summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md26
-rw-r--r--src/fmt.rs1
-rw-r--r--src/main.rs61
3 files changed, 22 insertions, 66 deletions
diff --git a/README.md b/README.md
index 05b3200..08f9f2e 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,30 @@
-Rebuild is an attempt at reimplementing Ken Silverman's Build engine in Rust,
-with the goal of being modular enough to serve as the base for a modern Blood
-source port. The motivation comes from the fact that [BloodGDX][1], the current
-source port being recommended by many, is nonfree, and written in Java.
+An attempt at reimplementing Ken Silverman's Build engine, with the goal of
+being modular enough to host a modern Blood source port. The motivation comes
+from the fact that [BloodGDX][1], the current source port being recommended by
+many, is nonfree, and written in Java.
Additionally, existing source ports such as [EDuke32][2] which are built upon
Ken Silverman's codebase are filled with legacy cruft and are subject to the
restrictions of the BUILD license.
+No, I'm not on a zealous [RIIR][3] crusade. I'm mostly using this as an
+opportunity to learn about Rust and its ecosystem. Even if you have reservations
+about Rust, I'm willing to bet that you'd still prefer this to something written
+in Java.
+
+
+# Roadmap
+
+- [ ] Implement usable parsers for the various Build engine formats.
+ - [x] Implement a GRP loader.
+ - [ ] Implement a MAP parser.
+ - [ ] Implement an ART parser.
+ - [ ] Implement a VOX parser.
+ - [ ] Implement a PALETTE.DAT parser.
+ - [ ] Implement a TABLES.DAT parser.
+- [ ] Get Jon St. John to insult me in person (in Duke's voice).
+
[1]: https://blood-wiki.org/index.php/BloodGDX
[2]: http://eduke32.com/
+[3]: https://github.com/ansuz/RIIR
diff --git a/src/fmt.rs b/src/fmt.rs
index 61f53eb..2ce342e 100644
--- a/src/fmt.rs
+++ b/src/fmt.rs
@@ -8,7 +8,6 @@ use std::io::Read;
use self::byteorder::{ByteOrder, LittleEndian};
-
// The ".grp" file format is just a collection of a lot of files stored into 1 big
// one. I tried to make the format as simple as possible: The first 12 bytes
// contains my name, "KenSilverman". The next 4 bytes is the number of files that
diff --git a/src/main.rs b/src/main.rs
index 0c48e53..7bfdd82 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -5,67 +5,6 @@ use std::process;
mod fmt;
-// initgroupfile(char *filename)
-// {
-// char buf[16];
-// long i, j, k;
-
-// if (numgroupfiles >= MAXGROUPFILES) return(-1);
-
-// groupfil[numgroupfiles] = open(filename,O_BINARY|O_RDWR,S_IREAD);
-// if (groupfil[numgroupfiles] != -1)
-// {
-// groupfilpos[numgroupfiles] = 0;
-// read(groupfil[numgroupfiles],buf,16);
-// if ((buf[0] != 'K') || (buf[1] != 'e') || (buf[2] != 'n') ||
-// (buf[3] != 'S') || (buf[4] != 'i') || (buf[5] != 'l') ||
-// (buf[6] != 'v') || (buf[7] != 'e') || (buf[8] != 'r') ||
-// (buf[9] != 'm') || (buf[10] != 'a') || (buf[11] != 'n'))
-// {
-// close(groupfil[numgroupfiles]);
-// groupfil[numgroupfiles] = -1;
-// return(-1);
-// }
-// gnumfiles[numgroupfiles] = *((long *)&buf[12]);
-
-// if ((gfilelist[numgroupfiles] = (char *)kmalloc(gnumfiles[numgroupfiles]<<4)) == 0)
-// { printf("Not enough memory for file grouping system\n"); exit(0); }
-// if ((gfileoffs[numgroupfiles] = (long *)kmalloc((gnumfiles[numgroupfiles]+1)<<2)) == 0)
-// { printf("Not enough memory for file grouping system\n"); exit(0); }
-
-// read(groupfil[numgroupfiles],gfilelist[numgroupfiles],gnumfiles[numgroupfiles]<<4);
-
-// j = 0;
-// for(i=0;i<gnumfiles[numgroupfiles];i++)
-// {
-// k = *((long *)&gfilelist[numgroupfiles][(i<<4)+12]);
-// gfilelist[numgroupfiles][(i<<4)+12] = 0;
-// gfileoffs[numgroupfiles][i] = j;
-// j += k;
-// }
-// gfileoffs[numgroupfiles][gnumfiles[numgroupfiles]] = j;
-// }
-// numgroupfiles++;
-// return(groupfil[numgroupfiles-1]);
-// }
-
-
-// High-level description:
-// - Caches group files into an array with a rolling index.
-// - Keeps track of group file positions (pointer?) starts as 0.
-// - Keeps track of number of files in another array (gnumfiles)
-//
-// - Check header for "KenSilverman", invalidate entry in cache if bad.
-// - kmalloc 16 * number of files (for storing table)
-// - kmalloc 4 * (number of files + 1) (for storing individual file offsets)
-// - Read in table
-// - For every entry, read in the file size, and invalidate the entry.
-
-
-
-
-// -------
-
// void printstr(short x, short y, char string[81], char attribute)
// {
// char character;