X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=helper.c;h=ced188919795911e88b13a9ef7369a45d2f720d7;hp=34667ecfdf965887333e25c4784e49fe874c2601;hb=122af2fd7820eda3af7a3b1dea9e2368ef3fca23;hpb=f35856ff3c184a948587637fd43206c901032426;ds=inline diff --git a/helper.c b/helper.c index 34667ec..ced1889 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 = 3; } \ No newline at end of file