TWINE: converted parameter to bool
This commit is contained in:
parent
3bdba53d98
commit
390336f5fc
7 changed files with 25 additions and 25 deletions
|
@ -193,7 +193,7 @@ void Debug::debugResetButton(int32 type) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Debug::debugRedrawScreen() {
|
void Debug::debugRedrawScreen() {
|
||||||
_engine->_redraw->redrawEngineActions(1);
|
_engine->_redraw->redrawEngineActions(true);
|
||||||
_engine->_screens->copyScreen(_engine->frontVideoBuffer, _engine->workVideoBuffer);
|
_engine->_screens->copyScreen(_engine->frontVideoBuffer, _engine->workVideoBuffer);
|
||||||
debugDrawWindows();
|
debugDrawWindows();
|
||||||
}
|
}
|
||||||
|
|
|
@ -274,7 +274,7 @@ void GameState::processFoundItem(int32 item) {
|
||||||
|
|
||||||
// Hide hero in scene
|
// Hide hero in scene
|
||||||
_engine->_scene->sceneHero->staticFlags.bIsHidden = 1;
|
_engine->_scene->sceneHero->staticFlags.bIsHidden = 1;
|
||||||
_engine->_redraw->redrawEngineActions(1);
|
_engine->_redraw->redrawEngineActions(true);
|
||||||
_engine->_scene->sceneHero->staticFlags.bIsHidden = 0;
|
_engine->_scene->sceneHero->staticFlags.bIsHidden = 0;
|
||||||
|
|
||||||
_engine->_screens->copyScreen(_engine->frontVideoBuffer, _engine->workVideoBuffer);
|
_engine->_screens->copyScreen(_engine->frontVideoBuffer, _engine->workVideoBuffer);
|
||||||
|
@ -436,7 +436,7 @@ void GameState::processGameoverAnimation() {
|
||||||
|
|
||||||
// workaround to fix hero redraw after drowning
|
// workaround to fix hero redraw after drowning
|
||||||
_engine->_scene->sceneHero->staticFlags.bIsHidden = 1;
|
_engine->_scene->sceneHero->staticFlags.bIsHidden = 1;
|
||||||
_engine->_redraw->redrawEngineActions(1);
|
_engine->_redraw->redrawEngineActions(true);
|
||||||
_engine->_scene->sceneHero->staticFlags.bIsHidden = 0;
|
_engine->_scene->sceneHero->staticFlags.bIsHidden = 0;
|
||||||
|
|
||||||
// TODO: drawInGameTransBox
|
// TODO: drawInGameTransBox
|
||||||
|
|
|
@ -192,9 +192,9 @@ void Redraw::addOverlay(int16 type, int16 info0, int16 x, int16 y, int16 info1,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Redraw::updateOverlayTypePosition(int16 X1, int16 Y1, int16 X2, int16 Y2) {
|
void Redraw::updateOverlayTypePosition(int16 x1, int16 y1, int16 x2, int16 y2) {
|
||||||
const int16 newX = X2 - X1;
|
const int16 newX = x2 - x1;
|
||||||
const int16 newY = Y2 - Y1;
|
const int16 newY = y2 - y1;
|
||||||
|
|
||||||
for (int32 i = 0; i < ARRAYSIZE(overlayList); i++) {
|
for (int32 i = 0; i < ARRAYSIZE(overlayList); i++) {
|
||||||
OverlayListStruct *overlay = &overlayList[i];
|
OverlayListStruct *overlay = &overlayList[i];
|
||||||
|
@ -206,7 +206,7 @@ void Redraw::updateOverlayTypePosition(int16 X1, int16 Y1, int16 X2, int16 Y2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: convert to bool and check if this isn't always true...
|
// TODO: convert to bool and check if this isn't always true...
|
||||||
void Redraw::redrawEngineActions(int32 bgRedraw) { // fullRedraw
|
void Redraw::redrawEngineActions(bool bgRedraw) { // fullRedraw
|
||||||
int16 tmp_projPosX = _engine->_renderer->projPosXScreen;
|
int16 tmp_projPosX = _engine->_renderer->projPosXScreen;
|
||||||
int16 tmp_projPosY = _engine->_renderer->projPosYScreen;
|
int16 tmp_projPosY = _engine->_renderer->projPosYScreen;
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ public:
|
||||||
* This is responsible for the entire game screen redraw
|
* This is responsible for the entire game screen redraw
|
||||||
* @param bgRedraw true if we want to redraw background grid, false if we want to update certain screen areas
|
* @param bgRedraw true if we want to redraw background grid, false if we want to update certain screen areas
|
||||||
*/
|
*/
|
||||||
void redrawEngineActions(int32 bgRedraw);
|
void redrawEngineActions(bool bgRedraw);
|
||||||
|
|
||||||
/** Draw dialogue sprite image */
|
/** Draw dialogue sprite image */
|
||||||
void drawBubble(int32 actorIdx);
|
void drawBubble(int32 actorIdx);
|
||||||
|
|
|
@ -528,7 +528,7 @@ void Scene::processActorZones(int32 actorIdx) {
|
||||||
talkingActor = actorIdx;
|
talkingActor = actorIdx;
|
||||||
_engine->_text->drawTextFullscreen(zone->infoData.DisplayText.textIdx);
|
_engine->_text->drawTextFullscreen(zone->infoData.DisplayText.textIdx);
|
||||||
_engine->unfreezeTime();
|
_engine->unfreezeTime();
|
||||||
_engine->_redraw->redrawEngineActions(1);
|
_engine->_redraw->redrawEngineActions(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kLadder:
|
case kLadder:
|
||||||
|
|
|
@ -652,7 +652,7 @@ static int32 lMESSAGE(TwinEEngine *engine, LifeScriptContext &ctx) {
|
||||||
engine->_scene->talkingActor = ctx.actorIdx;
|
engine->_scene->talkingActor = ctx.actorIdx;
|
||||||
engine->_text->drawTextFullscreen(textIdx);
|
engine->_text->drawTextFullscreen(textIdx);
|
||||||
engine->unfreezeTime();
|
engine->unfreezeTime();
|
||||||
engine->_redraw->redrawEngineActions(1);
|
engine->_redraw->redrawEngineActions(true);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -917,7 +917,7 @@ static int32 lMESSAGE_OBJ(TwinEEngine *engine, LifeScriptContext &ctx) {
|
||||||
engine->_scene->talkingActor = otherActorIdx;
|
engine->_scene->talkingActor = otherActorIdx;
|
||||||
engine->_text->drawTextFullscreen(textIdx);
|
engine->_text->drawTextFullscreen(textIdx);
|
||||||
engine->unfreezeTime();
|
engine->unfreezeTime();
|
||||||
engine->_redraw->redrawEngineActions(1);
|
engine->_redraw->redrawEngineActions(true);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -941,7 +941,7 @@ static int32 lFOUND_OBJECT(TwinEEngine *engine, LifeScriptContext &ctx) {
|
||||||
engine->freezeTime();
|
engine->freezeTime();
|
||||||
engine->_gameState->processFoundItem(item);
|
engine->_gameState->processFoundItem(item);
|
||||||
engine->unfreezeTime();
|
engine->unfreezeTime();
|
||||||
engine->_redraw->redrawEngineActions(1);
|
engine->_redraw->redrawEngineActions(true);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1282,7 +1282,7 @@ static int32 lASK_CHOICE(TwinEEngine *engine, LifeScriptContext &ctx) {
|
||||||
engine->_gameState->processGameChoices(choiceIdx);
|
engine->_gameState->processGameChoices(choiceIdx);
|
||||||
engine->_gameState->numChoices = 0;
|
engine->_gameState->numChoices = 0;
|
||||||
engine->unfreezeTime();
|
engine->unfreezeTime();
|
||||||
engine->_redraw->redrawEngineActions(1);
|
engine->_redraw->redrawEngineActions(true);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1304,7 +1304,7 @@ static int32 lBIG_MESSAGE(TwinEEngine *engine, LifeScriptContext &ctx) {
|
||||||
engine->_text->drawTextFullscreen(textIdx);
|
engine->_text->drawTextFullscreen(textIdx);
|
||||||
engine->_text->textClipSmall();
|
engine->_text->textClipSmall();
|
||||||
engine->unfreezeTime();
|
engine->unfreezeTime();
|
||||||
engine->_redraw->redrawEngineActions(1);
|
engine->_redraw->redrawEngineActions(true);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1442,7 +1442,7 @@ static int32 lGRM_OFF(TwinEEngine *engine, LifeScriptContext &ctx) {
|
||||||
engine->_grid->useCellingGrid = -1;
|
engine->_grid->useCellingGrid = -1;
|
||||||
engine->_grid->cellingGridIdx = -1;
|
engine->_grid->cellingGridIdx = -1;
|
||||||
engine->_grid->createGridMap();
|
engine->_grid->createGridMap();
|
||||||
engine->_redraw->redrawEngineActions(1);
|
engine->_redraw->redrawEngineActions(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1569,7 +1569,7 @@ static int32 lASK_CHOICE_OBJ(TwinEEngine *engine, LifeScriptContext &ctx) {
|
||||||
engine->_gameState->processGameChoices(choiceIdx);
|
engine->_gameState->processGameChoices(choiceIdx);
|
||||||
engine->_gameState->numChoices = 0;
|
engine->_gameState->numChoices = 0;
|
||||||
engine->unfreezeTime();
|
engine->unfreezeTime();
|
||||||
engine->_redraw->redrawEngineActions(1);
|
engine->_redraw->redrawEngineActions(true);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -554,7 +554,7 @@ void TwinEEngine::processInventoryAction() {
|
||||||
}
|
}
|
||||||
case kiBonusList: {
|
case kiBonusList: {
|
||||||
unfreezeTime();
|
unfreezeTime();
|
||||||
_redraw->redrawEngineActions(1);
|
_redraw->redrawEngineActions(true);
|
||||||
freezeTime();
|
freezeTime();
|
||||||
_text->initTextBank(TextBankId::Inventory_Intro_and_Holomap);
|
_text->initTextBank(TextBankId::Inventory_Intro_and_Holomap);
|
||||||
_text->textClipFull();
|
_text->textClipFull();
|
||||||
|
@ -576,7 +576,7 @@ void TwinEEngine::processInventoryAction() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
_redraw->redrawEngineActions(1);
|
_redraw->redrawEngineActions(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TwinEEngine::processOptionsMenu() {
|
void TwinEEngine::processOptionsMenu() {
|
||||||
|
@ -585,7 +585,7 @@ void TwinEEngine::processOptionsMenu() {
|
||||||
_menu->inGameOptionsMenu();
|
_menu->inGameOptionsMenu();
|
||||||
// TODO: play music
|
// TODO: play music
|
||||||
_sound->resumeSamples();
|
_sound->resumeSamples();
|
||||||
_redraw->redrawEngineActions(1);
|
_redraw->redrawEngineActions(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TwinEEngine::centerScreenOnActor() {
|
void TwinEEngine::centerScreenOnActor() {
|
||||||
|
@ -640,14 +640,14 @@ int32 TwinEEngine::runGameEngine() { // mainLoopInteration
|
||||||
}
|
}
|
||||||
if (giveUp == 1) {
|
if (giveUp == 1) {
|
||||||
unfreezeTime();
|
unfreezeTime();
|
||||||
_redraw->redrawEngineActions(1);
|
_redraw->redrawEngineActions(true);
|
||||||
ScopedEngineFreeze freeze(this);
|
ScopedEngineFreeze freeze(this);
|
||||||
autoSave();
|
autoSave();
|
||||||
quitGame = 0;
|
quitGame = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
unfreezeTime();
|
unfreezeTime();
|
||||||
_redraw->redrawEngineActions(1);
|
_redraw->redrawEngineActions(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_input->toggleActionIfActive(TwinEActionType::OptionsMenu)) {
|
if (_input->toggleActionIfActive(TwinEActionType::OptionsMenu)) {
|
||||||
|
@ -689,7 +689,7 @@ int32 TwinEEngine::runGameEngine() { // mainLoopInteration
|
||||||
freezeTime();
|
freezeTime();
|
||||||
_menu->processBehaviourMenu();
|
_menu->processBehaviourMenu();
|
||||||
unfreezeTime();
|
unfreezeTime();
|
||||||
_redraw->redrawEngineActions(1);
|
_redraw->redrawEngineActions(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// use Proto-Pack
|
// use Proto-Pack
|
||||||
|
@ -723,7 +723,7 @@ int32 TwinEEngine::runGameEngine() { // mainLoopInteration
|
||||||
_holomap->processHolomap();
|
_holomap->processHolomap();
|
||||||
_screens->lockPalette = true;
|
_screens->lockPalette = true;
|
||||||
unfreezeTime();
|
unfreezeTime();
|
||||||
_redraw->redrawEngineActions(1);
|
_redraw->redrawEngineActions(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process Pause
|
// Process Pause
|
||||||
|
@ -740,7 +740,7 @@ int32 TwinEEngine::runGameEngine() { // mainLoopInteration
|
||||||
g_system->delayMillis(10);
|
g_system->delayMillis(10);
|
||||||
} while (!_input->toggleActionIfActive(TwinEActionType::Pause));
|
} while (!_input->toggleActionIfActive(TwinEActionType::Pause));
|
||||||
unfreezeTime();
|
unfreezeTime();
|
||||||
_redraw->redrawEngineActions(1);
|
_redraw->redrawEngineActions(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -907,7 +907,7 @@ int32 TwinEEngine::runGameEngine() { // mainLoopInteration
|
||||||
// workaround to fix hero redraw after drowning
|
// workaround to fix hero redraw after drowning
|
||||||
if (_actor->cropBottomScreen && _redraw->reqBgRedraw) {
|
if (_actor->cropBottomScreen && _redraw->reqBgRedraw) {
|
||||||
_scene->sceneHero->staticFlags.bIsHidden = 1;
|
_scene->sceneHero->staticFlags.bIsHidden = 1;
|
||||||
_redraw->redrawEngineActions(1);
|
_redraw->redrawEngineActions(true);
|
||||||
_scene->sceneHero->staticFlags.bIsHidden = 0;
|
_scene->sceneHero->staticFlags.bIsHidden = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue