Advertisement
smc_gamer

SML Save Format 1 - Standalone Player

Jul 5th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.05 KB | None | 0 0
  1. // SML Save File Format
  2. // For Standalone Levels
  3. // Revision 1, by Celarix (7/5/2012)
  4.  
  5. /* Now, this one's a bit (well, a lot) different from the world file format.
  6.  * In order to prevent (or at least discourage) cheating, I'm going to use
  7.  * the BinaryReader class (http://msdn.microsoft.com/en-us/library/system.io.binaryreader.aspx)
  8.  * to store the necessary values.  Below is a list of what data there will be and what format
  9.  * it'll be in.  I'll do the same for the other save files formats.
  10.  */
  11.  
  12. byte type = 0; // 0 = standalone level, 1 = standalone world, 2 = uses project file
  13. bool midpointCleared; // Has the midpoint been cleared?
  14. short players; // The number of players in this particular level
  15. PlayerSaveSettings[] playerSaveSettings; // stores each player's save settings (see below for the details)
  16. bool isNetworkGame; // if the game is hosted on a LAN or online
  17. int collectiblesCollected; // how many collectibles (i.e. Yoshi coins) have been collected
  18.  
  19. public struct PlayerSaveSettings
  20. {
  21.     short lives; // The number of lives the player has
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement