mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 02:10:28 +00:00
ULTIMA1: Move the game view into the Ultima1 namespace
This commit is contained in:
parent
c463f341c8
commit
56776d5d69
@ -51,6 +51,7 @@ MODULE_OBJS += \
|
||||
ultima0/resources.o \
|
||||
ultima1/core/map.o \
|
||||
ultima1/core/resources.o \
|
||||
ultima1/gfx/game_view.o \
|
||||
ultima1/game.o \
|
||||
ultima1/project_item.o
|
||||
endif
|
||||
|
@ -22,10 +22,10 @@
|
||||
|
||||
#include "ultima/shared/early/ultima_game.h"
|
||||
#include "ultima/shared/core/game_state.h"
|
||||
#include "ultima/shared/gfx/game_view.h"
|
||||
#include "ultima/shared/engine/resources.h"
|
||||
#include "ultima/shared/early/ultima_early.h"
|
||||
#include "ultima/shared/gfx/screen.h"
|
||||
#include "ultima/shared/early/font_resources.h"
|
||||
#include "ultima/shared/early/ultima_early.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Shared {
|
||||
@ -35,8 +35,6 @@ EMPTY_MESSAGE_MAP(UltimaGame, Game);
|
||||
UltimaGame::UltimaGame() : Game() {
|
||||
_fontResources = new FontResources();
|
||||
_gameState = new GameState();
|
||||
_gameView = new GameView();
|
||||
_gameView->addUnder(this);
|
||||
|
||||
setPalette();
|
||||
}
|
||||
@ -44,7 +42,6 @@ UltimaGame::UltimaGame() : Game() {
|
||||
UltimaGame::~UltimaGame() {
|
||||
delete _fontResources;
|
||||
delete _gameState;
|
||||
delete _gameView;
|
||||
}
|
||||
|
||||
void UltimaGame::setPalette() {
|
||||
|
@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "ultima/ultima1/game.h"
|
||||
#include "ultima/ultima1/gfx/game_view.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
@ -28,6 +29,12 @@ namespace Ultima1 {
|
||||
EMPTY_MESSAGE_MAP(Ultima1Game, Shared::UltimaGame);
|
||||
|
||||
Ultima1Game::Ultima1Game() : Shared::UltimaGame() {
|
||||
_gameView = new GameView();
|
||||
_gameView->addUnder(this);
|
||||
}
|
||||
|
||||
Ultima1Game::~Ultima1Game() {
|
||||
delete _gameView;
|
||||
}
|
||||
|
||||
} // End of namespace Ultima1
|
||||
|
@ -28,15 +28,16 @@
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
|
||||
class GameView;
|
||||
|
||||
class Ultima1Game : public Shared::UltimaGame {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
|
||||
GameView *_gameView;
|
||||
public:
|
||||
CLASSDEF;
|
||||
Ultima1Game();
|
||||
virtual ~Ultima1Game() {}
|
||||
|
||||
virtual ~Ultima1Game();
|
||||
};
|
||||
|
||||
} // End of namespace Ultima1
|
||||
|
51
engines/ultima/ultima1/gfx/game_view.cpp
Normal file
51
engines/ultima/ultima1/gfx/game_view.cpp
Normal file
@ -0,0 +1,51 @@
|
||||
/* 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 "ultima/ultima1/gfx/game_view.h"
|
||||
#include "ultima/shared/gfx/info.h"
|
||||
#include "ultima/shared/gfx/status.h"
|
||||
#include "ultima/shared/gfx/viewport_dungeon.h"
|
||||
#include "ultima/shared/gfx/viewport_map.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima1 {
|
||||
|
||||
GameView::GameView() {
|
||||
_info = new Shared::Info();
|
||||
_status = new Shared::Status();
|
||||
_viewportDungeon = new Shared::ViewportDungeon();
|
||||
_viewportMap = new Shared::ViewportMap();
|
||||
_info->addUnder(this);
|
||||
_status->addUnder(this);
|
||||
_viewportDungeon->addUnder(this);
|
||||
_viewportMap->addUnder(this);
|
||||
}
|
||||
|
||||
GameView::~GameView() {
|
||||
delete _info;
|
||||
delete _status;
|
||||
delete _viewportDungeon;
|
||||
delete _viewportMap;
|
||||
}
|
||||
|
||||
} // End of namespace Shared
|
||||
} // End of namespace Ultima
|
57
engines/ultima/ultima1/gfx/game_view.h
Normal file
57
engines/ultima/ultima1/gfx/game_view.h
Normal file
@ -0,0 +1,57 @@
|
||||
/* 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 ULTIMA_ULTIMA1_GFX_GAME_VIEW_H
|
||||
#define ULTIMA_ULTIMA1_GFX_GAME_VIEW_H
|
||||
|
||||
#include "ultima/shared/gfx/visual_container.h"
|
||||
|
||||
namespace Ultima {
|
||||
|
||||
namespace Shared {
|
||||
class Info;
|
||||
class Status;
|
||||
class ViewportDungeon;
|
||||
class ViewportMap;
|
||||
}
|
||||
|
||||
namespace Ultima1 {
|
||||
|
||||
/**
|
||||
* This class implements a standard view screen that shows a status and log area, as well as either
|
||||
* a map or dungeon view covering the bulk of the screen
|
||||
*/
|
||||
class GameView : public Shared::Gfx::VisualContainer {
|
||||
private:
|
||||
Shared::Info *_info;
|
||||
Shared::Status *_status;
|
||||
Shared::ViewportDungeon *_viewportDungeon;
|
||||
Shared::ViewportMap *_viewportMap;
|
||||
public:
|
||||
GameView();
|
||||
virtual ~GameView();
|
||||
};
|
||||
|
||||
} // End of namespace Shared
|
||||
} // End of namespace Xeen
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user