TITANIC: Skeleton screen manager class
This commit is contained in:
parent
93c28c7970
commit
021c47b0c1
6 changed files with 249 additions and 3 deletions
30
engines/titanic/font.cpp
Normal file
30
engines/titanic/font.cpp
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
/* ScummVM - Graphic Adventure Engine
|
||||||
|
*
|
||||||
|
* ScummVM is the legal property of its developers, whose names
|
||||||
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||||
|
* file distributed with this source distribution.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "titanic/font.h"
|
||||||
|
|
||||||
|
namespace Titanic {
|
||||||
|
|
||||||
|
STFont::STFont() {
|
||||||
|
}
|
||||||
|
|
||||||
|
} // End of namespace Titanic
|
38
engines/titanic/font.h
Normal file
38
engines/titanic/font.h
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
/* ScummVM - Graphic Adventure Engine
|
||||||
|
*
|
||||||
|
* ScummVM is the legal property of its developers, whose names
|
||||||
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||||
|
* file distributed with this source distribution.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TITANIC_FONT_H
|
||||||
|
#define TITANIC_FONT_H
|
||||||
|
|
||||||
|
#include "common/scummsys.h"
|
||||||
|
|
||||||
|
namespace Titanic {
|
||||||
|
|
||||||
|
class STFont {
|
||||||
|
public:
|
||||||
|
public:
|
||||||
|
STFont();
|
||||||
|
};
|
||||||
|
|
||||||
|
} // End of namespace Titanic
|
||||||
|
|
||||||
|
#endif /* TITANIC_FONT_H */
|
|
@ -2,6 +2,8 @@ MODULE := engines/titanic
|
||||||
|
|
||||||
MODULE_OBJS := \
|
MODULE_OBJS := \
|
||||||
detection.o \
|
detection.o \
|
||||||
|
font.o \
|
||||||
|
screen_manager.o \
|
||||||
titanic.o
|
titanic.o
|
||||||
|
|
||||||
# This module can be built as a plugin
|
# This module can be built as a plugin
|
||||||
|
|
74
engines/titanic/screen_manager.cpp
Normal file
74
engines/titanic/screen_manager.cpp
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
/* ScummVM - Graphic Adventure Engine
|
||||||
|
*
|
||||||
|
* ScummVM is the legal property of its developers, whose names
|
||||||
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||||
|
* file distributed with this source distribution.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "titanic/screen_manager.h"
|
||||||
|
|
||||||
|
namespace Titanic {
|
||||||
|
|
||||||
|
CScreenManagerRec::CScreenManagerRec() {
|
||||||
|
_field0 = 0;
|
||||||
|
_field4 = 0;
|
||||||
|
_field8 = 0;
|
||||||
|
_fieldC = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
CScreenManager::CScreenManager() {
|
||||||
|
_screenManagerPtr = nullptr;
|
||||||
|
|
||||||
|
_field4 = 0;
|
||||||
|
_fontRenderSurface = nullptr;
|
||||||
|
_mouseCursor = nullptr;
|
||||||
|
_textCursor = nullptr;
|
||||||
|
_fontNumber = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
CScreenManager::~CScreenManager() {
|
||||||
|
_screenManagerPtr = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CScreenManager::proc2(int v) {
|
||||||
|
if (v)
|
||||||
|
_field4 = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CScreenManager::proc3(int v) {
|
||||||
|
if (!v || _field4)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
_field4 = 0;
|
||||||
|
proc27();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
OSScreenManager::OSScreenManager(): CScreenManager() {
|
||||||
|
_field48 = 0;
|
||||||
|
_field4C = 0;
|
||||||
|
_field50 = 0;
|
||||||
|
_field54 = 0;
|
||||||
|
_directDrawManager = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // End of namespace Titanic
|
105
engines/titanic/screen_manager.h
Normal file
105
engines/titanic/screen_manager.h
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
/* ScummVM - Graphic Adventure Engine
|
||||||
|
*
|
||||||
|
* ScummVM is the legal property of its developers, whose names
|
||||||
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||||
|
* file distributed with this source distribution.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef TITANIC_SCREEN_MANAGER_H
|
||||||
|
#define TITANIC_SCREEN_MANAGER_H
|
||||||
|
|
||||||
|
#include "common/scummsys.h"
|
||||||
|
#include "common/array.h"
|
||||||
|
#include "titanic/font.h"
|
||||||
|
|
||||||
|
namespace Titanic {
|
||||||
|
|
||||||
|
class CSurface {
|
||||||
|
};
|
||||||
|
|
||||||
|
class CScreenManagerRec {
|
||||||
|
public:
|
||||||
|
int _field0;
|
||||||
|
int _field4;
|
||||||
|
int _field8;
|
||||||
|
int _fieldC;
|
||||||
|
public:
|
||||||
|
CScreenManagerRec();
|
||||||
|
};
|
||||||
|
|
||||||
|
class CScreenManager {
|
||||||
|
public:
|
||||||
|
void *_screenManagerPtr;
|
||||||
|
public:
|
||||||
|
int _field4;
|
||||||
|
Common::Array<CSurface> _backSurfaces;
|
||||||
|
CSurface *_fontRenderSurface;
|
||||||
|
CScreenManagerRec _entries[2];
|
||||||
|
void *_mouseCursor;
|
||||||
|
void *_textCursor;
|
||||||
|
int _fontNumber;
|
||||||
|
public:
|
||||||
|
CScreenManager();
|
||||||
|
virtual ~CScreenManager();
|
||||||
|
|
||||||
|
void fn1() {}
|
||||||
|
void fn2() {}
|
||||||
|
|
||||||
|
virtual void proc2(int v);
|
||||||
|
virtual bool proc3(int v);
|
||||||
|
virtual void setMode() = 0;
|
||||||
|
virtual void proc5() = 0;
|
||||||
|
virtual void proc6() = 0;
|
||||||
|
virtual void proc7() = 0;
|
||||||
|
virtual void proc8() = 0;
|
||||||
|
virtual void proc9() = 0;
|
||||||
|
virtual void proc10() = 0;
|
||||||
|
virtual void proc11() = 0;
|
||||||
|
virtual void proc12() = 0;
|
||||||
|
virtual void proc13() = 0;
|
||||||
|
virtual void proc14() = 0;
|
||||||
|
virtual void proc15() = 0;
|
||||||
|
virtual void proc16() = 0;
|
||||||
|
virtual void getFont() = 0;
|
||||||
|
virtual void proc18() = 0;
|
||||||
|
virtual void proc19() = 0;
|
||||||
|
virtual void proc20() = 0;
|
||||||
|
virtual void proc21() = 0;
|
||||||
|
virtual void proc22() = 0;
|
||||||
|
virtual void proc23() = 0;
|
||||||
|
virtual void proc24() = 0;
|
||||||
|
virtual void proc25() = 0;
|
||||||
|
virtual void showCursor() = 0;
|
||||||
|
virtual void proc27() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class OSScreenManager: CScreenManager {
|
||||||
|
public:
|
||||||
|
int _field48;
|
||||||
|
int _field4C;
|
||||||
|
int _field50;
|
||||||
|
int _field54;
|
||||||
|
void *_directDrawManager;
|
||||||
|
STFont _fonts[4];
|
||||||
|
public:
|
||||||
|
OSScreenManager();
|
||||||
|
};
|
||||||
|
|
||||||
|
} // End of namespace Titanic
|
||||||
|
|
||||||
|
#endif /* TITANIC_SCREEN_MANAGER_H */
|
|
@ -44,9 +44,6 @@ void TitanicEngine::initialize() {
|
||||||
DebugMan.addDebugChannel(kDebugScripts, "scripts", "Game scripts");
|
DebugMan.addDebugChannel(kDebugScripts, "scripts", "Game scripts");
|
||||||
DebugMan.addDebugChannel(kDebugGraphics, "graphics", "Graphics handling");
|
DebugMan.addDebugChannel(kDebugGraphics, "graphics", "Graphics handling");
|
||||||
DebugMan.addDebugChannel(kDebugSound, "sound", "Sound and Music handling");
|
DebugMan.addDebugChannel(kDebugSound, "sound", "Sound and Music handling");
|
||||||
|
|
||||||
initGraphics(320, 200, false);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::Error TitanicEngine::run() {
|
Common::Error TitanicEngine::run() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue