diff options
-rw-r--r-- | engines/agi/op_cmd.cpp | 374 | ||||
-rw-r--r-- | engines/agi/op_test.cpp | 48 | ||||
-rw-r--r-- | engines/agi/opcodes.cpp | 630 | ||||
-rw-r--r-- | engines/agi/opcodes.h | 416 |
4 files changed, 734 insertions, 734 deletions
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp index f488bda922..42c3e57a34 100644 --- a/engines/agi/op_cmd.cpp +++ b/engines/agi/op_cmd.cpp @@ -54,17 +54,17 @@ namespace Agi { #define setflag(a,b) state->_vm->setflag(a,b) #define getflag(a) state->_vm->getflag(a) -void cmd_increment(AgiGame *state, uint8 *p) { +void cmdIncrement(AgiGame *state, uint8 *p) { if (_v[p0] != 0xff) ++_v[p0]; } -void cmd_decrement(AgiGame *state, uint8 *p) { +void cmdDecrement(AgiGame *state, uint8 *p) { if (_v[p0] != 0) --_v[p0]; } -void cmd_assignn(AgiGame *state, uint8 *p) { +void cmdAssignN(AgiGame *state, uint8 *p) { _v[p0] = p1; // WORKAROUND for a bug in fan _game "Get outta SQ" @@ -78,83 +78,83 @@ void cmd_assignn(AgiGame *state, uint8 *p) { _v[p0] = 8; } -void cmd_addn(AgiGame *state, uint8 *p) { +void cmdAddN(AgiGame *state, uint8 *p) { _v[p0] += p1; } -void cmd_subn(AgiGame *state, uint8 *p) { +void cmdSubN(AgiGame *state, uint8 *p) { _v[p0] -= p1; } -void cmd_assignv(AgiGame *state, uint8 *p) { +void cmdAssignV(AgiGame *state, uint8 *p) { _v[p0] = _v[p1]; } -void cmd_addv(AgiGame *state, uint8 *p) { +void cmdAddV(AgiGame *state, uint8 *p) { _v[p0] += _v[p1]; } -void cmd_subv(AgiGame *state, uint8 *p) { +void cmdSubV(AgiGame *state, uint8 *p) { _v[p0] -= _v[p1]; } -void cmd_mul_n(AgiGame *state, uint8 *p) { +void cmdMulN(AgiGame *state, uint8 *p) { _v[p0] *= p1; } -void cmd_mul_v(AgiGame *state, uint8 *p) { +void cmdMulV(AgiGame *state, uint8 *p) { _v[p0] *= _v[p1]; } -void cmd_div_n(AgiGame *state, uint8 *p) { +void cmdDivN(AgiGame *state, uint8 *p) { _v[p0] /= p1; } -void cmd_div_v(AgiGame *state, uint8 *p) { +void cmdDivV(AgiGame *state, uint8 *p) { _v[p0] /= _v[p1]; } -void cmd_random(AgiGame *state, uint8 *p) { +void cmdRandom(AgiGame *state, uint8 *p) { _v[p2] = state->_vm->_rnd->getRandomNumber(p1 - p0) + p0; } -void cmd_lindirectn(AgiGame *state, uint8 *p) { +void cmdLindirectN(AgiGame *state, uint8 *p) { _v[_v[p0]] = p1; } -void cmd_lindirectv(AgiGame *state, uint8 *p) { +void cmdLindirectV(AgiGame *state, uint8 *p) { _v[_v[p0]] = _v[p1]; } -void cmd_rindirect(AgiGame *state, uint8 *p) { +void cmdRindirect(AgiGame *state, uint8 *p) { _v[p0] = _v[_v[p1]]; } -void cmd_set(AgiGame *state, uint8 *p) { +void cmdSet(AgiGame *state, uint8 *p) { setflag(*p, true); } -void cmd_reset(AgiGame *state, uint8 *p) { +void cmdReset(AgiGame *state, uint8 *p) { setflag(*p, false); } -void cmd_toggle(AgiGame *state, uint8 *p) { +void cmdToggle(AgiGame *state, uint8 *p) { setflag(*p, !getflag(*p)); } -void cmd_set_v(AgiGame *state, uint8 *p) { +void cmdSetV(AgiGame *state, uint8 *p) { setflag(_v[p0], true); } -void cmd_reset_v(AgiGame *state, uint8 *p) { +void cmdResetV(AgiGame *state, uint8 *p) { setflag(_v[p0], false); } -void cmd_toggle_v(AgiGame *state, uint8 *p) { +void cmdToggleV(AgiGame *state, uint8 *p) { setflag(_v[p0], !getflag(_v[p0])); } -void cmd_new_room(AgiGame *state, uint8 *p) { +void cmdNewRoom(AgiGame *state, uint8 *p) { state->_vm->newRoom(p0); // WORKAROUND: Works around intro skipping bug (#1737343) in Gold Rush. @@ -170,79 +170,79 @@ void cmd_new_room(AgiGame *state, uint8 *p) { state->keypress = 0; } -void cmd_new_room_f(AgiGame *state, uint8 *p) { +void cmdNewRoomF(AgiGame *state, uint8 *p) { state->_vm->newRoom(_v[p0]); } -void cmd_load_view(AgiGame *state, uint8 *p) { +void cmdLoadView(AgiGame *state, uint8 *p) { state->_vm->agiLoadResource(rVIEW, p0); } -void cmd_load_logic(AgiGame *state, uint8 *p) { +void cmdLoadLogic(AgiGame *state, uint8 *p) { state->_vm->agiLoadResource(rLOGIC, p0); } -void cmd_load_sound(AgiGame *state, uint8 *p) { +void cmdLoadSound(AgiGame *state, uint8 *p) { state->_vm->agiLoadResource(rSOUND, p0); } -void cmd_load_view_f(AgiGame *state, uint8 *p) { +void cmdLoadViewF(AgiGame *state, uint8 *p) { state->_vm->agiLoadResource(rVIEW, _v[p0]); } -void cmd_load_logic_f(AgiGame *state, uint8 *p) { +void cmdLoadLogicF(AgiGame *state, uint8 *p) { state->_vm->agiLoadResource(rLOGIC, _v[p0]); } -void cmd_discard_view(AgiGame *state, uint8 *p) { +void cmdDiscardView(AgiGame *state, uint8 *p) { state->_vm->agiUnloadResource(rVIEW, p0); } -void cmd_object_on_anything(AgiGame *state, uint8 *p) { +void cmdObjectOnAnything(AgiGame *state, uint8 *p) { vt.flags &= ~(ON_WATER | ON_LAND); } -void cmd_object_on_land(AgiGame *state, uint8 *p) { +void cmdObjectOnLand(AgiGame *state, uint8 *p) { vt.flags |= ON_LAND; } -void cmd_object_on_water(AgiGame *state, uint8 *p) { +void cmdObjectOnWater(AgiGame *state, uint8 *p) { vt.flags |= ON_WATER; } -void cmd_observe_horizon(AgiGame *state, uint8 *p) { +void cmdObserveHorizon(AgiGame *state, uint8 *p) { vt.flags &= ~IGNORE_HORIZON; } -void cmd_ignore_horizon(AgiGame *state, uint8 *p) { +void cmdIgnoreHorizon(AgiGame *state, uint8 *p) { vt.flags |= IGNORE_HORIZON; } -void cmd_observe_objs(AgiGame *state, uint8 *p) { +void cmdObserveObjs(AgiGame *state, uint8 *p) { vt.flags &= ~IGNORE_OBJECTS; } -void cmd_ignore_objs(AgiGame *state, uint8 *p) { +void cmdIgnoreObjs(AgiGame *state, uint8 *p) { vt.flags |= IGNORE_OBJECTS; } -void cmd_observe_blocks(AgiGame *state, uint8 *p) { +void cmdObserveBlocks(AgiGame *state, uint8 *p) { vt.flags &= ~IGNORE_BLOCKS; } -void cmd_ignore_blocks(AgiGame *state, uint8 *p) { +void cmdIgnoreBlocks(AgiGame *state, uint8 *p) { vt.flags |= IGNORE_BLOCKS; } -void cmd_set_horizon(AgiGame *state, uint8 *p) { +void cmdSetHorizon(AgiGame *state, uint8 *p) { state->horizon = p0; } -void cmd_get_priority(AgiGame *state, uint8 *p) { +void cmdGetPriority(AgiGame *state, uint8 *p) { _v[p1] = vt.priority; } -void cmd_set_priority(AgiGame *state, uint8 *p) { +void cmdSetPriority(AgiGame *state, uint8 *p) { vt.flags |= FIXED_PRIORITY; vt.priority = p1; @@ -265,242 +265,242 @@ void cmd_set_priority(AgiGame *state, uint8 *p) { } } -void cmd_set_priority_f(AgiGame *state, uint8 *p) { +void cmdSetPriorityF(AgiGame *state, uint8 *p) { vt.flags |= FIXED_PRIORITY; vt.priority = _v[p1]; } -void cmd_release_priority(AgiGame *state, uint8 *p) { +void cmdReleasePriority(AgiGame *state, uint8 *p) { vt.flags &= ~FIXED_PRIORITY; } -void cmd_set_upper_left(AgiGame *state, uint8 *p) { // do nothing (AGI 2.917) +void cmdSetUpperLeft(AgiGame *state, uint8 *p) { // do nothing (AGI 2.917) } -void cmd_start_update(AgiGame *state, uint8 *p) { +void cmdStartUpdate(AgiGame *state, uint8 *p) { state->_vm->startUpdate(&vt); } -void cmd_stop_update(AgiGame *state, uint8 *p) { +void cmdStopUpdate(AgiGame *state, uint8 *p) { state->_vm->stopUpdate(&vt); } -void cmd_current_view(AgiGame *state, uint8 *p) { +void cmdCurrentView(AgiGame *state, uint8 *p) { _v[p1] = vt.currentView; } -void cmd_current_cel(AgiGame *state, uint8 *p) { +void cmdCurrentCel(AgiGame *state, uint8 *p) { _v[p1] = vt.currentCel; debugC(4, kDebugLevelScripts, "v%d=%d", p1, _v[p1]); } -void cmd_current_loop(AgiGame *state, uint8 *p) { +void cmdCurrentLoop(AgiGame *state, uint8 *p) { _v[p1] = vt.currentLoop; } -void cmd_last_cel(AgiGame *state, uint8 *p) { +void cmdLastCel(AgiGame *state, uint8 *p) { _v[p1] = vt.loopData->numCels - 1; } -void cmd_set_cel(AgiGame *state, uint8 *p) { +void cmdSetCel(AgiGame *state, uint8 *p) { state->_vm->setCel(&vt, p1); vt.flags &= ~DONTUPDATE; } -void cmd_set_cel_f(AgiGame *state, uint8 *p) { +void cmdSetCelF(AgiGame *state, uint8 *p) { state->_vm->setCel(&vt, _v[p1]); vt.flags &= ~DONTUPDATE; } -void cmd_set_view(AgiGame *state, uint8 *p) { +void cmdSetView(AgiGame *state, uint8 *p) { state->_vm->setView(&vt, p1); } -void cmd_set_view_f(AgiGame *state, uint8 *p) { +void cmdSetViewF(AgiGame *state, uint8 *p) { state->_vm->setView(&vt, _v[p1]); } -void cmd_set_loop(AgiGame *state, uint8 *p) { +void cmdSetLoop(AgiGame *state, uint8 *p) { state->_vm->setLoop(&vt, p1); } -void cmd_set_loop_f(AgiGame *state, uint8 *p) { +void cmdSetLoopF(AgiGame *state, uint8 *p) { state->_vm->setLoop(&vt, _v[p1]); } -void cmd_number_of_loops(AgiGame *state, uint8 *p) { +void cmdNumberOfLoops(AgiGame *state, uint8 *p) { _v[p1] = vt.numLoops; } -void cmd_fix_loop(AgiGame *state, uint8 *p) { +void cmdFixLoop(AgiGame *state, uint8 *p) { vt.flags |= FIX_LOOP; } -void cmd_release_loop(AgiGame *state, uint8 *p) { +void cmdReleaseLoop(AgiGame *state, uint8 *p) { vt.flags &= ~FIX_LOOP; } -void cmd_step_size(AgiGame *state, uint8 *p) { +void cmdStepSize(AgiGame *state, uint8 *p) { vt.stepSize = _v[p1]; } -void cmd_step_time(AgiGame *state, uint8 *p) { +void cmdStepTime(AgiGame *state, uint8 *p) { vt.stepTime = vt.stepTimeCount = _v[p1]; } -void cmd_cycle_time(AgiGame *state, uint8 *p) { +void cmdCycleTime(AgiGame *state, uint8 *p) { vt.cycleTime = vt.cycleTimeCount = _v[p1]; } -void cmd_stop_cycling(AgiGame *state, uint8 *p) { +void cmdStopCycling(AgiGame *state, uint8 *p) { vt.flags &= ~CYCLING; } -void cmd_start_cycling(AgiGame *state, uint8 *p) { +void cmdStartCycling(AgiGame *state, uint8 *p) { vt.flags |= CYCLING; } -void cmd_normal_cycle(AgiGame *state, uint8 *p) { +void cmdNormalCycle(AgiGame *state, uint8 *p) { vt.cycle = CYCLE_NORMAL; vt.flags |= CYCLING; } -void cmd_reverse_cycle(AgiGame *state, uint8 *p) { +void cmdReverseCycle(AgiGame *state, uint8 *p) { vt.cycle = CYCLE_REVERSE; vt.flags |= CYCLING; } -void cmd_set_dir(AgiGame *state, uint8 *p) { +void cmdSetDir(AgiGame *state, uint8 *p) { vt.direction = _v[p1]; } -void cmd_get_dir(AgiGame *state, uint8 *p) { +void cmdGetDir(AgiGame *state, uint8 *p) { _v[p1] = vt.direction; } -void cmd_get_room_f(AgiGame *state, uint8 *p) { +void cmdGetRoomF(AgiGame *state, uint8 *p) { _v[p1] = state->_vm->objectGetLocation(_v[p0]); } -void cmd_put(AgiGame *state, uint8 *p) { +void cmdPut(AgiGame *state, uint8 *p) { state->_vm->objectSetLocation(p0, _v[p1]); } -void cmd_put_f(AgiGame *state, uint8 *p) { +void cmdPutF(AgiGame *state, uint8 *p) { state->_vm->objectSetLocation(_v[p0], _v[p1]); } -void cmd_drop(AgiGame *state, uint8 *p) { +void cmdDrop(AgiGame *state, uint8 *p) { state->_vm->objectSetLocation(p0, 0); } -void cmd_get(AgiGame *state, uint8 *p) { +void cmdGet(AgiGame *state, uint8 *p) { state->_vm->objectSetLocation(p0, EGO_OWNED); } -void cmd_get_f(AgiGame *state, uint8 *p) { +void cmdGetF(AgiGame *state, uint8 *p) { state->_vm->objectSetLocation(_v[p0], EGO_OWNED); } -void cmd_word_to_string(AgiGame *state, uint8 *p) { +void cmdWordToString(AgiGame *state, uint8 *p) { strcpy(state->strings[p0], state->egoWords[p1].word); } -void cmd_open_dialogue(AgiGame *state, uint8 *p) { +void cmdOpenDialogue(AgiGame *state, uint8 *p) { state->hasWindow = true; } -void cmd_close_dialogue(AgiGame *state, uint8 *p) { +void cmdCloseDialogue(AgiGame *state, uint8 *p) { state->hasWindow = false; } -void cmd_close_window(AgiGame *state, uint8 *p) { +void cmdCloseWindow(AgiGame *state, uint8 *p) { state->_vm->closeWindow(); } -void cmd_status_line_on(AgiGame *state, uint8 *p) { +void cmdStatusLineOn(AgiGame *state, uint8 *p) { state->statusLine = true; state->_vm->writeStatus(); } -void cmd_status_line_off(AgiGame *state, uint8 *p) { +void cmdStatusLineOff(AgiGame *state, uint8 *p) { state->statusLine = false; state->_vm->writeStatus(); } -void cmd_show_obj(AgiGame *state, uint8 *p) { +void cmdShowObj(AgiGame *state, uint8 *p) { state->_vm->_sprites->showObj(p0); } -void cmd_show_obj_v(AgiGame *state, uint8 *p) { +void cmdShowObjV(AgiGame *state, uint8 *p) { state->_vm->_sprites->showObj(_v[p0]); } -void cmd_sound(AgiGame *state, uint8 *p) { +void cmdSound(AgiGame *state, uint8 *p) { state->_vm->_sound->startSound(p0, p1); } -void cmd_stop_sound(AgiGame *state, uint8 *p) { +void cmdStopSound(AgiGame *state, uint8 *p) { state->_vm->_sound->stopSound(); } -void cmd_menu_input(AgiGame *state, uint8 *p) { +void cmdMenuInput(AgiGame *state, uint8 *p) { state->_vm->newInputMode(INPUT_MENU); } -void cmd_enable_item(AgiGame *state, uint8 *p) { +void cmdEnableItem(AgiGame *state, uint8 *p) { state->_vm->_menu->setItem(p0, true); } -void cmd_disable_item(AgiGame *state, uint8 *p) { +void cmdDisableItem(AgiGame *state, uint8 *p) { state->_vm->_menu->setItem(p0, false); } -void cmd_submit_menu(AgiGame *state, uint8 *p) { +void cmdSubmitMenu(AgiGame *state, uint8 *p) { state->_vm->_menu->submit(); } -void cmd_set_scan_start(AgiGame *state, uint8 *p) { +void cmdSetScanStart(AgiGame *state, uint8 *p) { state->_curLogic->sIP = state->_curLogic->cIP; } -void cmd_reset_scan_start(AgiGame *state, uint8 *p) { +void cmdResetScanStart(AgiGame *state, uint8 *p) { state->_curLogic->sIP = 2; } -void cmd_save_game(AgiGame *state, uint8 *p) { +void cmdSaveGame(AgiGame *state, uint8 *p) { state->simpleSave ? state->_vm->saveGameSimple() : state->_vm->saveGameDialog(); } -void cmd_load_game(AgiGame *state, uint8 *p) { +void cmdLoadGame(AgiGame *state, uint8 *p) { assert(1); state->simpleSave ? state->_vm->loadGameSimple() : state->_vm->loadGameDialog(); } -void cmd_init_disk(AgiGame *state, uint8 *p) { // do nothing +void cmdInitDisk(AgiGame *state, uint8 *p) { // do nothing } -void cmd_log(AgiGame *state, uint8 *p) { // do nothing +void cmdLog(AgiGame *state, uint8 *p) { // do nothing } -void cmd_trace_on(AgiGame *state, uint8 *p) { // do nothing +void cmdTraceOn(AgiGame *state, uint8 *p) { // do nothing } -void cmd_trace_info(AgiGame *state, uint8 *p) { // do nothing +void cmdTraceInfo(AgiGame *state, uint8 *p) { // do nothing } -void cmd_show_mem(AgiGame *state, uint8 *p) { +void cmdShowMem(AgiGame *state, uint8 *p) { state->_vm->messageBox("Enough memory"); } -void cmd_init_joy(AgiGame *state, uint8 *p) { // do nothing +void cmdInitJoy(AgiGame *state, uint8 *p) { // do nothing } -void cmd_script_size(AgiGame *state, uint8 *p) { +void cmdScriptSize(AgiGame *state, uint8 *p) { debug(0, "script.size(%d)", p0); } -void cmd_cancel_line(AgiGame *state, uint8 *p) { +void cmdCancelLine(AgiGame *state, uint8 *p) { state->inputBuffer[0] = 0; state->cursorPos = 0; state->_vm->writePrompt(); @@ -516,7 +516,7 @@ void cmd_cancel_line(AgiGame *state, uint8 *p) { // 4051 (When ego is stationary), // 471 (When walking on the first screen's bridge), // 71 (When walking around, using the mouse or the keyboard). -void cmd_obj_status_f(AgiGame *state, uint8 *p) { +void cmdObjStatusF(AgiGame *state, uint8 *p) { const char *cycleDesc; // Object's cycle description line const char *motionDesc; // Object's motion description line char msg[256]; // The whole object status message @@ -588,20 +588,20 @@ void cmd_obj_status_f(AgiGame *state, uint8 *p) { // unk_174: Change priority table (used in KQ4) -- j5 // unk_177: Disable menus completely -- j5 // unk_181: Deactivate keypressed control (default control of ego) -void cmd_set_simple(AgiGame *state, uint8 *p) { +void cmdSetSimple(AgiGame *state, uint8 *p) { if (!(getFeatures() & (GF_AGI256 | GF_AGI256_2))) { state->simpleSave = true; } else { // AGI256 and AGI256-2 use this unknown170 command to load 256 color pictures. - // Load the picture. Similar to void cmd_load_pic(AgiGame *state, uint8 *p). + // Load the picture. Similar to void cmdLoad_pic(AgiGame *state, uint8 *p). state->_vm->_sprites->eraseBoth(); state->_vm->agiLoadResource(rPICTURE, _v[p0]); - // Draw the picture. Similar to void cmd_draw_pic(AgiGame *state, uint8 *p). + // Draw the picture. Similar to void cmdDraw_pic(AgiGame *state, uint8 *p). state->_vm->_picture->decodePicture(_v[p0], false, true); state->_vm->_sprites->blitBoth(); state->pictureShown = 0; - // Show the picture. Similar to void cmd_show_pic(AgiGame *state, uint8 *p). + // Show the picture. Similar to void cmdShow_pic(AgiGame *state, uint8 *p). setflag(fOutputMode, false); state->_vm->closeWindow(); state->_vm->_picture->showPic(); @@ -612,25 +612,25 @@ void cmd_set_simple(AgiGame *state, uint8 *p) { } } -void cmd_pop_script(AgiGame *state, uint8 *p) { +void cmdPopScript(AgiGame *state, uint8 *p) { if (getVersion() >= 0x2915) { debug(0, "pop.script"); } } -void cmd_hold_key(AgiGame *state, uint8 *p) { +void cmdHoldKey(AgiGame *state, uint8 *p) { if (getVersion() >= 0x3098) { state->_vm->_egoHoldKey = true; } } -void cmd_discard_sound(AgiGame *state, uint8 *p) { +void cmdDiscardSound(AgiGame *state, uint8 *p) { if (getVersion() >= 0x2936) { debug(0, "discard.sound"); } } -void cmd_hide_mouse(AgiGame *state, uint8 *p) { +void cmdHideMouse(AgiGame *state, uint8 *p) { // WORKAROUND: Turns off current movement that's being caused with the mouse. // This fixes problems with too many popup boxes appearing in the Amiga // Gold Rush's copy protection failure scene (i.e. the hanging scene, logic.192). @@ -643,29 +643,29 @@ void cmd_hide_mouse(AgiGame *state, uint8 *p) { g_system->showMouse(false); } -void cmd_allow_menu(AgiGame *state, uint8 *p) { +void cmdAllowMenu(AgiGame *state, uint8 *p) { if (getVersion() >= 0x3098) { setflag(fMenusWork, ((p0 != 0) ? true : false)); } } -void cmd_show_mouse(AgiGame *state, uint8 *p) { +void cmdShowMouse(AgiGame *state, uint8 *p) { g_system->showMouse(true); } -void cmd_fence_mouse(AgiGame *state, uint8 *p) { +void cmdFenceMouse(AgiGame *state, uint8 *p) { state->mouseFence.moveTo(p0, p1); state->mouseFence.setWidth(p2 - p0); state->mouseFence.setHeight(p3 - p1); } -void cmd_release_key(AgiGame *state, uint8 *p) { +void cmdReleaseKey(AgiGame *state, uint8 *p) { if (getVersion() >= 0x3098) { state->_vm->_egoHoldKey = false; } } -void cmd_adj_ego_move_to_x_y(AgiGame *state, uint8 *p) { +void cmdAdjEgoMoveToXY(AgiGame *state, uint8 *p) { int8 x, y; switch (logicNamesCmd[182].argumentsLength()) { @@ -703,7 +703,7 @@ void cmd_adj_ego_move_to_x_y(AgiGame *state, uint8 *p) { } } -void cmd_parse(AgiGame *state, uint8 *p) { +void cmdParse(AgiGame *state, uint8 *p) { _v[vWordNotFound] = 0; setflag(fEnteredCli, false); setflag(fSaidAcceptedInput, false); @@ -711,7 +711,7 @@ void cmd_parse(AgiGame *state, uint8 *p) { state->_vm->dictionaryWords(state->_vm->agiSprintf(state->strings[p0])); } -void cmd_call(AgiGame *state, uint8 *p) { +void cmdCall(AgiGame *state, uint8 *p) { int oldCIP; int oldLognum; @@ -727,11 +727,11 @@ void cmd_call(AgiGame *state, uint8 *p) { state->_curLogic->cIP = oldCIP; } -void cmd_call_f(AgiGame *state, uint8 *p) { - cmd_call(state, &_v[p0]); +void cmdCallF(AgiGame *state, uint8 *p) { + cmdCall(state, &_v[p0]); } -void cmd_draw_pic(AgiGame *state, uint8 *p) { +void cmdDrawPic(AgiGame *state, uint8 *p) { debugC(6, kDebugLevelScripts, "=== draw pic %d ===", _v[p0]); state->_vm->_sprites->eraseBoth(); state->_vm->_picture->decodePicture(_v[p0], true); @@ -759,7 +759,7 @@ void cmd_draw_pic(AgiGame *state, uint8 *p) { state->_vm->pause(kPausePicture); } -void cmd_show_pic(AgiGame *state, uint8 *p) { +void cmdShowPic(AgiGame *state, uint8 *p) { debugC(6, kDebugLevelScripts, "=== show pic ==="); setflag(fOutputMode, false); @@ -770,19 +770,19 @@ void cmd_show_pic(AgiGame *state, uint8 *p) { debugC(6, kDebugLevelScripts, "--- end of show pic ---"); } -void cmd_load_pic(AgiGame *state, uint8 *p) { +void cmdLoadPic(AgiGame *state, uint8 *p) { state->_vm->_sprites->eraseBoth(); state->_vm->agiLoadResource(rPICTURE, _v[p0]); state->_vm->_sprites->blitBoth(); state->_vm->_sprites->commitBoth(); } -void cmd_discard_pic(AgiGame *state, uint8 *p) { +void cmdDiscardPic(AgiGame *state, uint8 *p) { debugC(6, kDebugLevelScripts, "--- discard pic ---"); // do nothing } -void cmd_overlay_pic(AgiGame *state, uint8 *p) { +void cmdOverlayPic(AgiGame *state, uint8 *p) { debugC(6, kDebugLevelScripts, "--- overlay pic ---"); state->_vm->_sprites->eraseBoth(); @@ -795,7 +795,7 @@ void cmd_overlay_pic(AgiGame *state, uint8 *p) { state->_vm->pause(kPausePicture); } -void cmd_show_pri_screen(AgiGame *state, uint8 *p) { +void cmdShowPriScreen(AgiGame *state, uint8 *p) { state->_vm->_debug.priority = 1; state->_vm->_sprites->eraseBoth(); state->_vm->_picture->showPic(); @@ -809,7 +809,7 @@ void cmd_show_pri_screen(AgiGame *state, uint8 *p) { state->_vm->_sprites->blitBoth(); } -void cmd_animate_obj(AgiGame *state, uint8 *p) { +void cmdAnimateObj(AgiGame *state, uint8 *p) { if (vt.flags & ANIMATED) return; @@ -820,14 +820,14 @@ void cmd_animate_obj(AgiGame *state, uint8 *p) { vt.direction = 0; } -void cmd_unanimate_all(AgiGame *state, uint8 *p) { +void cmdUnanimateAll(AgiGame *state, uint8 *p) { int i; for (i = 0; i < MAX_VIEWTABLE; i++) state->viewTable[i].flags &= ~(ANIMATED | DRAWN); } -void cmd_draw(AgiGame *state, uint8 *p) { +void cmdDraw(AgiGame *state, uint8 *p) { if (vt.flags & DRAWN) return; @@ -871,7 +871,7 @@ void cmd_draw(AgiGame *state, uint8 *p) { debugC(4, kDebugLevelScripts, "vt entry #%d flags = %02x", p0, vt.flags); } -void cmd_erase(AgiGame *state, uint8 *p) { +void cmdErase(AgiGame *state, uint8 *p) { if (~vt.flags & DRAWN) return; @@ -896,7 +896,7 @@ void cmd_erase(AgiGame *state, uint8 *p) { state->_vm->_sprites->commitBlock(x1, y1, x2, y2, true); } -void cmd_position(AgiGame *state, uint8 *p) { +void cmdPosition(AgiGame *state, uint8 *p) { vt.xPos = vt.xPos2 = p1; vt.yPos = vt.yPos2 = p2; @@ -917,7 +917,7 @@ void cmd_position(AgiGame *state, uint8 *p) { state->_vm->clipViewCoordinates(&vt); } -void cmd_position_f(AgiGame *state, uint8 *p) { +void cmdPositionF(AgiGame *state, uint8 *p) { vt.xPos = vt.xPos2 = _v[p1]; vt.yPos = vt.yPos2 = _v[p2]; @@ -928,12 +928,12 @@ void cmd_position_f(AgiGame *state, uint8 *p) { state->_vm->clipViewCoordinates(&vt); } -void cmd_get_posn(AgiGame *state, uint8 *p) { +void cmdGetPosn(AgiGame *state, uint8 *p) { state->vars[p1] = (unsigned char)vt.xPos; state->vars[p2] = (unsigned char)vt.yPos; } -void cmd_reposition(AgiGame *state, uint8 *p) { +void cmdReposition(AgiGame *state, uint8 *p) { int dx = (int8) _v[p1], dy = (int8) _v[p2]; debugC(4, kDebugLevelScripts, "dx=%d, dy=%d", dx, dy); @@ -952,35 +952,35 @@ void cmd_reposition(AgiGame *state, uint8 *p) { state->_vm->fixPosition(p0); } -void cmd_reposition_to(AgiGame *state, uint8 *p) { +void cmdRepositionTo(AgiGame *state, uint8 *p) { vt.xPos = p1; vt.yPos = p2; vt.flags |= UPDATE_POS; state->_vm->fixPosition(p0); } -void cmd_reposition_to_f(AgiGame *state, uint8 *p) { +void cmdRepositionToF(AgiGame *state, uint8 *p) { vt.xPos = _v[p1]; vt.yPos = _v[p2]; vt.flags |= UPDATE_POS; state->_vm->fixPosition(p0); } -void cmd_add_to_pic(AgiGame *state, uint8 *p) { +void cmdAddToPic(AgiGame *state, uint8 *p) { state->_vm->_sprites->addToPic(p0, p1, p2, p3, p4, p5, p6); } -void cmd_add_to_pic_f(AgiGame *state, uint8 *p) { +void cmdAddToPicF(AgiGame *state, uint8 *p) { state->_vm->_sprites->addToPic(_v[p0], _v[p1], _v[p2], _v[p3], _v[p4], _v[p5], _v[p6]); } -void cmd_force_update(AgiGame *state, uint8 *p) { +void cmdForceUpdate(AgiGame *state, uint8 *p) { state->_vm->_sprites->eraseBoth(); state->_vm->_sprites->blitBoth(); state->_vm->_sprites->commitBoth(); } -void cmd_reverse_loop(AgiGame *state, uint8 *p) { +void cmdReverseLoop(AgiGame *state, uint8 *p) { debugC(4, kDebugLevelScripts, "o%d, f%d", p0, p1); vt.cycle = CYCLE_REV_LOOP; vt.flags |= (DONTUPDATE | UPDATE | CYCLING); @@ -988,7 +988,7 @@ void cmd_reverse_loop(AgiGame *state, uint8 *p) { setflag(p1, false); } -void cmd_end_of_loop(AgiGame *state, uint8 *p) { +void cmdEndOfLoop(AgiGame *state, uint8 *p) { debugC(4, kDebugLevelScripts, "o%d, f%d", p0, p1); vt.cycle = CYCLE_END_OF_LOOP; vt.flags |= (DONTUPDATE | UPDATE | CYCLING); @@ -996,7 +996,7 @@ void cmd_end_of_loop(AgiGame *state, uint8 *p) { setflag(p1, false); } -void cmd_block(AgiGame *state, uint8 *p) { +void cmdBlock(AgiGame *state, uint8 *p) { debugC(4, kDebugLevelScripts, "x1=%d, y1=%d, x2=%d, y2=%d", p0, p1, p2, p3); state->block.active = true; state->block.x1 = p0; @@ -1005,15 +1005,15 @@ void cmd_block(AgiGame *state, uint8 *p) { state->block.y2 = p3; } -void cmd_unblock(AgiGame *state, uint8 *p) { +void cmdUnblock(AgiGame *state, uint8 *p) { state->block.active = false; } -void cmd_normal_motion(AgiGame *state, uint8 *p) { +void cmdNormalMotion(AgiGame *state, uint8 *p) { vt.motion = MOTION_NORMAL; } -void cmd_stop_motion(AgiGame *state, uint8 *p) { +void cmdStopMotion(AgiGame *state, uint8 *p) { vt.direction = 0; vt.motion = MOTION_NORMAL; if (p0 == 0) { // ego only @@ -1022,7 +1022,7 @@ void cmd_stop_motion(AgiGame *state, uint8 *p) { } } -void cmd_start_motion(AgiGame *state, uint8 *p) { +void cmdStartMotion(AgiGame *state, uint8 *p) { vt.motion = MOTION_NORMAL; if (p0 == 0) { // ego only _v[vEgoDir] = 0; @@ -1030,16 +1030,16 @@ void cmd_start_motion(AgiGame *state, uint8 *p) { } } -void cmd_player_control(AgiGame *state, uint8 *p) { +void cmdPlayerControl(AgiGame *state, uint8 *p) { state->playerControl = true; state->viewTable[0].motion = MOTION_NORMAL; } -void cmd_program_control(AgiGame *state, uint8 *p) { +void cmdProgramControl(AgiGame *state, uint8 *p) { state->playerControl = false; } -void cmd_follow_ego(AgiGame *state, uint8 *p) { +void cmdFollowEgo(AgiGame *state, uint8 *p) { vt.motion = MOTION_FOLLOW_EGO; vt.parm1 = p1 > vt.stepSize ? p1 : vt.stepSize; vt.parm2 = p2; @@ -1048,7 +1048,7 @@ void cmd_follow_ego(AgiGame *state, uint8 *p) { vt.flags |= UPDATE; } -void cmd_move_obj(AgiGame *state, uint8 *p) { +void cmdMoveObj(AgiGame *state, uint8 *p) { // _D (_D_WARN "o=%d, x=%d, y=%d, s=%d, f=%d", p0, p1, p2, p3, p4); vt.motion = MOTION_MOVE_OBJ; @@ -1071,7 +1071,7 @@ void cmd_move_obj(AgiGame *state, uint8 *p) { state->_vm->moveObj(&vt); } -void cmd_move_obj_f(AgiGame *state, uint8 *p) { +void cmdMoveObjF(AgiGame *state, uint8 *p) { vt.motion = MOTION_MOVE_OBJ; vt.parm1 = _v[p1]; vt.parm2 = _v[p2]; @@ -1092,7 +1092,7 @@ void cmd_move_obj_f(AgiGame *state, uint8 *p) { state->_vm->moveObj(&vt); } -void cmd_wander(AgiGame *state, uint8 *p) { +void cmdWander(AgiGame *state, uint8 *p) { if (p0 == 0) state->playerControl = false; @@ -1100,7 +1100,7 @@ void cmd_wander(AgiGame *state, uint8 *p) { vt.flags |= UPDATE; } -void cmd_set_game_id(AgiGame *state, uint8 *p) { +void cmdSetGameID(AgiGame *state, uint8 *p) { if (state->_curLogic->texts && (p0 - 1) <= state->_curLogic->numTexts) strncpy(state->id, state->_curLogic->texts[p0 - 1], 8); else @@ -1109,7 +1109,7 @@ void cmd_set_game_id(AgiGame *state, uint8 *p) { debug(0, "Game ID: \"%s\"", state->id); } -void cmd_pause(AgiGame *state, uint8 *p) { +void cmdPause(AgiGame *state, uint8 *p) { int tmp = state->clockEnabled; const char *b[] = { "Continue", NULL }; const char *b_ru[] = { "\x8f\xe0\xae\xa4\xae\xab\xa6\xa8\xe2\xec", NULL }; @@ -1127,21 +1127,21 @@ void cmd_pause(AgiGame *state, uint8 *p) { state->clockEnabled = tmp; } -void cmd_set_menu(AgiGame *state, uint8 *p) { +void cmdSetMenu(AgiGame *state, uint8 *p) { debugC(4, kDebugLevelScripts, "text %02x of %02x", p0, state->_curLogic->numTexts); if (state->_curLogic->texts != NULL && p0 <= state->_curLogic->numTexts) state->_vm->_menu->add(state->_curLogic->texts[p0 - 1]); } -void cmd_set_menu_item(AgiGame *state, uint8 *p) { +void cmdSetMenuItem(AgiGame *state, uint8 *p) { debugC(4, kDebugLevelScripts, "text %02x of %02x", p0, state->_curLogic->numTexts); if (state->_curLogic->texts != NULL && p0 <= state->_curLogic->numTexts) state->_vm->_menu->addItem(state->_curLogic->texts[p0 - 1], p1); } -void cmd_version(AgiGame *state, uint8 *p) { +void cmdVersion(AgiGame *state, uint8 *p) { char verMsg[64]; char ver2Msg[] = "\n" @@ -1181,13 +1181,13 @@ void cmd_version(AgiGame *state, uint8 *p) { state->_vm->messageBox(msg); } -void cmd_configure_screen(AgiGame *state, uint8 *p) { +void cmdConfigureScreen(AgiGame *state, uint8 *p) { state->lineMinPrint = p0; state->lineUserInput = p1; state->lineStatus = p2; } -void cmd_text_screen(AgiGame *state, uint8 *p) { +void cmdTextScreen(AgiGame *state, uint8 *p) { debugC(4, kDebugLevelScripts, "switching to text mode"); state->gfxMode = false; @@ -1199,7 +1199,7 @@ void cmd_text_screen(AgiGame *state, uint8 *p) { state->_vm->_gfx->clearScreen(state->colorBg); } -void cmd_graphics(AgiGame *state, uint8 *p) { +void cmdGraphics(AgiGame *state, uint8 *p) { debugC(4, kDebugLevelScripts, "switching to graphics mode"); if (!state->gfxMode) { @@ -1211,7 +1211,7 @@ void cmd_graphics(AgiGame *state, uint8 *p) { } } -void cmd_set_text_attribute(AgiGame *state, uint8 *p) { +void cmdSetTextAttribute(AgiGame *state, uint8 *p) { state->colorFg = p0; state->colorBg = p1; @@ -1223,11 +1223,11 @@ void cmd_set_text_attribute(AgiGame *state, uint8 *p) { } } -void cmd_status(AgiGame *state, uint8 *p) { +void cmdStatus(AgiGame *state, uint8 *p) { state->_vm->inventory(); } -void cmd_quit(AgiGame *state, uint8 *p) { +void cmdQuit(AgiGame *state, uint8 *p) { const char *buttons[] = { "Quit", "Continue", NULL }; state->_vm->_sound->stopSound(); @@ -1240,7 +1240,7 @@ void cmd_quit(AgiGame *state, uint8 *p) { } } -void cmd_restart_game(AgiGame *state, uint8 *p) { +void cmdRestartGame(AgiGame *state, uint8 *p) { const char *buttons[] = { "Restart", "Continue", NULL }; int sel; @@ -1255,7 +1255,7 @@ void cmd_restart_game(AgiGame *state, uint8 *p) { } } -void cmd_distance(AgiGame *state, uint8 *p) { +void cmdDistance(AgiGame *state, uint8 *p) { int16 x1, y1, x2, y2, d; VtEntry *v0 = &state->viewTable[p0]; VtEntry *v1 = &state->viewTable[p1]; @@ -1306,7 +1306,7 @@ void cmd_distance(AgiGame *state, uint8 *p) { _v[p2] = (unsigned char)d; } -void cmd_accept_input(AgiGame *state, uint8 *p) { +void cmdAcceptInput(AgiGame *state, uint8 *p) { debugC(4, kDebugLevelScripts | kDebugLevelInput, "input normal"); state->_vm->newInputMode(INPUT_NORMAL); @@ -1314,7 +1314,7 @@ void cmd_accept_input(AgiGame *state, uint8 *p) { state->_vm->writePrompt(); } -void cmd_prevent_input(AgiGame *state, uint8 *p) { +void cmdPreventInput(AgiGame *state, uint8 *p) { debugC(4, kDebugLevelScripts | kDebugLevelInput, "no input"); state->_vm->newInputMode(INPUT_NONE); @@ -1323,7 +1323,7 @@ void cmd_prevent_input(AgiGame *state, uint8 *p) { state->_vm->clearPrompt(); } -void cmd_get_string(AgiGame *state, uint8 *p) { +void cmdGetString(AgiGame *state, uint8 *p) { int tex, row, col; debugC(4, kDebugLevelScripts, "%d %d %d %d %d", p0, p1, p2, p3, p4); @@ -1356,7 +1356,7 @@ void cmd_get_string(AgiGame *state, uint8 *p) { } while (state->inputMode == INPUT_GETSTRING && !(state->_vm->shouldQuit() || state->_vm->_restartGame)); } -void cmd_get_num(AgiGame *state, uint8 *p) { +void cmdGetNum(AgiGame *state, uint8 *p) { debugC(4, kDebugLevelScripts, "%d %d", p0, p1); state->_vm->newInputMode(INPUT_GETSTRING); @@ -1383,7 +1383,7 @@ void cmd_get_num(AgiGame *state, uint8 *p) { state->_vm->flushLines(22, 22); } -void cmd_set_cursor_char(AgiGame *state, uint8 *p) { +void cmdSetCursorChar(AgiGame *state, uint8 *p) { if (state->_curLogic->texts != NULL && (p0 - 1) <= state->_curLogic->numTexts) { state->cursorChar = *state->_curLogic->texts[p0 - 1]; } else { @@ -1392,7 +1392,7 @@ void cmd_set_cursor_char(AgiGame *state, uint8 *p) { } } -void cmd_set_key(AgiGame *state, uint8 *p) { +void cmdSetKey(AgiGame *state, uint8 *p) { int key; if (state->lastController >= MAX_CONTROLLERS) { @@ -1411,14 +1411,14 @@ void cmd_set_key(AgiGame *state, uint8 *p) { state->controllerOccured[p2] = false; } -void cmd_set_string(AgiGame *state, uint8 *p) { +void cmdSetString(AgiGame *state, uint8 *p) { // CM: to avoid crash in Groza (str = 150) if (p0 > MAX_STRINGS) return; strcpy(state->strings[p0], state->_curLogic->texts[p1 - 1]); } -void cmd_display(AgiGame *state, uint8 *p) { +void cmdDisplay(AgiGame *state, uint8 *p) { int len = 40; char *s = state->_vm->wordWrapString(state->_curLogic->texts[p2 - 1], &len); @@ -1428,11 +1428,11 @@ void cmd_display(AgiGame *state, uint8 *p) { free(s); } -void cmd_display_f(AgiGame *state, uint8 *p) { +void cmdDisplayF(AgiGame *state, uint8 *p) { state->_vm->printText(state->_curLogic->texts[_v[p2] - 1], _v[p1], 0, _v[p0], 40, state->colorFg, state->colorBg); } -void cmd_clear_text_rect(AgiGame *state, uint8 *p) { +void cmdClearTextRect(AgiGame *state, uint8 *p) { int c, x1, y1, x2, y2; if ((c = p4) != 0) @@ -1457,17 +1457,17 @@ void cmd_clear_text_rect(AgiGame *state, uint8 *p) { state->_vm->_gfx->flushBlock(x1, y1, x2, y2); } -void cmd_toggle_monitor(AgiGame *state, uint8 *p) { +void cmdToggleMonitor(AgiGame *state, uint8 *p) { debug(0, "toggle.monitor"); } -void cmd_echo_line(AgiGame *state, uint8 *p) { +void cmdEchoLine(AgiGame *state, uint8 *p) { strcpy((char *)state->inputBuffer, (const char *)state->echoBuffer); state->cursorPos = strlen((char *)state->inputBuffer); state->hasPrompt = 0; } -void cmd_clear_lines(AgiGame *state, uint8 *p) { +void cmdClearLines(AgiGame *state, uint8 *p) { uint8 l; // Residence 44 calls clear.lines(24,0,0), see Sarien bug #558423 @@ -1481,19 +1481,19 @@ void cmd_clear_lines(AgiGame *state, uint8 *p) { state->_vm->flushLines(p0, l); } -void cmd_print(AgiGame *state, uint8 *p) { +void cmdPrint(AgiGame *state, uint8 *p) { int n = p0 < 1 ? 1 : p0; state->_vm->print(state->_curLogic->texts[n - 1], 0, 0, 0); } -void cmd_print_f(AgiGame *state, uint8 *p) { +void cmdPrintF(AgiGame *state, uint8 *p) { int n = _v[p0] < 1 ? 1 : _v[p0]; state->_vm->print(state->_curLogic->texts[n - 1], 0, 0, 0); } -void cmd_print_at(AgiGame *state, uint8 *p) { +void cmdPrintAt(AgiGame *state, uint8 *p) { int n = p0 < 1 ? 1 : p0; debugC(4, kDebugLevelScripts, "%d %d %d %d", p0, p1, p2, p3); @@ -1501,13 +1501,13 @@ void cmd_print_at(AgiGame *state, uint8 *p) { state->_vm->print(state->_curLogic->texts[n - 1], p1, p2, p3); } -void cmd_print_at_v(AgiGame *state, uint8 *p) { +void cmdPrintAtV(AgiGame *state, uint8 *p) { int n = _v[p0] < 1 ? 1 : _v[p0]; state->_vm->print(state->_curLogic->texts[n - 1], p1, p2, p3); } -void cmd_push_script(AgiGame *state, uint8 *p) { +void cmdPushScript(AgiGame *state, uint8 *p) { // We run AGIMOUSE always as a side effect if (getFeatures() & GF_AGIMOUSE || true) { state->vars[27] = state->_vm->_mouse.button; @@ -1520,7 +1520,7 @@ void cmd_push_script(AgiGame *state, uint8 *p) { } } -void cmd_set_pri_base(AgiGame *state, uint8 *p) { +void cmdSetPriBase(AgiGame *state, uint8 *p) { int i, x, pri; debug(0, "Priority base set to %d", p0); @@ -1536,12 +1536,12 @@ void cmd_set_pri_base(AgiGame *state, uint8 *p) { } } -void cmd_mouse_posn(AgiGame *state, uint8 *p) { +void cmdMousePosn(AgiGame *state, uint8 *p) { _v[p0] = WIN_TO_PIC_X(state->_vm->_mouse.x); _v[p1] = WIN_TO_PIC_Y(state->_vm->_mouse.y); } -void cmd_shake_screen(AgiGame *state, uint8 *p) { +void cmdShakeScreen(AgiGame *state, uint8 *p) { int i; // AGIPAL uses shake.screen values between 100 and 109 to set the palette @@ -1574,13 +1574,13 @@ void cmd_shake_screen(AgiGame *state, uint8 *p) { state->inputEnabled = originalValue; } -void cmd_set_speed(AgiGame *state, uint8 *p) { +void cmdSetSpeed(AgiGame *state, uint8 *p) { // V1 command (void)state; (void)p; } -void cmd_unknown(AgiGame *state, uint8 *p) { +void cmdUnknown(AgiGame *state, uint8 *p) { warning("Skipping unknown opcode %2X", *(p - 1)); } diff --git a/engines/agi/op_test.cpp b/engines/agi/op_test.cpp index 230ed9714d..70d0cc0483 100644 --- a/engines/agi/op_test.cpp +++ b/engines/agi/op_test.cpp @@ -40,80 +40,80 @@ namespace Agi { #define testHas(obj) (state->_vm->objectGetLocation(obj) == EGO_OWNED) #define testObjInRoom(obj, v) (state->_vm->objectGetLocation(obj) == getvar(v)) -void cond_equal(AgiGame *state, uint8 *p) { +void condEqual(AgiGame *state, uint8 *p) { if (p[0] == 11) state->_vm->_timerHack++; state->testResult = testEqual(p[0], p[1]); } -void cond_equalv(AgiGame *state, uint8 *p) { +void condEqualV(AgiGame *state, uint8 *p) { if (p[0] == 11 || p[1] == 11) state->_vm->_timerHack++; state->testResult = testEqual(p[0], getvar(p[1])); } -void cond_less(AgiGame *state, uint8 *p) { +void condLess(AgiGame *state, uint8 *p) { if (p[0] == 11) state->_vm->_timerHack++; state->testResult = testLess(p[0], p[1]); } -void cond_lessv(AgiGame *state, uint8 *p) { +void condLessV(AgiGame *state, uint8 *p) { if (p[0] == 11 || p[1] == 11) state->_vm->_timerHack++; state->testResult = testLess(p[0], getvar(p[1])); } -void cond_greater(AgiGame *state, uint8 *p) { +void condGreater(AgiGame *state, uint8 *p) { if (p[0] == 11) state->_vm->_timerHack++; state->testResult = testGreater(p[0], p[1]); } -void cond_greaterv(AgiGame *state, uint8 *p) { +void condGreaterV(AgiGame *state, uint8 *p) { if (p[0] == 11 || p[1] == 11) state->_vm->_timerHack++; state->testResult = testGreater(p[0], getvar(p[1])); } -void cond_isset(AgiGame *state, uint8 *p) { +void condIsSet(AgiGame *state, uint8 *p) { state->testResult = testIsSet(p[0]); } -void cond_issetv(AgiGame *state, uint8 *p) { +void condIsSetV(AgiGame *state, uint8 *p) { state->testResult = testIsSet(getvar(p[1])); } -void cond_isset_v1(AgiGame *state, uint8 *p) { +void condIsSetV1(AgiGame *state, uint8 *p) { state->testResult = getvar(p[0]) > 0; } -void cond_has(AgiGame *state, uint8 *p) { +void condHas(AgiGame *state, uint8 *p) { state->testResult = testHas(p[0]); } -void cond_obj_in_room(AgiGame *state, uint8 *p) { +void condObjInRoom(AgiGame *state, uint8 *p) { state->testResult = testObjInRoom(p[0], p[1]); } -void cond_posn(AgiGame *state, uint8 *p) { +void condPosn(AgiGame *state, uint8 *p) { state->testResult = state->_vm->testPosn(p[0], p[1], p[2], p[3], p[4]); } -void cond_controller(AgiGame *state, uint8 *p) { +void condController(AgiGame *state, uint8 *p) { state->testResult = state->_vm->testController(p[0]); } -void cond_have_key(AgiGame *state, uint8 *p) { +void condHaveKey(AgiGame *state, uint8 *p) { state->testResult = state->_vm->testKeypressed(); } -void cond_said(AgiGame *state, uint8 *p) { +void condSaid(AgiGame *state, uint8 *p) { int ec = state->_vm->testSaid(p[0], p + 1); state->testResult = ec; } -void cond_said1(AgiGame *state, uint8 *p) { +void condSaid1(AgiGame *state, uint8 *p) { state->testResult = false; if (!getflag(fEnteredCli)) @@ -125,7 +125,7 @@ void cond_said1(AgiGame *state, uint8 *p) { state->testResult = true; } -void cond_said2(AgiGame *state, uint8 *p) { +void condSaid2(AgiGame *state, uint8 *p) { state->testResult = false; if (!getflag(fEnteredCli)) @@ -139,7 +139,7 @@ void cond_said2(AgiGame *state, uint8 *p) { state->testResult = true; } -void cond_said3(AgiGame *state, uint8 *p) { +void condSaid3(AgiGame *state, uint8 *p) { state->testResult = false; if (!getflag(fEnteredCli)) @@ -155,24 +155,24 @@ void cond_said3(AgiGame *state, uint8 *p) { state->testResult = true; } -void cond_compare_strings(AgiGame *state, uint8 *p) { +void condCompareStrings(AgiGame *state, uint8 *p) { debugC(7, kDebugLevelScripts, "comparing [%s], [%s]", state->strings[p[0]], state->strings[p[1]]); state->testResult = state->_vm->testCompareStrings(p[0], p[1]); } -void cond_obj_in_box(AgiGame *state, uint8 *p) { +void condObjInBox(AgiGame *state, uint8 *p) { state->testResult = state->_vm->testObjInBox(p[0], p[1], p[2], p[3], p[4]); } -void cond_center_posn(AgiGame *state, uint8 *p) { +void condCenterPosn(AgiGame *state, uint8 *p) { state->testResult = state->_vm->testObjCenter(p[0], p[1], p[2], p[3], p[4]); } -void cond_right_posn(AgiGame *state, uint8 *p) { +void condRightPosn(AgiGame *state, uint8 *p) { state->testResult = state->_vm->testObjRight(p[0], p[1], p[2], p[3], p[4]); } -void cond_unknown_13(AgiGame *state, uint8 *p) { +void condUnknown13(AgiGame *state, uint8 *p) { // My current theory is that this command checks whether the ego is currently moving // and that that movement has been caused using the mouse and not using the keyboard. // I base this theory on the game's behavior on an Amiga emulator, not on disassembly. @@ -184,7 +184,7 @@ void cond_unknown_13(AgiGame *state, uint8 *p) { state->testResult = ec; } -void cond_unknown(AgiGame *state, uint8 *p) { +void condUnknown(AgiGame *state, uint8 *p) { warning("Skipping unknown test command %2X", *(p - 1)); state->testResult = false; } diff --git a/engines/agi/opcodes.cpp b/engines/agi/opcodes.cpp index d700764f7f..b2bccd8a3c 100644 --- a/engines/agi/opcodes.cpp +++ b/engines/agi/opcodes.cpp @@ -29,332 +29,332 @@ AgiInstruction *logicNamesTest; AgiInstruction *logicNamesCmd; AgiInstruction insV1Test[] = { - { "", "", &cond_unknown }, // 00 - { "equaln", "vn", &cond_equal }, // 01 - { "equalv", "vv", &cond_equalv }, // 02 - { "lessn", "vn", &cond_less }, // 03 - { "lessv", "vv", &cond_lessv }, // 04 - { "greatern", "vn", &cond_greater }, // 05 - { "greaterv", "vv", &cond_greaterv }, // 06 - { "isset", "v", &cond_isset_v1 }, // 07 - { "has", "n", &cond_has }, // 08 - { "said", "nnnn", &cond_said2 }, // 09 - { "posn", "nnnnn", &cond_posn }, // 0A - { "controller", "n", &cond_controller }, // 0B - { "obj.in.room", "nv", &cond_obj_in_room }, // 0C - { "said", "nnnnnn", &cond_said3 }, // 0D - { "have.key", "", &cond_have_key }, // 0E - { "said", "nn", &cond_said1 }, // 0F - { "bit", "nv", &cond_unknown }, // 10 + { "", "", &condUnknown }, // 00 + { "equaln", "vn", &condEqual }, // 01 + { "equalv", "vv", &condEqualV }, // 02 + { "lessn", "vn", &condLess }, // 03 + { "lessv", "vv", &condLessV }, // 04 + { "greatern", "vn", &condGreater }, // 05 + { "greaterv", "vv", &condGreaterV }, // 06 + { "isset", "v", &condIsSetV1 }, // 07 + { "has", "n", &condHas }, // 08 + { "said", "nnnn", &condSaid2 }, // 09 + { "posn", "nnnnn", &condPosn }, // 0A + { "controller", "n", &condController }, // 0B + { "obj.in.room", "nv", &condObjInRoom }, // 0C + { "said", "nnnnnn", &condSaid3 }, // 0D + { "have.key", "", &condHaveKey }, // 0E + { "said", "nn", &condSaid1 }, // 0F + { "bit", "nv", &condUnknown }, // 10 }; AgiInstruction insV1[] = { { "return", "", NULL }, // 00 - { "increment", "v", &cmd_increment }, // 01 - { "decrement", "v", &cmd_decrement }, // 02 - { "assignn", "vn", &cmd_assignn }, // 03 - { "assignv", "vv", &cmd_assignv }, // 04 - { "addn", "vn", &cmd_addn }, // 05 - { "addv", "vv", &cmd_addv }, // 06 - { "subn", "vn", &cmd_subn }, // 07 - { "subv", "vv", &cmd_subv }, // 08 - { "load.view", "n", &cmd_load_view }, // 09 - { "animate.obj", "n", &cmd_animate_obj }, // 0A - { "new.room", "n", &cmd_new_room }, // 0B - { "draw.pic", "v", &cmd_draw_pic }, // 0C - { "print", "s", &cmd_print }, // 0D - { "status", "", &cmd_status }, // 0E - { "save.game", "", &cmd_save_game }, // 0F - { "restore.game", "", &cmd_load_game }, // 10 - { "...", "", &cmd_init_disk }, // 11 TODO - { "restart.game", "", &cmd_restart_game }, // 12 - { "random", "v", &cmd_random }, // 13 TODO: 1 vs 3 vars - { "get", "n", &cmd_get }, // 14 - { "drop", "n", &cmd_drop }, // 15 - { "draw", "n", &cmd_draw }, // 16 - { "erase", "n", &cmd_erase }, // 17 - { "position", "nnn", &cmd_position }, // 18 - { "position.v", "nvv", &cmd_position_f }, // 19 - { "get.posn", "nvv", &cmd_get_posn }, // 1A - { "set.cel", "nn", &cmd_set_cel }, // 1B - { "set.loop", "nn", &cmd_set_loop }, // 1C - { "end.of.loop", "nn", &cmd_end_of_loop }, // 1D - { "reverse.loop", "nn", &cmd_reverse_loop }, // 1E - { "move.obj", "nnnnn", &cmd_move_obj }, // 1F - { "set.view", "nn", &cmd_set_view }, // 20 - { "follow.ego", "nnn", &cmd_follow_ego }, // 21 - { "...", "", &cmd_unknown }, // 22 - { "...", "", &cmd_unknown }, // 23 - { "ignore.blocks", "n", &cmd_ignore_blocks }, // 24 - { "observe.blocks", "n", &cmd_observe_blocks }, // 25 - { "wander", "n", &cmd_wander }, // 26 - { "reposition", "nvv", &cmd_reposition }, // 27 - { "stop.motion", "n", &cmd_stop_motion }, // 28 - { "start.motion", "n", &cmd_start_motion }, // 29 - { "stop.cycling", "n", &cmd_stop_cycling }, // 2A - { "start.cycling", "n", &cmd_start_cycling }, // 2B - { "stop.update", "n", &cmd_stop_update }, // 2C - { "start.update", "n", &cmd_start_update }, // 2D - { "program.control", "", &cmd_program_control }, // 2E - { "player.control", "", &cmd_player_control }, // 2F - { "set.priority", "nn", &cmd_set_priority }, // 30 - { "release.priority", "n", &cmd_release_priority }, // 31 - { "add.to.pic", "nnnnnn", &cmd_add_to_pic }, // 32 TODO: 7 vs 8 args - { "set.horizon", "n", &cmd_set_horizon }, // 33 - { "ignore.horizon", "n", &cmd_ignore_horizon }, // 34 - { "observe.horizon", "n", &cmd_observe_horizon }, // 35 - { "load.logics", "n", &cmd_load_logic }, // 36 - { "object.on.water", "n", &cmd_object_on_water }, // 37 - { "load.pic", "v", &cmd_load_pic }, // 38 - { "load.sound", "n", &cmd_load_sound }, // 39 - { "sound", "nn", &cmd_sound }, // 3A - { "stop.sound", "", &cmd_stop_sound }, // 3B - { "set.v", "v", &cmd_set_v }, // 3C - { "reset.v", "v", &cmd_reset_v }, // 3D - { "toggle.v", "v", &cmd_toggle_v }, // 3E - { "new.room.v", "v", &cmd_new_room_f }, // 3F - { "call", "n", &cmd_call }, // 40 - { "...", "", &cmd_unknown }, // 41 - { "set.speed", "v", &cmd_set_speed }, // 42 - { "move.obj.v", "nvvvv", &cmd_move_obj_f }, // 43 - { "...", "", &cmd_unknown }, // 44 - { "...", "", &cmd_unknown }, // 45 - { "...", "", &cmd_unknown }, // 46 - { "...", "", &cmd_unknown }, // 47 - { "...", "nv", &cmd_unknown }, // 48 get.priority?? - { "ignore.objs", "n", &cmd_ignore_objs }, // 49 - { "observe.objs", "n", &cmd_observe_objs }, // 4A - { "distance", "nnv", &cmd_distance }, // 4B - { "object.on.land", "n", &cmd_object_on_land }, // 4C - { "...", "nv", &cmd_unknown }, // 4D set.priority.v??? - { "...", "", &cmd_unknown }, // 4E - { "load.logics", "n", &cmd_load_logic }, // 4F TODO: what is the other load.logics then? - { "display", "nnns", &cmd_display }, // 50 TODO: 4 vs 3 args - { "prevent.input???", "", &cmd_unknown }, // 51 - { "...", "", &cmd_unknown }, // 52 - { "...", "n", &cmd_unknown }, // 53 ??? - { "...", "", &cmd_unknown }, // 54 ??? - { "stop.motion", "", &cmd_stop_motion }, // 55 or force.update?? - { "discard.view", "n", &cmd_discard_view }, // 56 - { "discard.pic", "v", &cmd_discard_pic }, // 57 - { "...", "nn", &cmd_unknown }, // 58 - { "...", "", &cmd_unknown }, // 59 - { "last.cel", "nv", &cmd_last_cel }, // 5A - { "set.cel.v", "nv", &cmd_set_cel_f }, // 5B - { "...", "", &cmd_unknown }, // 5C - { "load.view", "n", &cmd_load_view }, // 5D - { "...", "", &cmd_unknown }, // 5E - { "...", "", &cmd_unknown }, // 5F - { "setbit", "nv", &cmd_unknown }, // 60 + { "increment", "v", &cmdIncrement }, // 01 + { "decrement", "v", &cmdDecrement }, // 02 + { "assignn", "vn", &cmdAssignN }, // 03 + { "assignv", "vv", &cmdAssignV }, // 04 + { "addn", "vn", &cmdAddN }, // 05 + { "addv", "vv", &cmdAddV }, // 06 + { "subn", "vn", &cmdSubN }, // 07 + { "subv", "vv", &cmdSubV }, // 08 + { "load.view", "n", &cmdLoadView }, // 09 + { "animate.obj", "n", &cmdAnimateObj }, // 0A + { "new.room", "n", &cmdNewRoom }, // 0B + { "draw.pic", "v", &cmdDrawPic }, // 0C + { "print", "s", &cmdPrint }, // 0D + { "status", "", &cmdStatus }, // 0E + { "save.game", "", &cmdSaveGame }, // 0F + { "restore.game", "", &cmdLoadGame }, // 10 + { "...", "", &cmdInitDisk }, // 11 TODO + { "restart.game", "", &cmdRestartGame }, // 12 + { "random", "v", &cmdRandom }, // 13 TODO: 1 vs 3 vars + { "get", "n", &cmdGet }, // 14 + { "drop", "n", &cmdDrop }, // 15 + { "draw", "n", &cmdDraw }, // 16 + { "erase", "n", &cmdErase }, // 17 + { "position", "nnn", &cmdPosition }, // 18 + { "position.v", "nvv", &cmdPositionF }, // 19 + { "get.posn", "nvv", &cmdGetPosn }, // 1A + { "set.cel", "nn", &cmdSetCel }, // 1B + { "set.loop", "nn", &cmdSetLoop }, // 1C + { "end.of.loop", "nn", &cmdEndOfLoop }, // 1D + { "reverse.loop", "nn", &cmdReverseLoop }, // 1E + { "move.obj", "nnnnn", &cmdMoveObj }, // 1F + { "set.view", "nn", &cmdSetView }, // 20 + { "follow.ego", "nnn", &cmdFollowEgo }, // 21 + { "...", "", &cmdUnknown }, // 22 + { "...", "", &cmdUnknown }, // 23 + { "ignore.blocks", "n", &cmdIgnoreBlocks }, // 24 + { "observe.blocks", "n", &cmdObserveBlocks }, // 25 + { "wander", "n", &cmdWander }, // 26 + { "reposition", "nvv", &cmdReposition }, // 27 + { "stop.motion", "n", &cmdStopMotion }, // 28 + { "start.motion", "n", &cmdStartMotion }, // 29 + { "stop.cycling", "n", &cmdStopCycling }, // 2A + { "start.cycling", "n", &cmdStartCycling }, // 2B + { "stop.update", "n", &cmdStopUpdate }, // 2C + { "start.update", "n", &cmdStartUpdate }, // 2D + { "program.control", "", &cmdProgramControl }, // 2E + { "player.control", "", &cmdPlayerControl }, // 2F + { "set.priority", "nn", &cmdSetPriority }, // 30 + { "release.priority", "n", &cmdReleasePriority }, // 31 + { "add.to.pic", "nnnnnn", &cmdAddToPic }, // 32 TODO: 7 vs 8 args + { "set.horizon", "n", &cmdSetHorizon }, // 33 + { "ignore.horizon", "n", &cmdIgnoreHorizon }, // 34 + { "observe.horizon", "n", &cmdObserveHorizon }, // 35 + { "load.logics", "n", &cmdLoadLogic }, // 36 + { "object.on.water", "n", &cmdObjectOnWater }, // 37 + { "load.pic", "v", &cmdLoadPic }, // 38 + { "load.sound", "n", &cmdLoadSound }, // 39 + { "sound", "nn", &cmdSound }, // 3A + { "stop.sound", "", &cmdStopSound }, // 3B + { "set.v", "v", &cmdSetV }, // 3C + { "reset.v", "v", &cmdResetV }, // 3D + { "toggle.v", "v", &cmdToggleV }, // 3E + { "new.room.v", "v", &cmdNewRoomF }, // 3F + { "call", "n", &cmdCall }, // 40 + { "...", "", &cmdUnknown }, // 41 + { "set.speed", "v", &cmdSetSpeed }, // 42 + { "move.obj.v", "nvvvv", &cmdMoveObjF }, // 43 + { "...", "", &cmdUnknown }, // 44 + { "...", "", &cmdUnknown }, // 45 + { "...", "", &cmdUnknown }, // 46 + { "...", "", &cmdUnknown }, // 47 + { "...", "nv", &cmdUnknown }, // 48 get.priority?? + { "ignore.objs", "n", &cmdIgnoreObjs }, // 49 + { "observe.objs", "n", &cmdObserveObjs }, // 4A + { "distance", "nnv", &cmdDistance }, // 4B + { "object.on.land", "n", &cmdObjectOnLand }, // 4C + { "...", "nv", &cmdUnknown }, // 4D set.priority.v??? + { "...", "", &cmdUnknown }, // 4E + { "load.logics", "n", &cmdLoadLogic }, // 4F TODO: what is the other load.logics then? + { "display", "nnns", &cmdDisplay }, // 50 TODO: 4 vs 3 args + { "prevent.input???", "", &cmdUnknown }, // 51 + { "...", "", &cmdUnknown }, // 52 + { "...", "n", &cmdUnknown }, // 53 ??? + { "...", "", &cmdUnknown }, // 54 ??? + { "stop.motion", "", &cmdStopMotion }, // 55 or force.update?? + { "discard.view", "n", &cmdDiscardView }, // 56 + { "discard.pic", "v", &cmdDiscardPic }, // 57 + { "...", "nn", &cmdUnknown }, // 58 + { "...", "", &cmdUnknown }, // 59 + { "last.cel", "nv", &cmdLastCel }, // 5A + { "set.cel.v", "nv", &cmdSetCelF }, // 5B + { "...", "", &cmdUnknown }, // 5C + { "load.view", "n", &cmdLoadView }, // 5D + { "...", "", &cmdUnknown }, // 5E + { "...", "", &cmdUnknown }, // 5F + { "setbit", "nv", &cmdUnknown }, // 60 }; AgiInstruction insV2Test[] = { - { "", "", &cond_unknown }, // 00 - { "equaln", "vn", &cond_equal }, // 01 - { "equalv", "vv", &cond_equalv }, // 02 - { "lessn", "vn", &cond_less }, // 03 - { "lessv", "vv", &cond_lessv }, // 04 - { "greatern", "vn", &cond_greater }, // 05 - { "greaterv", "vv", &cond_greaterv }, // 06 - { "isset", "n", &cond_isset }, // 07 - { "issetv", "v", &cond_issetv }, // 08 - { "has", "n", &cond_has }, // 09 - { "obj.in.room", "nv", &cond_obj_in_room}, // 0A - { "posn", "nnnnn", &cond_posn }, // 0B - { "controller", "n", &cond_controller }, // 0C - { "have.key", "", &cond_have_key}, // 0D - { "said", "", &cond_said }, // 0E - { "compare.strings", "ss", &cond_compare_strings }, // 0F - { "obj.in.box", "nnnnn", &cond_obj_in_box }, // 10 - { "center.posn", "nnnnn", &cond_center_posn }, // 11 - { "right.posn", "nnnnn", &cond_right_posn }, // 12 - { "in.motion.using.mouse", "", &cond_unknown_13 } // 13 + { "", "", &condUnknown }, // 00 + { "equaln", "vn", &condEqual }, // 01 + { "equalv", "vv", &condEqualV }, // 02 + { "lessn", "vn", &condLess }, // 03 + { "lessv", "vv", &condLessV }, // 04 + { "greatern", "vn", &condGreater }, // 05 + { "greaterv", "vv", &condGreaterV }, // 06 + { "isset", "n", &condIsSet }, // 07 + { "issetv", "v", &condIsSetV }, // 08 + { "has", "n", &condHas }, // 09 + { "obj.in.room", "nv", &condObjInRoom}, // 0A + { "posn", "nnnnn", &condPosn }, // 0B + { "controller", "n", &condController }, // 0C + { "have.key", "", &condHaveKey}, // 0D + { "said", "", &condSaid }, // 0E + { "compare.strings", "ss", &condCompareStrings }, // 0F + { "obj.in.box", "nnnnn", &condObjInBox }, // 10 + { "center.posn", "nnnnn", &condCenterPosn }, // 11 + { "right.posn", "nnnnn", &condRightPosn }, // 12 + { "in.motion.using.mouse", "", &condUnknown13 } // 13 }; AgiInstruction insV2[] = { { "return", "", NULL }, - { "increment", "v", &cmd_increment }, - { "decrement", "v", &cmd_decrement }, - { "assignn", "vn", &cmd_assignn }, - { "assignv", "vv", &cmd_assignv }, - { "addn", "vn", &cmd_addn }, - { "addv", "vv", &cmd_addv }, - { "subn", "vn", &cmd_subn }, - { "subv", "vv", &cmd_subv }, - { "lindirectv", "vv", &cmd_lindirectv }, - { "lindirect", "vv", &cmd_rindirect }, - { "lindirectn", "vn", &cmd_lindirectn }, - { "set", "n", &cmd_set }, - { "reset", "n", &cmd_reset }, - { "toggle", "n", &cmd_toggle }, - { "set.v", "v", &cmd_set_v }, - { "reset.v", "v", &cmd_reset_v }, - { "toggle.v", "v", &cmd_toggle_v }, - { "new.room", "n", &cmd_new_room }, - { "new.room.v", "v", &cmd_new_room_f }, - { "load.logics", "n", &cmd_load_logic }, - { "load.logics.v", "v", &cmd_load_logic_f }, - { "call", "n", &cmd_call }, - { "call.v", "v", &cmd_call_f }, - { "load.pic", "v", &cmd_load_pic }, - { "draw.pic", "v", &cmd_draw_pic }, - { "show.pic", "", &cmd_show_pic }, - { "discard.pic", "v", &cmd_discard_pic }, - { "overlay.pic", "v", &cmd_overlay_pic }, - { "show.pri.screen", "", &cmd_show_pri_screen }, - { "load.view", "n", &cmd_load_view }, - { "load.view.v", "v", &cmd_load_view_f }, - { "discard.view", "n", &cmd_discard_view }, - { "animate.obj", "n", &cmd_animate_obj }, - { "unanimate.all", "", &cmd_unanimate_all }, - { "draw", "n", &cmd_draw }, - { "erase", "n", &cmd_erase }, - { "position", "nnn", &cmd_position }, - { "position.v", "nvv", &cmd_position_f }, - { "get.posn", "nvv", &cmd_get_posn }, - { "reposition", "nvv", &cmd_reposition }, - { "set.view", "nn", &cmd_set_view }, - { "set.view.v", "nv", &cmd_set_view_f }, - { "set.loop", "nn", &cmd_set_loop }, - { "set.loop.v", "nv", &cmd_set_loop_f }, - { "fix.loop", "n", &cmd_fix_loop }, - { "release.loop", "n", &cmd_release_loop }, - { "set.cel", "nn", &cmd_set_cel }, - { "set.cel.v", "nv", &cmd_set_cel_f }, - { "last.cel", "nv", &cmd_last_cel }, - { "current.cel", "nv", &cmd_current_cel }, - { "current.loop", "nv", &cmd_current_loop }, - { "current.view", "nv", &cmd_current_view }, - { "number.of.loops", "nv", &cmd_number_of_loops }, - { "set.priority", "nn", &cmd_set_priority }, - { "set.priority.v", "nv", &cmd_set_priority_f }, - { "release.priority", "n", &cmd_release_priority }, - { "get.priority", "nn", &cmd_get_priority }, - { "stop.update", "n", &cmd_stop_update }, - { "start.update", "n", &cmd_start_update }, - { "force.update", "n", &cmd_force_update }, - { "ignore.horizon", "n", &cmd_ignore_horizon }, - { "observe.horizon", "n", &cmd_observe_horizon }, - { "set.horizon", "n", &cmd_set_horizon }, - { "object.on.water", "n", &cmd_object_on_water }, - { "object.on.land", "n", &cmd_object_on_land }, - { "object.on.anything", "n", &cmd_object_on_anything }, - { "ignore.objs", "n", &cmd_ignore_objs }, - { "observe.objs", "n", &cmd_observe_objs }, - { "distance", "nnv", &cmd_distance }, - { "stop.cycling", "n", &cmd_stop_cycling }, - { "start.cycling", "n", &cmd_start_cycling }, - { "normal.cycle", "n", &cmd_normal_cycle }, - { "end.of.loop", "nn", &cmd_end_of_loop }, - { "reverse.cycle", "n", &cmd_reverse_cycle }, - { "reverse.loop", "nn", &cmd_reverse_loop }, - { "cycle.time", "nv", &cmd_cycle_time }, - { "stop.motion", "n", &cmd_stop_motion }, - { "start.motion", "n", &cmd_start_motion }, - { "step.size", "nv", &cmd_step_size }, - { "step.time", "nv", &cmd_step_time }, - { "move.obj", "nnnnn", &cmd_move_obj }, - { "move.obj.v", "nvvvv", &cmd_move_obj_f }, - { "follow.ego", "nnn", &cmd_follow_ego }, - { "wander", "n", &cmd_wander }, - { "normal.motion", "n", &cmd_normal_motion }, - { "set.dir", "nv", &cmd_set_dir }, - { "get.dir", "nv", &cmd_get_dir }, - { "ignore.blocks", "n", &cmd_ignore_blocks }, - { "observe.blocks", "n", &cmd_observe_blocks }, - { "block", "nnnn", &cmd_block }, - { "unblock", "", &cmd_unblock }, - { "get", "n", &cmd_get }, - { "get.v", "v", &cmd_get_f }, - { "drop", "n", &cmd_drop }, - { "put", "nn", &cmd_put }, - { "put.v", "vv", &cmd_put_f }, - { "get.room.v", "vv", &cmd_get_room_f }, - { "load.sound", "n", &cmd_load_sound }, - { "sound", "nn", &cmd_sound }, - { "stop.sound", "", &cmd_stop_sound }, - { "print", "s", &cmd_print }, - { "print.v", "v", &cmd_print_f }, - { "display", "nns", &cmd_display }, - { "display.v", "vvv", &cmd_display_f }, - { "clear.lines", "nns", &cmd_clear_lines }, - { "text.screen", "", &cmd_text_screen }, - { "graphics", "", &cmd_graphics }, - { "set.cursor.char", "s", &cmd_set_cursor_char }, - { "set.text.attribute", "nn", &cmd_set_text_attribute }, - { "shake.screen", "n", &cmd_shake_screen }, - { "configure.screen", "nnn", &cmd_configure_screen }, - { "status.line.on", "", &cmd_status_line_on }, - { "status.line.off", "", &cmd_status_line_off }, - { "set.string", "ns", &cmd_set_string }, - { "get.string", "ns", &cmd_get_string }, - { "word.to.string", "nn", &cmd_word_to_string }, - { "parse", "n", &cmd_parse }, - { "get.num", "nv", &cmd_get_num }, - { "prevent.input", "", &cmd_prevent_input }, - { "accept.input", "", &cmd_accept_input }, - { "set.key", "nnn", &cmd_set_key }, - { "add.to.pic", "nnnnnnn", &cmd_add_to_pic }, - { "add.to.pic.v", "vvvvvvv", &cmd_add_to_pic_f }, - { "status", "", &cmd_status }, - { "save.game", "", &cmd_save_game }, - { "restore.game", "", &cmd_load_game }, - { "init.disk", "", &cmd_init_disk }, - { "restart.game", "", &cmd_restart_game }, - { "show.obj", "n", &cmd_show_obj }, - { "random", "nnv", &cmd_random }, - { "program.control", "", &cmd_program_control }, - { "player.control", "", &cmd_player_control }, - { "obj.status.v", "v", &cmd_obj_status_f }, - { "quit", "n", &cmd_quit }, - { "show.mem", "", &cmd_show_mem }, - { "pause", "", &cmd_pause }, - { "echo.line", "", &cmd_echo_line }, - { "cancel.line", "", &cmd_cancel_line }, - { "init.joy", "", &cmd_init_joy }, - { "toggle.monitor", "", &cmd_toggle_monitor }, - { "version", "", &cmd_version }, - { "script.size", "n", &cmd_script_size }, - { "set.game.id", "s", &cmd_set_game_id }, - { "log", "s", &cmd_log }, - { "set.scan.start", "", &cmd_set_scan_start }, - { "reset.scan.start", "", &cmd_reset_scan_start }, - { "reposition.to", "nnn", &cmd_reposition_to }, - { "reposition.to.v", "nvv", &cmd_reposition_to_f }, - { "trace.on", "", &cmd_trace_on }, - { "trace.info", "nnn", &cmd_trace_info }, - { "print.at", "snnn", &cmd_print_at }, - { "print.at.v", "vnnn", &cmd_print_at_v }, - { "discard.view.v", "v", &cmd_discard_view}, - { "clear.text.rect", "nnnnn", &cmd_clear_text_rect }, - { "set.upper.left", "nn", &cmd_set_upper_left }, - { "set.menu", "s", &cmd_set_menu }, - { "set.menu.member", "sn", &cmd_set_menu_item }, - { "submit.menu", "", &cmd_submit_menu }, - { "enable.member", "n", &cmd_enable_item }, - { "disable.member", "n", &cmd_disable_item }, - { "menu.input", "", &cmd_menu_input }, - { "show.obj.v", "v", &cmd_show_obj_v }, - { "open.dialogue", "", &cmd_open_dialogue }, - { "close.dialogue", "", &cmd_close_dialogue }, - { "mul.n", "vn", &cmd_mul_n }, - { "mul.v", "vv", &cmd_mul_v }, - { "div.n", "vn", &cmd_div_n }, - { "div.v", "vv", &cmd_div_v }, - { "close.window", "", &cmd_close_window }, - { "set.simple", "n", &cmd_set_simple }, - { "push.script", "", &cmd_push_script }, - { "pop.script", "", &cmd_pop_script }, - { "hold.key", "", &cmd_hold_key }, - { "set.pri.base", "n", &cmd_set_pri_base }, - { "discard.sound", "n", &cmd_discard_sound }, - { "hide.mouse", "", &cmd_hide_mouse }, - { "allow.menu", "n", &cmd_allow_menu }, - { "show.mouse", "", &cmd_show_mouse }, - { "fence.mouse", "nnnn", &cmd_fence_mouse }, - { "mouse.posn", "vv", &cmd_mouse_posn }, - { "release.key", "", &cmd_release_key }, - { "adj.ego.move.to.xy", "", &cmd_adj_ego_move_to_x_y } + { "increment", "v", &cmdIncrement }, + { "decrement", "v", &cmdDecrement }, + { "assignn", "vn", &cmdAssignN }, + { "assignv", "vv", &cmdAssignV }, + { "addn", "vn", &cmdAddN }, + { "addv", "vv", &cmdAddV }, + { "subn", "vn", &cmdSubN }, + { "subv", "vv", &cmdSubV }, + { "lindirectv", "vv", &cmdLindirectV }, + { "lindirect", "vv", &cmdRindirect }, + { "lindirectn", "vn", &cmdLindirectN }, + { "set", "n", &cmdSet }, + { "reset", "n", &cmdReset }, + { "toggle", "n", &cmdToggle }, + { "set.v", "v", &cmdSetV }, + { "reset.v", "v", &cmdResetV }, + { "toggle.v", "v", &cmdToggleV }, + { "new.room", "n", &cmdNewRoom }, + { "new.room.v", "v", &cmdNewRoomF }, + { "load.logics", "n", &cmdLoadLogic }, + { "load.logics.v", "v", &cmdLoadLogicF }, + { "call", "n", &cmdCall }, + { "call.v", "v", &cmdCallF }, + { "load.pic", "v", &cmdLoadPic }, + { "draw.pic", "v", &cmdDrawPic }, + { "show.pic", "", &cmdShowPic }, + { "discard.pic", "v", &cmdDiscardPic }, + { "overlay.pic", "v", &cmdOverlayPic }, + { "show.pri.screen", "", &cmdShowPriScreen }, + { "load.view", "n", &cmdLoadView }, + { "load.view.v", "v", &cmdLoadViewF }, + { "discard.view", "n", &cmdDiscardView }, + { "animate.obj", "n", &cmdAnimateObj }, + { "unanimate.all", "", &cmdUnanimateAll }, + { "draw", "n", &cmdDraw }, + { "erase", "n", &cmdErase }, + { "position", "nnn", &cmdPosition }, + { "position.v", "nvv", &cmdPositionF }, + { "get.posn", "nvv", &cmdGetPosn }, + { "reposition", "nvv", &cmdReposition }, + { "set.view", "nn", &cmdSetView }, + { "set.view.v", "nv", &cmdSetViewF }, + { "set.loop", "nn", &cmdSetLoop }, + { "set.loop.v", "nv", &cmdSetLoopF }, + { "fix.loop", "n", &cmdFixLoop }, + { "release.loop", "n", &cmdReleaseLoop }, + { "set.cel", "nn", &cmdSetCel }, + { "set.cel.v", "nv", &cmdSetCelF }, + { "last.cel", "nv", &cmdLastCel }, + { "current.cel", "nv", &cmdCurrentCel }, + { "current.loop", "nv", &cmdCurrentLoop }, + { "current.view", "nv", &cmdCurrentView }, + { "number.of.loops", "nv", &cmdNumberOfLoops }, + { "set.priority", "nn", &cmdSetPriority }, + { "set.priority.v", "nv", &cmdSetPriorityF }, + { "release.priority", "n", &cmdReleasePriority }, + { "get.priority", "nn", &cmdGetPriority }, + { "stop.update", "n", &cmdStopUpdate }, + { "start.update", "n", &cmdStartUpdate }, + { "force.update", "n", &cmdForceUpdate }, + { "ignore.horizon", "n", &cmdIgnoreHorizon }, + { "observe.horizon", "n", &cmdObserveHorizon }, + { "set.horizon", "n", &cmdSetHorizon }, + { "object.on.water", "n", &cmdObjectOnWater }, + { "object.on.land", "n", &cmdObjectOnLand }, + { "object.on.anything", "n", &cmdObjectOnAnything }, + { "ignore.objs", "n", &cmdIgnoreObjs }, + { "observe.objs", "n", &cmdObserveObjs }, + { "distance", "nnv", &cmdDistance }, + { "stop.cycling", "n", &cmdStopCycling }, + { "start.cycling", "n", &cmdStartCycling }, + { "normal.cycle", "n", &cmdNormalCycle }, + { "end.of.loop", "nn", &cmdEndOfLoop }, + { "reverse.cycle", "n", &cmdReverseCycle }, + { "reverse.loop", "nn", &cmdReverseLoop }, + { "cycle.time", "nv", &cmdCycleTime }, + { "stop.motion", "n", &cmdStopMotion }, + { "start.motion", "n", &cmdStartMotion }, + { "step.size", "nv", &cmdStepSize }, + { "step.time", "nv", &cmdStepTime }, + { "move.obj", "nnnnn", &cmdMoveObj }, + { "move.obj.v", "nvvvv", &cmdMoveObjF }, + { "follow.ego", "nnn", &cmdFollowEgo }, + { "wander", "n", &cmdWander }, + { "normal.motion", "n", &cmdNormalMotion }, + { "set.dir", "nv", &cmdSetDir }, + { "get.dir", "nv", &cmdGetDir }, + { "ignore.blocks", "n", &cmdIgnoreBlocks }, + { "observe.blocks", "n", &cmdObserveBlocks }, + { "block", "nnnn", &cmdBlock }, + { "unblock", "", &cmdUnblock }, + { "get", "n", &cmdGet }, + { "get.v", "v", &cmdGetF }, + { "drop", "n", &cmdDrop }, + { "put", "nn", &cmdPut }, + { "put.v", "vv", &cmdPutF }, + { "get.room.v", "vv", &cmdGetRoomF }, + { "load.sound", "n", &cmdLoadSound }, + { "sound", "nn", &cmdSound }, + { "stop.sound", "", &cmdStopSound }, + { "print", "s", &cmdPrint }, + { "print.v", "v", &cmdPrintF }, + { "display", "nns", &cmdDisplay }, + { "display.v", "vvv", &cmdDisplayF }, + { "clear.lines", "nns", &cmdClearLines }, + { "text.screen", "", &cmdTextScreen }, + { "graphics", "", &cmdGraphics }, + { "set.cursor.char", "s", &cmdSetCursorChar }, + { "set.text.attribute", "nn", &cmdSetTextAttribute }, + { "shake.screen", "n", &cmdShakeScreen }, + { "configure.screen", "nnn", &cmdConfigureScreen }, + { "status.line.on", "", &cmdStatusLineOn }, + { "status.line.off", "", &cmdStatusLineOff }, + { "set.string", "ns", &cmdSetString }, + { "get.string", "ns", &cmdGetString }, + { "word.to.string", "nn", &cmdWordToString }, + { "parse", "n", &cmdParse }, + { "get.num", "nv", &cmdGetNum }, + { "prevent.input", "", &cmdPreventInput }, + { "accept.input", "", &cmdAcceptInput }, + { "set.key", "nnn", &cmdSetKey }, + { "add.to.pic", "nnnnnnn", &cmdAddToPic }, + { "add.to.pic.v", "vvvvvvv", &cmdAddToPicF }, + { "status", "", &cmdStatus }, + { "save.game", "", &cmdSaveGame }, + { "restore.game", "", &cmdLoadGame }, + { "init.disk", "", &cmdInitDisk }, + { "restart.game", "", &cmdRestartGame }, + { "show.obj", "n", &cmdShowObj }, + { "random", "nnv", &cmdRandom }, + { "program.control", "", &cmdProgramControl }, + { "player.control", "", &cmdPlayerControl }, + { "obj.status.v", "v", &cmdObjStatusF }, + { "quit", "n", &cmdQuit }, + { "show.mem", "", &cmdShowMem }, + { "pause", "", &cmdPause }, + { "echo.line", "", &cmdEchoLine }, + { "cancel.line", "", &cmdCancelLine }, + { "init.joy", "", &cmdInitJoy }, + { "toggle.monitor", "", &cmdToggleMonitor }, + { "version", "", &cmdVersion }, + { "script.size", "n", &cmdScriptSize }, + { "set.game.id", "s", &cmdSetGameID }, + { "log", "s", &cmdLog }, + { "set.scan.start", "", &cmdSetScanStart }, + { "reset.scan.start", "", &cmdResetScanStart }, + { "reposition.to", "nnn", &cmdRepositionTo }, + { "reposition.to.v", "nvv", &cmdRepositionToF }, + { "trace.on", "", &cmdTraceOn }, + { "trace.info", "nnn", &cmdTraceInfo }, + { "print.at", "snnn", &cmdPrintAt }, + { "print.at.v", "vnnn", &cmdPrintAtV }, + { "discard.view.v", "v", &cmdDiscardView}, + { "clear.text.rect", "nnnnn", &cmdClearTextRect }, + { "set.upper.left", "nn", &cmdSetUpperLeft }, + { "set.menu", "s", &cmdSetMenu }, + { "set.menu.member", "sn", &cmdSetMenuItem }, + { "submit.menu", "", &cmdSubmitMenu }, + { "enable.member", "n", &cmdEnableItem }, + { "disable.member", "n", &cmdDisableItem }, + { "menu.input", "", &cmdMenuInput }, + { "show.obj.v", "v", &cmdShowObjV }, + { "open.dialogue", "", &cmdOpenDialogue }, + { "close.dialogue", "", &cmdCloseDialogue }, + { "mul.n", "vn", &cmdMulN }, + { "mul.v", "vv", &cmdMulV }, + { "div.n", "vn", &cmdDivN }, + { "div.v", "vv", &cmdDivV }, + { "close.window", "", &cmdCloseWindow }, + { "set.simple", "n", &cmdSetSimple }, + { "push.script", "", &cmdPushScript }, + { "pop.script", "", &cmdPopScript }, + { "hold.key", "", &cmdHoldKey }, + { "set.pri.base", "n", &cmdSetPriBase }, + { "discard.sound", "n", &cmdDiscardSound }, + { "hide.mouse", "", &cmdHideMouse }, + { "allow.menu", "n", &cmdAllowMenu }, + { "show.mouse", "", &cmdShowMouse }, + { "fence.mouse", "nnnn", &cmdFenceMouse }, + { "mouse.posn", "vv", &cmdMousePosn }, + { "release.key", "", &cmdReleaseKey }, + { "adj.ego.move.to.xy", "", &cmdAdjEgoMoveToXY } }; void AgiEngine::setupOpcodes() { diff --git a/engines/agi/opcodes.h b/engines/agi/opcodes.h index 3939b2d0a0..742b0d5fe9 100644 --- a/engines/agi/opcodes.h +++ b/engines/agi/opcodes.h @@ -38,217 +38,217 @@ struct AgiInstruction { extern AgiInstruction *logicNamesTest; extern AgiInstruction *logicNamesCmd; -void cmd_increment(AgiGame *state, uint8 *p); -void cmd_decrement(AgiGame *state, uint8 *p); -void cmd_assignn(AgiGame *state, uint8 *p); -void cmd_assignv(AgiGame *state, uint8 *p); -void cmd_addn(AgiGame *state, uint8 *p); -void cmd_addv(AgiGame *state, uint8 *p); -void cmd_subn(AgiGame *state, uint8 *p); -void cmd_subv(AgiGame *state, uint8 *p); // 0x08 -void cmd_lindirectv(AgiGame *state, uint8 *p); -void cmd_rindirect(AgiGame *state, uint8 *p); -void cmd_lindirectn(AgiGame *state, uint8 *p); -void cmd_set(AgiGame *state, uint8 *p); -void cmd_reset(AgiGame *state, uint8 *p); -void cmd_toggle(AgiGame *state, uint8 *p); -void cmd_set_v(AgiGame *state, uint8 *p); -void cmd_reset_v(AgiGame *state, uint8 *p); // 0x10 -void cmd_toggle_v(AgiGame *state, uint8 *p); -void cmd_new_room(AgiGame *state, uint8 *p); -void cmd_new_room_f(AgiGame *state, uint8 *p); -void cmd_load_logic(AgiGame *state, uint8 *p); -void cmd_load_logic_f(AgiGame *state, uint8 *p); -void cmd_call(AgiGame *state, uint8 *p); -void cmd_call_f(AgiGame *state, uint8 *p); -void cmd_load_pic(AgiGame *state, uint8 *p); // 0x18 -void cmd_draw_pic(AgiGame *state, uint8 *p); -void cmd_show_pic(AgiGame *state, uint8 *p); -void cmd_discard_pic(AgiGame *state, uint8 *p); -void cmd_overlay_pic(AgiGame *state, uint8 *p); -void cmd_show_pri_screen(AgiGame *state, uint8 *p); -void cmd_load_view(AgiGame *state, uint8 *p); -void cmd_load_view_f(AgiGame *state, uint8 *p); -void cmd_discard_view(AgiGame *state, uint8 *p); // 0x20 -void cmd_animate_obj(AgiGame *state, uint8 *p); -void cmd_unanimate_all(AgiGame *state, uint8 *p); -void cmd_draw(AgiGame *state, uint8 *p); -void cmd_erase(AgiGame *state, uint8 *p); -void cmd_position(AgiGame *state, uint8 *p); -void cmd_position_f(AgiGame *state, uint8 *p); -void cmd_get_posn(AgiGame *state, uint8 *p); -void cmd_reposition(AgiGame *state, uint8 *p); // 0x28 -void cmd_set_view(AgiGame *state, uint8 *p); -void cmd_set_view_f(AgiGame *state, uint8 *p); -void cmd_set_loop(AgiGame *state, uint8 *p); -void cmd_set_loop_f(AgiGame *state, uint8 *p); -void cmd_fix_loop(AgiGame *state, uint8 *p); -void cmd_release_loop(AgiGame *state, uint8 *p); -void cmd_set_cel(AgiGame *state, uint8 *p); -void cmd_set_cel_f(AgiGame *state, uint8 *p); // 0x30 -void cmd_last_cel(AgiGame *state, uint8 *p); -void cmd_current_cel(AgiGame *state, uint8 *p); -void cmd_current_loop(AgiGame *state, uint8 *p); -void cmd_current_view(AgiGame *state, uint8 *p); -void cmd_number_of_loops(AgiGame *state, uint8 *p); -void cmd_set_priority(AgiGame *state, uint8 *p); -void cmd_set_priority_f(AgiGame *state, uint8 *p); -void cmd_release_priority(AgiGame *state, uint8 *p); // 0x38 -void cmd_get_priority(AgiGame *state, uint8 *p); -void cmd_stop_update(AgiGame *state, uint8 *p); -void cmd_start_update(AgiGame *state, uint8 *p); -void cmd_force_update(AgiGame *state, uint8 *p); -void cmd_ignore_horizon(AgiGame *state, uint8 *p); -void cmd_observe_horizon(AgiGame *state, uint8 *p); -void cmd_set_horizon(AgiGame *state, uint8 *p); -void cmd_object_on_water(AgiGame *state, uint8 *p); // 0x40 -void cmd_object_on_land(AgiGame *state, uint8 *p); -void cmd_object_on_anything(AgiGame *state, uint8 *p); -void cmd_ignore_objs(AgiGame *state, uint8 *p); -void cmd_observe_objs(AgiGame *state, uint8 *p); -void cmd_distance(AgiGame *state, uint8 *p); -void cmd_stop_cycling(AgiGame *state, uint8 *p); -void cmd_start_cycling(AgiGame *state, uint8 *p); -void cmd_normal_cycle(AgiGame *state, uint8 *p); // 0x48 -void cmd_end_of_loop(AgiGame *state, uint8 *p); -void cmd_reverse_cycle(AgiGame *state, uint8 *p); -void cmd_reverse_loop(AgiGame *state, uint8 *p); -void cmd_cycle_time(AgiGame *state, uint8 *p); -void cmd_stop_motion(AgiGame *state, uint8 *p); -void cmd_start_motion(AgiGame *state, uint8 *p); -void cmd_step_size(AgiGame *state, uint8 *p); -void cmd_step_time(AgiGame *state, uint8 *p); // 0x50 -void cmd_move_obj(AgiGame *state, uint8 *p); -void cmd_move_obj_f(AgiGame *state, uint8 *p); -void cmd_follow_ego(AgiGame *state, uint8 *p); -void cmd_wander(AgiGame *state, uint8 *p); -void cmd_normal_motion(AgiGame *state, uint8 *p); -void cmd_set_dir(AgiGame *state, uint8 *p); -void cmd_get_dir(AgiGame *state, uint8 *p); -void cmd_ignore_blocks(AgiGame *state, uint8 *p); // 0x58 -void cmd_observe_blocks(AgiGame *state, uint8 *p); -void cmd_block(AgiGame *state, uint8 *p); -void cmd_unblock(AgiGame *state, uint8 *p); -void cmd_get(AgiGame *state, uint8 *p); -void cmd_get_f(AgiGame *state, uint8 *p); -void cmd_drop(AgiGame *state, uint8 *p); -void cmd_put(AgiGame *state, uint8 *p); -void cmd_put_f(AgiGame *state, uint8 *p); // 0x60 -void cmd_get_room_f(AgiGame *state, uint8 *p); -void cmd_load_sound(AgiGame *state, uint8 *p); -void cmd_sound(AgiGame *state, uint8 *p); -void cmd_stop_sound(AgiGame *state, uint8 *p); -void cmd_print(AgiGame *state, uint8 *p); -void cmd_print_f(AgiGame *state, uint8 *p); -void cmd_display(AgiGame *state, uint8 *p); -void cmd_display_f(AgiGame *state, uint8 *p); // 0x68 -void cmd_clear_lines(AgiGame *state, uint8 *p); -void cmd_text_screen(AgiGame *state, uint8 *p); -void cmd_graphics(AgiGame *state, uint8 *p); -void cmd_set_cursor_char(AgiGame *state, uint8 *p); -void cmd_set_text_attribute(AgiGame *state, uint8 *p); -void cmd_shake_screen(AgiGame *state, uint8 *p); -void cmd_configure_screen(AgiGame *state, uint8 *p); -void cmd_status_line_on(AgiGame *state, uint8 *p); // 0x70 -void cmd_status_line_off(AgiGame *state, uint8 *p); -void cmd_set_string(AgiGame *state, uint8 *p); -void cmd_get_string(AgiGame *state, uint8 *p); -void cmd_word_to_string(AgiGame *state, uint8 *p); -void cmd_parse(AgiGame *state, uint8 *p); -void cmd_get_num(AgiGame *state, uint8 *p); -void cmd_prevent_input(AgiGame *state, uint8 *p); -void cmd_accept_input(AgiGame *state, uint8 *p); // 0x78 -void cmd_set_key(AgiGame *state, uint8 *p); -void cmd_add_to_pic(AgiGame *state, uint8 *p); -void cmd_add_to_pic_f(AgiGame *state, uint8 *p); -void cmd_status(AgiGame *state, uint8 *p); -void cmd_save_game(AgiGame *state, uint8 *p); -void cmd_load_game(AgiGame *state, uint8 *p); -void cmd_init_disk(AgiGame *state, uint8 *p); -void cmd_restart_game(AgiGame *state, uint8 *p); // 0x80 -void cmd_show_obj(AgiGame *state, uint8 *p); -void cmd_random(AgiGame *state, uint8 *p); -void cmd_program_control(AgiGame *state, uint8 *p); -void cmd_player_control(AgiGame *state, uint8 *p); -void cmd_obj_status_f(AgiGame *state, uint8 *p); -void cmd_quit(AgiGame *state, uint8 *p); -void cmd_show_mem(AgiGame *state, uint8 *p); -void cmd_pause(AgiGame *state, uint8 *p); // 0x88 -void cmd_echo_line(AgiGame *state, uint8 *p); -void cmd_cancel_line(AgiGame *state, uint8 *p); -void cmd_init_joy(AgiGame *state, uint8 *p); -void cmd_toggle_monitor(AgiGame *state, uint8 *p); -void cmd_version(AgiGame *state, uint8 *p); -void cmd_script_size(AgiGame *state, uint8 *p); -void cmd_set_game_id(AgiGame *state, uint8 *p); -void cmd_log(AgiGame *state, uint8 *p); // 0x90 -void cmd_set_scan_start(AgiGame *state, uint8 *p); -void cmd_reset_scan_start(AgiGame *state, uint8 *p); -void cmd_reposition_to(AgiGame *state, uint8 *p); -void cmd_reposition_to_f(AgiGame *state, uint8 *p); -void cmd_trace_on(AgiGame *state, uint8 *p); -void cmd_trace_info(AgiGame *state, uint8 *p); -void cmd_print_at(AgiGame *state, uint8 *p); -void cmd_print_at_v(AgiGame *state, uint8 *p); // 0x98 -//void cmd_discard_view(AgiGame *state, uint8 *p); // Opcode repeated from 0x20 ? -void cmd_clear_text_rect(AgiGame *state, uint8 *p); -void cmd_set_upper_left(AgiGame *state, uint8 *p); -void cmd_set_menu(AgiGame *state, uint8 *p); -void cmd_set_menu_item(AgiGame *state, uint8 *p); -void cmd_submit_menu(AgiGame *state, uint8 *p); -void cmd_enable_item(AgiGame *state, uint8 *p); -void cmd_disable_item(AgiGame *state, uint8 *p); // 0xa0 -void cmd_menu_input(AgiGame *state, uint8 *p); -void cmd_show_obj_v(AgiGame *state, uint8 *p); -void cmd_open_dialogue(AgiGame *state, uint8 *p); -void cmd_close_dialogue(AgiGame *state, uint8 *p); -void cmd_mul_n(AgiGame *state, uint8 *p); -void cmd_mul_v(AgiGame *state, uint8 *p); -void cmd_div_n(AgiGame *state, uint8 *p); -void cmd_div_v(AgiGame *state, uint8 *p); // 0xa8 -void cmd_close_window(AgiGame *state, uint8 *p); -void cmd_set_simple(AgiGame *state, uint8 *p); -void cmd_push_script(AgiGame *state, uint8 *p); -void cmd_pop_script(AgiGame *state, uint8 *p); -void cmd_hold_key(AgiGame *state, uint8 *p); -void cmd_set_pri_base(AgiGame *state, uint8 *p); -void cmd_discard_sound(AgiGame *state, uint8 *p); -void cmd_hide_mouse(AgiGame *state, uint8 *p); // 0xb0 -void cmd_allow_menu(AgiGame *state, uint8 *p); -void cmd_show_mouse(AgiGame *state, uint8 *p); -void cmd_fence_mouse(AgiGame *state, uint8 *p); -void cmd_mouse_posn(AgiGame *state, uint8 *p); -void cmd_release_key(AgiGame *state, uint8 *p); -void cmd_adj_ego_move_to_x_y(AgiGame *state, uint8 *p); +void cmdIncrement(AgiGame *state, uint8 *p); +void cmdDecrement(AgiGame *state, uint8 *p); +void cmdAssignN(AgiGame *state, uint8 *p); +void cmdAssignV(AgiGame *state, uint8 *p); +void cmdAddN(AgiGame *state, uint8 *p); +void cmdAddV(AgiGame *state, uint8 *p); +void cmdSubN(AgiGame *state, uint8 *p); +void cmdSubV(AgiGame *state, uint8 *p); // 0x08 +void cmdLindirectV(AgiGame *state, uint8 *p); +void cmdRindirect(AgiGame *state, uint8 *p); +void cmdLindirectN(AgiGame *state, uint8 *p); +void cmdSet(AgiGame *state, uint8 *p); +void cmdReset(AgiGame *state, uint8 *p); +void cmdToggle(AgiGame *state, uint8 *p); +void cmdSetV(AgiGame *state, uint8 *p); +void cmdResetV(AgiGame *state, uint8 *p); // 0x10 +void cmdToggleV(AgiGame *state, uint8 *p); +void cmdNewRoom(AgiGame *state, uint8 *p); +void cmdNewRoomF(AgiGame *state, uint8 *p); +void cmdLoadLogic(AgiGame *state, uint8 *p); +void cmdLoadLogicF(AgiGame *state, uint8 *p); +void cmdCall(AgiGame *state, uint8 *p); +void cmdCallF(AgiGame *state, uint8 *p); +void cmdLoadPic(AgiGame *state, uint8 *p); // 0x18 +void cmdDrawPic(AgiGame *state, uint8 *p); +void cmdShowPic(AgiGame *state, uint8 *p); +void cmdDiscardPic(AgiGame *state, uint8 *p); +void cmdOverlayPic(AgiGame *state, uint8 *p); +void cmdShowPriScreen(AgiGame *state, uint8 *p); +void cmdLoadView(AgiGame *state, uint8 *p); +void cmdLoadViewF(AgiGame *state, uint8 *p); +void cmdDiscardView(AgiGame *state, uint8 *p); // 0x20 +void cmdAnimateObj(AgiGame *state, uint8 *p); +void cmdUnanimateAll(AgiGame *state, uint8 *p); +void cmdDraw(AgiGame *state, uint8 *p); +void cmdErase(AgiGame *state, uint8 *p); +void cmdPosition(AgiGame *state, uint8 *p); +void cmdPositionF(AgiGame *state, uint8 *p); +void cmdGetPosn(AgiGame *state, uint8 *p); +void cmdReposition(AgiGame *state, uint8 *p); // 0x28 +void cmdSetView(AgiGame *state, uint8 *p); +void cmdSetViewF(AgiGame *state, uint8 *p); +void cmdSetLoop(AgiGame *state, uint8 *p); +void cmdSetLoopF(AgiGame *state, uint8 *p); +void cmdFixLoop(AgiGame *state, uint8 *p); +void cmdReleaseLoop(AgiGame *state, uint8 *p); +void cmdSetCel(AgiGame *state, uint8 *p); +void cmdSetCelF(AgiGame *state, uint8 *p); // 0x30 +void cmdLastCel(AgiGame *state, uint8 *p); +void cmdCurrentCel(AgiGame *state, uint8 *p); +void cmdCurrentLoop(AgiGame *state, uint8 *p); +void cmdCurrentView(AgiGame *state, uint8 *p); +void cmdNumberOfLoops(AgiGame *state, uint8 *p); +void cmdSetPriority(AgiGame *state, uint8 *p); +void cmdSetPriorityF(AgiGame *state, uint8 *p); +void cmdReleasePriority(AgiGame *state, uint8 *p); // 0x38 +void cmdGetPriority(AgiGame *state, uint8 *p); +void cmdStopUpdate(AgiGame *state, uint8 *p); +void cmdStartUpdate(AgiGame *state, uint8 *p); +void cmdForceUpdate(AgiGame *state, uint8 *p); +void cmdIgnoreHorizon(AgiGame *state, uint8 *p); +void cmdObserveHorizon(AgiGame *state, uint8 *p); +void cmdSetHorizon(AgiGame *state, uint8 *p); +void cmdObjectOnWater(AgiGame *state, uint8 *p); // 0x40 +void cmdObjectOnLand(AgiGame *state, uint8 *p); +void cmdObjectOnAnything(AgiGame *state, uint8 *p); +void cmdIgnoreObjs(AgiGame *state, uint8 *p); +void cmdObserveObjs(AgiGame *state, uint8 *p); +void cmdDistance(AgiGame *state, uint8 *p); +void cmdStopCycling(AgiGame *state, uint8 *p); +void cmdStartCycling(AgiGame *state, uint8 *p); +void cmdNormalCycle(AgiGame *state, uint8 *p); // 0x48 +void cmdEndOfLoop(AgiGame *state, uint8 *p); +void cmdReverseCycle(AgiGame *state, uint8 *p); +void cmdReverseLoop(AgiGame *state, uint8 *p); +void cmdCycleTime(AgiGame *state, uint8 *p); +void cmdStopMotion(AgiGame *state, uint8 *p); +void cmdStartMotion(AgiGame *state, uint8 *p); +void cmdStepSize(AgiGame *state, uint8 *p); +void cmdStepTime(AgiGame *state, uint8 *p); // 0x50 +void cmdMoveObj(AgiGame *state, uint8 *p); +void cmdMoveObjF(AgiGame *state, uint8 *p); +void cmdFollowEgo(AgiGame *state, uint8 *p); +void cmdWander(AgiGame *state, uint8 *p); +void cmdNormalMotion(AgiGame *state, uint8 *p); +void cmdSetDir(AgiGame *state, uint8 *p); +void cmdGetDir(AgiGame *state, uint8 *p); +void cmdIgnoreBlocks(AgiGame *state, uint8 *p); // 0x58 +void cmdObserveBlocks(AgiGame *state, uint8 *p); +void cmdBlock(AgiGame *state, uint8 *p); +void cmdUnblock(AgiGame *state, uint8 *p); +void cmdGet(AgiGame *state, uint8 *p); +void cmdGetF(AgiGame *state, uint8 *p); +void cmdDrop(AgiGame *state, uint8 *p); +void cmdPut(AgiGame *state, uint8 *p); +void cmdPutF(AgiGame *state, uint8 *p); // 0x60 +void cmdGetRoomF(AgiGame *state, uint8 *p); +void cmdLoadSound(AgiGame *state, uint8 *p); +void cmdSound(AgiGame *state, uint8 *p); +void cmdStopSound(AgiGame *state, uint8 *p); +void cmdPrint(AgiGame *state, uint8 *p); +void cmdPrintF(AgiGame *state, uint8 *p); +void cmdDisplay(AgiGame *state, uint8 *p); +void cmdDisplayF(AgiGame *state, uint8 *p); // 0x68 +void cmdClearLines(AgiGame *state, uint8 *p); +void cmdTextScreen(AgiGame *state, uint8 *p); +void cmdGraphics(AgiGame *state, uint8 *p); +void cmdSetCursorChar(AgiGame *state, uint8 *p); +void cmdSetTextAttribute(AgiGame *state, uint8 *p); +void cmdShakeScreen(AgiGame *state, uint8 *p); +void cmdConfigureScreen(AgiGame *state, uint8 *p); +void cmdStatusLineOn(AgiGame *state, uint8 *p); // 0x70 +void cmdStatusLineOff(AgiGame *state, uint8 *p); +void cmdSetString(AgiGame *state, uint8 *p); +void cmdGetString(AgiGame *state, uint8 *p); +void cmdWordToString(AgiGame *state, uint8 *p); +void cmdParse(AgiGame *state, uint8 *p); +void cmdGetNum(AgiGame *state, uint8 *p); +void cmdPreventInput(AgiGame *state, uint8 *p); +void cmdAcceptInput(AgiGame *state, uint8 *p); // 0x78 +void cmdSetKey(AgiGame *state, uint8 *p); +void cmdAddToPic(AgiGame *state, uint8 *p); +void cmdAddToPicF(AgiGame *state, uint8 *p); +void cmdStatus(AgiGame *state, uint8 *p); +void cmdSaveGame(AgiGame *state, uint8 *p); +void cmdLoadGame(AgiGame *state, uint8 *p); +void cmdInitDisk(AgiGame *state, uint8 *p); +void cmdRestartGame(AgiGame *state, uint8 *p); // 0x80 +void cmdShowObj(AgiGame *state, uint8 *p); +void cmdRandom(AgiGame *state, uint8 *p); +void cmdProgramControl(AgiGame *state, uint8 *p); +void cmdPlayerControl(AgiGame *state, uint8 *p); +void cmdObjStatusF(AgiGame *state, uint8 *p); +void cmdQuit(AgiGame *state, uint8 *p); +void cmdShowMem(AgiGame *state, uint8 *p); +void cmdPause(AgiGame *state, uint8 *p); // 0x88 +void cmdEchoLine(AgiGame *state, uint8 *p); +void cmdCancelLine(AgiGame *state, uint8 *p); +void cmdInitJoy(AgiGame *state, uint8 *p); +void cmdToggleMonitor(AgiGame *state, uint8 *p); +void cmdVersion(AgiGame *state, uint8 *p); +void cmdScriptSize(AgiGame *state, uint8 *p); +void cmdSetGameID(AgiGame *state, uint8 *p); +void cmdLog(AgiGame *state, uint8 *p); // 0x90 +void cmdSetScanStart(AgiGame *state, uint8 *p); +void cmdResetScanStart(AgiGame *state, uint8 *p); +void cmdRepositionTo(AgiGame *state, uint8 *p); +void cmdRepositionToF(AgiGame *state, uint8 *p); +void cmdTraceOn(AgiGame *state, uint8 *p); +void cmdTraceInfo(AgiGame *state, uint8 *p); +void cmdPrintAt(AgiGame *state, uint8 *p); +void cmdPrintAtV(AgiGame *state, uint8 *p); // 0x98 +//void cmdDiscardView(AgiGame *state, uint8 *p); // Opcode repeated from 0x20 ? +void cmdClearTextRect(AgiGame *state, uint8 *p); +void cmdSetUpperLeft(AgiGame *state, uint8 *p); +void cmdSetMenu(AgiGame *state, uint8 *p); +void cmdSetMenuItem(AgiGame *state, uint8 *p); +void cmdSubmitMenu(AgiGame *state, uint8 *p); +void cmdEnableItem(AgiGame *state, uint8 *p); +void cmdDisableItem(AgiGame *state, uint8 *p); // 0xa0 +void cmdMenuInput(AgiGame *state, uint8 *p); +void cmdShowObjV(AgiGame *state, uint8 *p); +void cmdOpenDialogue(AgiGame *state, uint8 *p); +void cmdCloseDialogue(AgiGame *state, uint8 *p); +void cmdMulN(AgiGame *state, uint8 *p); +void cmdMulV(AgiGame *state, uint8 *p); +void cmdDivN(AgiGame *state, uint8 *p); +void cmdDivV(AgiGame *state, uint8 *p); // 0xa8 +void cmdCloseWindow(AgiGame *state, uint8 *p); +void cmdSetSimple(AgiGame *state, uint8 *p); +void cmdPushScript(AgiGame *state, uint8 *p); +void cmdPopScript(AgiGame *state, uint8 *p); +void cmdHoldKey(AgiGame *state, uint8 *p); +void cmdSetPriBase(AgiGame *state, uint8 *p); +void cmdDiscardSound(AgiGame *state, uint8 *p); +void cmdHideMouse(AgiGame *state, uint8 *p); // 0xb0 +void cmdAllowMenu(AgiGame *state, uint8 *p); +void cmdShowMouse(AgiGame *state, uint8 *p); +void cmdFenceMouse(AgiGame *state, uint8 *p); +void cmdMousePosn(AgiGame *state, uint8 *p); +void cmdReleaseKey(AgiGame *state, uint8 *p); +void cmdAdjEgoMoveToXY(AgiGame *state, uint8 *p); -void cmd_set_speed(AgiGame *state, uint8 *p); -void cmd_unknown(AgiGame *state, uint8 *p); +void cmdSetSpeed(AgiGame *state, uint8 *p); +void cmdUnknown(AgiGame *state, uint8 *p); -void cond_equal(AgiGame *state, uint8 *p); -void cond_equalv(AgiGame *state, uint8 *p); -void cond_less(AgiGame *state, uint8 *p); -void cond_lessv(AgiGame *state, uint8 *p); -void cond_greater(AgiGame *state, uint8 *p); -void cond_greaterv(AgiGame *state, uint8 *p); -void cond_isset(AgiGame *state, uint8 *p); -void cond_issetv(AgiGame *state, uint8 *p); -void cond_has(AgiGame *state, uint8 *p); -void cond_obj_in_room(AgiGame *state, uint8 *p); -void cond_posn(AgiGame *state, uint8 *p); -void cond_controller(AgiGame *state, uint8 *p); -void cond_have_key(AgiGame *state, uint8 *p); -void cond_said(AgiGame *state, uint8 *p); -void cond_compare_strings(AgiGame *state, uint8 *p); -void cond_obj_in_box(AgiGame *state, uint8 *p); -void cond_center_posn(AgiGame *state, uint8 *p); -void cond_right_posn(AgiGame *state, uint8 *p); -void cond_unknown_13(AgiGame *state, uint8 *p); -void cond_unknown(AgiGame *state, uint8 *p); +void condEqual(AgiGame *state, uint8 *p); +void condEqualV(AgiGame *state, uint8 *p); +void condLess(AgiGame *state, uint8 *p); +void condLessV(AgiGame *state, uint8 *p); +void condGreater(AgiGame *state, uint8 *p); +void condGreaterV(AgiGame *state, uint8 *p); +void condIsSet(AgiGame *state, uint8 *p); +void condIsSetV(AgiGame *state, uint8 *p); +void condHas(AgiGame *state, uint8 *p); +void condObjInRoom(AgiGame *state, uint8 *p); +void condPosn(AgiGame *state, uint8 *p); +void condController(AgiGame *state, uint8 *p); +void condHaveKey(AgiGame *state, uint8 *p); +void condSaid(AgiGame *state, uint8 *p); +void condCompareStrings(AgiGame *state, uint8 *p); +void condObjInBox(AgiGame *state, uint8 *p); +void condCenterPosn(AgiGame *state, uint8 *p); +void condRightPosn(AgiGame *state, uint8 *p); +void condUnknown13(AgiGame *state, uint8 *p); +void condUnknown(AgiGame *state, uint8 *p); -void cond_isset_v1(AgiGame *state, uint8 *p); -void cond_said1(AgiGame *state, uint8 *p); -void cond_said2(AgiGame *state, uint8 *p); -void cond_said3(AgiGame *state, uint8 *p); +void condIsSetV1(AgiGame *state, uint8 *p); +void condSaid1(AgiGame *state, uint8 *p); +void condSaid2(AgiGame *state, uint8 *p); +void condSaid3(AgiGame *state, uint8 *p); } // End of namespace Agi |