ScummVM API documentation
convert_usecode_u8.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 ULTIMA8_CONVERT_U8_CONVERTUSECODEU8_H
23 #define ULTIMA8_CONVERT_U8_CONVERTUSECODEU8_H
24 
25 #include "ultima/ultima8/convert/convert_usecode.h"
26 
27 namespace Ultima {
28 namespace Ultima8 {
29 
31 public:
32  const char* const *intrinsics() override { return _intrinsics; };
33  const char* const *event_names() override { return _event_names; };
34 
35 private:
36  static const char* const _intrinsics[];
37  static const char* const _event_names[];
38 };
39 
40 const char* const ConvertUsecodeU8::_intrinsics[] = {
41  // 0000
42  "process target()",
43  "Item::getNext()", // Unused
44  "Item::touch()",
45  "word Item::getX()",
46  "word Item::getY()",
47  "word Item::getZ()",
48  "word Item::getCX()",
49  "word Item::getCY()",
50  "word Item::getCZ()",
51  "word Item::Ultima8::getGumpX()", // Unused
52  "word Item::Ultima8::getGumpY()", // Unused
53  "void Item::setGumpXY(word x, word y)", // Unused
54  "Item::getPoint(WorldPoint*)",
55  "uword Item::getType()",
56  "void Item::setType(uword type)",
57  "uword Item::getFrame()",
58  // 0010
59  "void Item::setFrame(uword frame)",
60  "uword Item::getQuality()", // Get Q (Not generic familiy)
61  "uword Item::getUnkEggType()", // Get Q (UnkEgg family)
62  "uword Item::getQuantity()", // Get Q (Quantity or Reagent family)
63  "Item::getContents()", // Unused
64  "Item::getContainer()",
65  "Item::getRootContainer()",
66  "uword Item::getGlobNum()", // Get Q (GlobEgg family) - Unused
67  "void Item::setGlobNum(uword)", // Set Q (GlobEgg family) - Unused
68  "uword Item::getQ()", // Get Q
69  "void Item::setQ(uword)", // Set Q
70  "void Item::setQuality(word value)", // Set Q (Not generic familiy)
71  "void Item::setUnkEggType(word value)", // Set Q (UnkEgg family) - Unused
72  "void Item::setQuantity(word value)", // Set Q (Quantity and Reagent families)
73  "word Item::getFamily()",
74  "bool Item::getTypeFlag(word bit)", // Get TypeFlag (0 to 63 - not a mask!)
75  // 0020
76  "word Item::getStatus()", // Get Status Flags
77  "void Item::orStatus(word mask)", // Status |= mask;
78  "void Item::andStatus(word mask)", // Status &= mask;
79  "Item::getFootpad(word*, word*, word*)",
80  "Item::touches(uword)", // Unused
81  "Item::overlaps(uword)", // boundingbox Overlap in 3d
82  "Item::overlapsXY(uword)", // Unused
83  "Item::isOn(uword)", // 3dxy overlaps && other->ztop == this->zbot ???
84  "Item::isCompletelyOn(uword)", // Unused
85  "Item::isAbove(uword)", // Unused
86  "Item::isUnder(uword)", // Unused
87  "Item::ascend(word)", // used once
88  "Item::getWeight()",
89  "Item::getWeightIncludingContents()",
90  "Item::getSurfaceWeight()",
91  "Item::getVolume()", // Unused
92  // 0030
93  "Item::getCapacity()", // Unuses
94  "Item::legal_create(uword, uword, uword, uword, uword)",
95  "Item::create(uword, uword)",
96  "Item::legal_create(uword, uword, WorldPoint*)",
97  "Item::legal_create(uword, uword, uword, word)",
98  "Item::push()",
99  "Item::popToCoords(uword, uword, ubyte)",
100  "Item::popToContainer(uword)",
101  "Item::pop()",
102  "Item::popToEnd(uword)",
103  "Item::destroy()",
104  "Item::removeContents()",
105  "Item::destroyContents()",
106  "Item::isExplosive()",
107  "Item::move(uword, uword, ubyte)",
108  "Item::move(WorldPoint*)", // Unused
109  // 0040
110  "Item::legal_move(WorldPoint*, uword, uword)",
111  "Item::legal_move(uword*, uword)",
112  "Item::isNpc()",
113  "Item::isInNpc()", // Unused
114  "process Item::hurl(word, word, word, word)",
115  "Item::shoot(WorldPoint*, word, word)",
116  "Item::fall()",
117  "Item::grab()",
118  "Item::findTarget(word, word)", // Unused
119  "process Item::bark(char* str)",
120  "strptr process Item::ask(uword slist)",
121  "word Item::getSliderInput(word min, word max, word step)",
122  "Item::openGump(word)",
123  "Item::closeGump()",
124  "Item::isGumpOpen()", // Unused
125  "Item::getNpcArray()", // Unused
126  // 0050
127  "Item::getMapArray()",
128  "Item::setNpcArray(word)", // Unused
129  "Item::setMapArray(word)",
130  "Item::receiveHit(uword, byte, word, uword)",
131  "Item::explode()",
132  "Item::canReach(uword, word)",
133  "Item::getRange(uword)",
134  "Item::getRange(uword, uword, uword)", // Unused
135  "Item::getDirToCoords(uword, uword)",
136  "Item::getDirFromCoords(uword, uword)",
137  "Item::getDirToItem(uword)",
138  "Item::getDirFromItem(uword)",
139  "process Item::look()", // Call event 0x0
140  "process Item::use()", // Call event 0x1
141  "process Item::anim()", // Unused
142  "process Item::cachein()", // Unused
143  // 0060
144  "Item::hit(uword, word)", // Unused
145  "process Item::gotHit(uword, word)", // Call event ???
146  "process Item::release()", // Unused
147  "process Item::equip()", // Unused
148  "process Item::unequip()", // Unused
149  "process Item::combine()", // Unused
150  "process Item::calledFromAnim()", // Unused
151  "process Item::enterFastArea()", // Call event 0xF
152  "process Item::leaveFastArea()", // Unused
153  "process Item::cast(uword)", // Unused
154  "process Item::justMoved()", // Unused
155  "process Item::AvatarStoleSomething(uword)",// Unused
156  "process Item::animGetHit(uword)", // Unused
157  "process Item::guardianBark(word)", // Call event 0x15
158  "process Book::read(char*)",
159  "process Scroll::read(char*)",
160  // 0070
161  "process Grave::read(word,char*)",
162  "process Plaque::read(word,char*)",
163  "Egg::getEggXRange()",
164  "Egg::getEggYRange()",
165  "Egg::setEggXRange(uword)",
166  "Egg::setEggYRange(uword)", // Unused
167  "Egg::getEggId()",
168  "Egg::setEggId(uword)",
169  "Egg::hatch()", // Unused
170  "MonsterEgg::hatch()",
171  "MonsterEgg::getMonId()",
172  "MonsterEgg::getActivity()", // Unused
173  "MonsterEgg::getShapeType()", // Unused
174  "MonsterEgg::setMonId(word)", // Unused
175  "MonsterEgg::setActivity(word)", // Unused
176  "MonsterEgg::setShapeType(word)", // Unused
177  // 0080
178  "Npc::isBusy()",
179  "Npc::areEnemiesNear()",
180  "Npc::isInCombat()",
181  "Npc::setInCombat()",
182  "Npc::clrInCombat()",
183  "Npc::setTarget(uword)",
184  "Npc::getTarget()",
185  "Npc::setAlignment(ubyte)",
186  "Npc::getAlignment()", // Unused
187  "Npc::setEnemyAlignment(ubyte)",
188  "Npc::getEnemyAlignment()", // Unused
189  "Npc::isEnemy(uword)",
190  "Npc::isDead()",
191  "Npc::setDead()",
192  "Npc::clrDead()",
193  "Npc::isImmortal()", // Unused
194  // 0090
195  "Npc::setImmortal()",
196  "Npc::clrImmortal()",
197  "Npc::isWithstandDeath()", // Unused
198  "Npc::setWithstandDeath()",
199  "Npc::clrWithstandDeath()",
200  "Npc::isFeignDeath()", // Unused
201  "Npc::setFeignDeath()",
202  "Npc::clrFeignDeath()", // Unused
203  "Npc::freeEquip(uword)", // Unused
204  "Npc::clearEquip()", // Unused
205  "Npc::getNpcSlot()", // Unused
206  "Npc::freeNpcSlot()", // Unused
207  "Npc::getDir()",
208  "Npc::getMap()",
209  "Npc::teleport(uword, uword, ubyte, ubyte)",
210  "process Npc::doAnim(AnimSet, word, word, ubyte)",
211  // 00A0
212  "Npc::getLastAnimSet()",
213  "process Npc::pathfind(uword, uword, uword, uword)",
214  "process Npc::pathfind(uword, uword)",
215  "byte Npc::getStr()",
216  "byte Npc::getInt()",
217  "byte Npc::getDex()",
218  "ubyte Npc::getHp()",
219  "word Npc::getMana()",
220  "void Npc::setStr(byte str)",
221  "void Npc::setInt(byte int)",
222  "void Npc::setDex(byte dex)",
223  "void Npc::setHp(ubyte hp)",
224  "void Npc::setMana(word mana)",
225  "Npc::create(uword, uword)",
226  "process Npc::cSetActivity(Activity)",
227  "Npc::setAirWalkEnabled(ubyte)",
228  // 00B0
229  "Npc::getAirWalkEnabled()",
230  "Npc::schedule(ulong)",
231  "Npc::getEquip(word)",
232  "Npc::setEquip(word, uword)",
233  "closeAllGumps()",
234  "process Camera::scrollTo(uword, uword, ubyte, word)", // probably x, y, z, 'time'
235  "urandom(word)",
236  "rndRange(word,word)",
237  "castGrantPeaceSpell()",
238  "numToStr(uword)",
239  "strToNum(char*)", // Unused
240  "playMusic(byte)",
241  "getName()", // Returns the Avatar's name
242  "igniteChaos(uword, uword, ubyte)",
243  "Camera::setCenterOn(uword)",
244  "Camera::move_to(uword, uword, ubyte, word)",
245  // 00C0
246  "Camera::move_rel(word, word, word)", // Unused
247  "Camera::set_roof(word)", // Unused
248  "Camera::roof()", // Unused
249  "Camera::getX()", // Unused
250  "Camera::getY()", // Unused
251  "Camera::getZ()", // Unused
252  "Camera::startQuake(word)",
253  "Camera::stopQuake()",
254  "Camera::invertScreen(ubyte)",
255  "U8MousePointer::getDir()", // Unused
256  "Kernel::getNumProcesses(uword, ProcessType)",
257  "Kernel::resetRef(uword, ProcessType)",
258  "process teleportToEgg(word, word, ubyte)",
259  "resetRef(uword, uword)",
260  "setRef(uword, uword, uword)",
261  "getAvatarInStasis()",
262  // 00D0
263  "setAvatarInStasis(word)",
264  "getEtherealTop()",
265  "getCurrentTimerTick()",
266  "canGetThere(uword, uword, uword)", // Unused
267  "canExistAt(uword, uword, uword, uword, ubyte, uword, word)",
268  "createSprite(word, word, word, word, word, word, uword, uword, ubyte)",
269  "createSprite(word, word, word, word, uword, uword, ubyte)",
270  "word getFamilyOfType(uword type)",
271  "TimeInGameHours()",
272  "TimeInMinutes()",
273  "TimeInSeconds()", // Unused
274  "SetTimeInGameHours(word)",
275  "SetTimeInMinutes(long)", // Unused
276  "SetTimeInSeconds(long)", // unused
277  "process FadeToBlack()",
278  "process FadeFromBlack()",
279  // 00E0
280  "process FadeToPalette(word, word)",
281  "process LightningBolt()",
282  "process FadeToWhite()",
283  "process FadeFromWhite()",
284  "playEndgame()",
285  "FeedAvatar(word)",
286  "AccumulateStrength(word)", // Unused
287  "AccumulateIntelligence(word)",
288  "AccumulateDexterity(word)",
289  "ClrAvatarInCombat()",
290  "SetAvatarInCombat()",
291  "IsAvatarInCombat()", // Unused
292  "playSFX(word)",
293  "playSFX(word, ubyte)",
294  "playSFX(word, word, uword)",
295  "playAmbientSFX(word)", // Unused
296  // 00F0
297  "playAmbientSFX(word, word)", // Unused
298  "playAmbientSFX(word, word, uword)",
299  "isSFXPlaying(word)",
300  "setVolumeSFX(word, word)",
301  "stopSFX(word)",
302  "stopSFX(word, uword)",
303  "soundInit(word, word, word)", // Unused
304  "soundDeInit()", // Unused
305  "musicStop()",
306  "musicSlowStop()", // Unused
307  "musicPlay(word)", // Unused
308  "TonysBalls(word, word, uword, uword, uword)",
309  "AvatarCanCheat()",
310  "MakeAvatarACheater()",
311  "isGameRunning()",
312  "unused",
313  // 0100
314  "unused",
315  0
316 };
317 
318 const char * const ConvertUsecodeU8::_event_names[] = {
319  "look()", // 0x00
320  "use()", // 0x01
321  "anim()", // 0x02
322  "setActivity()", // 0x03
323  "cachein()", // 0x04
324  "hit(uword, word)", // 0x05
325  "gotHit(uword, word)", // 0x06
326  "hatch()", // 0x07
327  "schedule()", // 0x08
328  "release()", // 0x09
329  "equip()", // 0x0A
330  "unequip()", // 0x0B
331  "combine()", // 0x0C
332  "func0D", // 0x0D
333  "calledFromAnim()", // 0x0E
334  "enterFastArea()", // 0x0F
335 
336  "leaveFastArea()", // 0x10
337  "cast(uword)", // 0x11
338  "justMoved()", // 0x12
339  "AvatarStoleSomething(uword)", // 0x13
340  "animGetHit()", // 0x14
341  "guardianBark(word)", // 0x15
342  "func16", // 0x16
343  "func17", // 0x17
344  "func18", // 0x18
345  "func19", // 0x19
346  "func1A", // 0x1A
347  "func1B", // 0x1B
348  "func1C", // 0x1C
349  "func1D", // 0x1D
350  "func1E", // 0x1E
351  "func1F", // 0x1F
352  0
353 };
354 
355 } // End of namespace Ultima8
356 } // End of namespace Ultima
357 
358 #endif
Definition: convert_usecode.h:28
Definition: detection.h:27
Definition: convert_usecode_u8.h:30