diff --git a/3dcam-tri-quads.c b/3dcam-tri-quads.c index 868016a..60b1e78 100644 --- a/3dcam-tri-quads.c +++ b/3dcam-tri-quads.c @@ -339,16 +339,8 @@ int main() { generateTable(); VSyncCallback(callback); - - //~ SetLightMatrix(&LLM); - - SetColorMatrix(&cmat); - - SetBackColor(BKc.vx,BKc.vy,BKc.vz); - - SetFarColor(BGc.r, BGc.g, BGc.b); - - SetFogNearFar(1200, 1600, SCREENXRES); + + // Load textures for (int k = 0; k < sizeof(meshes)/sizeof(TMESH *); k++){ @@ -356,13 +348,15 @@ int main() { } + // Load current BG + if (camPtr->tim_data){ LoadTexture(camPtr->tim_data, camPtr->BGtim); } - // physics + // Physics short physics = 1; @@ -376,7 +370,7 @@ int main() { VECTOR camAngleToAct = {0, 0, 0, 0}; // rotation angles for the camera to point at actor - // Sprite sustem + // Sprite system VECTOR posToCam = {0, 0, 0, 0}; @@ -390,6 +384,8 @@ int main() { int atime = 0; + // Polycount + for (int k = 0; k < sizeof(meshes)/sizeof(meshes[0]); k++){ triCount += meshes[k]->tmesh->len; @@ -1037,6 +1033,16 @@ void init() { FntOpen(16, 180, 240, 96, 0, 512); + // Lighting setup + + SetColorMatrix(&cmat); + + SetBackColor(BKc.vx,BKc.vy,BKc.vz); + + SetFarColor(BGc.r, BGc.g, BGc.b); + + SetFogNearFar(1200, 1600, SCREENXRES); + }; void display(void){