COMMON: Fixing misspellings "occured" -> "occurred"

Fixing this misspelled word across multiple parts of the codebase.
This commit is contained in:
Thunderforge 2021-09-25 12:48:31 -05:00 committed by Filippos Karapetis
parent 3f5ac3532f
commit 35c3668275
19 changed files with 40 additions and 40 deletions

View file

@ -400,7 +400,7 @@ struct AgiGame {
unsigned int numObjects; unsigned int numObjects;
bool controllerOccured[MAX_CONTROLLERS]; /**< keyboard keypress events */ bool controllerOccurred[MAX_CONTROLLERS]; /**< keyboard keypress events */
AgiControllerKeyMapping controllerKeyMapping[MAX_CONTROLLER_KEYMAPPINGS]; AgiControllerKeyMapping controllerKeyMapping[MAX_CONTROLLER_KEYMAPPINGS];
char strings[MAX_STRINGS + 1][MAX_STRINGLEN]; /**< strings */ char strings[MAX_STRINGS + 1][MAX_STRINGLEN]; /**< strings */
@ -495,8 +495,8 @@ struct AgiGame {
numObjects = 0; numObjects = 0;
for (uint16 i = 0; i < ARRAYSIZE(controllerOccured); i++) { for (uint16 i = 0; i < ARRAYSIZE(controllerOccurred); i++) {
controllerOccured[i] = false; controllerOccurred[i] = false;
} }
// controllerKeyMapping defaulted by AgiControllerKeyMapping constructor // controllerKeyMapping defaulted by AgiControllerKeyMapping constructor

View file

@ -125,7 +125,7 @@ void AgiEngine::resetControllers() {
int i; int i;
for (i = 0; i < MAX_CONTROLLERS; i++) { for (i = 0; i < MAX_CONTROLLERS; i++) {
_game.controllerOccured[i] = false; _game.controllerOccurred[i] = false;
} }
} }
@ -293,8 +293,8 @@ uint16 AgiEngine::processAGIEvents() {
// WORKAROUND: For Apple II gs we added a Speed menu; here the user choose some speed setting from the menu // WORKAROUND: For Apple II gs we added a Speed menu; here the user choose some speed setting from the menu
if (getPlatform() == Common::kPlatformApple2GS && _game.appleIIgsSpeedControllerSlot != 0xffff) if (getPlatform() == Common::kPlatformApple2GS && _game.appleIIgsSpeedControllerSlot != 0xffff)
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
if (_game.controllerOccured[_game.appleIIgsSpeedControllerSlot + i]) { if (_game.controllerOccurred[_game.appleIIgsSpeedControllerSlot + i]) {
_game.controllerOccured[_game.appleIIgsSpeedControllerSlot + i] = false; _game.controllerOccurred[_game.appleIIgsSpeedControllerSlot + i] = false;
_game.setAppleIIgsSpeedLevel(i); _game.setAppleIIgsSpeedLevel(i);
} }

View file

@ -474,7 +474,7 @@ bool AgiEngine::handleController(uint16 key) {
for (uint16 curMapping = 0; curMapping < MAX_CONTROLLER_KEYMAPPINGS; curMapping++) { for (uint16 curMapping = 0; curMapping < MAX_CONTROLLER_KEYMAPPINGS; curMapping++) {
if (_game.controllerKeyMapping[curMapping].keycode == key) { if (_game.controllerKeyMapping[curMapping].keycode == key) {
debugC(3, kDebugLevelInput, "event %d: key press", _game.controllerKeyMapping[curMapping].controllerSlot); debugC(3, kDebugLevelInput, "event %d: key press", _game.controllerKeyMapping[curMapping].controllerSlot);
_game.controllerOccured[_game.controllerKeyMapping[curMapping].controllerSlot] = true; _game.controllerOccurred[_game.controllerKeyMapping[curMapping].controllerSlot] = true;
return true; return true;
} }
} }

View file

@ -511,7 +511,7 @@ void GfxMenu::keyPress(uint16 newKey) {
return; return;
// Trigger controller // Trigger controller
_vm->_game.controllerOccured[itemEntry->controllerSlot] = true; _vm->_game.controllerOccurred[itemEntry->controllerSlot] = true;
_vm->cycleInnerLoopInactive(); // exit execute-loop _vm->cycleInnerLoopInactive(); // exit execute-loop
break; break;
@ -622,7 +622,7 @@ void GfxMenu::mouseEvent(uint16 newKey) {
return; return;
// Trigger controller // Trigger controller
_vm->_game.controllerOccured[itemEntry->controllerSlot] = true; _vm->_game.controllerOccurred[itemEntry->controllerSlot] = true;
_vm->cycleInnerLoopInactive(); // exit execute-loop _vm->cycleInnerLoopInactive(); // exit execute-loop
return; return;
@ -675,7 +675,7 @@ void GfxMenu::mouseEvent(uint16 newKey) {
GuiMenuItemEntry *itemEntry = _itemArray[activeItemNr]; GuiMenuItemEntry *itemEntry = _itemArray[activeItemNr];
if (itemEntry->enabled) { if (itemEntry->enabled) {
// Trigger controller // Trigger controller
_vm->_game.controllerOccured[itemEntry->controllerSlot] = true; _vm->_game.controllerOccurred[itemEntry->controllerSlot] = true;
} }
} }

View file

@ -2095,7 +2095,7 @@ void cmdSetKey(AgiGame *state, AgiEngine *vm, uint8 *parameter) {
state->controllerKeyMapping[keyMappingSlot].keycode = key; state->controllerKeyMapping[keyMappingSlot].keycode = key;
state->controllerKeyMapping[keyMappingSlot].controllerSlot = controllerSlot; state->controllerKeyMapping[keyMappingSlot].controllerSlot = controllerSlot;
state->controllerOccured[controllerSlot] = false; state->controllerOccurred[controllerSlot] = false;
} }
void cmdSetString(AgiGame *state, AgiEngine *vm, uint8 *parameter) { void cmdSetString(AgiGame *state, AgiEngine *vm, uint8 *parameter) {

View file

@ -280,7 +280,7 @@ uint8 AgiEngine::testCompareStrings(uint8 s1, uint8 s2) {
} }
uint8 AgiEngine::testController(uint8 cont) { uint8 AgiEngine::testController(uint8 cont) {
return (_game.controllerOccured[cont] ? true : false); return (_game.controllerOccurred[cont] ? true : false);
} }
uint8 AgiEngine::testPosn(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) { uint8 AgiEngine::testPosn(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) {

View file

@ -549,7 +549,7 @@ int AgiEngine::loadGame(const Common::String &fileName, bool checkId) {
// Those are not serialized // Those are not serialized
for (i = 0; i < MAX_CONTROLLERS; i++) { for (i = 0; i < MAX_CONTROLLERS; i++) {
_game.controllerOccured[i] = false; _game.controllerOccurred[i] = false;
} }
if (saveVersion >= 7) { if (saveVersion >= 7) {

View file

@ -114,7 +114,7 @@ void run_function_on_non_blocking_thread(NonBlockingScriptFunction *funcToRun) {
// Returns 0 normally, or -1 to indicate that the NewInteraction has // Returns 0 normally, or -1 to indicate that the NewInteraction has
// become invalid and don't run another interaction on it // become invalid and don't run another interaction on it
// (eg. a room change occured) // (eg. a room change occurred)
int run_interaction_event(Interaction *nint, int evnt, int chkAny, int isInv) { int run_interaction_event(Interaction *nint, int evnt, int chkAny, int isInv) {
if (evnt < 0 || (size_t)evnt >= nint->Events.size() || if (evnt < 0 || (size_t)evnt >= nint->Events.size() ||
@ -154,7 +154,7 @@ int run_interaction_event(Interaction *nint, int evnt, int chkAny, int isInv) {
// Returns 0 normally, or -1 to indicate that the NewInteraction has // Returns 0 normally, or -1 to indicate that the NewInteraction has
// become invalid and don't run another interaction on it // become invalid and don't run another interaction on it
// (eg. a room change occured) // (eg. a room change occurred)
int run_interaction_script(InteractionScripts *nint, int evnt, int chkAny, int isInv) { int run_interaction_script(InteractionScripts *nint, int evnt, int chkAny, int isInv) {
if ((nint->ScriptFuncNames[evnt] == nullptr) || (nint->ScriptFuncNames[evnt][0u] == 0)) { if ((nint->ScriptFuncNames[evnt] == nullptr) || (nint->ScriptFuncNames[evnt][0u] == 0)) {

View file

@ -56,9 +56,9 @@ run_metacommand
0 to go on to next metacommand, 0 to go on to next metacommand,
1 to stop running metacommands, and 1 to stop running metacommands, and
2 to end the turn. 2 to end the turn.
3 indicates that redirection has just occured 3 indicates that redirection has just occurred
4 indicates a subcall has just occured. 4 indicates a subcall has just occurred.
5 to go on to next metacommand after a return has occured. 5 to go on to next metacommand after a return has occurred.
-2 means we're doing disambiguation and just hit an action token. -2 means we're doing disambiguation and just hit an action token.
*/ */
@ -493,8 +493,8 @@ static int run_metacommand(int cnum, int *redir_offset)
0 to go on to next metacommand, 0 to go on to next metacommand,
1 to stop running metacommands, and 1 to stop running metacommands, and
2 to end the turn. 2 to end the turn.
3 indicates that redirection has just occured 3 indicates that redirection has just occurred
4 indicates a subcall has just occured. 4 indicates a subcall has just occurred.
5 Is used to go on to the next metacommand after a Return. 5 Is used to go on to the next metacommand after a Return.
-2 means we're doing disambiguation and just hit an action token. */ -2 means we're doing disambiguation and just hit an action token. */
{ {
@ -990,8 +990,8 @@ int scan_metacommand(integer m_actor, int vcode,
/* If doing disambiguation, then -2=end of cycle, something happened; /* If doing disambiguation, then -2=end of cycle, something happened;
0 or 1=end of cycle; nothing happened; 2=end of turn, nothing happened. */ 0 or 1=end of cycle; nothing happened; 2=end of turn, nothing happened. */
/* If redir_flag is non-NULL, it is set when redirection occurs: /* If redir_flag is non-NULL, it is set when redirection occurs:
1+=Redirection occured 1+=Redirection occurred
2=Grammar-changing redirection occured. */ 2=Grammar-changing redirection occurred. */
{ {
int i, oldi; int i, oldi;
word m_verb; word m_verb;
@ -1001,7 +1001,7 @@ int scan_metacommand(integer m_actor, int vcode,
commands)-- this is used to hold the offset commands)-- this is used to hold the offset
of the given redirect. */ of the given redirect. */
long redirect_count; /* This is a safety measure: this keeps track of how long redirect_count; /* This is a safety measure: this keeps track of how
many redirections have occured on a single turn, and many redirections have occurred on a single turn, and
if there are "too many" it will issue an error message if there are "too many" it will issue an error message
and stop. This is to prevent the system from getting and stop. This is to prevent the system from getting
into a redirection loop. The number should be set into a redirection loop. The number should be set

View file

@ -558,7 +558,7 @@ struct word_type *object_match(struct word_type *iterator, int noun_number) {
} }
if (custom_error == TRUE) { if (custom_error == TRUE) {
/* AN ERROR OCCURED IN THE FIRST OBJECT PLACEHOLDER, DON'T /* AN ERROR OCCURRED IN THE FIRST OBJECT PLACEHOLDER, DON'T
* TRY ANY OTHERS */ * TRY ANY OTHERS */
return (NULL); return (NULL);
} }

View file

@ -62,7 +62,7 @@ void lerfre(errcxdef *errcx) {
} }
void errmsg(errcxdef *ctx, char *outbuf, uint outbufl, uint err) { void errmsg(errcxdef *ctx, char *outbuf, uint outbufl, uint err) {
sprintf(outbuf, "Error #%d occured.", err); sprintf(outbuf, "Error #%d occurred.", err);
} }
} // End of namespace TADS2 } // End of namespace TADS2

View file

@ -532,7 +532,7 @@ void Lua_V2::GetMemoryCardId() {
// 0 - No mem card // 0 - No mem card
// 1 - Not formatted // 1 - Not formatted
// 2 - Not enough space // 2 - Not enough space
// 3 - Error occured // 3 - Error occurred
lua_pushnumber(4); lua_pushnumber(4);
} }

View file

@ -1873,7 +1873,7 @@ bool LuaScript::initScript(Common::SeekableReadStream *stream, const char *scrip
lua_insert(_state, -2); lua_insert(_state, -2);
if (lua_pcall(_state, 0, 0, -2)) { if (lua_pcall(_state, 0, 0, -2)) {
error("LuaScript::initScript: An error occured while executing \"%s\": %s.", "level_init", lua_tostring(_state, -1)); error("LuaScript::initScript: An error occurred while executing \"%s\": %s.", "level_init", lua_tostring(_state, -1));
lua_pop(_state, -1); lua_pop(_state, -1);
return false; return false;
@ -1913,7 +1913,7 @@ void LuaScript::call(int args, int returns) {
return; return;
if (lua_pcall(_state, args, returns, -2)) { if (lua_pcall(_state, args, returns, -2)) {
error("LuaScript::call: An error occured while executing: %s.", lua_tostring(_state, -1)); error("LuaScript::call: An error occurred while executing: %s.", lua_tostring(_state, -1));
lua_pop(_state, -1); lua_pop(_state, -1);
} }
} }
@ -1926,7 +1926,7 @@ bool LuaScript::callFunction(const char *name, int returns) {
lua_getglobal(_state, name); lua_getglobal(_state, name);
if (lua_pcall(_state, 0, returns, -2)) { if (lua_pcall(_state, 0, returns, -2)) {
error("LuaScript::callFunction: An error occured while executing \"%s\": %s.", name, lua_tostring(_state, -1)); error("LuaScript::callFunction: An error occurred while executing \"%s\": %s.", name, lua_tostring(_state, -1));
lua_pop(_state, -1); lua_pop(_state, -1);
return false; return false;
@ -2042,7 +2042,7 @@ bool LuaScript::executeChunk(Common::String &chunk, const Common::String &chunkN
// Execute Chunk // Execute Chunk
if (lua_pcall(_state, 0, 0, -2)) { if (lua_pcall(_state, 0, 0, -2)) {
error("LuaScript::executeChunk: An error occured while executing \"%s\": %s.", chunkName.c_str(), lua_tostring(_state, -1)); error("LuaScript::executeChunk: An error occurred while executing \"%s\": %s.", chunkName.c_str(), lua_tostring(_state, -1));
lua_pop(_state, -1); lua_pop(_state, -1);
return false; return false;

View file

@ -1525,7 +1525,7 @@ Common::Error Myst3Engine::loadGameState(Common::String fileName, TransitionType
} }
if (saveFile->err()) { if (saveFile->err()) {
warning("An error occured when reading '%s'", fileName.c_str()); warning("An error occrured when reading '%s'", fileName.c_str());
return Common::kReadingFailed; return Common::kReadingFailed;
} }
@ -1601,7 +1601,7 @@ Common::Error Myst3Engine::saveGameState(const Common::String &desc, const Graph
} }
if (save->err()) { if (save->err()) {
warning("An error occured when writing '%s'", fileName.c_str()); warning("An error occurred when writing '%s'", fileName.c_str());
return Common::kWritingFailed; return Common::kWritingFailed;
} }

View file

@ -857,7 +857,7 @@ bool GfxSlider::pointerHit(gPanelMessage &msg) {
// update the image index // update the image index
updateSliderIndexes(msg.pickPos); updateSliderIndexes(msg.pickPos);
// redraw the control should any visual change hath occured // redraw the control should any visual change hath occurred
window.update(_extent); window.update(_extent);
activate(gEventMouseDown); activate(gEventMouseDown);
@ -869,7 +869,7 @@ void GfxSlider::pointerMove(gPanelMessage &msg) {
// update the image index // update the image index
updateSliderIndexes(msg.pickPos); updateSliderIndexes(msg.pickPos);
// redraw the control should any visual change hath occured // redraw the control should any visual change hath occurred
window.update(_extent); window.update(_extent);
notify(gEventMouseMove, _slCurrent); notify(gEventMouseMove, _slCurrent);
@ -889,7 +889,7 @@ void GfxSlider::pointerDrag(gPanelMessage &msg) {
updateSliderIndexes(msg.pickPos); updateSliderIndexes(msg.pickPos);
notify(gEventNewValue, _slCurrent); // notify App of successful hit notify(gEventNewValue, _slCurrent); // notify App of successful hit
// redraw the control should any visual change hath occured // redraw the control should any visual change hath occurred
window.update(_extent); window.update(_extent);
} }

View file

@ -68,7 +68,7 @@ extern gFont *mainFont;
* *
* /h2/NOTIFICATIONS * /h2/NOTIFICATIONS
* This class sends a gEventNewValue whenever the text box becomes * This class sends a gEventNewValue whenever the text box becomes
* deactivated. If the deactivation occured because of the user * deactivated. If the deactivation occurred because of the user
* hitting return, then the value of the event will be 1; In all * hitting return, then the value of the event will be 1; In all
* other cases it is zero. * other cases it is zero.
* *

View file

@ -925,7 +925,7 @@ void gToolBase::handleMouse(Common::Event &event, uint32 time) {
|| prevState.right != _curMouseState.right) { || prevState.right != _curMouseState.right) {
// If both buttons were previously up, then a mouse // If both buttons were previously up, then a mouse
// hit must have occured. // hit must have occurred.
if (prevState.left == 0 && prevState.right == 0) { if (prevState.left == 0 && prevState.right == 0) {

View file

@ -3942,7 +3942,7 @@ StaticTilePoint pickTile(Point32 pos,
relPos.x = pos.x - curMap->mapHeight - (tileCoords.u - tileCoords.v) * kTileDX; relPos.x = pos.x - curMap->mapHeight - (tileCoords.u - tileCoords.v) * kTileDX;
relPos.y = curMap->mapHeight - pos.y - (tileCoords.u + tileCoords.v) * kTileDY; relPos.y = curMap->mapHeight - pos.y - (tileCoords.u + tileCoords.v) * kTileDY;
// Compute which metatile the click occured on, and the tile // Compute which metatile the click occurred on, and the tile
// within that metatile, and the origin coords of the metatile // within that metatile, and the origin coords of the metatile
mCoords = tileCoords >> kPlatShift; mCoords = tileCoords >> kPlatShift;
tCoords.u = tileCoords.u & kPlatMask; tCoords.u = tileCoords.u & kPlatMask;

View file

@ -384,7 +384,7 @@ Common::Error StarkEngine::loadGameState(int slot) {
} }
if (stream.err()) { if (stream.err()) {
warning("An error occured when reading '%s'", filename.c_str()); warning("An error occurred when reading '%s'", filename.c_str());
return Common::kReadingFailed; return Common::kReadingFailed;
} }
@ -453,7 +453,7 @@ Common::Error StarkEngine::saveGameState(int slot, const Common::String &desc, b
} }
if (save->err()) { if (save->err()) {
warning("An error occured when writing '%s'", filename.c_str()); warning("An error occurred when writing '%s'", filename.c_str());
delete save; delete save;
return Common::kWritingFailed; return Common::kWritingFailed;
} }