aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1
diff options
context:
space:
mode:
authorMax Horn2009-11-02 21:54:57 +0000
committerMax Horn2009-11-02 21:54:57 +0000
commit51933629d1f1a17839ddbb75b2b619effe117abb (patch)
tree7292b23e5ce3fb11e6b2bb360a3befbbf35b64d9 /engines/sword1
parent400ee8c461e8060393b62be639c27dd3820dccd4 (diff)
downloadscummvm-rg350-51933629d1f1a17839ddbb75b2b619effe117abb.tar.gz
scummvm-rg350-51933629d1f1a17839ddbb75b2b619effe117abb.tar.bz2
scummvm-rg350-51933629d1f1a17839ddbb75b2b619effe117abb.zip
Changed foo(void) to foo() in almost all non-backend source files
svn-id: r45616
Diffstat (limited to 'engines/sword1')
-rw-r--r--engines/sword1/animation.cpp4
-rw-r--r--engines/sword1/animation.h4
-rw-r--r--engines/sword1/collision.h8
-rw-r--r--engines/sword1/control.cpp34
-rw-r--r--engines/sword1/control.h36
-rw-r--r--engines/sword1/eventman.cpp4
-rw-r--r--engines/sword1/eventman.h4
-rw-r--r--engines/sword1/logic.cpp8
-rw-r--r--engines/sword1/logic.h8
-rw-r--r--engines/sword1/memman.cpp8
-rw-r--r--engines/sword1/memman.h8
-rw-r--r--engines/sword1/menu.cpp16
-rw-r--r--engines/sword1/menu.h20
-rw-r--r--engines/sword1/mouse.cpp20
-rw-r--r--engines/sword1/mouse.h20
-rw-r--r--engines/sword1/music.cpp6
-rw-r--r--engines/sword1/objectman.cpp4
-rw-r--r--engines/sword1/objectman.h4
-rw-r--r--engines/sword1/resman.cpp6
-rw-r--r--engines/sword1/resman.h6
-rw-r--r--engines/sword1/router.h2
-rw-r--r--engines/sword1/screen.cpp24
-rw-r--r--engines/sword1/screen.h24
-rw-r--r--engines/sword1/sound.cpp16
-rw-r--r--engines/sword1/sound.h14
-rw-r--r--engines/sword1/sword1.cpp10
-rw-r--r--engines/sword1/sword1.h10
-rw-r--r--engines/sword1/text.cpp2
-rw-r--r--engines/sword1/text.h2
29 files changed, 166 insertions, 166 deletions
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index 60e9bb13fa..80e8573c44 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -73,7 +73,7 @@ MoviePlayer::MoviePlayer(SwordEngine *vm, Text *textMan, Audio::Mixer *snd, OSys
_decoderType = decoderType;
}
-MoviePlayer::~MoviePlayer(void) {
+MoviePlayer::~MoviePlayer() {
delete _decoder;
delete _bgSoundHandle;
}
@@ -145,7 +145,7 @@ bool MoviePlayer::load(uint32 id) {
return _decoder->loadFile(filename);
}
-void MoviePlayer::play(void) {
+void MoviePlayer::play() {
if (_bgSoundStream) {
_snd->playInputStream(Audio::Mixer::kSFXSoundType, _bgSoundHandle, _bgSoundStream);
}
diff --git a/engines/sword1/animation.h b/engines/sword1/animation.h
index 1a380d40b0..629198a63d 100644
--- a/engines/sword1/animation.h
+++ b/engines/sword1/animation.h
@@ -70,9 +70,9 @@ private:
class MoviePlayer : public Graphics::VideoPlayer {
public:
MoviePlayer(SwordEngine *vm, Text *textMan, Audio::Mixer *snd, OSystem *system, Audio::SoundHandle *bgSoundHandle, Graphics::VideoDecoder *decoder, DecoderType decoderType);
- virtual ~MoviePlayer(void);
+ virtual ~MoviePlayer();
bool load(uint32 id);
- void play(void);
+ void play();
protected:
SwordEngine *_vm;
Text *_textMan;
diff --git a/engines/sword1/collision.h b/engines/sword1/collision.h
index 1ed3980d0a..4079136da1 100644
--- a/engines/sword1/collision.h
+++ b/engines/sword1/collision.h
@@ -35,10 +35,10 @@ class Logic;
class Collision {
public:
Collision(ObjectMan *pObjMan, Logic *pLogic);
- ~Collision(void);
- void checkCollisions(void);
- void fnBumpOff(void);
- void fnBumpOn(void);
+ ~Collision();
+ void checkCollisions();
+ void fnBumpOff();
+ void fnBumpOn();
private:
int32 getIntersect(int32 x0, int32 y0, int32 x1, int32 y1, int32 x2, int32 y2, int32 x3, int32 y3);
int noCol;
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp
index 2b6509163e..dd57d8f98e 100644
--- a/engines/sword1/control.cpp
+++ b/engines/sword1/control.cpp
@@ -129,15 +129,15 @@ ControlButton::ControlButton(uint16 x, uint16 y, uint32 resId, uint8 id, uint8 f
_system = system;
}
-ControlButton::~ControlButton(void) {
+ControlButton::~ControlButton() {
_resMan->resClose(_resId);
}
-bool ControlButton::isSaveslot(void) {
+bool ControlButton::isSaveslot() {
return ((_resId >= SR_SLAB1) && (_resId <= SR_SLAB4));
}
-void ControlButton::draw(void) {
+void ControlButton::draw() {
FrameHeader *fHead = _resMan->fetchFrame(_resMan->fetchRes(_resId), _frameIdx);
uint8 *src = (uint8*)fHead + sizeof(FrameHeader);
uint8 *dst = _dstBuf;
@@ -241,7 +241,7 @@ Control::Control(Common::SaveFileManager *saveFileMan, ResMan *pResMan, ObjectMa
_panelShown = false;
}
-void Control::askForCd(void) {
+void Control::askForCd() {
_screenBuf = (uint8*)malloc(640 * 480);
uint32 fontId = SR_FONT;
if (SwordEngine::_systemVars.language == BS1_CZECH)
@@ -298,7 +298,7 @@ static int volToBalance(int volL, int volR) {
}
}
-uint8 Control::runPanel(void) {
+uint8 Control::runPanel() {
_panelShown = true;
_mouseDown = false;
_restoreBuf = NULL;
@@ -530,12 +530,12 @@ uint8 Control::handleButtonClick(uint8 id, uint8 mode, uint8 *retVal) {
return 0;
}
-void Control::deselectSaveslots(void) {
+void Control::deselectSaveslots() {
for (uint8 cnt = 0; cnt < 8; cnt++)
_buttons[cnt]->setSelected(0);
}
-void Control::setupMainPanel(void) {
+void Control::setupMainPanel() {
uint32 panelId;
if (SwordEngine::_systemVars.controlPanelMode == CP_DEATHSCREEN)
@@ -602,7 +602,7 @@ void Control::setupSaveRestorePanel(bool saving) {
showSavegameNames();
}
-void Control::setupVolumePanel(void) {
+void Control::setupVolumePanel() {
ControlButton *panel = new ControlButton(0, 0, SR_VOLUME, 0, 0, _resMan, _screenBuf, _system);
panel->draw();
delete panel;
@@ -623,7 +623,7 @@ void Control::setupVolumePanel(void) {
renderVolumeBar(3, volL, volR);
}
-void Control::handleVolumeClicks(void) {
+void Control::handleVolumeClicks() {
if (_mouseDown) {
uint8 clickedId = 0;
for (uint8 cnt = 1; cnt < 4; cnt++)
@@ -774,21 +774,21 @@ void Control::handleSaveKey(Common::KeyState kbd) {
}
}
-bool Control::saveToFile(void) {
+bool Control::saveToFile() {
if ((_selectedSavegame == 255) || _saveNames[_selectedSavegame].size() == 0)
return false; // no saveslot selected or no name entered
saveGameToFile(_selectedSavegame);
return true;
}
-bool Control::restoreFromFile(void) {
+bool Control::restoreFromFile() {
if (_selectedSavegame < 255) {
return restoreGameFromFile(_selectedSavegame);
} else
return false;
}
-void Control::readSavegameDescriptions(void) {
+void Control::readSavegameDescriptions() {
char saveName[40];
Common::String pattern = "sword1.???";
Common::StringList filenames = _saveFileMan->listSavefiles(pattern);
@@ -827,7 +827,7 @@ void Control::readSavegameDescriptions(void) {
_saveFiles = _numSaves = _saveNames.size();
}
-bool Control::isPanelShown(void) {
+bool Control::isPanelShown() {
return _panelShown;
}
@@ -845,7 +845,7 @@ int Control::displayMessage(const char *altButton, const char *message, ...) {
return result;
}
-bool Control::savegamesExist(void) {
+bool Control::savegamesExist() {
Common::String pattern = "sword1.???";
Common::StringList saveNames = _saveFileMan->listSavefiles(pattern);
return saveNames.size() > 0;
@@ -900,7 +900,7 @@ void Control::checkForOldSaveGames() {
_saveFileMan->removeSavefile("SAVEGAME.INF");
}
-void Control::showSavegameNames(void) {
+void Control::showSavegameNames() {
for (uint8 cnt = 0; cnt < 8; cnt++) {
_buttons[cnt]->draw();
uint8 textMode = TEXT_LEFT_ALIGN;
@@ -981,7 +981,7 @@ void Control::createButtons(const ButtonInfo *buttons, uint8 num) {
_numButtons = num;
}
-void Control::destroyButtons(void) {
+void Control::destroyButtons() {
for (uint8 cnt = 0; cnt < _numButtons; cnt++)
delete _buttons[cnt];
_numButtons = 0;
@@ -1301,7 +1301,7 @@ bool Control::convertSaveGame(uint8 slot, char* desc) {
return true;
}
-void Control::doRestore(void) {
+void Control::doRestore() {
uint8 *bufPos = _restoreBuf;
_objMan->loadLiveList((uint16*)bufPos);
bufPos += TOTAL_SECTIONS * 2;
diff --git a/engines/sword1/control.h b/engines/sword1/control.h
index 0193afc7f1..6741b3dd79 100644
--- a/engines/sword1/control.h
+++ b/engines/sword1/control.h
@@ -55,11 +55,11 @@ class Sound;
class ControlButton {
public:
ControlButton(uint16 x, uint16 y, uint32 resId, uint8 id, uint8 flag, ResMan *pResMan, uint8 *screenBuf, OSystem *system);
- ~ControlButton(void);
- void draw(void);
+ ~ControlButton();
+ void draw();
bool wasClicked(uint16 mouseX, uint16 mouseY);
void setSelected(uint8 selected);
- bool isSaveslot(void);
+ bool isSaveslot();
uint8 _id;
uint8 _flag;
private:
@@ -86,15 +86,15 @@ struct ButtonInfo {
class Control {
public:
Control(Common::SaveFileManager *saveFileMan, ResMan *pResMan, ObjectMan *pObjMan, OSystem *system, Mouse *pMouse, Sound *pSound, Music *pMusic);
- uint8 runPanel(void);
- void doRestore(void);
- void askForCd(void);
- bool savegamesExist(void);
- void readSavegameDescriptions(void);
+ uint8 runPanel();
+ void doRestore();
+ void askForCd();
+ bool savegamesExist();
+ void readSavegameDescriptions();
void saveGameToFile(uint8 slot);
bool restoreGameFromFile(uint8 slot);
- void checkForOldSaveGames(void);
- bool isPanelShown(void);
+ void checkForOldSaveGames();
+ bool isPanelShown();
void setSaveDescription(int slot, const char *desc) {
_saveNames[slot] = desc;
@@ -104,8 +104,8 @@ private:
int displayMessage(const char *altButton, const char *message, ...) GCC_PRINTF(3, 4);
bool convertSaveGame(uint8 slot, char* desc);
- void showSavegameNames(void);
- void deselectSaveslots(void);
+ void showSavegameNames();
+ void deselectSaveslots();
uint8 *_restoreBuf;
uint8 _saveFiles;
uint8 _numSaves;
@@ -119,18 +119,18 @@ private:
uint8 getClicks(uint8 mode, uint8 *retVal);
uint8 handleButtonClick(uint8 id, uint8 mode, uint8 *retVal);
- void handleVolumeClicks(void);
+ void handleVolumeClicks();
void changeVolume(uint8 id, uint8 action);
- void setupMainPanel(void);
+ void setupMainPanel();
void setupSaveRestorePanel(bool saving);
- void setupVolumePanel(void);
+ void setupVolumePanel();
bool getConfirm(const uint8 *title);
void saveNameScroll(uint8 scroll, bool saving);
void saveNameSelect(uint8 id, bool saving);
- bool saveToFile(void);
- bool restoreFromFile(void);
+ bool saveToFile();
+ bool restoreFromFile();
bool keyAccepted(uint16 ascii);
void handleSaveKey(Common::KeyState kbd);
@@ -140,7 +140,7 @@ private:
uint8 _numButtons;
uint8 _selectedButton;
void createButtons(const ButtonInfo *buttons, uint8 num);
- void destroyButtons(void);
+ void destroyButtons();
ControlButton *_buttons[MAX_BUTTONS];
static const ButtonInfo _deathButtons[3], _panelButtons[7], _saveButtons[16], _volumeButtons[4];
static const uint8 _languageStrings[8 * 20][43];
diff --git a/engines/sword1/eventman.cpp b/engines/sword1/eventman.cpp
index 59841c12ea..55a438f506 100644
--- a/engines/sword1/eventman.cpp
+++ b/engines/sword1/eventman.cpp
@@ -30,12 +30,12 @@
namespace Sword1 {
-EventManager::EventManager(void) {
+EventManager::EventManager() {
for (uint8 cnt = 0; cnt < TOTAL_EVENT_SLOTS; cnt++)
_eventPendingList[cnt].delay = _eventPendingList[cnt].eventNumber = 0;
}
-void EventManager::serviceGlobalEventList(void) {
+void EventManager::serviceGlobalEventList() {
for (uint8 slot = 0; slot < TOTAL_EVENT_SLOTS; slot++)
if (_eventPendingList[slot].delay)
_eventPendingList[slot].delay--;
diff --git a/engines/sword1/eventman.h b/engines/sword1/eventman.h
index 552f59977a..7a50b9a297 100644
--- a/engines/sword1/eventman.h
+++ b/engines/sword1/eventman.h
@@ -39,8 +39,8 @@ struct GlobalEvent {
class EventManager {
public:
- EventManager(void);
- void serviceGlobalEventList(void);
+ EventManager();
+ void serviceGlobalEventList();
void checkForEvent(Object *compact);
int fnCheckForEvent(Object *cpt, int32 id, int32 pause);
void fnIssueEvent(Object *compact, int32 id, int32 event, int32 delay);
diff --git a/engines/sword1/logic.cpp b/engines/sword1/logic.cpp
index f32c422540..35d8e14f27 100644
--- a/engines/sword1/logic.cpp
+++ b/engines/sword1/logic.cpp
@@ -75,13 +75,13 @@ Logic::Logic(SwordEngine *vm, ObjectMan *pObjMan, ResMan *resMan, Screen *pScree
setupMcodeTable();
}
-Logic::~Logic(void) {
+Logic::~Logic() {
delete _textMan;
delete _router;
delete _eventMan;
}
-void Logic::initialize(void) {
+void Logic::initialize() {
memset(_scriptVars, 0, NUM_SCRIPT_VARS * sizeof(uint32));
for (uint8 cnt = 0; cnt < NON_ZERO_SCRIPT_VARS; cnt++)
_scriptVars[_scriptVarInit[cnt][0]] = _scriptVarInit[cnt][1];
@@ -132,7 +132,7 @@ void Logic::newScreen(uint32 screen) {
}
}
-void Logic::engine(void) {
+void Logic::engine() {
debug(8, "\n\nNext logic cycle");
_eventMan->serviceGlobalEventList();
@@ -429,7 +429,7 @@ int Logic::animDriver(Object *compact) {
return 0;
}
-void Logic::updateScreenParams(void) {
+void Logic::updateScreenParams() {
Object *compact = (Object*)_objMan->fetchObject(PLAYER);
_screen->setScrolling((int16)(compact->o_xcoord - _scriptVars[FEET_X]),
(int16)(compact->o_ycoord - _scriptVars[FEET_Y]));
diff --git a/engines/sword1/logic.h b/engines/sword1/logic.h
index 6e3f08c4af..aabfb7fce9 100644
--- a/engines/sword1/logic.h
+++ b/engines/sword1/logic.h
@@ -53,11 +53,11 @@ typedef int (Logic::*BSMcodeTable)(Object *, int32, int32, int32, int32, int32,
class Logic {
public:
Logic(SwordEngine *vm, ObjectMan *pObjMan, ResMan *resMan, Screen *pScreen, Mouse *pMouse, Sound *pSound, Music *pMusic, Menu *pMenu, OSystem *system, Audio::Mixer *mixer);
- ~Logic(void);
- void initialize(void);
+ ~Logic();
+ void initialize();
void newScreen(uint32 screen);
- void engine(void);
- void updateScreenParams(void);
+ void engine();
+ void updateScreenParams();
void runMouseScript(Object *cpt, int32 scriptId);
void startPositions(uint32 pos);
diff --git a/engines/sword1/memman.cpp b/engines/sword1/memman.cpp
index f6e4e17658..b08631dfc8 100644
--- a/engines/sword1/memman.cpp
+++ b/engines/sword1/memman.cpp
@@ -29,12 +29,12 @@
namespace Sword1 {
-MemMan::MemMan(void) {
+MemMan::MemMan() {
_alloced = 0;
_memListFree = _memListFreeEnd = NULL;
}
-MemMan::~MemMan(void) {
+MemMan::~MemMan() {
flush();
if (_alloced)
warning("deleting MemMan, still %d bytes alloced", _alloced);
@@ -76,7 +76,7 @@ void MemMan::setCondition(MemHandle *bsMem, uint16 pCond) {
}
}
-void MemMan::flush(void) {
+void MemMan::flush() {
while (_memListFree) {
free(_memListFreeEnd->data);
_memListFreeEnd->data = NULL;
@@ -88,7 +88,7 @@ void MemMan::flush(void) {
warning("MemMan::flush: Something's wrong: still %d bytes alloced", _alloced);
}
-void MemMan::checkMemoryUsage(void) {
+void MemMan::checkMemoryUsage() {
while ((_alloced > MAX_ALLOC) && _memListFree) {
free(_memListFreeEnd->data);
_memListFreeEnd->data = NULL;
diff --git a/engines/sword1/memman.h b/engines/sword1/memman.h
index d482fff7b1..845a8638a2 100644
--- a/engines/sword1/memman.h
+++ b/engines/sword1/memman.h
@@ -50,17 +50,17 @@ struct MemHandle {
class MemMan {
public:
- MemMan(void);
- ~MemMan(void);
+ MemMan();
+ ~MemMan();
void alloc(MemHandle *bsMem, uint32 pSize, uint16 pCond = MEM_DONT_FREE);
void setCondition(MemHandle *bsMem, uint16 pCond);
void freeNow(MemHandle *bsMem);
void initHandle(MemHandle *bsMem);
- void flush(void);
+ void flush();
private:
void addToFreeList(MemHandle *bsMem);
void removeFromFreeList(MemHandle *bsMem);
- void checkMemoryUsage(void);
+ void checkMemoryUsage();
uint32 _alloced; //currently allocated memory
MemHandle *_memListFree;
MemHandle *_memListFreeEnd;
diff --git a/engines/sword1/menu.cpp b/engines/sword1/menu.cpp
index 1c7f18ba98..34f6daf276 100644
--- a/engines/sword1/menu.cpp
+++ b/engines/sword1/menu.cpp
@@ -107,7 +107,7 @@ Menu::Menu(Screen *pScreen, Mouse *pMouse) {
_inMenu = 0;
}
-Menu::~Menu(void) {
+Menu::~Menu() {
int i;
// the menu may be open, so delete the icons
for (i = 0; i < TOTAL_pockets; i++) {
@@ -214,7 +214,7 @@ uint8 Menu::checkMenuClick(uint8 menuType) {
return 0;
}
-void Menu::buildSubjects(void) {
+void Menu::buildSubjects() {
uint8 cnt;
for (cnt = 0; cnt < 16; cnt++)
if (_subjects[cnt]) {
@@ -288,7 +288,7 @@ void Menu::refresh(uint8 menuType) {
}
}
-void Menu::buildMenu(void) {
+void Menu::buildMenu() {
uint32 *pockets = Logic::_scriptVars + POCKET_1;
for (uint8 cnt = 0; cnt < _inMenu; cnt++)
if (_objects[cnt]) {
@@ -336,7 +336,7 @@ void Menu::showMenu(uint8 menuType) {
}
}
-void Menu::fnStartMenu(void) {
+void Menu::fnStartMenu() {
Logic::_scriptVars[OBJECT_HELD] = 0; // icon no longer selected
Logic::_scriptVars[SECOND_ITEM] = 0; // second icon no longer selected (after using one on another)
Logic::_scriptVars[MENU_LOOKING] = 0; // no longer 'looking at' an icon
@@ -344,7 +344,7 @@ void Menu::fnStartMenu(void) {
showMenu(MENU_TOP);
}
-void Menu::fnEndMenu(void) {
+void Menu::fnEndMenu() {
if (_objectBarStatus != MENU_CLOSED)
_objectBarStatus = MENU_CLOSING;
}
@@ -358,7 +358,7 @@ void Menu::fnChooser(Object *compact) {
_subjectBarStatus = MENU_OPENING;
}
-void Menu::fnEndChooser(void) {
+void Menu::fnEndChooser() {
Logic::_scriptVars[OBJECT_HELD] = 0;
_subjectBarStatus = MENU_CLOSING;
_objectBarStatus = MENU_CLOSING;
@@ -366,7 +366,7 @@ void Menu::fnEndChooser(void) {
_mouse->setLuggage(0, 0);
}
-void Menu::checkTopMenu(void) {
+void Menu::checkTopMenu() {
if (_objectBarStatus == MENU_OPEN)
checkMenuClick(MENU_TOP);
}
@@ -389,7 +389,7 @@ void Menu::fnAddSubject(int32 sub) {
Logic::_scriptVars[IN_SUBJECT]++;
}
-void Menu::cfnReleaseMenu(void) {
+void Menu::cfnReleaseMenu() {
_objectBarStatus = MENU_CLOSING;
}
diff --git a/engines/sword1/menu.h b/engines/sword1/menu.h
index d23097c9bc..f45f59a1e0 100644
--- a/engines/sword1/menu.h
+++ b/engines/sword1/menu.h
@@ -68,28 +68,28 @@ private:
class Menu {
public:
Menu(Screen *pScreen, Mouse *pMouse);
- ~Menu(void);
+ ~Menu();
void fnChooser(Object *compact);
- void fnEndChooser(void);
+ void fnEndChooser();
void fnAddSubject(int32 sub);
- void cfnReleaseMenu(void);
+ void cfnReleaseMenu();
int logicChooser(Object *compact);
- void engine(void);
+ void engine();
void refresh(uint8 menuType);
- void fnStartMenu(void);
- void fnEndMenu(void);
- void checkTopMenu(void);
+ void fnStartMenu();
+ void fnEndMenu();
+ void checkTopMenu();
static const MenuObject _objectDefs[TOTAL_pockets + 1];
private:
- void buildSubjects(void);
- void buildMenu(void);
+ void buildSubjects();
+ void buildMenu();
void showMenu(uint8 menuType);
byte _subjectBarStatus;
byte _objectBarStatus;
int8 _fadeSubject;
int8 _fadeObject;
- void refreshMenus(void);
+ void refreshMenus();
uint8 checkMenuClick(uint8 menuType);
//- lower menu, speech subjects:
MenuIcon *_subjects[16];
diff --git a/engines/sword1/mouse.cpp b/engines/sword1/mouse.cpp
index 77e58f8116..725254d76b 100644
--- a/engines/sword1/mouse.cpp
+++ b/engines/sword1/mouse.cpp
@@ -47,7 +47,7 @@ Mouse::Mouse(OSystem *system, ResMan *pResMan, ObjectMan *pObjMan) {
_currentPtr = NULL;
}
-Mouse::~Mouse(void) {
+Mouse::~Mouse() {
setLuggage(0, 0);
setPointer(0, 0);
@@ -55,7 +55,7 @@ Mouse::~Mouse(void) {
_resMan->resClose(MSE_POINTER + cnt);
}
-void Mouse::initialize(void) {
+void Mouse::initialize() {
_numObjs = 0;
Logic::_scriptVars[MOUSE_STATUS] = 0; // mouse off and unlocked
_getOff = 0;
@@ -189,7 +189,7 @@ void Mouse::engine(uint16 x, uint16 y, uint16 eventFlags) {
_numObjs = 0;
}
-uint16 Mouse::testEvent(void) {
+uint16 Mouse::testEvent() {
return _state;
}
@@ -302,7 +302,7 @@ void Mouse::setLuggage(uint32 resId, uint32 rate) {
createPointer(_currentPtrId, resId);
}
-void Mouse::animate(void) {
+void Mouse::animate() {
if ((Logic::_scriptVars[MOUSE_STATUS] == 1) || (_mouseOverride && _currentPtr)) {
_frame = (_frame + 1) % _currentPtr->numFrames;
uint8 *ptrData = (uint8*)_currentPtr + sizeof(MousePtr);
@@ -311,7 +311,7 @@ void Mouse::animate(void) {
}
}
-void Mouse::fnNoHuman(void) {
+void Mouse::fnNoHuman() {
if (Logic::_scriptVars[MOUSE_STATUS] & 2) // locked, can't do anything
return ;
Logic::_scriptVars[MOUSE_STATUS] = 0; // off & unlocked
@@ -319,7 +319,7 @@ void Mouse::fnNoHuman(void) {
setPointer(0, 0);
}
-void Mouse::fnAddHuman(void) {
+void Mouse::fnAddHuman() {
if (Logic::_scriptVars[MOUSE_STATUS] & 2) // locked, can't do anything
return ;
Logic::_scriptVars[MOUSE_STATUS] = 1;
@@ -328,19 +328,19 @@ void Mouse::fnAddHuman(void) {
setPointer(MSE_POINTER, 0);
}
-void Mouse::fnBlankMouse(void) {
+void Mouse::fnBlankMouse() {
setPointer(0, 0);
}
-void Mouse::fnNormalMouse(void) {
+void Mouse::fnNormalMouse() {
setPointer(MSE_POINTER, 0);
}
-void Mouse::fnLockMouse(void) {
+void Mouse::fnLockMouse() {
Logic::_scriptVars[MOUSE_STATUS] |= 2;
}
-void Mouse::fnUnlockMouse(void) {
+void Mouse::fnUnlockMouse() {
Logic::_scriptVars[MOUSE_STATUS] &= 1;
}
diff --git a/engines/sword1/mouse.h b/engines/sword1/mouse.h
index 1be35c4039..50b7431c48 100644
--- a/engines/sword1/mouse.h
+++ b/engines/sword1/mouse.h
@@ -72,22 +72,22 @@ class ObjectMan;
class Mouse {
public:
Mouse(OSystem *system, ResMan *pResMan, ObjectMan *pObjMan);
- ~Mouse(void);
- void initialize(void);
+ ~Mouse();
+ void initialize();
void addToList(int id, Object *compact);
void useLogicAndMenu(Logic *pLogic, Menu *pMenu);
void setLuggage(uint32 resID, uint32 rate);
void setPointer(uint32 resID, uint32 rate);
- void animate(void);
+ void animate();
void engine(uint16 x, uint16 y, uint16 eventFlags);
- uint16 testEvent(void);
+ uint16 testEvent();
void giveCoords(uint16 *x, uint16 *y);
- void fnNoHuman(void);
- void fnAddHuman(void);
- void fnBlankMouse(void);
- void fnNormalMouse(void);
- void fnLockMouse(void);
- void fnUnlockMouse(void);
+ void fnNoHuman();
+ void fnAddHuman();
+ void fnBlankMouse();
+ void fnNormalMouse();
+ void fnLockMouse();
+ void fnUnlockMouse();
void controlPanel(bool on);
private:
void createPointer(uint32 ptrId, uint32 luggageId);
diff --git a/engines/sword1/music.cpp b/engines/sword1/music.cpp
index 8c0315052f..67ea0bf376 100644
--- a/engines/sword1/music.cpp
+++ b/engines/sword1/music.cpp
@@ -287,15 +287,15 @@ bool MusicHandle::endOfData() const {
}
// if we don't have an audiosource, return some dummy values.
-bool MusicHandle::streaming(void) const {
+bool MusicHandle::streaming() const {
return (_audioSource) ? (!_audioSource->endOfStream()) : false;
}
-bool MusicHandle::isStereo(void) const {
+bool MusicHandle::isStereo() const {
return (_audioSource) ? _audioSource->isStereo() : false;
}
-int MusicHandle::getRate(void) const {
+int MusicHandle::getRate() const {
return (_audioSource) ? _audioSource->getRate() : 11025;
}
diff --git a/engines/sword1/objectman.cpp b/engines/sword1/objectman.cpp
index 703f422b8b..9ac2c7a255 100644
--- a/engines/sword1/objectman.cpp
+++ b/engines/sword1/objectman.cpp
@@ -37,7 +37,7 @@ ObjectMan::ObjectMan(ResMan *pResourceMan) {
_resMan = pResourceMan;
}
-void ObjectMan::initialize(void) {
+void ObjectMan::initialize() {
uint16 cnt;
for (cnt = 0; cnt < TOTAL_SECTIONS; cnt++)
_liveList[cnt] = 0; // we don't need to close the files here. When this routine is
@@ -55,7 +55,7 @@ void ObjectMan::initialize(void) {
}
}
-ObjectMan::~ObjectMan(void) {
+ObjectMan::~ObjectMan() {
for (uint16 cnt = 0; cnt < TOTAL_SECTIONS; cnt++)
if (_liveList[cnt])
_resMan->resClose(_objectList[cnt]);
diff --git a/engines/sword1/objectman.h b/engines/sword1/objectman.h
index fdb26e2e68..f4b8fe8906 100644
--- a/engines/sword1/objectman.h
+++ b/engines/sword1/objectman.h
@@ -37,8 +37,8 @@ namespace Sword1 {
class ObjectMan {
public:
ObjectMan(ResMan *pResourceMan);
- ~ObjectMan(void);
- void initialize(void);
+ ~ObjectMan();
+ void initialize();
Object *fetchObject(uint32 id);
uint32 fetchNoObjects(int section);
diff --git a/engines/sword1/resman.cpp b/engines/sword1/resman.cpp
index 90ea5fe677..3b11f6cca5 100644
--- a/engines/sword1/resman.cpp
+++ b/engines/sword1/resman.cpp
@@ -59,7 +59,7 @@ ResMan::ResMan(const char *fileName, bool isMacFile) {
loadCluDescript(fileName);
}
-ResMan::~ResMan(void) {
+ResMan::~ResMan() {
#if 0
for (uint32 clusCnt = 0; clusCnt < _prj.noClu; clusCnt++) {
Clu *cluster = _prj.clu[clusCnt];
@@ -150,7 +150,7 @@ void ResMan::loadCluDescript(const char *fileName) {
_srIdList[cnt] = 0x04050000 | cnt;
}
-void ResMan::freeCluDescript(void) {
+void ResMan::freeCluDescript() {
for (uint32 clusCnt = 0; clusCnt < _prj.noClu; clusCnt++) {
Clu *cluster = _prj.clu + clusCnt;
@@ -173,7 +173,7 @@ void ResMan::freeCluDescript(void) {
delete[] _prj.clu;
}
-void ResMan::flush(void) {
+void ResMan::flush() {
for (uint32 clusCnt = 0; clusCnt < _prj.noClu; clusCnt++) {
Clu *cluster = _prj.clu + clusCnt;
for (uint32 grpCnt = 0; grpCnt < cluster->noGrp; grpCnt++) {
diff --git a/engines/sword1/resman.h b/engines/sword1/resman.h
index a0a8bb6c4c..ee1d55cd14 100644
--- a/engines/sword1/resman.h
+++ b/engines/sword1/resman.h
@@ -67,8 +67,8 @@ struct Prj {
class ResMan {
public:
ResMan(const char *fileName, bool isMacFile);
- ~ResMan(void);
- void flush(void);
+ ~ResMan();
+ void flush();
void resClose(uint32 id);
void resOpen(uint32 id);
void *fetchRes(uint32 id);
@@ -120,7 +120,7 @@ private:
void openScriptResourceLittleEndian(uint32 id);
void loadCluDescript(const char *fileName);
- void freeCluDescript(void);
+ void freeCluDescript();
Prj _prj;
MemMan *_memMan;
static const uint32 _scriptList[TOTAL_SECTIONS]; //a table of resource tags
diff --git a/engines/sword1/router.h b/engines/sword1/router.h
index 7ea459d9aa..97fa42488b 100644
--- a/engines/sword1/router.h
+++ b/engines/sword1/router.h
@@ -138,7 +138,7 @@ private:
bool _slidyWalkAnimatorState;
int32 LoadWalkResources(Object *mega, int32 x, int32 y, int32 dir);
- int32 getRoute(void);
+ int32 getRoute();
int32 checkTarget(int32 x, int32 y);
bool scan(int32 level);
diff --git a/engines/sword1/screen.cpp b/engines/sword1/screen.cpp
index bef715199c..928cfafd10 100644
--- a/engines/sword1/screen.cpp
+++ b/engines/sword1/screen.cpp
@@ -57,14 +57,14 @@ Screen::Screen(OSystem *system, ResMan *pResMan, ObjectMan *pObjMan) {
_psxCache.extPlxCache = NULL;
}
-Screen::~Screen(void) {
+Screen::~Screen() {
free(_screenBuf);
free(_screenGrid);
if (_currentScreen != 0xFFFF)
quitScreen();
}
-void Screen::clearScreen(void) {
+void Screen::clearScreen() {
if (_screenBuf) {
_fullRefresh = true;
memset(_screenBuf, 0, _scrnSizeX * _scrnSizeY);
@@ -119,14 +119,14 @@ void Screen::setScrolling(int16 offsetX, int16 offsetY) {
}
}
-void Screen::fadeDownPalette(void) {
+void Screen::fadeDownPalette() {
if (!_isBlack) { // don't fade down twice
_fadingStep = 15;
_fadingDirection = FADE_DOWN;
}
}
-void Screen::fadeUpPalette(void) {
+void Screen::fadeUpPalette() {
_fadingStep = 1;
_fadingDirection = FADE_UP;
}
@@ -157,16 +157,16 @@ void Screen::fnSetPalette(uint8 start, uint16 length, uint32 id, bool fadeUp) {
_system->setPalette(_targetPalette + 4 * start, start, length);
}
-void Screen::fullRefresh(void) {
+void Screen::fullRefresh() {
_fullRefresh = true;
_system->setPalette(_targetPalette, 0, 256);
}
-bool Screen::stillFading(void) {
+bool Screen::stillFading() {
return (_fadingStep != 0);
}
-bool Screen::showScrollFrame(void) {
+bool Screen::showScrollFrame() {
if ((!_fullRefresh) || Logic::_scriptVars[NEW_PALETTE] || _updatePalette)
return false; // don't draw an additional frame if we aren't scrolling or have to change the palette
if ((_oldScrollX == Logic::_scriptVars[SCROLL_OFFSET_X]) &&
@@ -181,7 +181,7 @@ bool Screen::showScrollFrame(void) {
return true;
}
-void Screen::updateScreen(void) {
+void Screen::updateScreen() {
if (Logic::_scriptVars[NEW_PALETTE]) {
_fadingStep = 1;
_fadingDirection = FADE_UP;
@@ -346,7 +346,7 @@ void Screen::newScreen(uint32 screen) {
_fullRefresh = true;
}
-void Screen::quitScreen(void) {
+void Screen::quitScreen() {
uint8 cnt;
if (SwordEngine::isPsx())
flushPsxCache();
@@ -361,7 +361,7 @@ void Screen::quitScreen(void) {
_currentScreen = 0xFFFF;
}
-void Screen::draw(void) {
+void Screen::draw() {
uint8 cnt;
debug(8, "Screen::draw() -> _currentScreen %u", _currentScreen);
@@ -1114,7 +1114,7 @@ void Screen::decompressHIF(uint8 *src, uint8 *dest) {
}
}
-void Screen::flushPsxCache(void) {
+void Screen::flushPsxCache() {
if (_psxCache.decodedBackground) {
free(_psxCache.decodedBackground);
_psxCache.decodedBackground = NULL;
@@ -1126,7 +1126,7 @@ void Screen::flushPsxCache(void) {
}
}
-void Screen::fadePalette(void) {
+void Screen::fadePalette() {
if (_fadingStep == 16)
memcpy(_currentPalette, _targetPalette, 256 * 4);
else if ((_fadingStep == 1) && (_fadingDirection == FADE_DOWN)) {
diff --git a/engines/sword1/screen.h b/engines/sword1/screen.h
index 72a55b94d3..fc998c6f28 100644
--- a/engines/sword1/screen.h
+++ b/engines/sword1/screen.h
@@ -76,25 +76,25 @@ class Text; // Text objects use sprites that are created internally at run-time
class Screen {
public:
Screen(OSystem *system, ResMan *pResMan, ObjectMan *pObjMan);
- ~Screen(void);
- void clearScreen(void);
+ ~Screen();
+ void clearScreen();
void useTextManager(Text *pTextMan);
- void draw(void);
+ void draw();
- void quitScreen(void);
+ void quitScreen();
void newScreen(uint32 screen);
void setScrolling(int16 offsetX, int16 offsetY);
void addToGraphicList(uint8 listId, uint32 objId);
- void fadeDownPalette(void);
- void fadeUpPalette(void);
+ void fadeDownPalette();
+ void fadeUpPalette();
void fnSetPalette(uint8 start, uint16 length, uint32 id, bool fadeUp);
- bool stillFading(void);
- void fullRefresh(void);
+ bool stillFading();
+ void fullRefresh();
- bool showScrollFrame(void);
- void updateScreen(void);
+ bool showScrollFrame();
+ void updateScreen();
void showFrame(uint16 x, uint16 y, uint32 resId, uint32 frameNo, const byte *fadeMask = NULL, int8 fadeStatus = 0);
void fnSetParallax(uint32 screen, uint32 resId);
@@ -130,9 +130,9 @@ private:
void decompressTony(uint8 *src, uint32 compSize, uint8 *dest);
void fastShrink(uint8 *src, uint32 width, uint32 height, uint32 scale, uint8 *dest);
int32 inRange(int32 a, int32 b, int32 c);
- void fadePalette(void);
+ void fadePalette();
- void flushPsxCache(void);
+ void flushPsxCache();
OSystem *_system;
ResMan *_resMan;
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index 1aee713370..d8e664fed3 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -59,7 +59,7 @@ Sound::Sound(const char *searchPath, Audio::Mixer *mixer, ResMan *pResMan) {
_speechVolL = _speechVolR = _sfxVolL = _sfxVolR = 192;
}
-Sound::~Sound(void) {
+Sound::~Sound() {
// clean up fx queue
_mixer->stopAll();
for (uint8 cnt = 0; cnt < _endOfQueue; cnt++)
@@ -168,7 +168,7 @@ int Sound::addToQueue(int32 fxNo) {
return 0;
}
-void Sound::engine(void) {
+void Sound::engine() {
// first of all, add any random sfx to the queue...
for (uint16 cnt = 0; cnt < TOTAL_FX_PER_ROOM; cnt++) {
uint16 fxNo = _roomsFixedFx[Logic::_scriptVars[SCREEN]][cnt];
@@ -211,12 +211,12 @@ void Sound::fnStopFx(int32 fxNo) {
debug(8, "fnStopFx: id not found in queue");
}
-bool Sound::amISpeaking(void) {
+bool Sound::amISpeaking() {
_waveVolPos++;
return _waveVolume[_waveVolPos - 1];
}
-bool Sound::speechFinished(void) {
+bool Sound::speechFinished() {
return !_mixer->isSoundHandleActive(_speechHandle);
}
@@ -238,7 +238,7 @@ void Sound::newScreen(uint32 screen) {
}
}
-void Sound::quitScreen(void) {
+void Sound::quitScreen() {
// stop all running SFX
while (_endOfQueue)
fnStopFx(_fxQueue[0].id);
@@ -540,11 +540,11 @@ void Sound::calcWaveVolume(int16 *data, uint32 length) {
}
}
-void Sound::stopSpeech(void) {
+void Sound::stopSpeech() {
_mixer->stopID(SOUND_SPEECH_ID);
}
-void Sound::initCowSystem(void) {
+void Sound::initCowSystem() {
char cowName[25];
/* look for speech1/2.clu in the data dir
and speech/speech.clu (running from cd or using cd layout)
@@ -633,7 +633,7 @@ void Sound::initCowSystem(void) {
warning("Sound::initCowSystem: Can't open SPEECH%d.CLU", SwordEngine::_systemVars.currentCD);
}
-void Sound::closeCowSystem(void) {
+void Sound::closeCowSystem() {
_cowFile.close();
free(_cowHeader);
_cowHeader = NULL;
diff --git a/engines/sword1/sound.h b/engines/sword1/sound.h
index c105d06b50..68be0e56e2 100644
--- a/engines/sword1/sound.h
+++ b/engines/sword1/sound.h
@@ -76,31 +76,31 @@ enum CowMode {
class Sound {
public:
Sound(const char *searchPath, Audio::Mixer *mixer, ResMan *pResMan);
- ~Sound(void);
+ ~Sound();
void setSpeechVol(uint8 volL, uint8 volR) { _speechVolL = volL; _speechVolR = volR; }
void setSfxVol(uint8 volL, uint8 volR) { _sfxVolL = volL; _sfxVolR = volR; }
void giveSpeechVol(uint8 *volL, uint8 *volR) { *volL = _speechVolL; *volR = _speechVolR; }
void giveSfxVol(uint8 *volL, uint8 *volR) { *volL = _sfxVolL; *volR = _sfxVolR; }
void newScreen(uint32 screen);
- void quitScreen(void);
- void closeCowSystem(void);
+ void quitScreen();
+ void closeCowSystem();
bool startSpeech(uint16 roomNo, uint16 localNo);
- bool speechFinished(void);
+ bool speechFinished();
void stopSpeech();
- bool amISpeaking(void);
+ bool amISpeaking();
void fnStopFx(int32 fxNo);
int addToQueue(int32 fxNo);
- void engine(void);
+ void engine();
void checkSpeechFileEndianness();
private:
uint8 _sfxVolL, _sfxVolR, _speechVolL, _speechVolR;
void playSample(QueueElement *elem);
- void initCowSystem(void);
+ void initCowSystem();
int16 *uncompressSpeech(uint32 index, uint32 cSize, uint32 *size);
void calcWaveVolume(int16 *data, uint32 length);
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 180537f4ec..a1ff5087cf 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -152,7 +152,7 @@ Common::Error SwordEngine::init() {
return Common::kNoError;
}
-void SwordEngine::reinitialize(void) {
+void SwordEngine::reinitialize() {
_sound->quitScreen();
_resMan->flush(); // free everything that's currently alloced and opened. (*evil*)
@@ -414,7 +414,7 @@ void SwordEngine::showFileErrorMsg(uint8 type, bool *fileExists) {
error("%s", msg);
}
-void SwordEngine::checkCdFiles(void) { // check if we're running from cd, hdd or what...
+void SwordEngine::checkCdFiles() { // check if we're running from cd, hdd or what...
bool fileExists[30];
bool isFullVersion = false; // default to demo version
bool missingTypes[8] = { false, false, false, false, false, false, false, false };
@@ -595,7 +595,7 @@ Common::Error SwordEngine::go() {
return Common::kNoError;
}
-void SwordEngine::checkCd(void) {
+void SwordEngine::checkCd() {
uint8 needCd = _cdList[Logic::_scriptVars[NEW_SCREEN]];
if (_systemVars.runningFromCd) { // are we running from cd?
if (needCd == 0) { // needCd == 0 means we can use either CD1 or CD2.
@@ -617,7 +617,7 @@ void SwordEngine::checkCd(void) {
}
}
-uint8 SwordEngine::mainLoop(void) {
+uint8 SwordEngine::mainLoop() {
uint8 retCode = 0;
_keyPressed.reset();
@@ -736,7 +736,7 @@ bool SwordEngine::mouseIsActive() {
}
// The following function is needed to restore proper status after GMM load game
-void SwordEngine::reinitRes(void) {
+void SwordEngine::reinitRes() {
checkCd(); // Reset currentCD var to correct value
_screen->newScreen(Logic::_scriptVars[NEW_SCREEN]);
_logic->newScreen(Logic::_scriptVars[NEW_SCREEN]);
diff --git a/engines/sword1/sword1.h b/engines/sword1/sword1.h
index 4877f99582..b3d7aee717 100644
--- a/engines/sword1/sword1.h
+++ b/engines/sword1/sword1.h
@@ -75,7 +75,7 @@ public:
SwordEngine(OSystem *syst);
virtual ~SwordEngine();
static SystemVars _systemVars;
- void reinitialize(void);
+ void reinitialize();
uint32 _features;
@@ -107,14 +107,14 @@ protected:
private:
void delay(int32 amount);
- void checkCdFiles(void);
- void checkCd(void);
+ void checkCdFiles();
+ void checkCd();
void showFileErrorMsg(uint8 type, bool *fileExists);
void flagsToBool(bool *dest, uint8 flags);
- void reinitRes(void); //Reinits the resources after a GMM load
+ void reinitRes(); //Reinits the resources after a GMM load
- uint8 mainLoop(void);
+ uint8 mainLoop();
Common::Point _mouseCoord;
uint16 _mouseState;
diff --git a/engines/sword1/text.cpp b/engines/sword1/text.cpp
index d71b5027b8..e8a20ec2b7 100644
--- a/engines/sword1/text.cpp
+++ b/engines/sword1/text.cpp
@@ -55,7 +55,7 @@ Text::Text(ObjectMan *pObjMan, ResMan *pResMan, bool czechVersion) {
_textBlocks[i] = NULL;
}
-Text::~Text(void) {
+Text::~Text() {
for (int i = 0; i < MAX_TEXT_OBS; i++)
free(_textBlocks[i]);
//_resMan->resClose(_fontId); => wiped automatically by _resMan->flush();
diff --git a/engines/sword1/text.h b/engines/sword1/text.h
index 803d8c3fd0..9bfc88fce0 100644
--- a/engines/sword1/text.h
+++ b/engines/sword1/text.h
@@ -49,7 +49,7 @@ struct LineInfo {
class Text {
public:
Text(ObjectMan *pObjMan, ResMan *pResMan, bool czechVersion);
- ~Text(void);
+ ~Text();
FrameHeader *giveSpriteData(uint32 textTarget);
uint32 lowTextManager(uint8 *text, int32 width, uint8 pen);
void makeTextSprite(uint8 slot, uint8 *text, uint16 maxWidth, uint8 pen);