Skip to content

Commit

Permalink
HOPKINS: Added initialisation of graphics manager and globals fields
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Sep 9, 2012
1 parent 97e84b2 commit 8501e1c
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
31 changes: 28 additions & 3 deletions engines/hopkins/globals.cpp
Expand Up @@ -38,9 +38,30 @@ Globals::Globals() {
MUSICVOL = 6;
SOUNDVOL = 6;
VOICEVOL = 6;
MUSICOFF = false;
SOUNDOFF = false;
VOICEOFF = false;
XSETMODE = 0;
XZOOM = 0;
min_x = min_y = 0;
max_x = max_y = 0;
lItCounter = 0;
lOldItCounter = 0;
g_old_anim = 0;
g_old_sens = 0;
police_l = police_h = 0;
TETE = NULL;
texte_long = 0;
TEXTE_FORMATE = 0;
OBJET_EN_COURS = 0;
NUM_FICHIER_OBJ = 0;
nbrligne = 0;
largeur_boite = 0;
hauteur_boite = 0;
FORET = 0;
OBJL = OBJH = 0;
HELICO = 0;
CAT_POSI = 0;
CAT_TAILLE = 0;
Nouv_objet = 0;


// Initialise pointers
ICONE = NULL;
Expand All @@ -65,8 +86,12 @@ Globals::Globals() {
BufLig = NULL;
Bufferdecor = NULL;
ADR_FICHIER_OBJ = NULL;
police = NULL;

// Reset flags
MUSICOFF = false;
SOUNDOFF = false;
VOICEOFF = false;
XFULLSCREEN = false;
XFORCE16 = false;
XFORCE8 = false;
Expand Down
16 changes: 16 additions & 0 deletions engines/hopkins/graphics.cpp
Expand Up @@ -33,8 +33,23 @@ namespace Hopkins {

GraphicsManager::GraphicsManager() {
SDL_MODEYES = false;
SDL_ECHELLE = 0;
XSCREEN = YSCREEN = 0;
WinScan = 0;
Winbpp = 0;
PAL_PIXELS = NULL;
nbrligne = 0;
Linear = false;
VideoPtr = NULL;
start_x = 0;
ofscroll = 0;
SCROLL = 0;
PCX_L = PCX_H = 0;
DOUBLE_ECRAN = false;
OLD_SCROLL = 0;
MANU_SCROLL = 1;
SPEED_SCROLL = 16;
nbrligne2 = 0;
Agr_x = Agr_y = 0;
Agr_Flag_x = Agr_Flag_y = 0;
}
Expand Down Expand Up @@ -107,6 +122,7 @@ void GraphicsManager::DD_Lock() {
}

void GraphicsManager::DD_Unlock() {
assert(VideoPtr);
g_system->unlockScreen();
}

Expand Down

0 comments on commit 8501e1c

Please sign in to comment.