a bit more cleanup

This commit is contained in:
ABelliqueux 2021-03-22 14:39:47 +01:00
parent 3a854d8ccd
commit eec42d5418

View File

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