aboutsummaryrefslogtreecommitdiff
path: root/saga/gamedesc_priv.h
blob: b017ba7a90aa9cf5abdf54c6f305b3155fea8baf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/* ScummVM - Scumm Interpreter
 * Copyright (C) 2003 The ScummVM project
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * $Header$
 *
 */

#ifndef SAGA_GAMEDESC_PRIV_H
#define SAGA_GAMEDESC_PRIV_H

#include "gamedesc.h"

namespace Saga {

//-------------------------------------------------------------------
// Private stuff 
//-------------------------------------------------------------------

#define R_GAME_LANGSTR_LIMIT 3
#define R_GAME_PATH_LIMIT 512

#define R_GAME_ITE_LANG_PREFIX "ite_"
#define R_GAME_LANG_EXT "lng"

/* Script lookup table entry sizes for game verification */
#define R_SCR_LUT_ENTRYLEN_ITECD 22
#define R_SCR_LUT_ENTRYLEN_ITEDISK 16

typedef bool (ResourceFile::*R_GAME_VERIFYFUNC)();

typedef struct R_GAME_FILEDESC_tag {
    const char *gf_fname;
    unsigned int gf_type;

} R_GAME_FILEDESC;

typedef struct R_GAMEDESC_tag {
    int gd_game_type;
    int gd_game_id;

    const char *gd_title;

    R_GAME_DISPLAYINFO *gd_display_info;

    int   gd_startscene;

    R_GAME_RESOURCEINFO *gd_resource_info;

    int              gd_filect;
    R_GAME_FILEDESC *gd_filedescs;
    
    int              gd_fontct;
    R_GAME_FONTDESC *gd_fontdescs;
    
    R_GAME_SOUNDINFO *gd_soundinfo;

    int gd_supported;

} R_GAMEDESC;


typedef struct R_GAME_FILEDATA_tag {
    ResourceFile *file_ctxt;

    unsigned int  file_types;
    unsigned int  file_flags;

} R_GAME_FILEDATA;


typedef struct R_GAMEMODULE_tag {
    int game_init;
    int game_index;
    
    R_GAMEDESC *gamedesc;

    int g_skipintro;

    const char *game_dir;
    
    char game_language[R_GAME_LANGSTR_LIMIT];

    unsigned int gfile_n;
    R_GAME_FILEDATA *gfile_data;

    unsigned int gd_fontct;
    R_GAME_FONTDESC *gd_fontdescs;

    int         err_n;
    const char *err_str;

} R_GAMEMODULE;

bool verifyITEDEMO();
bool verifyITEDISK();
bool verifyITECD();
bool verifyIHNMDEMO();
bool verifyIHNMCD();

} // End of namespace Saga

#endif // SAGA_GAMEDESC_PRIV_H