aboutsummaryrefslogtreecommitdiff
path: root/sword1
diff options
context:
space:
mode:
authorJonathan Gray2003-12-16 09:43:08 +0000
committerJonathan Gray2003-12-16 09:43:08 +0000
commit83e9c59327d695b4bf2e0d8ae6661b25042ff750 (patch)
tree321f416f99654f03f69a4185996dbb29b9e8ac84 /sword1
parent9673833d97135fd9b5af5f3457f11babcba59d72 (diff)
downloadscummvm-rg350-83e9c59327d695b4bf2e0d8ae6661b25042ff750.tar.gz
scummvm-rg350-83e9c59327d695b4bf2e0d8ae6661b25042ff750.tar.bz2
scummvm-rg350-83e9c59327d695b4bf2e0d8ae6661b25042ff750.zip
compilation fixes
svn-id: r11679
Diffstat (limited to 'sword1')
-rw-r--r--sword1/logic.cpp10
-rw-r--r--sword1/logic.h2
-rw-r--r--sword1/menu.cpp2
-rw-r--r--sword1/mouse.cpp9
-rw-r--r--sword1/resman.cpp4
-rw-r--r--sword1/router.cpp4
-rw-r--r--sword1/screen.cpp2
-rw-r--r--sword1/sound.cpp4
8 files changed, 19 insertions, 18 deletions
diff --git a/sword1/logic.cpp b/sword1/logic.cpp
index ddc8a224ff..52afbe7ca0 100644
--- a/sword1/logic.cpp
+++ b/sword1/logic.cpp
@@ -63,7 +63,7 @@ SwordLogic::SwordLogic(ObjectMan *pObjMan, ResMan *resMan, SwordScreen *pScreen,
_speechFinished = true;
}
-void SwordLogic::newScreen(uint32 newScreen) {
+void SwordLogic::newScreen(uint32 screen) {
BsObject *compact = (BsObject*)_objMan->fetchObject(PLAYER);
//Tdebug("locked player");
@@ -116,7 +116,7 @@ void SwordLogic::engine(void) {
compact->o_sync = 0; // syncs are only available for 1 cycle.
}
- if (compact->o_screen == _scriptVars[SCREEN]) {
+ if ((uint32)compact->o_screen == _scriptVars[SCREEN]) {
if (compact->o_status & STAT_FORE)
_screen->addToGraphicList(0, currentId);
if (compact->o_status & STAT_SORT)
@@ -1529,8 +1529,8 @@ int SwordLogic::fnInnerSpace(BsObject *cpt, int32 id, int32 a, int32 b, int32 c,
return SCRIPT_STOP;
}
-int SwordLogic::fnSetScreen(BsObject *cpt, int32 id, int32 target, int32 newScreen, int32 c, int32 d, int32 z, int32 x) {
- _objMan->fetchObject(target)->o_screen = newScreen;
+int SwordLogic::fnSetScreen(BsObject *cpt, int32 id, int32 target, int32 screen, int32 c, int32 d, int32 z, int32 x) {
+ _objMan->fetchObject(target)->o_screen = screen;
return SCRIPT_CONT;
}
@@ -1540,7 +1540,7 @@ int SwordLogic::fnPreload(BsObject *cpt, int32 id, int32 resId, int32 b, int32 c
return SCRIPT_CONT;
}
-int SwordLogic::fnCheckCD(BsObject *cpt, int32 id, int32 newScreen, int32 b, int32 c, int32 d, int32 z, int32 x) {
+int SwordLogic::fnCheckCD(BsObject *cpt, int32 id, int32 screen, int32 b, int32 c, int32 d, int32 z, int32 x) {
warning("fnCheckCd called");
// Not sure if we really have to check that here. I think we can do it in the main loop
// and leave a dummy here.
diff --git a/sword1/logic.h b/sword1/logic.h
index e13ebc542d..33e17ef5e8 100644
--- a/sword1/logic.h
+++ b/sword1/logic.h
@@ -46,7 +46,7 @@ class SwordLogic {
public:
SwordLogic(ObjectMan *pObjMan, ResMan *resMan, SwordScreen *pScreen, SwordMouse *pMouse, SwordSound *pSound, SwordMusic *pMusic, SwordMenu *pMenu);
~SwordLogic(void);
- void newScreen(uint32 newScreen);
+ void newScreen(uint32 screen);
void engine(void);
void updateScreenParams(void);
void runMouseScript(BsObject *cpt, int32 scriptId);
diff --git a/sword1/menu.cpp b/sword1/menu.cpp
index 0fcc614ebc..cc7ec95f01 100644
--- a/sword1/menu.cpp
+++ b/sword1/menu.cpp
@@ -88,7 +88,7 @@ uint8 SwordMenu::checkMenuClick(uint8 menuType) {
}
void SwordMenu::buildSubjects(void) {
- uint8 subDest = 0;
+ // uint8 subDest = 0;
clearMenu(MENU_BOT);
for (uint8 cnt = 0; cnt < 16; cnt++)
if (_subjects[cnt]) {
diff --git a/sword1/mouse.cpp b/sword1/mouse.cpp
index f0eeca0e71..ffdf5d257a 100644
--- a/sword1/mouse.cpp
+++ b/sword1/mouse.cpp
@@ -106,7 +106,7 @@ void SwordMouse::engine(uint16 x, uint16 y, uint16 eventFlags) {
//-
int32 touchedId = 0;
- uint16 clicked;
+ uint16 clicked = 0;
if (y > 40) {
for (uint16 priority = 0; (priority < 10) && (!touchedId); priority++) {
for (uint16 cnt = 0; cnt < _numObjs; cnt++) {
@@ -120,7 +120,7 @@ void SwordMouse::engine(uint16 x, uint16 y, uint16 eventFlags) {
}
}
}
- if (touchedId != SwordLogic::_scriptVars[SPECIAL_ITEM]) { //the mouse collision situation has changed in one way or another
+ if (touchedId != (int)SwordLogic::_scriptVars[SPECIAL_ITEM]) { //the mouse collision situation has changed in one way or another
SwordLogic::_scriptVars[SPECIAL_ITEM] = touchedId;
debug(9, "New special item: %X\n", touchedId);
if (_getOff) { // there was something else selected before, run its get-off script
@@ -128,7 +128,7 @@ void SwordMouse::engine(uint16 x, uint16 y, uint16 eventFlags) {
_getOff = 0;
}
if (touchedId) { // there's something new selected, now.
- BsObject *compact = _objMan->fetchObject(SwordLogic::_scriptVars[SPECIAL_ITEM]);
+ // BsObject *compact = _objMan->fetchObject(SwordLogic::_scriptVars[SPECIAL_ITEM]);
if (_objList[clicked].compact->o_mouse_on) //run its get on
_logic->runMouseScript(_objList[clicked].compact, _objList[clicked].compact->o_mouse_on);
@@ -195,7 +195,8 @@ void SwordMouse::fnAddHuman(void) {
if (_mouseStatus & 2) // locked, can't do anything
return ;
_mouseStatus = 1;
- SwordLogic::_scriptVars[SPECIAL_ITEM] = -1;
+ // SwordLogic::_scriptVars[SPECIAL_ITEM] = -1;
+ SwordLogic::_scriptVars[SPECIAL_ITEM] = 0; // _scriptVars is unsigned...
_getOff = SCR_std_off;
setPointer(MSE_POINTER, 0);
_mouseCount = 3;
diff --git a/sword1/resman.cpp b/sword1/resman.cpp
index 9dd37c74fa..7a07747526 100644
--- a/sword1/resman.cpp
+++ b/sword1/resman.cpp
@@ -173,7 +173,7 @@ void ResMan::resOpen(uint32 id) { // load resource ID into memory
if (memHandle->cond == MEM_FREED) { // memory has been freed
uint32 size = resLength(id);
_memMan->alloc(memHandle, size);
- uint8 *dest = (uint8*)memHandle->data;
+ // uint8 *dest = (uint8*)memHandle->data;
File *clusFile = openClusterFile(id);
clusFile->seek( resOffset(id) );
clusFile->read( memHandle->data, size);
@@ -280,7 +280,7 @@ void ResMan::openCptResourceBigEndian(uint32 id) {
void ResMan::openScriptResourceBigEndian(uint32 id) {
resOpen(id);
BsMemHandle *handle = resHandle(id);
- uint32 totSize = handle->size;
+ // uint32 totSize = handle->size;
Header *head = (Header*)handle->data;
head->comp_length = FROM_LE_32(head->comp_length);
head->decomp_length = FROM_LE_32(head->decomp_length);
diff --git a/sword1/router.cpp b/sword1/router.cpp
index cd2c2e5ed3..7ae4296140 100644
--- a/sword1/router.cpp
+++ b/sword1/router.cpp
@@ -75,7 +75,7 @@ int SwordRouter::routeFinder(int32 id, BsObject *mega, int32 x, int32 y, int32 t
frameInfo.slowOutFrames = 0;
}
int32 routeFlag = getRoute();
- int32 routeLength;
+ int32 routeLength = 0;
if (routeFlag == 1) {
// extract the route as nodes and the directions to go between each node
// route.X,route.Y and route.Dir now hold all the route infomation with
@@ -666,7 +666,7 @@ int32 SwordRouter::smoothestPath(uint16 startX, uint16 startY, uint16 startDir,
int32 DS;
int32 DD;
int32 temp;
- int32 steps;
+ int32 steps = 0;
int32 option;
int32 options;
int32 lastDir;
diff --git a/sword1/screen.cpp b/sword1/screen.cpp
index cfacea2c82..a4b4e3bfde 100644
--- a/sword1/screen.cpp
+++ b/sword1/screen.cpp
@@ -271,7 +271,7 @@ void SwordScreen::newScreen(uint32 screen) {
// TEMPORARY!
uint8 *bgPal = (uint8*)_resMan->openFetchRes(_roomDefTable[_currentScreen].palettes[0]);
- uint8 *sprPal = (uint8*)_resMan->openFetchRes(_roomDefTable[_currentScreen].palettes[1]);
+ // uint8 *sprPal = (uint8*)_resMan->openFetchRes(_roomDefTable[_currentScreen].palettes[1]);
for (uint16 cnt = 0; cnt < 256; cnt++) {
_targetPalette[cnt * 4 + 0] = bgPal[cnt * 3 + 0] << 2;
_targetPalette[cnt * 4 + 1] = bgPal[cnt * 3 + 1] << 2;
diff --git a/sword1/sound.cpp b/sword1/sound.cpp
index 4b64fabbf7..09e2d1d81a 100644
--- a/sword1/sound.cpp
+++ b/sword1/sound.cpp
@@ -40,7 +40,7 @@ SwordSound::SwordSound(const char *searchPath, SoundMixer *mixer, ResMan *pResMa
int SwordSound::addToQueue(int32 fxNo) {
bool alreadyInQueue = false;
for (uint8 cnt = 0; (cnt < _endOfQueue) && (!alreadyInQueue); cnt++)
- if (_fxQueue[cnt].id == fxNo)
+ if (_fxQueue[cnt].id == (uint32)fxNo)
alreadyInQueue = true;
if (!alreadyInQueue) {
if (_endOfQueue == MAX_FXQ_LENGTH)
@@ -117,7 +117,7 @@ void SwordSound::playSample(QueueElement elem) {
uint8 *sampleData = (uint8*)_resMan->fetchRes(_fxList[elem.id].sampleId);
for (uint16 cnt = 0; cnt < MAX_ROOMS_PER_FX; cnt++) {
if (_fxList[elem.id].roomVolList[cnt].roomNo) {
- if ((_fxList[elem.id].roomVolList[cnt].roomNo == SwordLogic::_scriptVars[SCREEN]) ||
+ if ((_fxList[elem.id].roomVolList[cnt].roomNo == (int)SwordLogic::_scriptVars[SCREEN]) ||
(_fxList[elem.id].roomVolList[cnt].roomNo == -1)) {
uint8 volL = _fxList[elem.id].roomVolList[cnt].leftVol * 10;