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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
|
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $URL$
* $Id$
*
*/
#include "kyra/lol.h"
#include "kyra/screen_lol.h"
#include "kyra/resource.h"
#include "common/endian.h"
namespace Kyra {
void LoLEngine::runInitScript(const char *filename, int func) {
EMCData scriptData;
EMCState scriptState;
memset(&scriptData, 0, sizeof(EMCData));
_emc->load(filename, &scriptData, &_opcodes);
_emc->init(&scriptState, &scriptData);
_emc->start(&scriptState, 0);
while (_emc->isValid(&scriptState))
_emc->run(&scriptState);
if (func) {
_emc->init(&scriptState, &scriptData);
_emc->start(&scriptState, func);
while (_emc->isValid(&scriptState))
_emc->run(&scriptState);
}
_emc->unload(&scriptData);
}
void LoLEngine::runInfScript(const char *filename) {
_emc->load(filename, &_scriptData, &_opcodes);
runResidentScript(0x400, -1);
}
void LoLEngine::runResidentScript(int func, int reg0) {
runResidentScriptCustom(func, reg0, -1, 0, 0, 0);
}
void LoLEngine::runResidentScriptCustom(int func, int reg0, int reg1, int reg2, int reg3, int reg4) {
EMCState scriptState;
memset(&scriptState, 0, sizeof(EMCState));
if (!_scriptBoolSkipExec) {
_emc->init(&scriptState, &_scriptData);
_emc->start(&scriptState, func);
scriptState.regs[0] = reg0;
scriptState.regs[1] = reg1;
scriptState.regs[2] = reg2;
scriptState.regs[3] = reg3;
scriptState.regs[4] = reg4;
scriptState.regs[5] = func;
scriptState.regs[6] = _unkScriptByte;
while (_emc->isValid(&scriptState))
_emc->run(&scriptState);
}
checkScriptUnk(func);
}
bool LoLEngine::checkScriptUnk(int func) {
if (_boolScriptFuncDone)
return true;
for (int i = 0; i < 15; i++) {
if (_scriptExecutedFuncs[i] == func) {
_boolScriptFuncDone = true;
return true;
}
}
if (_currentBlock == func){
_boolScriptFuncDone = true;
return true;
}
return false;
}
int LoLEngine::olol_setGameFlag(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_setGameFlag(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1));
if (stackPos(1))
_gameFlags[stackPos(0) >> 4] |= (1 << (stackPos(0) & 0x0f));
else
_gameFlags[stackPos(0) >> 4] &= (~(1 << (stackPos(0) & 0x0f)));
return 1;
}
int LoLEngine::olol_testGameFlag(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_testGameFlag(%p) (%d)", (const void *)script, stackPos(0));
if (!stackPos(0))
return 0;
if (_gameFlags[stackPos(0) >> 4] & (1 << (stackPos(0) & 0x0f)))
return 1;
return 0;
}
int LoLEngine::olol_loadLevelGraphics(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_loadLevelGraphics(%p) (%s, %d, %d, %d, %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5));
loadLevelGraphics(stackPosString(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), (stackPos(5) == -1) ? 0 : stackPosString(5));
return 1;
}
int LoLEngine::olol_loadCmzFile(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_loadCmzFile(%p) (%s)", (const void *)script, stackPosString(0));
loadCmzFile(stackPosString(0));
return 1;
}
int LoLEngine::olol_loadMonsterShapes(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_loadMonsterShapes(%p) (%s, %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2));
loadMonsterShapes(stackPosString(0), stackPos(1), stackPos(2));
return 1;
}
int LoLEngine::olol_allocItemPropertiesBuffer(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_allocItemPropertiesBuffer(%p) (%d)", (const void *)script, stackPos(0));
delete[] _itemProperties;
_itemProperties = new ItemProperty[stackPos(0)];
return 1;
}
int LoLEngine::olol_setItemProperty(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_setItemProperty(%p) (%d, %d, %d, %d, %d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6), stackPos(7), stackPos(8), stackPos(9));
ItemProperty *tmp = &_itemProperties[stackPos(0)];
tmp->nameStringId = stackPos(1);
tmp->shpIndex = stackPos(2);
tmp->unk5 = stackPos(3);
tmp->itemScriptFunc = stackPos(4);
tmp->unk8 = stackPos(5);
tmp->unk9 = stackPos(6);
tmp->unkA = stackPos(7);
tmp->flags = stackPos(8);
tmp->unkB = stackPos(9);
return 1;
}
int LoLEngine::olol_makeItem(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_makeItem(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2));
return makeItem(stackPos(0), stackPos(1), stackPos(2));
}
int LoLEngine::olol_getItemPara(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_getItemPara(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1));
if (!stackPos(0))
return 0;
ItemInPlay *i = &_itemsInPlay[stackPos(0)];
ItemProperty *p = &_itemProperties[i->itemPropertyIndex];
switch (stackPos(1)) {
case 0:
return i->blockPropertyIndex;
case 1:
return i->unk7;
case 2:
return i->anonymous_4;
case 3:
return i->level;
case 4:
return i->itemPropertyIndex;
case 5:
return i->shpCurFrame_flg;
case 6:
return p->nameStringId;
case 7:
break;
case 8:
return p->shpIndex;
case 9:
return p->unk5;
case 10:
return p->itemScriptFunc;
case 11:
case 12:
case 13:
return p[stackPos(1)].unkB & 0x0f;
case 14:
return p->unkB;
case 15:
return i->shpCurFrame_flg & 0x1fff;
case 16:
return p->flags;
case 17:
return (p->unk9 << 8) | p->unk8;
default:
break;
}
return -1;
}
int LoLEngine::olol_getCharacterStat(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_getCharacterStat(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2));
LoLCharacter *c = &_characters[stackPos(0)];
int d = stackPos(2);
switch (stackPos(1)) {
case 0:
return c->flags;
case 1:
return c->raceClassSex;
case 2:
case 3:
case 4:
default:
break;
case 5:
return c->hitPointsCur;
case 6:
return c->hitPointsMax;
case 7:
return c->magicPointsCur;
case 8:
return c->magicPointsMax;
case 9:
return c->field_37;
case 10:
return c->items[d];
case 11:
return c->field_66[d] + c->field_69[d];
case 12:
return c->field_27[d];
case 13:
return (d & 0x80) ? c->field_25 : c->field_17[d];
case 14:
return c->field_69[d];
case 15:
return c->id;
}
return 0;
}
int LoLEngine::olol_setCharacterStat(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_setCharacterStat(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3));
LoLCharacter *c = &_characters[stackPos(0)];
int d = stackPos(2);
int e = stackPos(3);
// FIXME: This looks really strange, especially why for example
// case 8 should fall through till case 10. case 8 seems to handle
// max magic points settings, while case 10 seems to remove an
// item from the inventory of a character. If it should really
// fall through please add "// fall through" at the end of the
// case.
switch (stackPos(1)) {
case 0:
c->flags = e;
case 1:
c->raceClassSex = e & 0x0f;
case 2:
case 3:
case 4:
default:
break;
case 5:
//// TODO
break;
case 6:
c->hitPointsMax = e;
case 7:
//// TODO
break;
case 8:
c->magicPointsMax = e;
case 9:
c->field_37 = e;
case 10:
c->items[d] = 0;
case 11:
c->field_66[d] = e;
case 12:
c->field_27[d] = e;
case 13:
if (d & 0x80)
c->field_25 = e;
else
c->field_17[d] = e;
case 14:
c->field_69[d] = e;
}
return 0;
}
int LoLEngine::olol_loadLevelShapes(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_loadLevelShapes(%p) (%s, %s)", (const void *)script, stackPosString(0), stackPosString(1));
loadLevelShpDat(stackPosString(0), stackPosString(1), true);
return 1;
}
int LoLEngine::olol_closeLevelShapeFile(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_closeLevelShapeFile(%p) ()", (const void *)script);
delete _lvlShpFileHandle;
_lvlShpFileHandle = 0;
return 1;
}
int LoLEngine::olol_loadDoorShapes(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_loadDoorShapes(%p) (%s, %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2));
_screen->loadBitmap(stackPosString(0), 3, 3, 0);
const uint8 *p = _screen->getCPagePtr(2);
if (_doorShapes[0])
delete[] _doorShapes[0];
_doorShapes[0] = _screen->makeShapeCopy(p, stackPos(1));
if (_doorShapes[1])
delete[] _doorShapes[1];
_doorShapes[1] = _screen->makeShapeCopy(p, stackPos(2));
for (int i = 0; i < 20; i++) {
_wllWallFlags[i + 3] |= 7;
int t = i % 5;
if (t == 4)
_wllWallFlags[i + 3] &= 0xf8;
if (t == 3)
_wllWallFlags[i + 3] &= 0xfd;
}
if (stackPos(3)) {
for (int i = 3; i < 13; i++)
_wllWallFlags[i] &= 0xfd;
}
if (stackPos(4)) {
for (int i = 13; i < 23; i++)
_wllWallFlags[i] &= 0xfd;
}
return 1;
}
int LoLEngine::olol_setMusicTrack(EMCState *script) {
_curMusicTheme = stackPos(0);
return 1;
}
int LoLEngine::olol_getUnkArrayVal(EMCState *script) {
return _unkEMC46[stackPos(0)];
}
int LoLEngine::olol_setUnkArrayVal(EMCState *script) {
_unkEMC46[stackPos(0)] = stackPos(1);
return 1;
}
int LoLEngine::olol_setGlobalVar(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_setGlobalVar(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2));
//uint16 a = stackPos(1);
uint16 b = stackPos(2);
switch (stackPos(0)) {
case 0:
_currentBlock = b;
setLF1(_unkCmzU1, _unkCmzU2, _currentBlock, 0x80, 0x80);
setLF2(_currentBlock);
break;
case 1:
_currentDirection = b;
break;
case 2:
_currentLevel = b & 0xff;
break;
case 3:
break;
case 4:
_brightness = b & 0xff;
break;
case 5:
_credits = b;
break;
case 6:
//TODO
break;
case 7:
break;
case 8:
_charFlagUnk = b;
//TODO
break;
case 9:
_lampStatusUnk = b & 0xff;
break;
case 10:
_loadLevelFlag2 = b & 0xff;
//TODO
break;
case 11:
//TODO
break;
case 12:
//TODO
break;
default:
break;
}
return 1;
}
int LoLEngine::olol_mapShapeToBlock(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_mapShapeToBlock(%p) (%d)", (const void *)script, stackPos(0));
return assignLevelShapes(stackPos(0));
}
int LoLEngine::olol_resetBlockShapeAssignment(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_resetBlockShapeAssignment(%p) (%d)", (const void *)script, stackPos(0));
uint8 v = stackPos(0) & 0xff;
memset(_wllShapeMap + 3, v, 5);
memset(_wllShapeMap + 13, v, 5);
return 1;
}
int LoLEngine::olol_loadLangFile(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_loadLangFile(%p) (%s)", (const void *)script, stackPosString(0));
char filename[13];
snprintf(filename, sizeof(filename), "%s.%s", stackPosString(0), _languageExt[_lang]);
if (_levelLangFile)
delete[] _levelLangFile;
_levelLangFile = _res->fileData(filename, 0);
return 1;
}
int LoLEngine::olol_loadSoundFile(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_loadSoundFile(%p) (%d)", (const void *)script, stackPos(0));
snd_loadSoundFile(stackPos(0));
return 1;
}
int LoLEngine::olol_setPaletteBrightness(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_setPaletteBrightness(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1));
uint16 old = _brightness;
_brightness = stackPos(0);
if (stackPos(1) == 1)
_screen->setPaletteBrightness(_screen->_currentPalette, stackPos(0), _lampOilStatus);
return old;
}
int LoLEngine::olol_assignCustomSfx(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_assignCustomSfx(%p) (%s, %d)", (const void *)script, stackPosString(0), stackPos(1));
const char *c = stackPosString(0);
int i = stackPos(1);
if (!c || i > 250)
return 0;
if (_ingameSoundIndex[i] == 0xffff)
return 0;
strcpy(_ingameSoundList[_ingameSoundIndex[i]], c);
return 0;
}
#pragma mark -
int LoLEngine::tlol_setupPaletteFade(const TIM *tim, const uint16 *param) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::t2_playSoundEffect(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
_screen->getFadeParams(_screen->getPalette(0), param[0], _tim->_palDelayInc, _tim->_palDiff);
_tim->_palDelayAcc = 0;
return 1;
}
int LoLEngine::tlol_loadPalette(const TIM *tim, const uint16 *param) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_loadPalette(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
const char *palFile = (const char *)(tim->text + READ_LE_UINT16(tim->text + (param[0]<<1)));
_res->loadFileToBuf(palFile, _screen->getPalette(0), 768);
return 1;
}
int LoLEngine::tlol_setupPaletteFadeEx(const TIM *tim, const uint16 *param) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_setupPaletteFadeEx(%p, %p) (%d)", (const void*)tim, (const void*)param, param[0]);
memcpy(_screen->getPalette(0), _screen->getPalette(1), 768);
_screen->getFadeParams(_screen->getPalette(0), param[0], _tim->_palDelayInc, _tim->_palDiff);
_tim->_palDelayAcc = 0;
return 1;
}
int LoLEngine::tlol_processWsaFrame(const TIM *tim, const uint16 *param) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_processWsaFrame(%p, %p) (%d, %d, %d, %d, %d)",
(const void*)tim, (const void*)param, param[0], param[1], param[2], param[3], param[4]);
TIMInterpreter::Animation *anim = (TIMInterpreter::Animation *)tim->wsa[param[0]].anim;
const int frame = param[1];
const int x2 = param[2];
const int y2 = param[3];
const int factor = MAX<int>(0, (int16)param[4]);
const int x1 = anim->x;
const int y1 = anim->y;
int w1 = anim->wsa->width();
int h1 = anim->wsa->height();
int w2 = (w1 * factor) / 100;
int h2 = (h1 * factor) / 100;
anim->wsa->setDrawPage(2);
anim->wsa->setX(x1);
anim->wsa->setY(y1);
anim->wsa->displayFrame(frame, anim->wsaCopyParams & 0xF0FF, 0, 0);
_screen->wsaFrameAnimationStep(x1, y1, x2, y2, w1, h1, w2, h2, 2, 8, 0);
_screen->checkedPageUpdate(8, 4);
_screen->updateScreen();
return 1;
}
int LoLEngine::tlol_displayText(const TIM *tim, const uint16 *param) {
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::tlol_displayText(%p, %p) (%d, %d)", (const void*)tim, (const void*)param, param[0], (int16)param[1]);
_tim->displayText(param[0], param[1]);
return 1;
}
#pragma mark -
typedef Common::Functor1Mem<EMCState*, int, LoLEngine> OpcodeV2;
#define SetOpcodeTable(x) table = &x;
#define Opcode(x) table->push_back(new OpcodeV2(this, &LoLEngine::x))
#define OpcodeUnImpl() table->push_back(new OpcodeV2(this, 0))
typedef Common::Functor2Mem<const TIM *, const uint16 *, int, LoLEngine> TIMOpcodeLoL;
#define SetTimOpcodeTable(x) timTable = &x;
#define OpcodeTim(x) timTable->push_back(new TIMOpcodeLoL(this, &LoLEngine::x))
#define OpcodeTimUnImpl() timTable->push_back(new TIMOpcodeLoL(this, 0))
void LoLEngine::setupOpcodeTable() {
Common::Array<const Opcode*> *table = 0;
SetOpcodeTable(_opcodes);
// 0x00
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
Opcode(o1_getRand);
// 0x04
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
Opcode(olol_setGameFlag);
// 0x08
Opcode(olol_testGameFlag);
Opcode(olol_loadLevelGraphics);
Opcode(olol_loadCmzFile);
Opcode(olol_loadMonsterShapes);
// 0x0C
OpcodeUnImpl();
Opcode(olol_allocItemPropertiesBuffer);
Opcode(olol_setItemProperty);
Opcode(olol_makeItem);
// 0x10
OpcodeUnImpl();
OpcodeUnImpl();
Opcode(olol_getItemPara);
Opcode(olol_getCharacterStat);
// 0x14
Opcode(olol_setCharacterStat);
Opcode(olol_loadLevelShapes);
Opcode(olol_closeLevelShapeFile);
OpcodeUnImpl();
// 0x18
Opcode(olol_loadDoorShapes);
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x1C
OpcodeUnImpl();
OpcodeUnImpl();
Opcode(olol_setMusicTrack);
OpcodeUnImpl();
// 0x20
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x24
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x28
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x2C
OpcodeUnImpl();
Opcode(olol_getUnkArrayVal);
Opcode(olol_setUnkArrayVal);
OpcodeUnImpl();
// 0x30
Opcode(olol_setGlobalVar);
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x34
OpcodeUnImpl();
Opcode(olol_mapShapeToBlock);
Opcode(olol_resetBlockShapeAssignment);
OpcodeUnImpl();
// 0x38
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x3C
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x40
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x44
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x48
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x4C
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x50
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x54
OpcodeUnImpl();
OpcodeUnImpl();
Opcode(olol_loadLangFile);
OpcodeUnImpl();
// 0x58
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x5C
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x60
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
Opcode(olol_loadSoundFile);
// 0x64
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x68
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
Opcode(olol_setPaletteBrightness);
// 0x6C
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x70
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x74
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x78
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x7C
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x80
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x84
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x88
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x8C
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x90
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x94
Opcode(olol_assignCustomSfx);
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x98
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0x9C
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0xA0
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0xA4
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0xA8
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0xAC
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0xB0
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0xB4
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0xB8
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
// 0xBC
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
OpcodeUnImpl();
Common::Array<const TIMOpcode*> *timTable = 0;
SetTimOpcodeTable(_timIntroOpcodes);
// 0x00
OpcodeTim(tlol_setupPaletteFade);
OpcodeTimUnImpl();
OpcodeTim(tlol_loadPalette);
OpcodeTim(tlol_setupPaletteFadeEx);
// 0x04
OpcodeTim(tlol_processWsaFrame);
OpcodeTim(tlol_displayText);
OpcodeTimUnImpl();
OpcodeTimUnImpl();
}
} // end of namespace Kyra
|