Skip to content

Commit f44c4bb

Browse files
committed
GOB: Add o7_ansiToOEM/o7_oemToANSI Adibou2 opcodes
1 parent 07529ea commit f44c4bb

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

engines/gob/degob_script.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,7 @@ class Script_v7 : public Script_v6 {
672672
void o7_loadCursor(FuncParams &params);
673673
void oPlaytoons_printText(FuncParams &params);
674674
void o7_oemToANSI(FuncParams &params);
675+
void o7_ansiToOEM(FuncParams &params);
675676
void oPlaytoons_freeSprite(FuncParams &params);
676677
};
677678

engines/gob/degob_script_v7.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ const int Script_v7::_goblinFuncLookUp[][2] = {
102102
{2005, 70},
103103
{3, 71},
104104
{420, 72},
105-
{513, 73}
105+
{421, 73},
106+
{513, 74}
106107
};
107108

108109
Script_v7::Script_v7(byte *totData, uint32 totSize, ExtTable *extTable) :
@@ -541,7 +542,7 @@ void Script_v7::setupOpcodes() {
541542
{OPCODET(o1_manageDataFile), {PARAM_EXPR}},
542543
};
543544

544-
static const OpcodeGoblinEntryV7 opcodesGoblin[74] = {
545+
static const OpcodeGoblinEntryV7 opcodesGoblin[75] = {
545546
/* 00 */
546547
{OPCODEF(o1_dummy), {PARAM_NONE}},
547548
{OPCODET(o2_startInfogrames), {PARAM_UINT16}},
@@ -632,6 +633,7 @@ void Script_v7::setupOpcodes() {
632633
{TYPE_NONE, 0, 0, {PARAM_NONE}},
633634
{TYPE_NONE, 0, 0, {PARAM_NONE}},
634635
{OPCODEF(o1_dummy), {PARAM_NONE}},
636+
{OPCODEF(o7_ansiToOEM), {PARAM_NONE}},
635637
{OPCODEF(o7_oemToANSI), {PARAM_NONE}},
636638
{OPCODET(o7_gob0x201), {PARAM_UINT16}}
637639
};
@@ -768,11 +770,18 @@ void Script_v7::oPlaytoons_printText(FuncParams &params)
768770
skip(1);
769771
}
770772

773+
void Script_v7::o7_ansiToOEM(FuncParams &params)
774+
{
775+
startFunc(params);
776+
print("&var8_%d", 4 * readUint16());
777+
endFunc();
778+
}
779+
771780
void Script_v7::o7_oemToANSI(FuncParams &params)
772781
{
773782
startFunc(params);
783+
print("&var8_%d", 4 * readUint16());
774784
endFunc();
775-
skip(2);
776785
}
777786

778787
void Script_v7::oPlaytoons_freeSprite(FuncParams &params)

0 commit comments

Comments
 (0)