mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 16:03:05 +00:00
DREAMWEB: 'getblockofpixel' ported to C++
This commit is contained in:
parent
bd4bc2215f
commit
c346bf79b4
@ -148,6 +148,7 @@ generator = cpp(context, "DreamGen", blacklist = [
|
||||
'adjustlen',
|
||||
'finishedwalking',
|
||||
'checkone',
|
||||
'getblockofpixel',
|
||||
'getflagunderp',
|
||||
'walkandexamine',
|
||||
'obname',
|
||||
|
@ -2385,30 +2385,6 @@ foundlineend:
|
||||
goto lookforlinestart;
|
||||
}
|
||||
|
||||
void DreamGenContext::getblockofpixel() {
|
||||
STACK_CHECK;
|
||||
push(cx);
|
||||
push(es);
|
||||
push(di);
|
||||
ax = data.word(kMapxstart);
|
||||
_add(cl, al);
|
||||
ax = data.word(kMapystart);
|
||||
_add(ch, al);
|
||||
checkone();
|
||||
_and(cl, 1);
|
||||
if (!flags.z())
|
||||
goto failrain;
|
||||
di = pop();
|
||||
es = pop();
|
||||
cx = pop();
|
||||
return;
|
||||
failrain:
|
||||
di = pop();
|
||||
es = pop();
|
||||
cx = pop();
|
||||
al = 0;
|
||||
}
|
||||
|
||||
void DreamGenContext::liftnoise() {
|
||||
STACK_CHECK;
|
||||
_cmp(data.byte(kReallocation), 5);
|
||||
@ -16969,7 +16945,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
|
||||
case addr_reminders: reminders(); break;
|
||||
case addr_initrain: initrain(); break;
|
||||
case addr_splitintolines: splitintolines(); break;
|
||||
case addr_getblockofpixel: getblockofpixel(); break;
|
||||
case addr_backobject: backobject(); break;
|
||||
case addr_liftnoise: liftnoise(); break;
|
||||
case addr_random: random(); break;
|
||||
|
@ -553,7 +553,6 @@ public:
|
||||
static const uint16 addr_random = 0xc17c;
|
||||
static const uint16 addr_liftnoise = 0xc178;
|
||||
static const uint16 addr_backobject = 0xc170;
|
||||
static const uint16 addr_getblockofpixel = 0xc168;
|
||||
static const uint16 addr_splitintolines = 0xc164;
|
||||
static const uint16 addr_initrain = 0xc160;
|
||||
static const uint16 addr_reminders = 0xc15c;
|
||||
@ -1381,7 +1380,7 @@ public:
|
||||
//void updatepeople();
|
||||
//void addtopeoplelist();
|
||||
void hangoncurs();
|
||||
void sparkydrip();
|
||||
//void getblockofpixel();
|
||||
//void kernchars();
|
||||
void printcurs();
|
||||
//void convertkey();
|
||||
@ -1629,7 +1628,7 @@ public:
|
||||
void madmanstelly();
|
||||
void constant();
|
||||
void loadroomssample();
|
||||
void getblockofpixel();
|
||||
void sparkydrip();
|
||||
void paltostartpal();
|
||||
void bossman();
|
||||
void getridofpit();
|
||||
|
@ -876,6 +876,19 @@ void DreamGenContext::checkone(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uin
|
||||
*type = tileData[2];
|
||||
}
|
||||
|
||||
void DreamGenContext::getblockofpixel() {
|
||||
al = getblockofpixel(cl, ch);
|
||||
}
|
||||
|
||||
uint8 DreamGenContext::getblockofpixel(uint8 x, uint8 y) {
|
||||
uint8 flag, flagEx, type, flagX, flagY;
|
||||
checkone(x + data.word(kMapxstart), y + data.word(kMapystart), &flag, &flagEx, &type, &flagX, &flagY);
|
||||
if (flag & 1)
|
||||
return 0;
|
||||
else
|
||||
return type;
|
||||
}
|
||||
|
||||
void DreamGenContext::addtopeoplelist() {
|
||||
addtopeoplelist((ReelRoutine *)es.ptr(bx, sizeof(ReelRoutine)));
|
||||
}
|
||||
|
@ -241,4 +241,6 @@
|
||||
uint8 *getobtextstartCPP();
|
||||
void usetext(const uint8 *string);
|
||||
void usetext();
|
||||
void getblockofpixel();
|
||||
uint8 getblockofpixel(uint8 x, uint8 y);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user