Subversion Repositories plumbers

Rev

Rev 3 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. #ifndef PLUMBERS_GAMESTRUCT_HEADER
  2. #define PLUMBERS_GAMESTRUCT_HEADER
  3.  
  4. #include <stdint.h>
  5.  
  6. #define SCENEID_PREVDECISION 32767
  7. #define SCENEID_ENDGAME      -1
  8.  
  9. #define SEGMENT_BEGINNING 0
  10. #define SEGMENT_DECISION  1
  11.  
  12. #pragma pack(push, 1)
  13.  
  14. struct _coord {
  15.         int16_t     x;
  16.         int16_t     y;
  17. };
  18.  
  19. struct _actionDef {
  20.         int32_t     scoreDelta;
  21.         int16_t     nextSceneID;       // will jump to the scene with the name "SCxx", where xx stands for nextSceneID (2 digits at least)
  22.                                        // 7FFF (32767) = end game
  23.                                        // FFFF (   -1) = go back to the last decision
  24.         int16_t     sceneSegment;      // 0 = scene from beginning, 1 = decision page
  25.         _coord      cHotspotTopLeft;
  26.         _coord      cHotspotBottomRigh;
  27. };
  28.  
  29. struct _sceneDef {
  30.         int16_t     numPics;
  31.         int16_t     pictureIndex;
  32.         int16_t     numActions;
  33.         char        szSceneFolder[14]; // Foldername *must* be "SCxx" (case sensitive) where xx stands for a 2 digit ID
  34.         char        szDialogWav[14];
  35.         char        szDecisionBmp[14];
  36.         _actionDef  actions[3];
  37. };
  38.  
  39. struct _pictureDef {
  40.         int16_t     duration;          // deciseconds
  41.         char        szBitmapFile[14];
  42. };
  43.  
  44. struct _gameBinFile {
  45.         int16_t     unknown1[7];
  46.         int16_t     numScenes;
  47.         int16_t     numPics;
  48.         int16_t     unknown2[2];
  49.         _sceneDef   scenes[100];       // Scenes start at file position 0x0016
  50.         _pictureDef pictures[2000];    // Pictures start at file position 0x2596
  51. };
  52.  
  53. #pragma pack(pop)
  54.  
  55. #endif // PLUMBERS_GAMESTRUCT_HEADER
  56.