aboutsummaryrefslogtreecommitdiff
path: root/engines/illusions/duckman
diff options
context:
space:
mode:
Diffstat (limited to 'engines/illusions/duckman')
-rw-r--r--engines/illusions/duckman/duckman_credits.cpp44
-rw-r--r--engines/illusions/duckman/duckman_credits.h2
-rw-r--r--engines/illusions/duckman/duckman_dialog.cpp2
-rw-r--r--engines/illusions/duckman/duckman_dialog.h2
-rw-r--r--engines/illusions/duckman/duckman_inventory.h2
-rw-r--r--engines/illusions/duckman/duckman_screenshakereffects.cpp4
-rw-r--r--engines/illusions/duckman/duckman_specialcode.cpp6
-rw-r--r--engines/illusions/duckman/duckman_specialcode.h2
-rw-r--r--engines/illusions/duckman/illusions_duckman.cpp16
-rw-r--r--engines/illusions/duckman/illusions_duckman.h14
-rw-r--r--engines/illusions/duckman/menusystem_duckman.cpp2
-rw-r--r--engines/illusions/duckman/scriptopcodes_duckman.cpp28
-rw-r--r--engines/illusions/duckman/scriptopcodes_duckman.h8
13 files changed, 66 insertions, 66 deletions
diff --git a/engines/illusions/duckman/duckman_credits.cpp b/engines/illusions/duckman/duckman_credits.cpp
index ccbde8daf3..804d55e4d3 100644
--- a/engines/illusions/duckman/duckman_credits.cpp
+++ b/engines/illusions/duckman/duckman_credits.cpp
@@ -100,7 +100,7 @@ int DuckmanCredits::update(uint flags) {
uint16 wtext[128];
charToWChar(text, wtext, ARRAYSIZE(wtext));
- FontResource *font = _vm->_dict->findFont(0x120001);
+ FontResource *font = _vm->_dict->findFont(0x120001);
TextDrawer textDrawer;
WidthHeight dimensions;
uint16 *outText;
@@ -158,28 +158,28 @@ char *DuckmanCredits::readNextLine() {
Common::Point DuckmanCredits::getItemPosition(int index) {
static const struct { int16 x, y; } kCreditsItemsPoints[] = {
- {159, 200}, {158, 195}, {157, 190}, {156, 185}, {156, 180}, {157, 176},
- {158, 172}, {159, 168}, {161, 164}, {162, 161}, {163, 158}, {163, 155},
- {162, 152}, {161, 149}, {159, 147}, {158, 144}, {157, 142}, {156, 140},
- {156, 138}, {157, 136}, {158, 134}, {159, 132}, {161, 130}, {162, 128},
- {163, 127}, {163, 126}, {162, 125}, {161, 124}, {159, 123}, {158, 122},
- {157, 121}, {156, 120}, {156, 119}, {157, 118}, {158, 117}, {159, 116},
- {161, 115}, {162, 114}, {163, 113}, {163, 112}, {162, 111}, {161, 110},
- {159, 109}, {158, 108}, {157, 107}, {156, 106}, {156, 105}, {157, 104},
- {158, 103}, {159, 102}, {161, 101}, {162, 100}, {163, 99}, {163, 98},
- {162, 97}, {161, 96}, {159, 95}, {158, 94}, {157, 93}, {156, 92},
- {156, 91}, {157, 90}, {158, 89}, {159, 88}, {161, 87}, {162, 86},
- {163, 85}, {163, 84}, {162, 83}, {161, 82}, {159, 81}, {158, 80},
+ {159, 200}, {158, 195}, {157, 190}, {156, 185}, {156, 180}, {157, 176},
+ {158, 172}, {159, 168}, {161, 164}, {162, 161}, {163, 158}, {163, 155},
+ {162, 152}, {161, 149}, {159, 147}, {158, 144}, {157, 142}, {156, 140},
+ {156, 138}, {157, 136}, {158, 134}, {159, 132}, {161, 130}, {162, 128},
+ {163, 127}, {163, 126}, {162, 125}, {161, 124}, {159, 123}, {158, 122},
+ {157, 121}, {156, 120}, {156, 119}, {157, 118}, {158, 117}, {159, 116},
+ {161, 115}, {162, 114}, {163, 113}, {163, 112}, {162, 111}, {161, 110},
+ {159, 109}, {158, 108}, {157, 107}, {156, 106}, {156, 105}, {157, 104},
+ {158, 103}, {159, 102}, {161, 101}, {162, 100}, {163, 99}, {163, 98},
+ {162, 97}, {161, 96}, {159, 95}, {158, 94}, {157, 93}, {156, 92},
+ {156, 91}, {157, 90}, {158, 89}, {159, 88}, {161, 87}, {162, 86},
+ {163, 85}, {163, 84}, {162, 83}, {161, 82}, {159, 81}, {158, 80},
{157, 79}, {156, 78}, {156, 77}, {157, 76}, {158, 75}, {159, 74},
- {161, 73}, {162, 72}, {163, 71}, {163, 70}, {162, 69}, {161, 68},
- {159, 67}, {158, 66}, {157, 64}, {156, 62}, {156, 60}, {157, 58},
- {158, 56}, {159, 54}, {161, 52}, {162, 50}, {163, 40}, {163, 40},
- {162, 40}, {161, 40}, {159, 40}, {158, 40}, {157, 40}, {156, 40},
- {156, 40}, {157, 40}, {158, 40}, {159, 40}, {161, 40}, {162, 40},
- {163, 40}, {163, 40}, {162, 40}, {161, 40}, {159, 40}, {158, 40},
- {157, 40}, {156, 40}, {156, 40}, {157, 40}, {158, 40}, {159, 40},
- {161, 40}, {162, 40}, {163, 40}, {163, 40}, {162, 40}, {161, 40},
- {159, 40}, {158, 40}, { -1, -1}
+ {161, 73}, {162, 72}, {163, 71}, {163, 70}, {162, 69}, {161, 68},
+ {159, 67}, {158, 66}, {157, 64}, {156, 62}, {156, 60}, {157, 58},
+ {158, 56}, {159, 54}, {161, 52}, {162, 50}, {163, 40}, {163, 40},
+ {162, 40}, {161, 40}, {159, 40}, {158, 40}, {157, 40}, {156, 40},
+ {156, 40}, {157, 40}, {158, 40}, {159, 40}, {161, 40}, {162, 40},
+ {163, 40}, {163, 40}, {162, 40}, {161, 40}, {159, 40}, {158, 40},
+ {157, 40}, {156, 40}, {156, 40}, {157, 40}, {158, 40}, {159, 40},
+ {161, 40}, {162, 40}, {163, 40}, {163, 40}, {162, 40}, {161, 40},
+ {159, 40}, {158, 40}, { -1, -1}
};
if (index < 0 || index >= ARRAYSIZE(kCreditsItemsPoints))
diff --git a/engines/illusions/duckman/duckman_credits.h b/engines/illusions/duckman/duckman_credits.h
index 039575ced5..ef52553efc 100644
--- a/engines/illusions/duckman/duckman_credits.h
+++ b/engines/illusions/duckman/duckman_credits.h
@@ -41,7 +41,7 @@ public:
DuckmanCredits(IllusionsEngine_Duckman *vm);
~DuckmanCredits();
void start();
-public:
+public:
typedef Common::Array<CreditsItem> CreditsItems;
IllusionsEngine_Duckman *_vm;
uint32 _lastUpdateTicks;
diff --git a/engines/illusions/duckman/duckman_dialog.cpp b/engines/illusions/duckman/duckman_dialog.cpp
index f624ed8d01..60da222ad9 100644
--- a/engines/illusions/duckman/duckman_dialog.cpp
+++ b/engines/illusions/duckman/duckman_dialog.cpp
@@ -131,7 +131,7 @@ void DuckmanDialogSystem::updateDialogState() {
Control *currOverlappedControl = _vm->_cursor._currOverlappedControl;
Control *newOverlappedControl;
-
+
if (_vm->_controls->getDialogItemAtPos(_vm->_cursor._control, mousePos, &newOverlappedControl)) {
if (currOverlappedControl != newOverlappedControl) {
newOverlappedControl->setActorIndex(2);
diff --git a/engines/illusions/duckman/duckman_dialog.h b/engines/illusions/duckman/duckman_dialog.h
index 9c7cfad484..cb4b4a1239 100644
--- a/engines/illusions/duckman/duckman_dialog.h
+++ b/engines/illusions/duckman/duckman_dialog.h
@@ -42,7 +42,7 @@ public:
void startDialog(int16 *choiceOfsPtr, uint32 actorTypeId, uint32 callerThreadId);
void updateDialogState();
public:
- IllusionsEngine_Duckman *_vm;
+ IllusionsEngine_Duckman *_vm;
Common::Array<DialogItem> _dialogItems;
};
diff --git a/engines/illusions/duckman/duckman_inventory.h b/engines/illusions/duckman/duckman_inventory.h
index e1abbebd14..05048f4eac 100644
--- a/engines/illusions/duckman/duckman_inventory.h
+++ b/engines/illusions/duckman/duckman_inventory.h
@@ -47,7 +47,7 @@ public:
DuckmanInventory(IllusionsEngine_Duckman *vm);
~DuckmanInventory();
public:
- IllusionsEngine_Duckman *_vm;
+ IllusionsEngine_Duckman *_vm;
Common::Array<DMInventorySlot> _inventorySlots;
Common::Array<DMInventoryItem> _inventoyItems;
void initInventory();
diff --git a/engines/illusions/duckman/duckman_screenshakereffects.cpp b/engines/illusions/duckman/duckman_screenshakereffects.cpp
index 66bfaeaae2..6ccb143bf0 100644
--- a/engines/illusions/duckman/duckman_screenshakereffects.cpp
+++ b/engines/illusions/duckman/duckman_screenshakereffects.cpp
@@ -36,8 +36,8 @@ static const ScreenShakeEffect kShakerEffect0 = {
};
static const ScreenShakerPoint kShakerPoints1[] = {
- {-4, -5}, {4, 5}, {-3, -4}, {3, 4}, {-2, -3}, {2, 3}, {-1, -2},
- { 1, 2}, {0, -1}
+ {-4, -5}, {4, 5}, {-3, -4}, {3, 4}, {-2, -3}, {2, 3}, {-1, -2},
+ { 1, 2}, {0, -1}
};
static const ScreenShakeEffect kShakerEffect1 = {
diff --git a/engines/illusions/duckman/duckman_specialcode.cpp b/engines/illusions/duckman/duckman_specialcode.cpp
index ec8578290f..c420bd500c 100644
--- a/engines/illusions/duckman/duckman_specialcode.cpp
+++ b/engines/illusions/duckman/duckman_specialcode.cpp
@@ -49,7 +49,7 @@ DuckmanSpecialCode::DuckmanSpecialCode(IllusionsEngine_Duckman *vm)
_propertyTimers = new PropertyTimers(_vm);
_inventory = new DuckmanInventory(_vm);
_credits = new DuckmanCredits(_vm);
-
+
_wasCursorHoldingElvisPoster = false;
_counter = 0;
_savedTempMasterSfxVolume = 16;
@@ -189,7 +189,7 @@ void DuckmanSpecialCode::spcUpdateTeleporterPosition(OpCall &opCall) {
int16 deltaX = 0;
int16 deltaY = 0;
uint32 sequenceId = 0;
-
+
Control *control = _vm->getObjectControl(0x400C0);
switch (direction) {
case 1:
@@ -219,7 +219,7 @@ void DuckmanSpecialCode::spcUpdateTeleporterPosition(OpCall &opCall) {
default:
break;
}
-
+
if (sequenceId) {
control->startSequenceActor(sequenceId, 2, opCall._threadId);
_teleporterPosition.x += deltaX;
diff --git a/engines/illusions/duckman/duckman_specialcode.h b/engines/illusions/duckman/duckman_specialcode.h
index a9fb7b9803..694086b0dc 100644
--- a/engines/illusions/duckman/duckman_specialcode.h
+++ b/engines/illusions/duckman/duckman_specialcode.h
@@ -42,7 +42,7 @@ public:
~DuckmanSpecialCode();
virtual void init();
virtual void run(uint32 specialCodeId, OpCall &opCall);
-public:
+public:
typedef Common::HashMap<uint32, SpecialCodeFunction*> SpecialCodeMap;
typedef SpecialCodeMap::iterator SpecialCodeMapIterator;
diff --git a/engines/illusions/duckman/illusions_duckman.cpp b/engines/illusions/duckman/illusions_duckman.cpp
index 7ffa312948..e08d1b0096 100644
--- a/engines/illusions/duckman/illusions_duckman.cpp
+++ b/engines/illusions/duckman/illusions_duckman.cpp
@@ -89,7 +89,7 @@ Common::Error IllusionsEngine_Duckman::run() {
SearchMan.addSubDirectoryMatching(gameDataDir, "voice");
_dict = new Dictionary();
-
+
_resReader = new ResourceReaderGamArchive("duckman.gam");
_resSys = new ResourceSystem(this);
@@ -106,7 +106,7 @@ Common::Error IllusionsEngine_Duckman::run() {
_screen = new Screen8Bit(this, 320, 200);
_screenPalette = new ScreenPalette(this);
_screenText = new ScreenText(this);
- _input = new Input();
+ _input = new Input();
_actorInstances = new ActorInstanceList(this);
_backgroundInstances = new BackgroundInstanceList(this);
_camera = new Camera(this);
@@ -119,7 +119,7 @@ Common::Error IllusionsEngine_Duckman::run() {
_gameState = new Duckman_GameState(this);
_fader = new Fader();
-
+
_dialogSys = new DuckmanDialogSystem(this);
_screen->setColorKey1(0);
@@ -130,7 +130,7 @@ Common::Error IllusionsEngine_Duckman::run() {
_scriptOpcodes = new ScriptOpcodes_Duckman(this);
_stack = new ScriptStack();
-
+
// TODO Move to own class
_resGetCtr = 0;
_unpauseControlActorFlag = false;
@@ -230,9 +230,9 @@ Common::Error IllusionsEngine_Duckman::run() {
delete _resSys;
delete _resReader;
delete _dict;
-
+
debug("Ok");
-
+
return Common::kNoError;
}
@@ -1015,7 +1015,7 @@ void IllusionsEngine_Duckman::updateGameState2() {
Control *overlappedControl;
_cursor._control->_actor->_position = cursorPos;
-
+
foundOverlapped = _controls->getOverlappedObject(_cursor._control, convMousePos, &overlappedControl, 0);
if (cursorPos.y < 8 && !_camera->isAtPanLimit(1)) {
@@ -1188,7 +1188,7 @@ uint32 IllusionsEngine_Duckman::runTriggerCause(uint32 verbId, uint32 objectId2,
if (!getTriggerCause(verbId, objectId2, objectId, triggerThreadId))
return 0;
-
+
playTriggerCauseSound(verbId, objectId2, objectId);
uint32 tempThreadId = newTempThreadId();
diff --git a/engines/illusions/duckman/illusions_duckman.h b/engines/illusions/duckman/illusions_duckman.h
index 87ca932ea8..feacd50cc1 100644
--- a/engines/illusions/duckman/illusions_duckman.h
+++ b/engines/illusions/duckman/illusions_duckman.h
@@ -94,16 +94,16 @@ public:
Cursor_Duckman _cursor;
Control *_currWalkOverlappedControl;
-
+
DuckmanDialogSystem *_dialogSys;
int _savedInventoryActorIndex;
ScreenShaker *_screenShaker;
DuckmanMenuSystem *_menuSystem;
-
+
void initInput();
-
+
void initUpdateFunctions();
int updateScript(uint flags);
@@ -156,7 +156,7 @@ public:
uint32 startTempScriptThread(byte *scriptCodeIp, uint32 callingThreadId,
uint32 value8, uint32 valueC, uint32 value10);
void resumeFromSavegame(uint32 callingThreadId);
-
+
void newScriptThread(uint32 threadId, uint32 callingThreadId, uint notifyFlags,
byte *scriptCodeIp);
uint32 newTimerThread(uint32 duration, uint32 callingThreadId, bool isAbortable);
@@ -180,9 +180,9 @@ public:
void setSceneIdThreadId(uint32 theSceneId, uint32 theThreadId);
bool findTriggerCause(uint32 sceneId, uint32 verbId, uint32 objectId2, uint32 objectId, uint32 &codeOffs);
void reset();
-
+
uint32 getObjectActorTypeId(uint32 objectId);
-
+
Common::Point convertMousePos(Common::Point mousePos);
void startCursorSequence();
int getCursorActorIndex();
@@ -191,7 +191,7 @@ public:
bool getTriggerCause(uint32 verbId, uint32 objectId2, uint32 objectId, uint32 &outThreadId);
uint32 runTriggerCause(uint32 verbId, uint32 objectId2, uint32 objectId);
void playTriggerCauseSound(uint32 verbId, uint32 objectId2, uint32 objectId);
-
+
bool loadSavegameFromScript(int16 slotNum, uint32 callingThreadId);
bool saveSavegameFromScript(int16 slotNum, uint32 callingThreadId);
void activateSavegame(uint32 callingThreadId);
diff --git a/engines/illusions/duckman/menusystem_duckman.cpp b/engines/illusions/duckman/menusystem_duckman.cpp
index 4d63147321..84f7974d95 100644
--- a/engines/illusions/duckman/menusystem_duckman.cpp
+++ b/engines/illusions/duckman/menusystem_duckman.cpp
@@ -42,7 +42,7 @@ DuckmanMenuSystem::~DuckmanMenuSystem() {
void DuckmanMenuSystem::runMenu(MenuChoiceOffsets menuChoiceOffsets, int16 *menuChoiceOffset,
uint32 menuId, uint32 duration, uint timeOutMenuChoiceIndex, uint32 menuCallerThreadId) {
-
+
debug(0, "DuckmanMenuSystem::runMenu(%08X)", menuId);
setTimeOutDuration(duration, timeOutMenuChoiceIndex);
diff --git a/engines/illusions/duckman/scriptopcodes_duckman.cpp b/engines/illusions/duckman/scriptopcodes_duckman.cpp
index 1876b13593..6b76a65686 100644
--- a/engines/illusions/duckman/scriptopcodes_duckman.cpp
+++ b/engines/illusions/duckman/scriptopcodes_duckman.cpp
@@ -202,11 +202,11 @@ void ScriptOpcodes_Duckman::opStartTimerThread(ScriptThread *scriptThread, OpCal
ARG_INT16(maxDuration);
if (maxDuration)
duration += _vm->getRandom(maxDuration);
-
+
//duration = 1;//DEBUG Speeds up things
//duration = 5;
//debug("duration: %d", duration);
-
+
if (isAbortable)
_vm->startAbortableTimerThread(duration, opCall._callerThreadId);
else
@@ -284,9 +284,9 @@ void ScriptOpcodes_Duckman::opChangeScene(ScriptThread *scriptThread, OpCall &op
ARG_UINT32(sceneId);
ARG_UINT32(threadId);
_vm->_input->discardAllEvents();
-
+
debug(1, "changeScene(%08X, %08X)", sceneId, threadId);
-
+
//DEBUG
#if 0
if (dsceneId) {
@@ -295,7 +295,7 @@ void ScriptOpcodes_Duckman::opChangeScene(ScriptThread *scriptThread, OpCall &op
dsceneId = 0;
}
#endif
-
+
if (_vm->_scriptResource->_properties.get(31)) {
_vm->changeScene(0x10002, 0x20001, opCall._callerThreadId);
} else {
@@ -584,10 +584,10 @@ void ScriptOpcodes_Duckman::opPlayVideo(ScriptThread *scriptThread, OpCall &opCa
ARG_UINT32(objectId);
// NOTE This has no attached objectId or priority
_vm->playVideo(0, objectId, 0, opCall._threadId);
-
+
//DEBUG Resume calling thread, later done by the video player
_vm->notifyThreadId(opCall._threadId);
-
+
}
void ScriptOpcodes_Duckman::opRunSpecialCode(ScriptThread *scriptThread, OpCall &opCall) {
@@ -653,7 +653,7 @@ void ScriptOpcodes_Duckman::opDisplayMenu(ScriptThread *scriptThread, OpCall &op
ARG_INT16(timeOutDuration);
ARG_UINT32(menuId);
ARG_UINT32(timeOutMenuChoiceIndex);
-
+
MenuChoiceOffsets menuChoiceOffsets;
// Load menu choices from the stack
@@ -661,11 +661,11 @@ void ScriptOpcodes_Duckman::opDisplayMenu(ScriptThread *scriptThread, OpCall &op
int16 choiceOffs = _vm->_stack->pop();
menuChoiceOffsets.push_back(choiceOffs);
} while (_vm->_stack->pop() == 0);
-
- _vm->_menuSystem->runMenu(menuChoiceOffsets, &_vm->_menuChoiceOfs,
+
+ _vm->_menuSystem->runMenu(menuChoiceOffsets, &_vm->_menuChoiceOfs,
menuId, timeOutDuration, timeOutMenuChoiceIndex,
opCall._callerThreadId);
-
+
//DEBUG Resume calling thread, later done by the video player
//_vm->notifyThreadId(opCall._callerThreadId);
@@ -713,7 +713,7 @@ void ScriptOpcodes_Duckman::opActivateButton(ScriptThread *scriptThread, OpCall
}
void ScriptOpcodes_Duckman::opIncBlockCounter(ScriptThread *scriptThread, OpCall &opCall) {
- ARG_INT16(index);
+ ARG_INT16(index);
byte value = _vm->_scriptResource->_blockCounters.get(index) + 1;
if (value <= 63)
_vm->_scriptResource->_blockCounters.set(index, value);
@@ -778,8 +778,8 @@ void ScriptOpcodes_Duckman::opGetProperty(ScriptThread *scriptThread, OpCall &op
}
void ScriptOpcodes_Duckman::opCompareBlockCounter(ScriptThread *scriptThread, OpCall &opCall) {
- ARG_INT16(index);
- ARG_INT16(compareOp);
+ ARG_INT16(index);
+ ARG_INT16(compareOp);
ARG_INT16(rvalue);
int16 lvalue = _vm->_scriptResource->_blockCounters.get(index);
bool compareResult = false;
diff --git a/engines/illusions/duckman/scriptopcodes_duckman.h b/engines/illusions/duckman/scriptopcodes_duckman.h
index 0fae4b7b26..521a7329b6 100644
--- a/engines/illusions/duckman/scriptopcodes_duckman.h
+++ b/engines/illusions/duckman/scriptopcodes_duckman.h
@@ -41,7 +41,7 @@ protected:
IllusionsEngine_Duckman *_vm;
// Opcodes
-
+
void opNop(ScriptThread *scriptThread, OpCall &opCall);
void opSuspend(ScriptThread *scriptThread, OpCall &opCall);
void opYield(ScriptThread *scriptThread, OpCall &opCall);
@@ -129,8 +129,8 @@ protected:
void opSetBlockCounter118(ScriptThread *scriptThread, OpCall &opCall);
void opDebug126(ScriptThread *scriptThread, OpCall &opCall);
void opDebug127(ScriptThread *scriptThread, OpCall &opCall);
-
-#if 0
+
+#if 0
void opStartTempScriptThread(ScriptThread *scriptThread, OpCall &opCall);
void opSetThreadSceneId(ScriptThread *scriptThread, OpCall &opCall);
void opEndTalkThreads(ScriptThread *scriptThread, OpCall &opCall);
@@ -157,7 +157,7 @@ protected:
void opSetFontId(ScriptThread *scriptThread, OpCall &opCall);
void opAddMenuKey(ScriptThread *scriptThread, OpCall &opCall);
void opChangeSceneAll(ScriptThread *scriptThread, OpCall &opCall);
-#endif
+#endif
};
} // End of namespace Illusions