I have been working this weekend with the save/load functions.
I tried with the Thor code and simple example. Load the game, save the data, restart and load the saved data (all this in NeoPop)
Apparently nothing happened. If I check a value in the data array, not has any value when I retrive the data. This should work on emulator? Or only on flash carth? I have a bung flash cart but I'm not tried it yet.
I'm doing this:
I tried with the Thor code and simple example. Load the game, save the data, restart and load the saved data (all this in NeoPop)
Apparently nothing happened. If I check a value in the data array, not has any value when I retrive the data. This should work on emulator? Or only on flash carth? I have a bung flash cart but I'm not tried it yet.
I'm doing this:
Code:
data[0] = 0;
data[1] = 2; //Future value to check
data[2] = 5;
data[3] = 1;
data[4] = 1;
flash(data); //Erase and save the data
data[0] = 0;
data[1] = 0; //Reset values to 0
data[2] = 0;
data[3] = 0;
data[4] = 0;
getSavedData(); //Load the data
if(data[1] == 2){ //Not equals? why?
SetBackgroundColour(RGB2NGPColor(255,0,0)); //Red background color
} else {
SetBackgroundColour(RGB2NGPColor(170,141,122)); //Brown background color
}
