reading/writing save states

Squall Leonhart
Posting Freak
Posts: 1223
Joined: Tue Mar 18, 2008 9:21 am

reading/writing save states

Post by Squall Leonhart »

so the int should be dynamic, rather then static?

spacy51
Senior Member
Posts: 371
Joined: Tue Mar 18, 2008 4:59 pm

reading/writing save states

Post by spacy51 »

so the int should be dynamic, rather then static?

 

No, the other way round. Instead of sizeof(int), which may vary depending on the compiler/platform, we should use a static number of bytes per value, and declare the file as little-endian.

Squall Leonhart
Posting Freak
Posts: 1223
Joined: Tue Mar 18, 2008 9:21 am

reading/writing save states

Post by Squall Leonhart »

oh, that makes complete sense now.

lanceaugust31
Junior Member
Posts: 1
Joined: Mon Aug 31, 2009 12:27 pm

reading/writing save states

Post by lanceaugust31 »

When reading or writing to a save state, the core uses sizeof() to determine the number of bytes to read. what should we do if in that case? :badger:

 

 


Freelance writing

Post Reply