ScummVM API documentation
encount.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef BAGEL_METAGAME_GTL_ENCOUNT_H
23 #define BAGEL_METAGAME_GTL_ENCOUNT_H
24 
25 #include "bagel/hodjnpodj/metagame/bgen/mgstat.h"
26 #include "bagel/hodjnpodj/metagame/bgen/invent.h"
27 
28 namespace Bagel {
29 namespace HodjNPodj {
30 namespace Metagame {
31 namespace Gtl {
32 
33 #define TRAP_PER_SECTOR 2
34 #define NARR_PER_SECTOR 8
35 #define MG_TRAP_COUNT 60
36 #define MG_NARR_COUNT 180
37 #define MG_ENC_COUNT (MG_TRAP_COUNT + MG_NARR_COUNT)
38 
39 #define TRAP_PROB 20 // 20% of the time, set a trap ( 2 out of 10 times )
40 #define NARR_PROB 3 // 3 * number of steps
41 #define PROB_FACTOR 10 // raise percentages by a factor of ten
42 #define RAND_FACTOR 100 // 100%
43 
44 #define MG_ACT_HODJ 288
45 #define MG_ACT_PODJ 289
46 
47 // Value of Two objects, MISH and MOSH
48 #define ENC_MISHMOSH 2
49 
50 // Input whether they want a boobytrap or narration
51 #define ENC_BOOBYTRAP 0
52 #define ENC_NARRATION 1
53 
54 // RETURN values for the DoEncounter function
55 #define ENC_DO_NOTHING 0
56 #define ENC_LOSE_TURN 1
57 #define ENC_GAIN_TURN 2
58 
59 #define MAX_ACTIONS 5
60 
61 
62 // CEncounterTable definition, used for both Booby Traps and Colour Narrations
63 
65 public:
66  int m_iSectorCode ; // MG_SECTOR_xxxx: sector code
67  const char *m_lpszWavEFile; // name of 8-bit sound file (*m_pItemSoundPath)
68  int m_Actions[MAX_ACTIONS]; // string of action codes, set to nullptr for Colour Narrations
69  const char *m_lpszText ; // text of booby trap
70 } ;
71 
72 
73 int DoEncounter(CWnd *pWnd, CPalette *pPalette, bool bHodj, CInventory *pInventory,
74  CInventory *pPawn, CInventory *pGeneral,
75  int EncType, int nNumSteps,
76  int nPSector, int nOSector, bool *pArray);
77 
78 } // namespace Gtl
79 } // namespace Metagame
80 } // namespace HodjNPodj
81 } // namespace Bagel
82 
83 #endif
Definition: afxwin.h:1125
Definition: afxwin.h:655
Definition: afxwin.h:27