summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob L. Kreuze <jakob@memeware.net>2018-06-01 20:37:53 -0400
committerJakob L. Kreuze <jakob@memeware.net>2018-06-01 20:37:53 -0400
commit814cf89647ff6d3c71da79191722eceb9c9a846b (patch)
treebec9bd738859ad833d628e83ddcdf9e5a70effc4
parent20c791ebe6526eec175cf83ec1f60d9c4eaa2e67 (diff)
Add copyright information
-rw-r--r--README.md5
-rw-r--r--src/defs.rs16
-rw-r--r--src/fmt.rs21
-rw-r--r--src/game_vars.rs34
-rw-r--r--src/main.rs16
-rw-r--r--src/path.rs16
-rw-r--r--src/renderer.rs47
-rw-r--r--src/timer.rs16
8 files changed, 170 insertions, 1 deletions
diff --git a/README.md b/README.md
index ead7a96..b4c8606 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,10 @@ BUILD license.
- [x] GRP parser.
- [x] Caching system.
- [ ] Proper path resolution.
-- [ ] Implement a timer.
+- [ ] Implement support for RTS. (?)
+ - Appears to be a Doom iwad, though I'm not sure what its purpose is.
+- [ ] Implement a timer system.
+ - Needs to expose some sort of 'totalclock'.
- [ ] Implement support for ART bitmaps.
- [ ] PALETTE.DAT parser.
- [ ] ART parser.
diff --git a/src/defs.rs b/src/defs.rs
index 37dd5a1..47000eb 100644
--- a/src/defs.rs
+++ b/src/defs.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2018 Jakob L. Kreuze, All Rights Reserved.
+//
+// This file is part of rebuild.
+//
+// rebuild is free software: you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the Free Software
+// Foundation, either version 3 of the License, or (at your option) any later
+// version.
+//
+// rebuild is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+// A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along with
+// rebuild. If not, see <http://www.gnu.org/licenses/>.
+
// Straight ripped from DUKE3D.H
pub struct UserDefs {
diff --git a/src/fmt.rs b/src/fmt.rs
index a838de6..bd34962 100644
--- a/src/fmt.rs
+++ b/src/fmt.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2018 Jakob L. Kreuze, All Rights Reserved.
+//
+// This file is part of rebuild.
+//
+// rebuild is free software: you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the Free Software
+// Foundation, either version 3 of the License, or (at your option) any later
+// version.
+//
+// rebuild is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+// A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along with
+// rebuild. If not, see <http://www.gnu.org/licenses/>.
+
extern crate byteorder;
extern crate simple_error;
@@ -298,6 +314,11 @@ mod grp_tests {
// shades. The problem is that my palette conversion program never truncated off
// the end of the file. So the last 8K of Duke3D's PALETTE.DAT is the last 8K of
// a translucent table that was based on an older version of their palette.
+//
+//
+// For canonical parsers, see:
+// - 'paletteLoadFromDisk' in EDuke's 'build/src/palette.cpp'
+// - 'loadpalette' in Build's 'ENGINE.C'
/// Parser for PALETTE.DAT, the file specifying the color format.
pub struct Palette {
diff --git a/src/game_vars.rs b/src/game_vars.rs
new file mode 100644
index 0000000..a4538d7
--- /dev/null
+++ b/src/game_vars.rs
@@ -0,0 +1,34 @@
+// Copyright (C) 2018 Jakob L. Kreuze, All Rights Reserved.
+//
+// This file is part of rebuild.
+//
+// rebuild is free software: you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the Free Software
+// Foundation, either version 3 of the License, or (at your option) any later
+// version.
+//
+// rebuild is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+// A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along with
+// rebuild. If not, see <http://www.gnu.org/licenses/>.
+
+use std::collections::HashMap;
+
+pub enum GameVar {
+ String(string),
+}
+
+// TODO: Document this.
+// TODO: Rename?
+pub struct GameVarManager {
+ vars: HashMap<String,
+}
+
+impl GameVars {
+ // TODO: Document this.
+ pub fn new() -> GameVars {
+ GameVars { }
+ }
+}
diff --git a/src/main.rs b/src/main.rs
index b60030e..d54bfea 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2018 Jakob L. Kreuze, All Rights Reserved.
+//
+// This file is part of rebuild.
+//
+// rebuild is free software: you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the Free Software
+// Foundation, either version 3 of the License, or (at your option) any later
+// version.
+//
+// rebuild is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+// A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along with
+// rebuild. If not, see <http://www.gnu.org/licenses/>.
+
#[macro_use]
extern crate simple_error;
diff --git a/src/path.rs b/src/path.rs
index 5fb5875..e53fe50 100644
--- a/src/path.rs
+++ b/src/path.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2018 Jakob L. Kreuze, All Rights Reserved.
+//
+// This file is part of rebuild.
+//
+// rebuild is free software: you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the Free Software
+// Foundation, either version 3 of the License, or (at your option) any later
+// version.
+//
+// rebuild is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+// A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along with
+// rebuild. If not, see <http://www.gnu.org/licenses/>.
+
use std::env;
use std::error::Error;
use std::path::Path;
diff --git a/src/renderer.rs b/src/renderer.rs
new file mode 100644
index 0000000..1f0d09f
--- /dev/null
+++ b/src/renderer.rs
@@ -0,0 +1,47 @@
+// Copyright (C) 2018 Jakob L. Kreuze, All Rights Reserved.
+//
+// This file is part of rebuild.
+//
+// rebuild is free software: you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the Free Software
+// Foundation, either version 3 of the License, or (at your option) any later
+// version.
+//
+// rebuild is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+// A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along with
+// rebuild. If not, see <http://www.gnu.org/licenses/>.
+
+extern crate sdl2;
+
+pub trait Renderer {
+ pub fn new() -> Self;
+
+ // FIXME: Error handling?
+ pub fn window_title(title: &str);
+
+ pub fn draw_rooms(player_num: i32, smooth_ratio: i32);
+}
+
+// TODO: Document this.
+pub struct ClassicRenderer;
+
+impl Renderer for ClassicRenderer {
+ // TODO: Document this.
+ // FIXME: Proper error handling.
+ pub fn new() -> ClassicRenderer {
+ // let context = sdl2::init().unwrap();
+ // let video_subsystem = context.video().unwrap();
+
+ // let display = video_subsystem.window("SDL2", 800, 600)
+ // // .resizable()
+ // // .build_glium()
+ // .unwrap();
+
+ ClassicRenderer { }
+ }
+
+ pub fn window_title()
+}
diff --git a/src/timer.rs b/src/timer.rs
index f34df8d..1ad1ac5 100644
--- a/src/timer.rs
+++ b/src/timer.rs
@@ -1,3 +1,19 @@
+// Copyright (C) 2018 Jakob L. Kreuze, All Rights Reserved.
+//
+// This file is part of rebuild.
+//
+// rebuild is free software: you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the Free Software
+// Foundation, either version 3 of the License, or (at your option) any later
+// version.
+//
+// rebuild is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+// A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along with
+// rebuild. If not, see <http://www.gnu.org/licenses/>.
+
extern crate sdl2;
use sdl2::TimerSubsystem;