X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=helper.c;h=8135854e751bdd83c6c4f770ab6480ffa2a71e00;hp=34667ecfdf965887333e25c4784e49fe874c2601;hb=f8d40619ed0eba4ec9f0174f8bbf0981013185b0;hpb=f060b203a10568807bc3810b28628d28df8d74e4 diff --git a/helper.c b/helper.c index 34667ec..8135854 100644 --- a/helper.c +++ b/helper.c @@ -363,4 +363,24 @@ void updateLights() { } glEnable(GL_LIGHTING); +} + +/** + * Sets variables to the state they are in to begin with. + */ +void initializeState() { + /* Initial light 0 position. */ + lightObjs[0].position[0] = 4; + lightObjs[0].position[1] = 5; + lightObjs[0].position[2] = 6; + lightObjs[0].position[3] = 0.0; + + /* Initial light 1 position. */ + lightObjs[1].position[0] = -4; + lightObjs[1].position[1] = 5; + lightObjs[1].position[2] = -6; + lightObjs[1].position[3] = 0.0; + + /* Initial floor texture */ + currentGroundTexture = 5; } \ No newline at end of file