|
|
@ -51,6 +51,12 @@ extern u_long tim_player_b[]; |
|
|
extern u_long mdl_shambler[]; |
|
|
extern u_long mdl_shambler[]; |
|
|
extern u_long tim_shambler_f[]; |
|
|
extern u_long tim_shambler_f[]; |
|
|
extern u_long tim_shambler_b[]; |
|
|
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 |
|
|
typedef struct |
|
|
{ |
|
|
{ |
|
|
@ -76,9 +82,11 @@ typedef struct |
|
|
ps1texture_t front, back; |
|
|
ps1texture_t front, back; |
|
|
} ps1skin_t; |
|
|
} 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 = { |
|
|
const MATRIX identity = { |
|
|
ONE, 0, 0, |
|
|
ONE, 0, 0, |
|
|
@ -204,6 +212,12 @@ void init(void) |
|
|
loadModel(mdl_shambler, &shamblerModel); |
|
|
loadModel(mdl_shambler, &shamblerModel); |
|
|
loadSkin(tim_shambler_f, tim_shambler_b, &shamblerSkin); |
|
|
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(); |
|
|
InitGeom(); |
|
|
gte_SetGeomOffset(SCREENWIDTH >> 1, SCREENHEIGHT >> 1); |
|
|
gte_SetGeomOffset(SCREENWIDTH >> 1, SCREENHEIGHT >> 1); |
|
|
gte_SetGeomScreen(180); // Screen depth for FOV control. Essentially the Z position of the vanishing point. |
|
|
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, &playerModel, &playerSkin, counter >> 2); |
|
|
drawModel(&view_matrix, &shamblerModel, &shamblerSkin, 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 |
|
|
// Main function, program entrypoint |
|
|
@ -535,7 +551,8 @@ int main(int argc, const char *argv[]) |
|
|
counter = 0; |
|
|
counter = 0; |
|
|
while(1) |
|
|
while(1) |
|
|
{ |
|
|
{ |
|
|
//playerModel.rotation.vz = (counter << 2) % ONE; |
|
|
|
|
|
|
|
|
quadModel.rotation.vz = (counter << 5) % ONE; |
|
|
|
|
|
quadModel.position.vz = (isin(counter << 6) * 32) >> 12; |
|
|
|
|
|
|
|
|
drawStuff(counter); |
|
|
drawStuff(counter); |
|
|
|
|
|
|
|
|
|