diff --git a/CMakeLists.txt b/CMakeLists.txt index 62db926..41d2d32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,10 +16,19 @@ psn00bsdk_add_executable(template STATIC main.c) psn00bsdk_target_incbin(template PRIVATE mdl_player player.ps1mdl) psn00bsdk_target_incbin(template PRIVATE tim_player_f player_f.tim) psn00bsdk_target_incbin(template PRIVATE tim_player_b player_b.tim) + psn00bsdk_target_incbin(template PRIVATE mdl_shambler shambler.ps1mdl) psn00bsdk_target_incbin(template PRIVATE tim_shambler_f shambler_f.tim) psn00bsdk_target_incbin(template PRIVATE tim_shambler_b shambler_b.tim) +psn00bsdk_target_incbin(template PRIVATE mdl_ogre ogre.ps1mdl) +psn00bsdk_target_incbin(template PRIVATE tim_ogre_f ogre_f.tim) +psn00bsdk_target_incbin(template PRIVATE tim_ogre_b ogre_b.tim) + +psn00bsdk_target_incbin(template PRIVATE mdl_quaddama quaddama.ps1mdl) +psn00bsdk_target_incbin(template PRIVATE tim_quaddama_f quaddama_f.tim) +psn00bsdk_target_incbin(template PRIVATE tim_quaddama_b quaddama_b.tim) + psn00bsdk_add_cd_image( iso # Target name template # Output file name (= template.bin + template.cue) diff --git a/main.c b/main.c index 130c9bc..4177530 100644 --- a/main.c +++ b/main.c @@ -51,6 +51,12 @@ extern u_long tim_player_b[]; extern u_long mdl_shambler[]; extern u_long tim_shambler_f[]; extern u_long tim_shambler_b[]; +extern u_long mdl_ogre[]; +extern u_long tim_ogre_f[]; +extern u_long tim_ogre_b[]; +extern u_long mdl_quaddama[]; +extern u_long tim_quaddama_f[]; +extern u_long tim_quaddama_b[]; typedef struct { @@ -76,9 +82,11 @@ typedef struct ps1texture_t front, back; } ps1skin_t; -ps1mdl_t playerModel = { .position = { -150, 0, 0 }, .rotation = { 0 } }; -ps1mdl_t shamblerModel = { .position = { 150, 0, 0 }, .rotation = { 0, 0, ONE >> 1, 0 } }; -ps1skin_t playerSkin, shamblerSkin; +ps1mdl_t playerModel = { .position = { -180, 0, 0 }, .rotation = { 0 } }; +ps1mdl_t shamblerModel = { .position = { 180, 0, 0 }, .rotation = { 0, 0, ONE >> 1, 0 } }; +ps1mdl_t ogreModel = { .position = { 0, 180, 0 }, .rotation = { 0, 0, (ONE * 3) >> 2, 0 } }; +ps1mdl_t quadModel = { .position = { -32, 0, 0 }, .rotation = { 0 } }; +ps1skin_t playerSkin, shamblerSkin, ogreSkin, quadSkin; const MATRIX identity = { ONE, 0, 0, @@ -204,6 +212,12 @@ void init(void) loadModel(mdl_shambler, &shamblerModel); loadSkin(tim_shambler_f, tim_shambler_b, &shamblerSkin); + loadModel(mdl_ogre, &ogreModel); + loadSkin(tim_ogre_f, tim_ogre_b, &ogreSkin); + + loadModel(mdl_quaddama, &quadModel); + loadSkin(tim_quaddama_f, tim_quaddama_b, &quadSkin); + InitGeom(); gte_SetGeomOffset(SCREENWIDTH >> 1, SCREENHEIGHT >> 1); gte_SetGeomScreen(180); // Screen depth for FOV control. Essentially the Z position of the vanishing point. @@ -521,6 +535,8 @@ void drawStuff(int counter) drawModel(&view_matrix, &playerModel, &playerSkin, counter >> 2); drawModel(&view_matrix, &shamblerModel, &shamblerSkin, counter >> 2); + //drawModel(&view_matrix, &ogreModel, &ogreSkin, counter >> 2); + drawModel(&view_matrix, &quadModel, &quadSkin, 0); } // Main function, program entrypoint @@ -535,7 +551,8 @@ int main(int argc, const char *argv[]) counter = 0; while(1) { - //playerModel.rotation.vz = (counter << 2) % ONE; + quadModel.rotation.vz = (counter << 5) % ONE; + quadModel.position.vz = (isin(counter << 6) * 32) >> 12; drawStuff(counter); diff --git a/ogre.ps1mdl b/ogre.ps1mdl new file mode 100644 index 0000000..8a7267d Binary files /dev/null and b/ogre.ps1mdl differ diff --git a/ogre_b.tim b/ogre_b.tim new file mode 100644 index 0000000..84d75f6 Binary files /dev/null and b/ogre_b.tim differ diff --git a/ogre_f.tim b/ogre_f.tim new file mode 100644 index 0000000..2ff6027 Binary files /dev/null and b/ogre_f.tim differ diff --git a/quaddama.ps1mdl b/quaddama.ps1mdl new file mode 100644 index 0000000..1c64696 Binary files /dev/null and b/quaddama.ps1mdl differ diff --git a/quaddama_b.tim b/quaddama_b.tim new file mode 100644 index 0000000..6e52f94 Binary files /dev/null and b/quaddama_b.tim differ diff --git a/quaddama_f.tim b/quaddama_f.tim new file mode 100644 index 0000000..a2484cf Binary files /dev/null and b/quaddama_f.tim differ