Skip to content

Commit

Permalink
DM: Add several global variables, add code to F0462_START_StartGame_CPSF
Browse files Browse the repository at this point in the history
  • Loading branch information
Bendegúz Nagy committed Aug 26, 2016
1 parent bcbb3e4 commit 78d8a8d
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 3 deletions.
2 changes: 2 additions & 0 deletions engines/dm/champion.h
Expand Up @@ -256,6 +256,8 @@ class ChampionMan {
Thing _leaderHand; // @ G0414_T_LeaderHandObject
ChampionIndex _leaderIndex; // @ G0411_i_LeaderIndex
uint16 _candidateChampionOrdinal; // @ G0299_ui_CandidateChampionOrdinal
bool _partyIsSleeping; // @ G0300_B_PartyIsSleeping
uint16 _actingChampionOrdinal; // @ G0506_ui_ActingChampionOrdinal

ChampionMan(DMEngine *vm);
};
Expand Down
24 changes: 22 additions & 2 deletions engines/dm/dm.cpp
Expand Up @@ -94,17 +94,37 @@ void DMEngine::initializeGame() {


void DMEngine::startGame() {
_pressingEye = false;
_stopPressingEye = false;
_pressingMouth = false;
_stopPressingMouth = false;
_highlightBoxInversionRequested = false;
_eventMan->_highlightBoxEnabled = false;
_championMan->_partyIsSleeping = false;
_championMan->_actingChampionOrdinal = indexToOrdinal(kChampionNone);
_menuMan->_actionAreaContainsIcons = true;
_eventMan->_useChampionIconOrdinalAsMousePointerBitmap = indexToOrdinal(kChampionNone);

_eventMan->_primaryMouseInput = gPrimaryMouseInput_Interface;
_eventMan->_secondaryMouseInput = gSecondaryMouseInput_Movement;
warning("MISSING CODE: set primary/secondary keyboard input");

// MISSING CODE: F0003_MAIN_ProcessNewPartyMap_CPSE
// TODO:(next 2 lines) move to F0003_MAIN_ProcessNewPartyMap_CPSE
_dungeonMan->setCurrentMapAndPartyMap(0);
_displayMan->loadCurrentMapGraphics();

if (!_dungeonMan->_messages._newGame) {
// MISSING CODE: loading game
} {
_displayMan->_useByteBoxCoordinates = false;
// MISSING CODE: clear screen
}

// MISSING CODE: build copper
_menuMan->drawMovementArrows();
warning("MISSING CODE: F0278_CHAMPION_ResetDataToStartGame");
_gameTimeTicking = true;

// MISSING CODE: Lot of stuff
}

Common::Error DMEngine::run() {
Expand Down
5 changes: 5 additions & 0 deletions engines/dm/dm.h
Expand Up @@ -102,6 +102,11 @@ class DMEngine : public Engine {
bool _gameTimeTicking; // @ G0301_B_GameTimeTicking
bool _restartGameAllowed; // @ G0524_B_RestartGameAllowed
uint32 _gameId; // @ G0525_l_GameID, probably useless here
bool _pressingEye; // @ G0331_B_PressingEye
bool _stopPressingEye; // @ G0332_B_StopPressingEye
bool _pressingMouth; // @ G0333_B_PressingMouth
bool _stopPressingMouth; // @ G0334_B_StopPressingMouth
bool _highlightBoxInversionRequested; // @ G0340_B_HighlightBoxInversionRequested
};

class Console : public GUI::Debugger {
Expand Down
3 changes: 2 additions & 1 deletion engines/dm/eventman.h
Expand Up @@ -199,7 +199,8 @@ class EventManager {
public:
MouseInput* _primaryMouseInput;// @ G0441_ps_PrimaryMouseInput
MouseInput* _secondaryMouseInput;// @ G0442_ps_SecondaryMouseInput

bool _highlightBoxEnabled; // @ G0341_B_HighlightBoxEnabled
uint16 _useChampionIconOrdinalAsMousePointerBitmap; // @ G0599_ui_UseChampionIconOrdinalAsMousePointerBitmap
EventManager(DMEngine *vm);
void initMouse();
void showMouse(bool visibility);
Expand Down
2 changes: 2 additions & 0 deletions engines/dm/gfx.h
Expand Up @@ -304,6 +304,8 @@ class DisplayMan {
int16 _currMapViAltarIndex; // @ G0266_i_CurrentMapViAltarWallOrnamentIndex

Thing _inscriptionThing; // @ G0290_T_DungeonView_InscriptionThing

bool _useByteBoxCoordinates; // @ G0578_B_UseByteBoxCoordinates
};

}
Expand Down
1 change: 1 addition & 0 deletions engines/dm/menus.h
Expand Up @@ -9,6 +9,7 @@ class MenuMan {
DMEngine *_vm;
public:
bool _shouldRefreshActionArea; // @ G0508_B_RefreshActionArea
bool _actionAreaContainsIcons; // @ G0509_B_ActionAreaContainsIcons
MenuMan(DMEngine *vm);

void drawMovementArrows();
Expand Down

0 comments on commit 78d8a8d

Please sign in to comment.