PokeParadox said:
If you look in StateTitle.cpp:
CODE
// The game needs to pass the following variables
/// 0 - PASS / FAIL 0 is fail 1 is pass
/// 1 - Game mode
/// 2 - CurrentStageNo for score purposes
/// 3 - Next stage for ordered progression
/// 4 - RemainingLives
variables.resize(7);
variables[0].setInt(1); // Pass/fail
variables[1].setInt(0); // 0 random, 1 ordered,2 selection
variables[2].setInt(0); // currentstage 0
variables[3].setInt(0); // Start at beginning
variables[4].setInt(3); // Start with 4 lives
variables[5].setInt(1); // difficulty?
variables[6].setInt(1); // First run?
I've implemented levels as a static member in my game's class. Unfortunately, a static member is just that -- it doesn't get reset except on initial game load. I can lose my game several times, enter my initials on the scoreboard, start the game again, and continue on the next level instead of starting over. Do you have any suggestions on a good way to fix this?
My best guess is: Whenever the player loses an episode of my game, check how many lives they have left. If it's 0, reset my level variable. Would variables[4] provide this information for me?
I think you're onto the right track, that should work. variables[4] does provide the lives yep.
Here is a better run-down of the variable slots.
CODE
variables[0].setInt(1); // Pass/fail - Game passing status
variables[1].setInt(0); // 0 random, 1 ordered,2 selection - game advancing mode
variables[2].setInt(0); // stage for score purposes
variables[3].setInt(0); // the next minigame to load
variables[4].setInt(3); // Start with 4 lives
variables[5].setInt(1); // difficulty?
variables[6].setInt(1); // First run - used to stop music playing all time in certain cases in StateMain
I don't think there is a much better way, but you could create an extra variable slot if you wanted.
PoisonedV said:
How can i use the NEON for single point floats?
I think it is a compiler flag. Regardless I don't know enough about it right now and I need to read up on it myself.