Subversion Repositories plumbers

Rev

Rev 2 | Rev 12 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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