mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-03 16:58:26 +00:00
DGDS: Simplify casts to avoid nulls
This commit is contained in:
parent
74abb4cbab
commit
afec75acac
@ -40,7 +40,8 @@ _reverseDirection(0), _clockwise(false)
|
||||
|
||||
void ShellGame::init() {
|
||||
DgdsEngine *engine = DgdsEngine::getInstance();
|
||||
HocGlobals *globals = dynamic_cast<HocGlobals *>(engine->getGameGlobals());
|
||||
HocGlobals *globals = static_cast<HocGlobals *>(engine->getGameGlobals());
|
||||
assert(globals);
|
||||
_shellGameImg.reset(new Image(engine->getResourceManager(), engine->getDecompressor()));
|
||||
_shellGameImg->loadBitmap("SHELLGM2.BMP");
|
||||
globals->setShellPea(engine->getRandom().getRandomNumber(2));
|
||||
@ -85,7 +86,8 @@ void ShellGame::drawShells() const {
|
||||
|
||||
void ShellGame::shellGameTick() {
|
||||
DgdsEngine *engine = DgdsEngine::getInstance();
|
||||
HocGlobals *globals = dynamic_cast<HocGlobals *>(engine->getGameGlobals());
|
||||
HocGlobals *globals = static_cast<HocGlobals *>(engine->getGameGlobals());
|
||||
assert(globals);
|
||||
|
||||
if (!_shellGameImg)
|
||||
init();
|
||||
|
Loading…
x
Reference in New Issue
Block a user