Subversion Repositories plumbers

Rev

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