From eec42d5418a4c2846e7abd3e44ffb860c4f527c8 Mon Sep 17 00:00:00 2001 From: ABelliqueux Date: Mon, 22 Mar 2021 14:39:47 +0100 Subject: [PATCH] a bit more cleanup --- 3dcam-tri-quads.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) 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){