DREAMWEB: 'autolook' ported to C++
This commit is contained in:
parent
a8a698c82b
commit
7843073c0e
5 changed files with 17 additions and 25 deletions
|
@ -272,6 +272,7 @@ generator = cpp(context, "DreamGen", blacklist = [
|
||||||
'createpanel',
|
'createpanel',
|
||||||
'createpanel2',
|
'createpanel2',
|
||||||
'findroominloc',
|
'findroominloc',
|
||||||
|
'autolook',
|
||||||
'reelsonscreen',
|
'reelsonscreen',
|
||||||
'reconstruct',
|
'reconstruct',
|
||||||
], skip_output = [
|
], skip_output = [
|
||||||
|
|
|
@ -4894,29 +4894,6 @@ void DreamGenContext::drawfloor() {
|
||||||
es = pop();
|
es = pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DreamGenContext::autolook() {
|
|
||||||
STACK_CHECK;
|
|
||||||
ax = data.word(kMousex);
|
|
||||||
_cmp(ax, data.word(kOldx));
|
|
||||||
if (!flags.z())
|
|
||||||
goto diffmouse;
|
|
||||||
ax = data.word(kMousey);
|
|
||||||
_cmp(ax, data.word(kOldy));
|
|
||||||
if (!flags.z())
|
|
||||||
goto diffmouse;
|
|
||||||
_dec(data.word(kLookcounter));
|
|
||||||
_cmp(data.word(kLookcounter), 0);
|
|
||||||
if (!flags.z())
|
|
||||||
return /* (noautolook) */;
|
|
||||||
_cmp(data.word(kWatchingtime), 0);
|
|
||||||
if (!flags.z())
|
|
||||||
return /* (noautolook) */;
|
|
||||||
dolook();
|
|
||||||
return;
|
|
||||||
diffmouse:
|
|
||||||
data.word(kLookcounter) = 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DreamGenContext::look() {
|
void DreamGenContext::look() {
|
||||||
STACK_CHECK;
|
STACK_CHECK;
|
||||||
_cmp(data.word(kWatchingtime), 0);
|
_cmp(data.word(kWatchingtime), 0);
|
||||||
|
|
|
@ -378,7 +378,6 @@ public:
|
||||||
static const uint16 addr_redrawmainscrn = 0xc478;
|
static const uint16 addr_redrawmainscrn = 0xc478;
|
||||||
static const uint16 addr_dolook = 0xc474;
|
static const uint16 addr_dolook = 0xc474;
|
||||||
static const uint16 addr_look = 0xc470;
|
static const uint16 addr_look = 0xc470;
|
||||||
static const uint16 addr_autolook = 0xc46c;
|
|
||||||
static const uint16 addr_drawfloor = 0xc428;
|
static const uint16 addr_drawfloor = 0xc428;
|
||||||
static const uint16 addr_deleteextext = 0xc420;
|
static const uint16 addr_deleteextext = 0xc420;
|
||||||
static const uint16 addr_deleteexframe = 0xc41c;
|
static const uint16 addr_deleteexframe = 0xc41c;
|
||||||
|
@ -1586,7 +1585,7 @@ public:
|
||||||
void dosreturn();
|
void dosreturn();
|
||||||
void wheelsound();
|
void wheelsound();
|
||||||
void actualsave();
|
void actualsave();
|
||||||
void autolook();
|
//void autolook();
|
||||||
void playguitar();
|
void playguitar();
|
||||||
//void showreelframe();
|
//void showreelframe();
|
||||||
void searchforsame();
|
void searchforsame();
|
||||||
|
|
|
@ -2260,5 +2260,19 @@ void DreamGenContext::findroominloc() {
|
||||||
data.byte(kRoomnum) = roomNum;
|
data.byte(kRoomnum) = roomNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DreamGenContext::autolook() {
|
||||||
|
if ((data.word(kMousex) != data.word(kOldx)) || (data.word(kMousey) != data.word(kOldy))) {
|
||||||
|
data.word(kLookcounter) = 1000;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
--data.word(kLookcounter);
|
||||||
|
if (data.word(kLookcounter))
|
||||||
|
return;
|
||||||
|
if (data.word(kWatchingtime))
|
||||||
|
return;
|
||||||
|
dolook();
|
||||||
|
}
|
||||||
|
|
||||||
} /*namespace dreamgen */
|
} /*namespace dreamgen */
|
||||||
|
|
||||||
|
|
|
@ -332,4 +332,5 @@
|
||||||
void findroominloc();
|
void findroominloc();
|
||||||
void reelsonscreen();
|
void reelsonscreen();
|
||||||
void reconstruct();
|
void reconstruct();
|
||||||
|
void autolook();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue