Some indentation and format changes. Mostly replacing spaces with tabs.

svn-id: r25654
This commit is contained in:
Torbjörn Andersson 2007-02-17 15:37:49 +00:00
parent 9ab2ca5bc7
commit f33da9e412
17 changed files with 410 additions and 380 deletions

View File

@ -522,7 +522,7 @@ LValue getLValue(Instruction *inst, char *str, LocalVariable *locals, Animation
void jobRunScripts(void *parm, Job *j) {
debugC(3, kDebugLocation, "jobRunScripts");
debugC(3, kDebugLocation, "jobRunScripts");
static uint16 modCounter = 0;
@ -673,7 +673,8 @@ void jobRunScripts(void *parm, Job *j) {
a->_program->_ip = (Instruction*)inst->_node._next;
label1:
if (a->_zone._flags & kFlagsCharacter) a->_z = a->_zone.pos._position._y + a->_cnv._height;
if (a->_zone._flags & kFlagsCharacter)
a->_z = a->_zone.pos._position._y + a->_cnv._height;
}
sortAnimations();
@ -685,8 +686,10 @@ label1:
void wrapLocalVar(LocalVariable *local) {
// printf("wrapLocalVar(v: %i, min: %i, max: %i)\n", local->_value, local->_min, local->_max);
if (local->_value >= local->_max) local->_value = local->_min;
if (local->_value < local->_min) local->_value = local->_max - 1;
if (local->_value >= local->_max)
local->_value = local->_min;
if (local->_value < local->_min)
local->_value = local->_max - 1;
return;
}

View File

@ -42,7 +42,8 @@ static uint32 _handle = MAX_ARCHIVE_ENTRIES;
void openArchive(const char *file) {
debugC(1, kDebugDisk, "open archive '%s'", file);
if (_archive.isOpen()) closeArchive();
if (_archive.isOpen())
closeArchive();
uint32 offset = DIRECTORY_OFFSET_IN_FILE;
@ -96,7 +97,7 @@ ArchivedFile *openArchivedFile(const char *name) {
ArchivedFile *file = (ArchivedFile*)memAlloc(sizeof(ArchivedFile));
if (!file)
error("openArchivedFile: can't allocate buffer for '%s'", name);
error("openArchivedFile: can't allocate buffer for '%s'", name);
file->_index = i;
file->_offset = _archiveOffsets[i];
@ -167,7 +168,8 @@ char *readArchivedFileText(char *buf, uint16 size, void*) {
char *t = _archive.readLine(buf, size);
if (_archive.eof() || t == NULL) return NULL;
if (_archive.eof() || t == NULL)
return NULL;
return t;
}

View File

@ -47,7 +47,8 @@ void _c_play_boogie(void *parm) {
static uint16 flag = 1;
if (flag == 0) return;
if (flag == 0)
return;
flag = 0;
stopMusic();
@ -174,7 +175,8 @@ static uint16 num_foglie = 0;
void _c_contaFoglie(void *parm) {
num_foglie++;
if (num_foglie != 6) return;
if (num_foglie != 6)
return;
_commandFlags |= 0x1000;
@ -264,7 +266,8 @@ void _c_finito(void *parm) {
Common::File stream;
stream.open(_vm->_characterName, Common::File::kFileWriteMode);
if (stream.isOpen()) stream.close();
if (stream.isOpen())
stream.close();
Common::File streamDino, streamDough, streamDonna;

View File

@ -295,19 +295,19 @@ void runCommands(Command *list, Zone *z) {
break;
case CMD_ON: // on
// WORKAROUND: the original DOS-based engine didn't check u->_zone before dereferencing
// the pointer to get structure members, thus leading to crashes in systems with memory
// protection.
// As a side note, the overwritten address is the 5th entry in the DOS interrupt table
// (print screen handler): this suggests that a system would hang when the print screen
// key is pressed after playing Nippon Safes, provided that this code path is taken.
if (u->_zone != NULL) {
u->_zone->_flags &= ~kFlagsRemove;
u->_zone->_flags |= kFlagsActive;
if ((u->_zone->_type & 0xFFFF) == kZoneGet) {
addJob(&jobDisplayDroppedItem, u->_zone, kPriority17 );
}
}
// WORKAROUND: the original DOS-based engine didn't check u->_zone before dereferencing
// the pointer to get structure members, thus leading to crashes in systems with memory
// protection.
// As a side note, the overwritten address is the 5th entry in the DOS interrupt table
// (print screen handler): this suggests that a system would hang when the print screen
// key is pressed after playing Nippon Safes, provided that this code path is taken.
if (u->_zone != NULL) {
u->_zone->_flags &= ~kFlagsRemove;
u->_zone->_flags |= kFlagsActive;
if ((u->_zone->_type & 0xFFFF) == kZoneGet) {
addJob(&jobDisplayDroppedItem, u->_zone, kPriority17 );
}
}
break;
case CMD_OFF: // off
@ -342,7 +342,7 @@ void runCommands(Command *list, Zone *z) {
}
}
debugC(1, kDebugLocation, "runCommands completed");
debugC(1, kDebugLocation, "runCommands completed");
return;

View File

@ -220,14 +220,14 @@ void freeDialogue(Dialogue *d) {
void runDialogue(SpeakData *data) {
debugC(1, kDebugDialogue, "runDialogue: starting dialogue '%s'", data->_name);
debugC(1, kDebugDialogue, "runDialogue: starting dialogue '%s'", data->_name);
enterDialogue();
debugC(1, kDebugDialogue, "runDialogue: enterDialogue ok");
debugC(1, kDebugDialogue, "runDialogue: enterDialogue ok");
if (!scumm_stricmp(_location, "museum")) {
_vm->_graphics->freeCnv( &_tempFrames );
debugC(1, kDebugDialogue, "runDialogue: special trick for 'museum' location");
debugC(1, kDebugDialogue, "runDialogue: special trick for 'museum' location");
}
char v20[PATH_LEN];
@ -242,9 +242,9 @@ void runDialogue(SpeakData *data) {
sprintf(v20, "%stal", v24);
}
debugC(1, kDebugDialogue, "runDialogue: loading 1st character head '%s'", v20);
debugC(1, kDebugDialogue, "runDialogue: loading 1st character head '%s'", v20);
_vm->_graphics->loadExternalCnv(v20, &_characterFace);
debugC(1, kDebugDialogue, "runDialogue: 1st character head loaded");
debugC(1, kDebugDialogue, "runDialogue: 1st character head loaded");
_vm->_graphics->loadExternalCnv("comiccnv", &Graphics::_font);
@ -253,11 +253,11 @@ void runDialogue(SpeakData *data) {
if (!scumm_stricmp(data->_name, "yourself") || data->_name[0] == '\0') {
memcpy(&v6E, &_characterFace, sizeof(Cnv));
debugC(1, kDebugDialogue, "runDialogue: using default character head");
debugC(1, kDebugDialogue, "runDialogue: using default character head");
} else {
debugC(1, kDebugDialogue, "runDialogue: loading 2nd character head '%s'", v20);
debugC(1, kDebugDialogue, "runDialogue: loading 2nd character head '%s'", v20);
_vm->_graphics->loadCnv(data->_name, &v6E);
debugC(1, kDebugDialogue, "runDialogue: 2nd character head loaded");
debugC(1, kDebugDialogue, "runDialogue: 2nd character head loaded");
}
v5C._width = v6E._width;
@ -282,7 +282,7 @@ void runDialogue(SpeakData *data) {
// display Question if any
if (scumm_stricmp(v60->_text, "NULL")) {
debugC(1, kDebugDialogue, "runDialogue: showing question '%s'", v60->_text);
debugC(1, kDebugDialogue, "runDialogue: showing question '%s'", v60->_text);
_vm->_graphics->flatBlitCnv(
&v5C,
@ -345,10 +345,10 @@ void runDialogue(SpeakData *data) {
&_answerBalloonH[_si]
);
debugC(1, kDebugDialogue, "runDialogue: showing answer #%i '%s'",
_si,
v60->_answers[_si]
);
debugC(1, kDebugDialogue, "runDialogue: showing answer #%i '%s'",
_si,
v60->_answers[_si]
);
_vm->_graphics->drawBalloon(
_answerBalloonX[_si],
@ -368,18 +368,18 @@ void runDialogue(SpeakData *data) {
3
);
debugC(1, kDebugDialogue, "runDialogue: answer #%i shown at (%i, %i)+(%i, %i)",
_si,
_answerBalloonX[_si],
debugC(1, kDebugDialogue, "runDialogue: answer #%i shown at (%i, %i)+(%i, %i)",
_si,
_answerBalloonX[_si],
_answerBalloonY[_si],
_answerBalloonW[_si],
_answerBalloonH[_si]
);
);
displayedAnswers = true;
} else {
debugC(1, kDebugDialogue, "runDialogue: skipping answer #%i", _si);
debugC(1, kDebugDialogue, "runDialogue: skipping answer #%i", _si);
_answerBalloonY[_si+1] = _answerBalloonY[_si];
_answerBalloonY[_si] = SKIPPED_ANSWER;
@ -393,7 +393,7 @@ void runDialogue(SpeakData *data) {
if (displayedAnswers == true) {
debugC(1, kDebugDialogue, "runDialogue: showing answering face (%p)", (const void*)v48._data0);
debugC(1, kDebugDialogue, "runDialogue: showing answering face (%p)", (const void*)v48._data0);
_vm->_graphics->flatBlitCnv(
&v48,
@ -403,20 +403,20 @@ void runDialogue(SpeakData *data) {
v48._data1
);
debugC(1, kDebugDialogue, "runDialogue: answering face shown");
debugC(1, kDebugDialogue, "runDialogue: answering face shown");
if (askPassword == false) {
debugC(1, kDebugDialogue, "runDialogue: waiting for user to select answer");
debugC(1, kDebugDialogue, "runDialogue: waiting for user to select answer");
_di = selectAnswer(v60, &v48);
debugC(1, kDebugDialogue, "runDialogue: user selected answer #%i", _di);
debugC(1, kDebugDialogue, "runDialogue: user selected answer #%i", _di);
} else {
char password[100];
uint16 passwordLen = 0;
debugC(1, kDebugDialogue, "runDialogue: asking password");
debugC(1, kDebugDialogue, "runDialogue: asking password");
while (askPassword == true) {
strcpy(password, ".......");
@ -495,7 +495,7 @@ void runDialogue(SpeakData *data) {
v60 = (Dialogue*)v60->_following._questions[_di];
} else {
debugC(1, kDebugDialogue, "runDialogue: no suitable answers found");
debugC(1, kDebugDialogue, "runDialogue: no suitable answers found");
v60 = NULL;
}
@ -507,21 +507,21 @@ void runDialogue(SpeakData *data) {
}
debugC(1, kDebugDialogue, "runDialogue: out of dialogue loop");
debugC(1, kDebugDialogue, "runDialogue: out of dialogue loop");
_vm->_graphics->copyScreen(Graphics::kBitBack, Graphics::kBitFront);
_vm->_graphics->freeCnv(&_characterFace);
debugC(1, kDebugDialogue, "runDialogue: 1st character head free'd");
debugC(1, kDebugDialogue, "runDialogue: 1st character head free'd");
if (scumm_stricmp(data->_name, "yourself") || data->_name[0] == '\0') {
_vm->_graphics->freeCnv(&v6E);
debugC(1, kDebugDialogue, "runDialogue: 2nd character head free'd");
debugC(1, kDebugDialogue, "runDialogue: 2nd character head free'd");
}
_vm->_graphics->freeCnv(&Graphics::_font);
exitDialogue();
debugC(1, kDebugDialogue, "runDialogue: exit dialogue ok");
debugC(1, kDebugDialogue, "runDialogue: exit dialogue ok");
if (!scumm_stricmp(_location, "museum")) {
@ -532,13 +532,13 @@ void runDialogue(SpeakData *data) {
memcpy(&_yourself._cnv, &_tempFrames, sizeof(Cnv));
debugC(1, kDebugDialogue, "runDialogue: special trick for 'museum' location ok");
debugC(1, kDebugDialogue, "runDialogue: special trick for 'museum' location ok");
}
debugC(1, kDebugDialogue, "runDialogue: running zone commands");
debugC(1, kDebugDialogue, "runDialogue: running zone commands");
runCommands(v34);
debugC(1, kDebugDialogue, "runDialogue: end");
debugC(1, kDebugDialogue, "runDialogue: end");
return;
@ -624,7 +624,7 @@ int16 selectAnswer(Question *q, StaticCnv *cnv) {
}
g_system->delayMillis(30);
g_system->delayMillis(30);
v2 = _si;
}

View File

@ -360,14 +360,16 @@ void Graphics::floodFill(byte color, uint16 left, uint16 top, uint16 right, uint
void Graphics::flatBlit(uint16 w, uint16 h, int16 x, int16 y, byte *data, Graphics::Buffers buffer) {
debugC(9, kDebugGraphics, "Graphics::flatBlit(%i, %i, %i, %i)", w, h, x, y);
debugC(9, kDebugGraphics, "Graphics::flatBlit(%i, %i, %i, %i)", w, h, x, y);
// source coordinates
// source coordinates
int16 left = 0, top = 0;
int16 right = w, bottom = h;
if (x + w > SCREEN_WIDTH) right = SCREEN_WIDTH - x;
if (y + h > SCREEN_HEIGHT) bottom = SCREEN_HEIGHT - y;
if (x + w > SCREEN_WIDTH)
right = SCREEN_WIDTH - x;
if (y + h > SCREEN_HEIGHT)
bottom = SCREEN_HEIGHT - y;
if (x < 0) { // partially left clipped
left = -x;
@ -465,9 +467,10 @@ void Graphics::blit(uint16 w, uint16 h, int16 x, int16 y, uint16 z, byte *data,
void jobDisplayLabel(void *parm, Job *j) {
ZoneLabel *label = (ZoneLabel*)parm;
debugC(1, kDebugLocation, "jobDisplayLabel (%p)", (const void*) label);
debugC(1, kDebugLocation, "jobDisplayLabel (%p)", (const void*) label);
if (label->_cnv._width == 0) return;
if (label->_cnv._width == 0)
return;
_vm->_graphics->flatBlitCnv(&label->_cnv, Graphics::_labelPosition[0]._x, Graphics::_labelPosition[0]._y, Graphics::kBitBack, label->_cnv._data1);
return;
@ -476,7 +479,7 @@ void jobDisplayLabel(void *parm, Job *j) {
void jobEraseLabel(void *parm, Job *j) {
ZoneLabel *label = (ZoneLabel*)parm;
debugC(1, kDebugLocation, "jobEraseLabel (%p)", (const void*) label);
debugC(1, kDebugLocation, "jobEraseLabel (%p)", (const void*) label);
int16 _si, _di;
@ -631,7 +634,8 @@ void Graphics::restoreCnvBackground(StaticCnv *cnv, int16 x, int16 y) {
// strings
//
void Graphics::displayString(uint16 x, uint16 y, const char *text) {
if (text == NULL) return;
if (text == NULL)
return;
uint16 len = strlen(text);
StaticCnv tmp;
@ -1178,13 +1182,13 @@ void Graphics::loadBackground(const char *filename, Graphics::Buffers buffer) {
_bgLayers[_si] = _al;
}
Common::MemoryReadStream sread(tempfx, sizeof(PaletteFxRange)*6);
Common::MemoryReadStream sread(tempfx, sizeof(PaletteFxRange)*6);
for (_si = 0; _si < 6; _si++) {
_palettefx[_si]._timer = sread.readUint16BE();
_palettefx[_si]._step = sread.readUint16BE();
_palettefx[_si]._flags = sread.readUint16BE();
_palettefx[_si]._first = sread.readByte();
_palettefx[_si]._last = sread.readByte();
_palettefx[_si]._timer = sread.readUint16BE();
_palettefx[_si]._step = sread.readUint16BE();
_palettefx[_si]._flags = sread.readUint16BE();
_palettefx[_si]._first = sread.readByte();
_palettefx[_si]._last = sread.readByte();
}
#if 0
@ -1258,15 +1262,15 @@ void Graphics::drawBorder(Graphics::Buffers buffer, uint16 x, uint16 y, uint16 w
byte *d = _buffers[buffer] + x + SCREEN_WIDTH * y;
memset(d, color, w);
memset(d, color, w);
for (uint16 i = 0; i < h; i++) {
d[i * SCREEN_WIDTH] = color;
d[i * SCREEN_WIDTH + w - 1] = color;
}
d = _buffers[buffer] + x + SCREEN_WIDTH * (y + h - 1);
memset(d, color, w);
d = _buffers[buffer] + x + SCREEN_WIDTH * (y + h - 1);
memset(d, color, w);
return;
}

View File

@ -31,92 +31,92 @@ namespace Parallaction {
static Animation *_rightHandAnim;
static uint16 _rightHandPositions[684] = {
0x0064, 0x0046, 0x006c, 0x0046, 0x0074, 0x0046, 0x007c, 0x0046,
0x0084, 0x0046, 0x008c, 0x0046, 0x0094, 0x0046, 0x009c, 0x0046,
0x00a4, 0x0046, 0x00ac, 0x0046, 0x00b4, 0x0046, 0x00bc, 0x0046,
0x00c4, 0x0046, 0x00cc, 0x0046, 0x00d4, 0x0046, 0x00dc, 0x0046,
0x00e4, 0x0046, 0x00ec, 0x0046, 0x00f4, 0x0046, 0x00fc, 0x0046,
0x0104, 0x0046, 0x00ff, 0x0042, 0x00ff, 0x004a, 0x00ff, 0x0052,
0x00ff, 0x005a, 0x00ff, 0x0062, 0x00ff, 0x006a, 0x00ff, 0x0072,
0x00ff, 0x007a, 0x00ff, 0x0082, 0x00ff, 0x008a, 0x00ff, 0x0092,
0x00ff, 0x009a, 0x00ff, 0x00a2, 0x0104, 0x0097, 0x00fc, 0x0097,
0x00f4, 0x0097, 0x00ec, 0x0097, 0x00e4, 0x0097, 0x00dc, 0x0097,
0x00d4, 0x0097, 0x00cc, 0x0097, 0x00c4, 0x0097, 0x00bc, 0x0097,
0x00b4, 0x0097, 0x00ac, 0x0097, 0x00a4, 0x0097, 0x009c, 0x0097,
0x0094, 0x0097, 0x008c, 0x0097, 0x0084, 0x0097, 0x007c, 0x0097,
0x0074, 0x0097, 0x006c, 0x0097, 0x0064, 0x0097, 0x0066, 0x0042,
0x0066, 0x004a, 0x0066, 0x0052, 0x0066, 0x005a, 0x0066, 0x0062,
0x0066, 0x006a, 0x0066, 0x0072, 0x0066, 0x007a, 0x0066, 0x0082,
0x0066, 0x008a, 0x0066, 0x0092, 0x0066, 0x009a, 0x0066, 0x00a2,
0x008c, 0x0091, 0x0099, 0x0042, 0x0099, 0x004a, 0x0099, 0x0052,
0x0099, 0x005a, 0x0099, 0x0062, 0x0099, 0x006a, 0x0099, 0x0072,
0x0099, 0x007a, 0x0099, 0x0082, 0x0099, 0x008a, 0x0099, 0x0092,
0x0099, 0x009a, 0x0099, 0x00a2, 0x00a0, 0x004d, 0x00cc, 0x0042,
0x00cc, 0x004a, 0x00cc, 0x0052, 0x00cc, 0x005a, 0x00cc, 0x0062,
0x00cc, 0x006a, 0x00cc, 0x0072, 0x00cc, 0x007a, 0x00cc, 0x0082,
0x00cc, 0x008a, 0x00cc, 0x0092, 0x00cc, 0x009a, 0x00cc, 0x00a2,
0x00ca, 0x0050, 0x00b1, 0x0050, 0x0081, 0x0052, 0x007e, 0x0052,
0x007c, 0x0055, 0x007c, 0x005c, 0x007e, 0x005e, 0x0080, 0x005e,
0x0082, 0x005c, 0x0082, 0x0054, 0x0080, 0x0052, 0x0078, 0x0052,
0x007c, 0x005e, 0x0077, 0x0061, 0x0074, 0x006e, 0x0074, 0x0078,
0x0076, 0x007a, 0x0079, 0x0078, 0x0079, 0x0070, 0x0078, 0x0070,
0x0078, 0x006b, 0x007b, 0x0066, 0x007a, 0x006f, 0x0084, 0x006f,
0x0085, 0x0066, 0x0086, 0x0070, 0x0085, 0x0070, 0x0085, 0x0079,
0x0088, 0x0079, 0x008a, 0x0078, 0x008a, 0x006c, 0x0087, 0x0061,
0x0085, 0x005f, 0x0082, 0x005f, 0x0080, 0x0061, 0x007e, 0x0061,
0x007b, 0x005f, 0x007c, 0x006f, 0x007c, 0x0071, 0x0079, 0x0074,
0x0079, 0x0089, 0x0076, 0x008c, 0x0076, 0x008e, 0x007a, 0x008e,
0x007f, 0x0089, 0x007f, 0x0083, 0x007e, 0x0083, 0x007e, 0x0077,
0x0080, 0x0077, 0x0080, 0x0083, 0x0080, 0x008b, 0x0084, 0x0090,
0x0088, 0x0090, 0x0088, 0x008e, 0x0085, 0x008b, 0x0085, 0x0074,
0x0082, 0x0071, 0x00b2, 0x0052, 0x00b0, 0x0054, 0x00b0, 0x0056,
0x00ae, 0x0058, 0x00af, 0x0059, 0x00af, 0x005e, 0x00b2, 0x0061,
0x00b5, 0x0061, 0x00b8, 0x005e, 0x00b8, 0x005a, 0x00b9, 0x0059,
0x00b9, 0x0058, 0x00b7, 0x0056, 0x00b7, 0x0054, 0x00b5, 0x0052,
0x00b2, 0x0052, 0x00ae, 0x005a, 0x00ab, 0x005b, 0x00ab, 0x006d,
0x00ae, 0x0072, 0x00b8, 0x0072, 0x00bc, 0x006d, 0x00bc, 0x005b,
0x00b9, 0x005a, 0x00bc, 0x005c, 0x00be, 0x005c, 0x00c1, 0x005f,
0x00c4, 0x0067, 0x00c4, 0x006d, 0x00c1, 0x0076, 0x00c0, 0x0077,
0x00bd, 0x0077, 0x00bb, 0x0075, 0x00bd, 0x0073, 0x00bb, 0x0072,
0x00be, 0x0070, 0x00be, 0x006a, 0x00a9, 0x006a, 0x00a9, 0x0070,
0x00ac, 0x0072, 0x00aa, 0x0073, 0x00ac, 0x0075, 0x00aa, 0x0077,
0x00a7, 0x0077, 0x00a3, 0x006d, 0x00a3, 0x0067, 0x00a6, 0x005f,
0x00a9, 0x005c, 0x00ab, 0x005c, 0x00ac, 0x0077, 0x00ac, 0x007c,
0x00ab, 0x007c, 0x00ab, 0x0084, 0x00ac, 0x0084, 0x00ac, 0x008b,
0x00a9, 0x008e, 0x00a9, 0x0090, 0x00ae, 0x0090, 0x00ae, 0x008d,
0x00b2, 0x008c, 0x00b2, 0x0087, 0x00b1, 0x0086, 0x00b1, 0x007b,
0x00b2, 0x0079, 0x00b4, 0x0079, 0x00b4, 0x007d, 0x00b5, 0x007d,
0x00b5, 0x0087, 0x00b4, 0x0087, 0x00b4, 0x008c, 0x00b6, 0x008c,
0x00b9, 0x0091, 0x00b4, 0x0091, 0x00bd, 0x008f, 0x00ba, 0x008c,
0x00ba, 0x0083, 0x00bb, 0x0082, 0x00bb, 0x0075, 0x00cc, 0x006e,
0x00d4, 0x006c, 0x00db, 0x0069, 0x00d9, 0x0068, 0x00d9, 0x0064,
0x00dc, 0x0064, 0x00dc, 0x0060, 0x00df, 0x0056, 0x00e5, 0x0052,
0x00e7, 0x0052, 0x00ec, 0x0056, 0x00ef, 0x005d, 0x00f1, 0x0065,
0x00f3, 0x0064, 0x00f3, 0x0069, 0x00f0, 0x0069, 0x00ec, 0x0065,
0x00ec, 0x005e, 0x00e9, 0x005f, 0x00e9, 0x005a, 0x00e7, 0x0058,
0x00e4, 0x0058, 0x00e3, 0x0054, 0x00e3, 0x0058, 0x00e1, 0x005c,
0x00e4, 0x0061, 0x00e7, 0x0061, 0x00e9, 0x005f, 0x00eb, 0x005d,
0x00e4, 0x0062, 0x00e0, 0x0064, 0x00e0, 0x0069, 0x00e2, 0x006b,
0x00e0, 0x0072, 0x00e0, 0x0077, 0x00ec, 0x0077, 0x00ec, 0x0071,
0x00ea, 0x006b, 0x00ec, 0x006a, 0x00ec, 0x0063, 0x00e7, 0x0063,
0x00e7, 0x0065, 0x00e1, 0x0069, 0x00e3, 0x0068, 0x00e6, 0x0069,
0x00ec, 0x005e, 0x00ea, 0x006b, 0x00e7, 0x006b, 0x00e7, 0x006a,
0x00e5, 0x006a, 0x00e5, 0x006b, 0x00e2, 0x006b, 0x00df, 0x006c,
0x00dc, 0x006f, 0x00dc, 0x0071, 0x00da, 0x0073, 0x00d8, 0x0073,
0x00d8, 0x006f, 0x00dc, 0x006b, 0x00dc, 0x0069, 0x00dd, 0x0068,
0x00ef, 0x0068, 0x00f0, 0x0069, 0x00f0, 0x006b, 0x00f4, 0x006f,
0x00f4, 0x0072, 0x00f3, 0x0073, 0x00f2, 0x0073, 0x00f0, 0x0071,
0x00f0, 0x006f, 0x00ec, 0x006b, 0x00ec, 0x007a, 0x00eb, 0x007b,
0x00eb, 0x007f, 0x00ec, 0x0080, 0x00ec, 0x0084, 0x00eb, 0x0085,
0x00eb, 0x008b, 0x00ec, 0x008c, 0x00ec, 0x008f, 0x00ed, 0x0091,
0x00e9, 0x0091, 0x00e9, 0x008f, 0x00e7, 0x008d, 0x00e7, 0x0090,
0x00e7, 0x0089, 0x00e8, 0x0088, 0x00e8, 0x0086, 0x00e7, 0x0085,
0x00e7, 0x007d, 0x00e6, 0x007c, 0x00e6, 0x0078, 0x00e5, 0x007d,
0x00e5, 0x0085, 0x00e4, 0x0086, 0x00e4, 0x0088, 0x00e5, 0x0089,
0x00e5, 0x0090, 0x00e5, 0x008b, 0x00e3, 0x0091, 0x00df, 0x0091,
0x00e0, 0x0090, 0x00e0, 0x008c, 0x00e2, 0x008b, 0x00e1, 0x0085,
0x00e0, 0x0084, 0x00e0, 0x0080, 0x00e1, 0x007f, 0x00e1, 0x007c,
0x00e0, 0x007b, 0x00e0, 0x0077
0x0064, 0x0046, 0x006c, 0x0046, 0x0074, 0x0046, 0x007c, 0x0046,
0x0084, 0x0046, 0x008c, 0x0046, 0x0094, 0x0046, 0x009c, 0x0046,
0x00a4, 0x0046, 0x00ac, 0x0046, 0x00b4, 0x0046, 0x00bc, 0x0046,
0x00c4, 0x0046, 0x00cc, 0x0046, 0x00d4, 0x0046, 0x00dc, 0x0046,
0x00e4, 0x0046, 0x00ec, 0x0046, 0x00f4, 0x0046, 0x00fc, 0x0046,
0x0104, 0x0046, 0x00ff, 0x0042, 0x00ff, 0x004a, 0x00ff, 0x0052,
0x00ff, 0x005a, 0x00ff, 0x0062, 0x00ff, 0x006a, 0x00ff, 0x0072,
0x00ff, 0x007a, 0x00ff, 0x0082, 0x00ff, 0x008a, 0x00ff, 0x0092,
0x00ff, 0x009a, 0x00ff, 0x00a2, 0x0104, 0x0097, 0x00fc, 0x0097,
0x00f4, 0x0097, 0x00ec, 0x0097, 0x00e4, 0x0097, 0x00dc, 0x0097,
0x00d4, 0x0097, 0x00cc, 0x0097, 0x00c4, 0x0097, 0x00bc, 0x0097,
0x00b4, 0x0097, 0x00ac, 0x0097, 0x00a4, 0x0097, 0x009c, 0x0097,
0x0094, 0x0097, 0x008c, 0x0097, 0x0084, 0x0097, 0x007c, 0x0097,
0x0074, 0x0097, 0x006c, 0x0097, 0x0064, 0x0097, 0x0066, 0x0042,
0x0066, 0x004a, 0x0066, 0x0052, 0x0066, 0x005a, 0x0066, 0x0062,
0x0066, 0x006a, 0x0066, 0x0072, 0x0066, 0x007a, 0x0066, 0x0082,
0x0066, 0x008a, 0x0066, 0x0092, 0x0066, 0x009a, 0x0066, 0x00a2,
0x008c, 0x0091, 0x0099, 0x0042, 0x0099, 0x004a, 0x0099, 0x0052,
0x0099, 0x005a, 0x0099, 0x0062, 0x0099, 0x006a, 0x0099, 0x0072,
0x0099, 0x007a, 0x0099, 0x0082, 0x0099, 0x008a, 0x0099, 0x0092,
0x0099, 0x009a, 0x0099, 0x00a2, 0x00a0, 0x004d, 0x00cc, 0x0042,
0x00cc, 0x004a, 0x00cc, 0x0052, 0x00cc, 0x005a, 0x00cc, 0x0062,
0x00cc, 0x006a, 0x00cc, 0x0072, 0x00cc, 0x007a, 0x00cc, 0x0082,
0x00cc, 0x008a, 0x00cc, 0x0092, 0x00cc, 0x009a, 0x00cc, 0x00a2,
0x00ca, 0x0050, 0x00b1, 0x0050, 0x0081, 0x0052, 0x007e, 0x0052,
0x007c, 0x0055, 0x007c, 0x005c, 0x007e, 0x005e, 0x0080, 0x005e,
0x0082, 0x005c, 0x0082, 0x0054, 0x0080, 0x0052, 0x0078, 0x0052,
0x007c, 0x005e, 0x0077, 0x0061, 0x0074, 0x006e, 0x0074, 0x0078,
0x0076, 0x007a, 0x0079, 0x0078, 0x0079, 0x0070, 0x0078, 0x0070,
0x0078, 0x006b, 0x007b, 0x0066, 0x007a, 0x006f, 0x0084, 0x006f,
0x0085, 0x0066, 0x0086, 0x0070, 0x0085, 0x0070, 0x0085, 0x0079,
0x0088, 0x0079, 0x008a, 0x0078, 0x008a, 0x006c, 0x0087, 0x0061,
0x0085, 0x005f, 0x0082, 0x005f, 0x0080, 0x0061, 0x007e, 0x0061,
0x007b, 0x005f, 0x007c, 0x006f, 0x007c, 0x0071, 0x0079, 0x0074,
0x0079, 0x0089, 0x0076, 0x008c, 0x0076, 0x008e, 0x007a, 0x008e,
0x007f, 0x0089, 0x007f, 0x0083, 0x007e, 0x0083, 0x007e, 0x0077,
0x0080, 0x0077, 0x0080, 0x0083, 0x0080, 0x008b, 0x0084, 0x0090,
0x0088, 0x0090, 0x0088, 0x008e, 0x0085, 0x008b, 0x0085, 0x0074,
0x0082, 0x0071, 0x00b2, 0x0052, 0x00b0, 0x0054, 0x00b0, 0x0056,
0x00ae, 0x0058, 0x00af, 0x0059, 0x00af, 0x005e, 0x00b2, 0x0061,
0x00b5, 0x0061, 0x00b8, 0x005e, 0x00b8, 0x005a, 0x00b9, 0x0059,
0x00b9, 0x0058, 0x00b7, 0x0056, 0x00b7, 0x0054, 0x00b5, 0x0052,
0x00b2, 0x0052, 0x00ae, 0x005a, 0x00ab, 0x005b, 0x00ab, 0x006d,
0x00ae, 0x0072, 0x00b8, 0x0072, 0x00bc, 0x006d, 0x00bc, 0x005b,
0x00b9, 0x005a, 0x00bc, 0x005c, 0x00be, 0x005c, 0x00c1, 0x005f,
0x00c4, 0x0067, 0x00c4, 0x006d, 0x00c1, 0x0076, 0x00c0, 0x0077,
0x00bd, 0x0077, 0x00bb, 0x0075, 0x00bd, 0x0073, 0x00bb, 0x0072,
0x00be, 0x0070, 0x00be, 0x006a, 0x00a9, 0x006a, 0x00a9, 0x0070,
0x00ac, 0x0072, 0x00aa, 0x0073, 0x00ac, 0x0075, 0x00aa, 0x0077,
0x00a7, 0x0077, 0x00a3, 0x006d, 0x00a3, 0x0067, 0x00a6, 0x005f,
0x00a9, 0x005c, 0x00ab, 0x005c, 0x00ac, 0x0077, 0x00ac, 0x007c,
0x00ab, 0x007c, 0x00ab, 0x0084, 0x00ac, 0x0084, 0x00ac, 0x008b,
0x00a9, 0x008e, 0x00a9, 0x0090, 0x00ae, 0x0090, 0x00ae, 0x008d,
0x00b2, 0x008c, 0x00b2, 0x0087, 0x00b1, 0x0086, 0x00b1, 0x007b,
0x00b2, 0x0079, 0x00b4, 0x0079, 0x00b4, 0x007d, 0x00b5, 0x007d,
0x00b5, 0x0087, 0x00b4, 0x0087, 0x00b4, 0x008c, 0x00b6, 0x008c,
0x00b9, 0x0091, 0x00b4, 0x0091, 0x00bd, 0x008f, 0x00ba, 0x008c,
0x00ba, 0x0083, 0x00bb, 0x0082, 0x00bb, 0x0075, 0x00cc, 0x006e,
0x00d4, 0x006c, 0x00db, 0x0069, 0x00d9, 0x0068, 0x00d9, 0x0064,
0x00dc, 0x0064, 0x00dc, 0x0060, 0x00df, 0x0056, 0x00e5, 0x0052,
0x00e7, 0x0052, 0x00ec, 0x0056, 0x00ef, 0x005d, 0x00f1, 0x0065,
0x00f3, 0x0064, 0x00f3, 0x0069, 0x00f0, 0x0069, 0x00ec, 0x0065,
0x00ec, 0x005e, 0x00e9, 0x005f, 0x00e9, 0x005a, 0x00e7, 0x0058,
0x00e4, 0x0058, 0x00e3, 0x0054, 0x00e3, 0x0058, 0x00e1, 0x005c,
0x00e4, 0x0061, 0x00e7, 0x0061, 0x00e9, 0x005f, 0x00eb, 0x005d,
0x00e4, 0x0062, 0x00e0, 0x0064, 0x00e0, 0x0069, 0x00e2, 0x006b,
0x00e0, 0x0072, 0x00e0, 0x0077, 0x00ec, 0x0077, 0x00ec, 0x0071,
0x00ea, 0x006b, 0x00ec, 0x006a, 0x00ec, 0x0063, 0x00e7, 0x0063,
0x00e7, 0x0065, 0x00e1, 0x0069, 0x00e3, 0x0068, 0x00e6, 0x0069,
0x00ec, 0x005e, 0x00ea, 0x006b, 0x00e7, 0x006b, 0x00e7, 0x006a,
0x00e5, 0x006a, 0x00e5, 0x006b, 0x00e2, 0x006b, 0x00df, 0x006c,
0x00dc, 0x006f, 0x00dc, 0x0071, 0x00da, 0x0073, 0x00d8, 0x0073,
0x00d8, 0x006f, 0x00dc, 0x006b, 0x00dc, 0x0069, 0x00dd, 0x0068,
0x00ef, 0x0068, 0x00f0, 0x0069, 0x00f0, 0x006b, 0x00f4, 0x006f,
0x00f4, 0x0072, 0x00f3, 0x0073, 0x00f2, 0x0073, 0x00f0, 0x0071,
0x00f0, 0x006f, 0x00ec, 0x006b, 0x00ec, 0x007a, 0x00eb, 0x007b,
0x00eb, 0x007f, 0x00ec, 0x0080, 0x00ec, 0x0084, 0x00eb, 0x0085,
0x00eb, 0x008b, 0x00ec, 0x008c, 0x00ec, 0x008f, 0x00ed, 0x0091,
0x00e9, 0x0091, 0x00e9, 0x008f, 0x00e7, 0x008d, 0x00e7, 0x0090,
0x00e7, 0x0089, 0x00e8, 0x0088, 0x00e8, 0x0086, 0x00e7, 0x0085,
0x00e7, 0x007d, 0x00e6, 0x007c, 0x00e6, 0x0078, 0x00e5, 0x007d,
0x00e5, 0x0085, 0x00e4, 0x0086, 0x00e4, 0x0088, 0x00e5, 0x0089,
0x00e5, 0x0090, 0x00e5, 0x008b, 0x00e3, 0x0091, 0x00df, 0x0091,
0x00e0, 0x0090, 0x00e0, 0x008c, 0x00e2, 0x008b, 0x00e1, 0x0085,
0x00e0, 0x0084, 0x00e0, 0x0080, 0x00e1, 0x007f, 0x00e1, 0x007c,
0x00e0, 0x007b, 0x00e0, 0x0077
};
extern Credit _credits[];

View File

@ -119,7 +119,8 @@ int16 pickupItem(Zone *z) {
uint16 _si;
for (_si = 0; _inventory[_si]._id != 0; _si++) ;
if (_si == INVENTORY_MAX_ITEMS) return -1;
if (_si == INVENTORY_MAX_ITEMS)
return -1;
_inventory[_si]._id = (z->u.get->_icon << 16) & 0xFFFF0000;
_inventory[_si]._index = z->u.get->_icon;

View File

@ -59,9 +59,9 @@ void Parallaction::doLoadGame(uint16 slot) {
Common::InSaveFile *f = _saveFileMan->openForLoading(filename);
if (!f) return;
char s[20];
char s[20];
f->readLine(s, 19);
f->readLine(s, 19);
f->readLine(_vm->_characterName, 15);
f->readLine(_location, 15);
@ -154,23 +154,23 @@ void Parallaction::doSaveGame(uint16 slot, const char* name) {
Common::OutSaveFile *f = _saveFileMan->openForSaving(path);
if (f == 0) {
char buf[32];
sprintf(buf, "Can't save game in slot %i\n\n(%s)", slot, path);
GUI::MessageDialog dialog(buf);
dialog.runModal();
return;
char buf[32];
sprintf(buf, "Can't save game in slot %i\n\n(%s)", slot, path);
GUI::MessageDialog dialog(buf);
dialog.runModal();
return;
}
char s[30];
if (!name || name[0] == '\0') {
sprintf(s, "default_%i", slot);
} else {
strncpy(s, name, 29);
}
if (!name || name[0] == '\0') {
sprintf(s, "default_%i", slot);
} else {
strncpy(s, name, 29);
}
f->writeString(s);
f->writeString("\n");
f->writeString(s);
f->writeString("\n");
if (_engineFlags & kEngineMiniDonna) {
sprintf(s, "%stras\n", _vm->_characterName);
@ -599,7 +599,7 @@ void SaveLoadChooser::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint
updateInfos();
}
_list->startEditMode();
_list->startEditMode();
// Disable button if nothing is selected, or (in load mode) if an empty
// list item is selected. We allow choosing an empty item in save mode
// because we then just assign a default name.
@ -614,11 +614,11 @@ void SaveLoadChooser::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint
}
void SaveLoadChooser::reflowLayout() {
_container->setFlags(GUI::WIDGET_INVISIBLE);
_gfxWidget->setFlags(GUI::WIDGET_INVISIBLE);
_date->setFlags(GUI::WIDGET_INVISIBLE);
_time->setFlags(GUI::WIDGET_INVISIBLE);
_playtime->setFlags(GUI::WIDGET_INVISIBLE);
_container->setFlags(GUI::WIDGET_INVISIBLE);
_gfxWidget->setFlags(GUI::WIDGET_INVISIBLE);
_date->setFlags(GUI::WIDGET_INVISIBLE);
_time->setFlags(GUI::WIDGET_INVISIBLE);
_playtime->setFlags(GUI::WIDGET_INVISIBLE);
Dialog::reflowLayout();
}
@ -680,46 +680,46 @@ void SaveLoadChooser::updateInfos() {
int Parallaction::buildSaveFileList(Common::StringList& l) {
char name[16];
char buf[30];
char name[16];
char buf[30];
int count = 0;
int count = 0;
for (int i = 0; i < 10; i++) {
sprintf(name, "game.%i", i);
for (int i = 0; i < 10; i++) {
sprintf(name, "game.%i", i);
buf[0] = '\0';
Common::InSaveFile *f = _saveFileMan->openForLoading(name);
buf[0] = '\0';
Common::InSaveFile *f = _saveFileMan->openForLoading(name);
if (f) {
f->readLine(buf, 29);
delete f;
if (f) {
f->readLine(buf, 29);
delete f;
count++;
}
count++;
}
l.push_back(buf);
}
l.push_back(buf);
}
return count;
return count;
}
int Parallaction::selectSaveFile(uint16 arg_0, const char* caption, const char* button) {
SaveLoadChooser* slc = new SaveLoadChooser(caption, button, _vm);
SaveLoadChooser* slc = new SaveLoadChooser(caption, button, _vm);
Common::StringList l;
/*int count = */ buildSaveFileList(l);
slc->setList(l);
/*int count = */ buildSaveFileList(l);
slc->setList(l);
int idx = slc->runModal();
if (idx >= 0) {
_saveFileName = slc->getResultString();
}
int idx = slc->runModal();
if (idx >= 0) {
_saveFileName = slc->getResultString();
}
delete slc;
delete slc;
return idx;
}
@ -730,13 +730,13 @@ void Parallaction::loadGame() {
int _di = selectSaveFile( 0, "Load file", "Load" );
if (_di == -1) {
return;
return;
}
doLoadGame(_di);
GUI::TimedMessageDialog dialog("Loading game...", 1500);
dialog.runModal();
GUI::TimedMessageDialog dialog("Loading game...", 1500);
dialog.runModal();
changeCursor(kCursorArrow);
@ -748,17 +748,18 @@ void Parallaction::saveGame() {
// strcpy(v30, asc_1C91A);
if (!scumm_stricmp(_location, "caveau")) return;
if (!scumm_stricmp(_location, "caveau"))
return;
int slot = selectSaveFile( 1, "Save file", "Save" );
if (slot == -1) {
return;
return;
}
doSaveGame(slot, _saveFileName.c_str());
GUI::TimedMessageDialog dialog("Saving game...", 1500);
dialog.runModal();
GUI::TimedMessageDialog dialog("Saving game...", 1500);
dialog.runModal();
return;

View File

@ -203,7 +203,7 @@ void resolveLocationForwards() {
void freeLocation() {
debugC(7, kDebugLocation, "freeLocation");
debugC(7, kDebugLocation, "freeLocation");
uint16 _si = 1;
while (_localFlagNames[_si] != 0) {
@ -211,43 +211,43 @@ void freeLocation() {
_localFlagNames[_si] = NULL;
_si++;
}
debugC(7, kDebugLocation, "freeLocation: localflags names freed");
debugC(7, kDebugLocation, "freeLocation: localflags names freed");
freeNodeList(_locationWalkNodes._next);
_locationWalkNodes._next = NULL;
debugC(7, kDebugLocation, "freeLocation: walk nodes freed");
debugC(7, kDebugLocation, "freeLocation: walk nodes freed");
helperNode._prev = helperNode._next = NULL;
helperNode._prev = helperNode._next = NULL;
freeZones(_zones._next);
freeNodeList(_zones._next);
memcpy(&_zones, &helperNode, sizeof(Node));
debugC(7, kDebugLocation, "freeLocation: zones freed");
debugC(7, kDebugLocation, "freeLocation: zones freed");
helperNode._prev = helperNode._next = NULL;
helperNode._prev = helperNode._next = NULL;
freeZones(_animations._next);
freeAnimations();
freeNodeList(_animations._next);
memcpy(&_animations, &helperNode, sizeof(Node));
debugC(7, kDebugLocation, "freeLocation: animations freed");
memcpy(&_animations, &helperNode, sizeof(Node));
debugC(7, kDebugLocation, "freeLocation: animations freed");
if (_locationComment) {
memFree(_locationComment);
}
_locationComment = NULL;
debugC(7, kDebugLocation, "freeLocation: comments freed");
debugC(7, kDebugLocation, "freeLocation: comments freed");
if (_locationCommands) {
freeNodeList(&_locationCommands->_node);
}
_locationCommands = NULL;
debugC(7, kDebugLocation, "freeLocation: commands freed");
debugC(7, kDebugLocation, "freeLocation: commands freed");
if (_locationACommands) {
freeNodeList(&_locationACommands->_node);
}
_locationACommands = NULL;
debugC(7, kDebugLocation, "freeLocation: acommands freed");
debugC(7, kDebugLocation, "freeLocation: acommands freed");
return;
}
@ -316,7 +316,7 @@ extern Job *_jEraseLabel;
void Parallaction::changeLocation(char *location) {
debugC(1, kDebugLocation, "changeLocation to '%s'", location);
debugC(1, kDebugLocation, "changeLocation to '%s'", location);
// printf("changeLocation('%s')", location);
if (_musicData1 != 0) {
@ -331,7 +331,7 @@ void Parallaction::changeLocation(char *location) {
playMusic();
_musicData1 = 0;
debugC(2, kDebugLocation, "changeLocation: started character specific music");
debugC(2, kDebugLocation, "changeLocation: started character specific music");
}
if (!scumm_stricmp(location, "night") || !scumm_stricmp(location, "intsushi")) {
@ -339,7 +339,7 @@ void Parallaction::changeLocation(char *location) {
loadMusic("soft");
playMusic();
debugC(2, kDebugLocation, "changeLocation: started music 'soft'");
debugC(2, kDebugLocation, "changeLocation: started music 'soft'");
}
if (!scumm_stricmp(location, "museo") ||
@ -353,33 +353,33 @@ void Parallaction::changeLocation(char *location) {
stopMusic();
_musicData1 = 1;
debugC(2, kDebugLocation, "changeLocation: music stopped");
debugC(2, kDebugLocation, "changeLocation: music stopped");
}
// WORKAROUND: this if-statement has been added to avoid crashes caused by
// execution of label jobs after a location switch. The other workaround in
// Parallaction::runGame should have been rendered useless by this one.
if (_jDrawLabel != NULL) {
removeJob(_jDrawLabel);
removeJob(_jEraseLabel);
_jDrawLabel = NULL;
_jEraseLabel = NULL;
}
// WORKAROUND: this if-statement has been added to avoid crashes caused by
// execution of label jobs after a location switch. The other workaround in
// Parallaction::runGame should have been rendered useless by this one.
if (_jDrawLabel != NULL) {
removeJob(_jDrawLabel);
removeJob(_jEraseLabel);
_jDrawLabel = NULL;
_jEraseLabel = NULL;
}
_hoverZone = NULL;
_hoverZone = NULL;
if (_engineFlags & kEngineMouse) {
changeCursor( kCursorArrow );
debugC(2, kDebugLocation, "changeLocation: changed cursor");
changeCursor( kCursorArrow );
debugC(2, kDebugLocation, "changeLocation: changed cursor");
}
strcpy(_newLocation, location);
removeNode(&_yourself._zone._node);
debugC(2, kDebugLocation, "changeLocation: removed character from the animation list");
debugC(2, kDebugLocation, "changeLocation: removed character from the animation list");
freeLocation();
debugC(1, kDebugLocation, "changeLocation: old location free'd");
debugC(1, kDebugLocation, "changeLocation: old location free'd");
char *tmp = strchr(_newLocation, '.');
@ -394,7 +394,7 @@ void Parallaction::changeLocation(char *location) {
_vm->_graphics->palUnk0(_palette);
_vm->_graphics->copyScreen(Graphics::kBitBack, Graphics::kBitFront);
debugC(1, kDebugLocation, "changeLocation: new background set");
debugC(1, kDebugLocation, "changeLocation: new background set");
_vm->_graphics->_proportionalFont = false;
_vm->_graphics->loadExternalCnv("slidecnv", &Graphics::_font);
@ -407,7 +407,7 @@ void Parallaction::changeLocation(char *location) {
_vm->_graphics->freeCnv(&Graphics::_font);
waitUntilLeftClick();
debugC(2, kDebugLocation, "changeLocation: intro text shown");
debugC(2, kDebugLocation, "changeLocation: intro text shown");
tmp = strchr(tmp+1, '.');
strcpy(_newLocation, tmp+1);
@ -434,7 +434,7 @@ void Parallaction::changeLocation(char *location) {
parseLocation(_newLocation);
_vm->_graphics->copyScreen(Graphics::kBitBack, Graphics::kBit2);
debugC(1, kDebugLocation, "changeLocation: new location '%s' parsed", _newLocation);
debugC(1, kDebugLocation, "changeLocation: new location '%s' parsed", _newLocation);
_yourself._zone.pos._oldposition._x = -1000;
_yourself._zone.pos._oldposition._y = -1000;
@ -447,7 +447,7 @@ void Parallaction::changeLocation(char *location) {
_firstPosition._y = -1000;
_firstPosition._x = -1000;
debugC(2, kDebugLocation, "changeLocation: initial position set to x: %i, y: %i, f: %i", _firstPosition._x, _firstPosition._y, _firstFrame);
debugC(2, kDebugLocation, "changeLocation: initial position set to x: %i, y: %i, f: %i", _firstPosition._x, _firstPosition._y, _firstFrame);
}
byte palette[PALETTE_SIZE];
@ -463,8 +463,8 @@ void Parallaction::changeLocation(char *location) {
}
if (_locationComment) {
doLocationEnterTransition();
debugC(2, kDebugLocation, "changeLocation: shown location comment");
doLocationEnterTransition();
debugC(2, kDebugLocation, "changeLocation: shown location comment");
}
runJobs();
@ -472,11 +472,11 @@ void Parallaction::changeLocation(char *location) {
_vm->_graphics->palUnk0(_palette);
if (_locationACommands) {
runCommands(_locationACommands);
debugC(1, kDebugLocation, "changeLocation: location acommands run");
}
runCommands(_locationACommands);
debugC(1, kDebugLocation, "changeLocation: location acommands run");
}
debugC(1, kDebugLocation, "changeLocation completed");
debugC(1, kDebugLocation, "changeLocation completed");
return;

View File

@ -193,7 +193,8 @@ void Menu::newGame() {
if (_mouseButtons == kMouseRightUp) break;
}
if (_mouseButtons != kMouseRightUp) return; // show intro
if (_mouseButtons != kMouseRightUp)
return; // show intro
_vm->_graphics->freeCnv(&Graphics::_font);
closeArchive();

View File

@ -172,16 +172,16 @@ Parallaction::Parallaction(OSystem *syst) :
Common::File::addDefaultDirectory( _gameDataPath );
/* Common::addSpecialDebugLevel(kDebugAnimation, "Animation", "Animations debug level");
Common::addSpecialDebugLevel(kDebugZone, "Zone", "Zones debug level");
Common::addSpecialDebugLevel(kDebugCommand, "Command", "Commands debug level");
/* Common::addSpecialDebugLevel(kDebugAnimation, "Animation", "Animations debug level");
Common::addSpecialDebugLevel(kDebugZone, "Zone", "Zones debug level");
Common::addSpecialDebugLevel(kDebugCommand, "Command", "Commands debug level");
Common::addSpecialDebugLevel(kDebugIntro, "Intro", "Intro debug level");
Common::addSpecialDebugLevel(kDebugInventory, "Inventory", "Inventory debug level");
Common::addSpecialDebugLevel(kDebugIntro, "Intro", "Intro debug level");
Common::addSpecialDebugLevel(kDebugInventory, "Inventory", "Inventory debug level");
*/
Common::addSpecialDebugLevel(kDebugDialogue, "dialogue", "Dialogues debug level");
Common::addSpecialDebugLevel(kDebugLocation, "location", "Location debug level");
Common::addSpecialDebugLevel(kDebugDialogue, "dialogue", "Dialogues debug level");
Common::addSpecialDebugLevel(kDebugLocation, "location", "Location debug level");
Common::addSpecialDebugLevel(kDebugDisk, "disk", "Disk debug level");
Common::addSpecialDebugLevel(kDebugWalk, "walk", "Walk debug level");
Common::addSpecialDebugLevel(kDebugGraphics, "gfx", "Gfx debug level");
@ -208,42 +208,42 @@ int Parallaction::init() {
*/
_engineFlags = 0;
/*
if (ConfMan.hasKey("boot_param")) {
Common::String bootp = ConfMan.get("boot_param");
if (ConfMan.hasKey("boot_param")) {
Common::String bootp = ConfMan.get("boot_param");
char argv[3][30];
char* d = argv[0];
uint16 j = 0;
for (uint16 i = 0; i < bootp.size(); i++) {
if (bootp[i] == '.') {
j++;
d = argv[j];
continue;
}
char argv[3][30];
char* d = argv[0];
uint16 j = 0;
for (uint16 i = 0; i < bootp.size(); i++) {
if (bootp[i] == '.') {
j++;
d = argv[j];
continue;
}
*d++ = bootp[i];
}
*d++ = bootp[i];
}
if (j < 3) {
GUIErrorMessage("Not enough parameters for Nippon Safes Inc.");
return -2;
}
if (j < 3) {
GUIErrorMessage("Not enough parameters for Nippon Safes Inc.");
return -2;
}
argv[2][2] = '/';
argv[2][3] = '\0';
argv[2][2] = '/';
argv[2][3] = '\0';
strcpy(_location, argv[0]);
strcpy(_characterName, argv[1]);
strcpy(_languageDir, argv[2]);
_skipMenu = true;
strcpy(_location, argv[0]);
strcpy(_characterName, argv[1]);
strcpy(_languageDir, argv[2]);
_skipMenu = true;
} else {*/
strcpy(_characterName, "dough");
/* }
} else {*/
strcpy(_characterName, "dough");
/* }
*/
memset(_locationNames, 0, 120*32);
memset(_locationNames, 0, 120*32);
_numLocations = 0;
_yourself._zone.pos._position._x = 150;
@ -422,19 +422,19 @@ void Parallaction::runGame() {
while ((_engineFlags & kEngineQuit) == 0) {
_keyDown = updateInput();
debugC(3, kDebugLocation, "runGame: input flags (%i, %i, %i, %i)",
_mouseHidden == 0,
(_engineFlags & kEngineMouse) == 0,
(_engineFlags & kEngineWalking) == 0,
(_engineFlags & kEngineChangeLocation) == 0
);
debugC(3, kDebugLocation, "runGame: input flags (%i, %i, %i, %i)",
_mouseHidden == 0,
(_engineFlags & kEngineMouse) == 0,
(_engineFlags & kEngineWalking) == 0,
(_engineFlags & kEngineChangeLocation) == 0
);
// WORKAROUND: the engine doesn't check for displayed labels before performing a location
// switch, thus crashing whenever a jobDisplayLabel/jEraseLabel pair is left into the
// queue after the character enters a door.
// Skipping input processing when kEngineChangeLocation is set solves the issue. It's
// noteworthy that the programmers added this very check in Big Red Adventure's engine,
// so it should be ok here in Nippon Safes too.
// WORKAROUND: the engine doesn't check for displayed labels before performing a location
// switch, thus crashing whenever a jobDisplayLabel/jEraseLabel pair is left into the
// queue after the character enters a door.
// Skipping input processing when kEngineChangeLocation is set solves the issue. It's
// noteworthy that the programmers added this very check in Big Red Adventure's engine,
// so it should be ok here in Nippon Safes too.
if ((_mouseHidden == 0) && ((_engineFlags & kEngineMouse) == 0) && ((_engineFlags & kEngineWalking) == 0) && ((_engineFlags & kEngineChangeLocation) == 0)) {
InputData *v8 = translateInput();
if (v8) processInput(v8);
@ -483,7 +483,7 @@ void Parallaction::processInput(InputData *data) {
switch (data->_event) {
case kEvEnterZone:
debugC(2, kDebugLocation, "processInput: kEvEnterZone");
debugC(2, kDebugLocation, "processInput: kEvEnterZone");
_graphics->_labelPosition[1]._x = -1000;
_graphics->_labelPosition[1]._y = -1000;
_graphics->_labelPosition[0]._x = -1000;
@ -493,14 +493,14 @@ void Parallaction::processInput(InputData *data) {
break;
case kEvExitZone:
debugC(2, kDebugLocation, "processInput: kEvExitZone");
debugC(2, kDebugLocation, "processInput: kEvExitZone");
removeJob(_jDrawLabel);
addJob(&jobWaitRemoveJob, _jEraseLabel, kPriority15);
_jDrawLabel = NULL;
break;
case kEvAction:
debugC(2, kDebugLocation, "processInput: kEvAction");
debugC(2, kDebugLocation, "processInput: kEvAction");
_procCurrentHoverItem = -1;
_hoverZone = NULL;
pauseJobs();
@ -544,7 +544,7 @@ void Parallaction::processInput(InputData *data) {
break;
case kEvWalk:
debugC(2, kDebugLocation, "processInput: kEvWalk");
debugC(2, kDebugLocation, "processInput: kEvWalk");
_hoverZone = NULL;
changeCursor(kCursorArrow);
if (_yourself._zone._flags & kFlagsRemove) break;
@ -769,7 +769,7 @@ void Parallaction::changeCursor(int32 index) {
if (index == kCursorArrow) { // standard mouse pointer
debugC(1, kDebugLocation, "changeCursor(%i), label: %p", index, (const void*)_jDrawLabel);
debugC(1, kDebugLocation, "changeCursor(%i), label: %p", index, (const void*)_jDrawLabel);
if (_jDrawLabel != NULL) {
removeJob(_jDrawLabel);
@ -967,7 +967,8 @@ void runJobs() {
(*j->_fn)(j->_parm, j);
Job *v4 = (Job*)j->_node._next;
if (j->_finished == 1) removeJob(j);
if (j->_finished == 1)
removeJob(j);
j = v4;
}
@ -983,7 +984,7 @@ void jobWaitRemoveJob(void *parm, Job *j) {
static uint16 count = 0;
debugC(3, kDebugLocation, "jobWaitRemoveJob: count = %i", count);
debugC(3, kDebugLocation, "jobWaitRemoveJob: count = %i", count);
_engineFlags |= kEngineMouse;

View File

@ -41,28 +41,28 @@ namespace Parallaction {
// high values mean high priority
enum {
kPriority0 = 0,
kPriority1 = 1,
kPriority2 = 2,
kPriority3 = 3,
kPriority4 = 4,
kPriority5 = 5,
kPriority6 = 6,
kPriority7 = 7,
kPriority8 = 8,
kPriority9 = 9,
kPriority10 = 10,
kPriority11 = 11,
kPriority12 = 12,
kPriority13 = 13,
kPriority14 = 14,
kPriority15 = 15,
kPriority16 = 16,
kPriority17 = 17,
kPriority18 = 18,
kPriority19 = 19,
kPriority20 = 20,
kPriority21 = 21
kPriority0 = 0,
kPriority1 = 1,
kPriority2 = 2,
kPriority3 = 3,
kPriority4 = 4,
kPriority5 = 5,
kPriority6 = 6,
kPriority7 = 7,
kPriority8 = 8,
kPriority9 = 9,
kPriority10 = 10,
kPriority11 = 11,
kPriority12 = 12,
kPriority13 = 13,
kPriority14 = 14,
kPriority15 = 15,
kPriority16 = 16,
kPriority17 = 17,
kPriority18 = 18,
kPriority19 = 19,
kPriority20 = 20,
kPriority21 = 21
};
enum {
@ -271,7 +271,7 @@ protected: // data
int16 _inventoryIndex;
Zone* _zone;
ZoneLabel* _label;
ZoneLabel* _label;
};
bool _skipMenu;
@ -298,9 +298,9 @@ protected: // members
void initGame();
void initGlobals();
Common::String _saveFileName;
int buildSaveFileList(Common::StringList& l);
int selectSaveFile(uint16 arg_0, const char* caption, const char* button);
Common::String _saveFileName;
int buildSaveFileList(Common::StringList& l);
int selectSaveFile(uint16 arg_0, const char* caption, const char* button);
void doLoadGame(uint16 slot);
void doSaveGame(uint16 slot, const char* name);

View File

@ -69,7 +69,8 @@ char *parseComment(ArchivedFile *file) {
v194 = parseNextLine(v190, 400);
v194[strlen(v194)-1] = '\0';
if (!scumm_stricmp(v194, "endtext")) break;
if (!scumm_stricmp(v194, "endtext"))
break;
strcat(_tmp_comment, v194);
strcat(_tmp_comment, " ");

View File

@ -25,22 +25,22 @@
namespace Parallaction {
byte Graphics::_mouseArrow[256] = {
0x12, 0x11, 0x11, 0x11, 0x13, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x11, 0x13, 0x12, 0x12, 0x00,
0x13, 0x12, 0x12, 0x11, 0x13, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x12,
0x13, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x13, 0x13, 0x13, 0x12, 0x00,
0x13, 0x00, 0x12, 0x00, 0x13, 0x00, 0x12, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
0x11, 0x11, 0x11, 0x11, 0x12, 0x12, 0x12, 0x11, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00,
0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12,
0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00,
0x13, 0x13, 0x12, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x11, 0x11, 0x11, 0x11, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00,
0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x11, 0x12, 0x12, 0x12, 0x12,
0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x13, 0x12, 0x12, 0x00,
0x00, 0x12, 0x13, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x11, 0x11, 0x11, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x11, 0x00,
0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x11,
0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x13, 0x12, 0x12, 0x00, 0x00, 0x12, 0x13, 0x00,
0x00, 0x12, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x12, 0x11, 0x11, 0x11, 0x13, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x11, 0x13, 0x12, 0x12, 0x00,
0x13, 0x12, 0x12, 0x11, 0x13, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x12,
0x13, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x13, 0x13, 0x13, 0x12, 0x00,
0x13, 0x00, 0x12, 0x00, 0x13, 0x00, 0x12, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
0x11, 0x11, 0x11, 0x11, 0x12, 0x12, 0x12, 0x11, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00,
0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12,
0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00,
0x13, 0x13, 0x12, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x11, 0x11, 0x11, 0x11, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00,
0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x11, 0x12, 0x12, 0x12, 0x12,
0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x13, 0x12, 0x12, 0x00,
0x00, 0x12, 0x13, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x11, 0x11, 0x11, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x11, 0x00,
0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x11,
0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x13, 0x12, 0x12, 0x00, 0x00, 0x12, 0x13, 0x00,
0x00, 0x12, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

View File

@ -120,7 +120,7 @@ WalkNode *buildWalkPath(uint16 x, uint16 y) {
uint16 v38 = walkFunc1(to_x, to_y, v44);
if (v38 == 1) {
// destination directly reachable
debugC(1, kDebugWalk, "direct move to (%i, %i)", to_x, to_y);
debugC(1, kDebugWalk, "direct move to (%i, %i)", to_x, to_y);
memFree(v44);
return v48;
}
@ -219,9 +219,9 @@ WalkNode *buildWalkPath(uint16 x, uint16 y) {
WalkNode* tmp = &v58;
uint16 i = 1;
while (tmp->_node._next) {
debugC(1, kDebugWalk, "node %i: %i, %i", i, tmp->_x, tmp->_y);
tmp = (WalkNode*)tmp->_node._next;
i++;
debugC(1, kDebugWalk, "node %i: %i, %i", i, tmp->_x, tmp->_y);
tmp = (WalkNode*)tmp->_node._next;
i++;
}
@ -321,7 +321,7 @@ void jobWalk(void *parm, Job *j) {
int16 _si = _yourself._zone.pos._position._x;
int16 _di = _yourself._zone.pos._position._y;
// debugC(1, kDebugWalk, "jobWalk to (%i, %i)", node->_x + _yourself._cnv._width / 2, node->_y + _yourself._cnv._height);
// debugC(1, kDebugWalk, "jobWalk to (%i, %i)", node->_x + _yourself._cnv._width / 2, node->_y + _yourself._cnv._height);
_yourself._zone.pos._oldposition._x = _si;
_yourself._zone.pos._oldposition._y = _di;
@ -338,11 +338,11 @@ void jobWalk(void *parm, Job *j) {
}
WalkNode *tmp = (WalkNode*)node->_node._next;
WalkNode *tmp = (WalkNode*)node->_node._next;
j->_parm = node->_node._next;
memFree(node);
debugC(1, kDebugWalk, "jobWalk moving to next node (%i, %i)", tmp->_x, tmp->_y);
debugC(1, kDebugWalk, "jobWalk moving to next node (%i, %i)", tmp->_x, tmp->_y);
node = (WalkNode*)tmp;
}
@ -352,8 +352,10 @@ void jobWalk(void *parm, Job *j) {
node->_y - _yourself._zone.pos._position._y
};
if (dist._x < 0) dist._x = -dist._x;
if (dist._y < 0) dist._y = -dist._y;
if (dist._x < 0)
dist._x = -dist._x;
if (dist._y < 0)
dist._y = -dist._y;
walkData1++;

View File

@ -121,24 +121,24 @@ void Parallaction::parseZone(ArchivedFile *file, Node *list, char *name) {
}
void freeZones(Node *list) {
debugC(1, kDebugLocation, "freeZones: kEngineQuit = %i", _engineFlags & kEngineQuit);
debugC(1, kDebugLocation, "freeZones: kEngineQuit = %i", _engineFlags & kEngineQuit);
Zone *z = (Zone*)list;
Zone *v8 = NULL;
for (; z; ) {
// WORKAROUND: this huge condition is needed because we made ZoneTypeData a collection of structs
// instead of an union. So, merge->_obj1 and get->_icon were just aliases in the original engine,
// but we need to check it separately here. The same workaround is applied in hitZone.
// WORKAROUND: this huge condition is needed because we made ZoneTypeData a collection of structs
// instead of an union. So, merge->_obj1 and get->_icon were just aliases in the original engine,
// but we need to check it separately here. The same workaround is applied in hitZone.
if (((z->_limits._top == -1) ||
((z->_limits._left == -2) && (
(((z->_type & 0xFFFF) == kZoneMerge) && ((isItemInInventory(MAKE_INVENTORY_ID(z->u.merge->_obj1)) != 0) || (isItemInInventory(MAKE_INVENTORY_ID(z->u.merge->_obj2)) != 0))) ||
(((z->_type & 0xFFFF) == kZoneGet) && ((isItemInInventory(MAKE_INVENTORY_ID(z->u.get->_icon)) != 0)))
))) &&
((_engineFlags & kEngineQuit) == 0)) {
((z->_limits._left == -2) && (
(((z->_type & 0xFFFF) == kZoneMerge) && ((isItemInInventory(MAKE_INVENTORY_ID(z->u.merge->_obj1)) != 0) || (isItemInInventory(MAKE_INVENTORY_ID(z->u.merge->_obj2)) != 0))) ||
(((z->_type & 0xFFFF) == kZoneGet) && ((isItemInInventory(MAKE_INVENTORY_ID(z->u.get->_icon)) != 0)))
))) &&
((_engineFlags & kEngineQuit) == 0)) {
debugC(1, kDebugLocation, "freeZones preserving zone '%s'", z->_label._text);
debugC(1, kDebugLocation, "freeZones preserving zone '%s'", z->_label._text);
v8 = (Zone*)z->_node._next;
removeNode(&z->_node);
@ -190,7 +190,7 @@ void freeZones(Node *list) {
_vm->_graphics->freeStaticCnv(&z->_label._cnv);
freeCommands(z->_commands);
z=(Zone*)z->_node._next;
z=(Zone*)z->_node._next;
}
@ -472,7 +472,7 @@ void displayItemComment(ExamineData *data) {
uint16 runZone(Zone *z) {
debugC(3, kDebugLocation, "runZone (%s)", z->_label._text);
debugC(3, kDebugLocation, "runZone (%s)", z->_label._text);
uint16 subtype = z->_type & 0xFFFF;
@ -512,7 +512,7 @@ uint16 runZone(Zone *z) {
}
debugC(3, kDebugLocation, "runZone completed");
debugC(3, kDebugLocation, "runZone completed");
return 0;
}
@ -634,28 +634,39 @@ Zone *hitZone(uint32 type, uint16 x, uint16 y) {
// instead of an union. So, merge->_obj1 and get->_icon were just aliases in the original engine,
// but we need to check it separately here. The same workaround is applied in freeZones.
if ((((z->_type & 0xFFFF0000) == kZoneMerge) && (((_si == z->u.merge->_obj1) && (_di == z->u.merge->_obj2)) || ((_si == z->u.merge->_obj2) && (_di == z->u.merge->_obj1)))) ||
(((z->_type & 0xFFFF0000) == kZoneGet) && ((_si == z->u.get->_icon) || (_di == z->u.get->_icon)))) {
(((z->_type & 0xFFFF0000) == kZoneGet) && ((_si == z->u.get->_icon) || (_di == z->u.get->_icon)))) {
// special Zone
if ((type == 0) && ((z->_type & 0xFFFF0000) == 0)) return z;
if (z->_type == type) return z;
if ((z->_type & 0xFFFF0000) == type) return z;
if ((type == 0) && ((z->_type & 0xFFFF0000) == 0))
return z;
if (z->_type == type)
return z;
if ((z->_type & 0xFFFF0000) == type)
return z;
}
}
if (z->_limits._left != -1) continue;
if (_si < _yourself._zone.pos._position._x) continue;
if (_si > (_yourself._zone.pos._position._x + _yourself._cnv._width)) continue;
if (_di < _yourself._zone.pos._position._y) continue;
if (_di > (_yourself._zone.pos._position._y + _yourself._cnv._height)) continue;
if (z->_limits._left != -1)
continue;
if (_si < _yourself._zone.pos._position._x)
continue;
if (_si > (_yourself._zone.pos._position._x + _yourself._cnv._width))
continue;
if (_di < _yourself._zone.pos._position._y)
continue;
if (_di > (_yourself._zone.pos._position._y + _yourself._cnv._height))
continue;
}
// normal Zone
if ((type == 0) && ((z->_type & 0xFFFF0000) == 0)) return z;
if (z->_type == type) return z;
if ((z->_type & 0xFFFF0000) == type) return z;
if ((type == 0) && ((z->_type & 0xFFFF0000) == 0))
return z;
if (z->_type == type)
return z;
if ((z->_type & 0xFFFF0000) == type)
return z;
}