TOLTECS: - Merged input.cpp with toltecs.cpp
- Kernel function 5 returns a random value; use ScummVM's RNG
This commit is contained in:
parent
5660ff5148
commit
74c05f6aa8
5 changed files with 127 additions and 32 deletions
|
@ -34,7 +34,6 @@
|
|||
|
||||
#include "toltecs/toltecs.h"
|
||||
#include "toltecs/animation.h"
|
||||
#include "toltecs/input.h"
|
||||
#include "toltecs/palette.h"
|
||||
#include "toltecs/resource.h"
|
||||
#include "toltecs/script.h"
|
||||
|
@ -80,9 +79,9 @@ void ToltecsEngine::savegame(const char *filename) {
|
|||
out->writeByte(_movieSceneFlag ? 1 : 0);
|
||||
out->writeByte(_flag01);
|
||||
|
||||
out->writeUint16LE(_input->_mouseX);
|
||||
out->writeUint16LE(_input->_mouseY);
|
||||
out->writeUint16LE(_input->_mouseDisabled);
|
||||
out->writeUint16LE(_mouseX);
|
||||
out->writeUint16LE(_mouseY);
|
||||
out->writeUint16LE(_mouseDisabled);
|
||||
|
||||
_palette->saveState(out);
|
||||
_script->saveState(out);
|
||||
|
@ -140,12 +139,12 @@ void ToltecsEngine::loadgame(const char *filename) {
|
|||
_movieSceneFlag = in->readByte() != 0;
|
||||
_flag01 = in->readByte();
|
||||
|
||||
_input->_mouseX = in->readUint16LE();
|
||||
_input->_mouseY = in->readUint16LE();
|
||||
_input->_mouseDisabled = in->readUint16LE();
|
||||
_mouseX = in->readUint16LE();
|
||||
_mouseY = in->readUint16LE();
|
||||
_mouseDisabled = in->readUint16LE();
|
||||
|
||||
_system->warpMouse(_input->_mouseX, _input->_mouseY);
|
||||
_system->showMouse(_input->_mouseDisabled == 0);
|
||||
_system->warpMouse(_mouseX, _mouseY);
|
||||
_system->showMouse(_mouseDisabled == 0);
|
||||
|
||||
_palette->loadState(in);
|
||||
_script->loadState(in);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue