mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-06 00:31:43 +00:00
DM: Refactor to use Engine debugger
This commit is contained in:
parent
e86c21351a
commit
cefb7cfdfe
@ -185,7 +185,7 @@ DMEngine::~DMEngine() {
|
|||||||
|
|
||||||
// dispose of resources
|
// dispose of resources
|
||||||
delete _rnd;
|
delete _rnd;
|
||||||
delete _console;
|
//delete _console; Debugger is deleted by Engine
|
||||||
delete _displayMan;
|
delete _displayMan;
|
||||||
delete _dungeonMan;
|
delete _dungeonMan;
|
||||||
delete _eventMan;
|
delete _eventMan;
|
||||||
@ -359,6 +359,7 @@ Common::Error DMEngine::run() {
|
|||||||
// scummvm/engine specific
|
// scummvm/engine specific
|
||||||
initGraphics(320, 200);
|
initGraphics(320, 200);
|
||||||
_console = new Console(this);
|
_console = new Console(this);
|
||||||
|
setDebugger(_console);
|
||||||
_displayMan = new DisplayMan(this);
|
_displayMan = new DisplayMan(this);
|
||||||
_dungeonMan = new DungeonMan(this);
|
_dungeonMan = new DungeonMan(this);
|
||||||
_eventMan = new EventManager(this);
|
_eventMan = new EventManager(this);
|
||||||
|
@ -230,8 +230,6 @@ public:
|
|||||||
|
|
||||||
bool isDemo() const;
|
bool isDemo() const;
|
||||||
|
|
||||||
GUI::Debugger *getDebugger() override { return _console; }
|
|
||||||
|
|
||||||
void delay(uint16 verticalBlank); // @ F0022_MAIN_Delay
|
void delay(uint16 verticalBlank); // @ F0022_MAIN_Delay
|
||||||
uint16 getScaledProduct(uint16 val, uint16 scale, uint16 vale2); // @ F0030_MAIN_GetScaledProduct
|
uint16 getScaledProduct(uint16 val, uint16 scale, uint16 vale2); // @ F0030_MAIN_GetScaledProduct
|
||||||
uint16 getRandomNumber(uint32 max) { return _rnd->getRandomNumber(max - 1); }
|
uint16 getRandomNumber(uint32 max) { return _rnd->getRandomNumber(max - 1); }
|
||||||
|
@ -614,11 +614,6 @@ Common::EventType EventManager::processInput(Common::Event *grabKey, Common::Eve
|
|||||||
if (event.kbdRepeat)
|
if (event.kbdRepeat)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (event.kbd.keycode == Common::KEYCODE_d && event.kbd.hasFlags(Common::KBD_CTRL)) {
|
|
||||||
_vm->_console->attach();
|
|
||||||
return Common::EVENT_INVALID;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (grabKey) {
|
if (grabKey) {
|
||||||
*grabKey = event;
|
*grabKey = event;
|
||||||
return event.type;
|
return event.type;
|
||||||
|
@ -1143,7 +1143,7 @@ void DisplayMan::updateScreen() {
|
|||||||
for (uint32 i = 320 * 30; i < 320 * 170; ++i)
|
for (uint32 i = 320 * 30; i < 320 * 170; ++i)
|
||||||
_bitmapScreen[i] += 16;
|
_bitmapScreen[i] += 16;
|
||||||
g_system->copyRectToScreen(_bitmapScreen, _screenWidth, 0, 0, _screenWidth, _screenHeight);
|
g_system->copyRectToScreen(_bitmapScreen, _screenWidth, 0, 0, _screenWidth, _screenHeight);
|
||||||
_vm->_console->onFrame();
|
|
||||||
g_system->updateScreen();
|
g_system->updateScreen();
|
||||||
for (uint32 i = 320 * 30; i < 320 * 170; ++i)
|
for (uint32 i = 320 * 30; i < 320 * 170; ++i)
|
||||||
_bitmapScreen[i] -= 16;
|
_bitmapScreen[i] -= 16;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user