DREAMWEB: Ported 'movemap' to C++
This commit is contained in:
parent
8892f2ec70
commit
ca32fb2b34
6 changed files with 25 additions and 39 deletions
|
@ -114,6 +114,7 @@ generator = cpp(context, "DreamGen", blacklist = [
|
||||||
'updatepeople',
|
'updatepeople',
|
||||||
'madmantext',
|
'madmantext',
|
||||||
'madmode',
|
'madmode',
|
||||||
|
'movemap',
|
||||||
], skip_output = [
|
], skip_output = [
|
||||||
# These functions are processed but not output
|
# These functions are processed but not output
|
||||||
'dreamweb',
|
'dreamweb',
|
||||||
|
|
|
@ -2615,40 +2615,6 @@ notfudge:
|
||||||
data.byte(kHavedoneobs) = 0;
|
data.byte(kHavedoneobs) = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DreamGenContext::movemap() {
|
|
||||||
STACK_CHECK;
|
|
||||||
_cmp(ah, 32);
|
|
||||||
if (!flags.z())
|
|
||||||
goto notmapup2;
|
|
||||||
_sub(data.byte(kMapy), 20);
|
|
||||||
data.byte(kNowinnewroom) = 1;
|
|
||||||
return;
|
|
||||||
notmapup2:
|
|
||||||
_cmp(ah, 16);
|
|
||||||
if (!flags.z())
|
|
||||||
goto notmapupspec;
|
|
||||||
_sub(data.byte(kMapy), 10);
|
|
||||||
data.byte(kNowinnewroom) = 1;
|
|
||||||
return;
|
|
||||||
notmapupspec:
|
|
||||||
_cmp(ah, 8);
|
|
||||||
if (!flags.z())
|
|
||||||
goto notmapdownspec;
|
|
||||||
_add(data.byte(kMapy), 10);
|
|
||||||
data.byte(kNowinnewroom) = 1;
|
|
||||||
return;
|
|
||||||
notmapdownspec:
|
|
||||||
_cmp(ah, 2);
|
|
||||||
if (!flags.z())
|
|
||||||
goto notmaprightspec;
|
|
||||||
_add(data.byte(kMapx), 11);
|
|
||||||
data.byte(kNowinnewroom) = 1;
|
|
||||||
return;
|
|
||||||
notmaprightspec:
|
|
||||||
_sub(data.byte(kMapx), 11);
|
|
||||||
data.byte(kNowinnewroom) = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DreamGenContext::deleverything() {
|
void DreamGenContext::deleverything() {
|
||||||
STACK_CHECK;
|
STACK_CHECK;
|
||||||
al = data.byte(kMapysize);
|
al = data.byte(kMapysize);
|
||||||
|
@ -19088,7 +19054,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
|
||||||
case addr_reelsonscreen: reelsonscreen(); break;
|
case addr_reelsonscreen: reelsonscreen(); break;
|
||||||
case addr_soundonreels: soundonreels(); break;
|
case addr_soundonreels: soundonreels(); break;
|
||||||
case addr_reconstruct: reconstruct(); break;
|
case addr_reconstruct: reconstruct(); break;
|
||||||
case addr_movemap: movemap(); break;
|
|
||||||
case addr_deleverything: deleverything(); break;
|
case addr_deleverything: deleverything(); break;
|
||||||
case addr_dumpeverything: dumpeverything(); break;
|
case addr_dumpeverything: dumpeverything(); break;
|
||||||
case addr_showpcx: showpcx(); break;
|
case addr_showpcx: showpcx(); break;
|
||||||
|
|
|
@ -621,7 +621,6 @@ public:
|
||||||
static const uint16 addr_showpcx = 0xc1cc;
|
static const uint16 addr_showpcx = 0xc1cc;
|
||||||
static const uint16 addr_dumpeverything = 0xc1c4;
|
static const uint16 addr_dumpeverything = 0xc1c4;
|
||||||
static const uint16 addr_deleverything = 0xc1c0;
|
static const uint16 addr_deleverything = 0xc1c0;
|
||||||
static const uint16 addr_movemap = 0xc1b4;
|
|
||||||
static const uint16 addr_reconstruct = 0xc1ac;
|
static const uint16 addr_reconstruct = 0xc1ac;
|
||||||
static const uint16 addr_soundonreels = 0xc1a8;
|
static const uint16 addr_soundonreels = 0xc1a8;
|
||||||
static const uint16 addr_reelsonscreen = 0xc1a0;
|
static const uint16 addr_reelsonscreen = 0xc1a0;
|
||||||
|
@ -1892,7 +1891,7 @@ public:
|
||||||
void showman();
|
void showman();
|
||||||
void readmouse2();
|
void readmouse2();
|
||||||
void newplace();
|
void newplace();
|
||||||
void movemap();
|
//void movemap();
|
||||||
void loadsample();
|
void loadsample();
|
||||||
void usecardreader1();
|
void usecardreader1();
|
||||||
void usecardreader2();
|
void usecardreader2();
|
||||||
|
|
|
@ -856,5 +856,26 @@ void DreamGenContext::madmode() {
|
||||||
data.byte(kPointermode) = 2;
|
data.byte(kPointermode) = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DreamGenContext::movemap(uint8 param) {
|
||||||
|
switch (param) {
|
||||||
|
case 32:
|
||||||
|
data.byte(kMapy) -= 20;
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
data.byte(kMapy) -= 10;
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
data.byte(kMapy) += 10;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
data.byte(kMapx) += 11;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
data.byte(kMapx) -= 11;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
data.byte(kNowinnewroom) = 1;
|
||||||
|
}
|
||||||
|
|
||||||
} /*namespace dreamgen */
|
} /*namespace dreamgen */
|
||||||
|
|
||||||
|
|
|
@ -879,8 +879,7 @@ void DreamGenContext::dealwithspecial(uint8 firstParam, uint8 secondParam) {
|
||||||
} else if (type == 6) {
|
} else if (type == 6) {
|
||||||
data.byte(kNewlocation) = secondParam;
|
data.byte(kNewlocation) = secondParam;
|
||||||
} else {
|
} else {
|
||||||
ah = secondParam;
|
movemap(secondParam);
|
||||||
movemap();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -130,5 +130,6 @@
|
||||||
void updatepeople();
|
void updatepeople();
|
||||||
void madmantext();
|
void madmantext();
|
||||||
void madmode();
|
void madmode();
|
||||||
|
void movemap(uint8 param);
|
||||||
bool isCD();
|
bool isCD();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue