aboutsummaryrefslogtreecommitdiff
path: root/init.cpp
blob: 67f6515bf67a6a1dea648a42a84726d0366f72a3 (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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
/* ScummVM - Scumm Interpreter
 * Copyright (C) 2001  Ludvig Strigeus
 * Copyright (C) 2001/2002 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$
 *
 */

#include"stdafx.h"
#include"scumm.h"

Scumm::Scumm(void)
{	
	/* Initilize all our stuff */
	memset(&res, 0, sizeof(res));
	memset(&vm, 0, sizeof(vm));
	memset(&camera, 0, sizeof(camera));
	memset(&mouse, 0, sizeof(mouse));
	memset(&string, 0, sizeof(string));
	memset(&_mixer_channel, 0, sizeof(_mixer_channel));
	memset(&charset, 0, sizeof(charset));
	memset(&actor, 0, sizeof(actor));
	memset(&sentence, 0, sizeof(sentence));
	
	//memset(_objs, 0, sizeof(_objs));
	memset(_colorCycle, 0, sizeof(_colorCycle));        
	memset(_mouthSyncTimes, 0, sizeof(_mouthSyncTimes));        

	/* Initialize the sound queues */
	clearSoundQue();

		_resFilePath=0;
        _resFilePrefix=0;
        _scummStackPos=0;
        _verbMouseOver=0;

        _palDirtyMax=0;
        _palDirtyMin=0;
        _debugger=0;

        _xPos = 0;
        _yPos = 0;
        _dir = 0;

        _resultVarNumber = 0;
        delta=0;
        _soundEngine=0;
        _gui=0;

        _verbs=0;
        _objs=0;
        _debugger=0;

        _inventory=0;
        _arrays=0;
        _newNames=0;
        _vars=0;
        _varwatch=0;
        _bitVars=0;

        _talk_sound_mode=0;
        _talk_sound_a = 0;
        _talk_sound_b = 0;

        _curActor = 0;
        _curExecScript = 0;
        _curPalIndex = 0;
        _curVerb = 0;
        _curVerbSlot = 0;
        _currentScript = 0;
        _currentRoom = 0;

        _midi_driver = 0;
        _curSoundPos = 0;
        _soundQuePos = 0;
        _soundQue2Pos = 0;
        _soundParam = 0;
        _soundParam2 = 0;
        _soundParam3 = 0;
		_soundsPaused = 0;
		_soundsPaused2 = 0;
        current_cd_sound = 0;
        num_sound_effects = 0;
        _noSubtitles = 0;

        _screenEffectFlag = 0;
        _switchRoomEffect = 0;
        _switchRoomEffect2 = 0;
        _screenLeft = 0;
        _screenTop = 0;

        _enqueue_b = 0;
        _enqueue_c = 0;
        _enqueue_d = 0;
        _enqueue_e = 0;

        _palManipCounter = 0;
        _palManipStart = 0;
        _palManipEnd = 0;

        

        _CLUT_offs = 0;
        _ENCD_offs = 0;
        _EPAL_offs = 0;
        _IM00_offs = 0;
        _PALS_offs = 0;

        _fastMode = 0;

        
        _charsetColor = 0;

        _insaneFlag = 12;
        _insaneState = 0;


		_haveMsg = 0;
		_talkDelay = 0;
		_defaultTalkDelay = 0;
		_useTalkAnims = 0;
		_endOfMouthSync = 0;
		_mouthSyncMode = 0;

		_lastLoadedRoom = -1; /* This to be sure that the check in openRoom will fail */
		_roomResource = 0;
		_dynamicRoomOffsets = 0; /* This seems to be a reasonable default value :-) */

		gdi._mask_left = -1; /* Taken from saveload.cpp */
		gdi._disable_zbuffer = false; /* By default, ZBuffer should be on */
		gdi._cursorActive = 0; /* Maybe false ? */
		_cursorAnimate = 0; /* Reasonable default too I hope */
		_cursorAnimateIndex = 0; /* Absolutely no idea what THAT should have as a default value */
		_sfxMode = 0; /* Still same comment :-) */
		_saveLoadFlag = 0;
		_completeScreenRedraw = false; /* Maybe it should be true to force a full redraw on start ? */
		_expire_counter = 0; /* Start expired (0xFF) or not ? */
		_leftBtnPressed = 0;
		_rightBtnPressed = 0;
		_lastKeyHit = 0;
		_cdrom = 0;
}