ULTIMA1: Clarify gfx folder as u1gfx

This commit is contained in:
Paul Gilbert authored and Paul Gilbert committed 2020-02-01 13:13:51 -08:00
1 parent 525df2960e
commit 4e1b0935e2
17 files changed
+71 -78

No files matched your search

+7 -7
View File
@@ -60,13 +60,13 @@ MODULE_OBJS += \
ultima1/core/people.o \
ultima1/core/resources.o \
ultima1/core/transports.o \
ultima1/gfx/drawing_support.o \
ultima1/gfx/game_view.o \
ultima1/gfx/sprites.o \
ultima1/gfx/status.o \
ultima1/gfx/text_cursor.o \
ultima1/gfx/viewport_dungeon.o \
ultima1/gfx/viewport_map.o \
ultima1/u1gfx/drawing_support.o \
ultima1/u1gfx/game_view.o \
ultima1/u1gfx/sprites.o \
ultima1/u1gfx/status.o \
ultima1/u1gfx/text_cursor.o \
ultima1/u1gfx/viewport_dungeon.o \
ultima1/u1gfx/viewport_map.o \
ultima1/u6gfx/game_view.o \
ultima1/game.o
endif
+3 -4
View File
@@ -22,10 +22,9 @@
#include "ultima/ultima1/game.h"
#include "ultima/ultima1/core/resources.h"
#include "ultima/ultima1/gfx/game_view.h"
#include "ultima/ultima1/gfx/text_cursor.h"
#include "ultima/ultima1/u1gfx/game_view.h"
#include "ultima/ultima1/u1gfx/text_cursor.h"
#include "ultima/ultima1/u6gfx/game_view.h"
#include "ultima/shared/engine/resources.h"
#include "ultima/shared/early/font_resources.h"
#include "ultima/shared/early/ultima_early.h"
@@ -37,7 +36,7 @@ EMPTY_MESSAGE_MAP(Ultima1Game, Shared::Game);
Ultima1Game::Ultima1Game() : Shared::Game() {
_res = new GameResources();
delete _textCursor;
_textCursor = new Gfx::U1TextCursor();
_textCursor = new U1Gfx::U1TextCursor();
if (g_vm->getFeatures() & GF_VGA_ENHANCED) {
_videoMode = VIDEOMODE_VGA;
@@ -20,7 +20,7 @@
*
*/
#include "ultima/ultima1/gfx/drawing_support.h"
#include "ultima/ultima1/u1gfx/drawing_support.h"
#include "ultima/ultima1/game.h"
#include "ultima/shared/early/ultima_early.h"
@@ -20,8 +20,8 @@
*
*/
#ifndef ULTIMA_ULTIMA1_GFX_DRAWING_SUPPORT_H
#define ULTIMA_ULTIMA1_GFX_DRAWING_SUPPORT_H
#ifndef ULTIMA_ULTIMA1_U1GFX_DRAWING_SUPPORT_H
#define ULTIMA_ULTIMA1_U1GFX_DRAWING_SUPPORT_H
#include "ultima/shared/gfx/visual_surface.h"
@@ -74,6 +74,6 @@ public:
} // End of namespace U1Gfx
} // End of namespace Shared
} // End of namespace Ultima
} // End of namespace Xeen
#endif
@@ -20,15 +20,15 @@
*
*/
#include "ultima/ultima1/gfx/game_view.h"
#include "ultima/ultima1/u1gfx/game_view.h"
#include "ultima/shared/actions/pass.h"
#include "ultima/shared/core/map.h"
#include "ultima/shared/gfx/info.h"
#include "ultima/ultima1/game.h"
#include "ultima/ultima1/gfx/drawing_support.h"
#include "ultima/ultima1/gfx/status.h"
#include "ultima/ultima1/gfx/viewport_dungeon.h"
#include "ultima/ultima1/gfx/viewport_map.h"
#include "ultima/ultima1/u1gfx/drawing_support.h"
#include "ultima/ultima1/u1gfx/status.h"
#include "ultima/ultima1/u1gfx/viewport_dungeon.h"
#include "ultima/ultima1/u1gfx/viewport_map.h"
#include "ultima/ultima1/actions/move.h"
#include "ultima/ultima1/actions/climb.h"
#include "ultima/ultima1/actions/enter.h"
@@ -43,14 +43,13 @@ BEGIN_MESSAGE_MAP(GameView, Shared::Gfx::VisualContainer)
ON_MESSAGE(KeypressMsg)
END_MESSAGE_MAP()
GameView::GameView(TreeItem *parent) : Shared::Gfx::VisualContainer("GameView", Rect(0, 0, 320, 200), parent) {
GameView::GameView(Shared::TreeItem *parent) : Shared::Gfx::VisualContainer("GameView", Rect(0, 0, 320, 200), parent) {
_info = new Shared::Info(this);
_status = new Status(this);
_viewportDungeon = new ViewportDungeon(this);
Ultima1Game *game = static_cast<Ultima1Game *>(getGame());
_viewportMap = new ViewportMap(this);
_actions[0] = new Actions::Move(this);
_actions[1] = new Actions::Climb(this);
_actions[2] = new Actions::Enter(this);
@@ -27,27 +27,21 @@
#include "ultima/shared/gfx/bitmap.h"
namespace Ultima {
namespace Shared {
class Info;
class ViewportDungeon;
} // End of namespace Shared
} // End of namespace Ultima
namespace Ultima {
namespace Shared {
namespace Actions {
class Action;
} // End of namespace Actions
} // End of namespace Shared
} // End of namespace Ultima
namespace Ultima {
class Info;
class ViewportDungeon;
namespace Actions {
class Action;
}
}
namespace Ultima1 {
namespace U1Gfx {
class Status;
class ViewportMap;
using Shared::CKeypressMsg;
/**
@@ -80,7 +74,7 @@ public:
};
} // End of namespace U1Gfx
} // End of namespace Ultima1
} // End of namespace Ultima
} // End of namespace Shared
} // End of namespace Xeen
#endif
@@ -20,14 +20,14 @@
*
*/
#include "ultima/ultima1/gfx/sprites.h"
#include "ultima/ultima1/u1gfx/sprites.h"
#include "ultima/shared/early/ultima_early.h"
namespace Ultima {
namespace Ultima1 {
namespace U1Gfx {
BEGIN_MESSAGE_MAP(Sprites, TreeItem)
BEGIN_MESSAGE_MAP(Sprites, Shared::TreeItem)
ON_MESSAGE(FrameMsg)
END_MESSAGE_MAP()
@@ -35,9 +35,9 @@ void Sprites::load(bool isOverworld) {
_isOverworld = isOverworld;
if (isOverworld)
::Ultima::Shared::Gfx::Sprites::load("t1ktiles.bin", 4);
Shared::Gfx::Sprites::load("t1ktiles.bin", 4);
else
::Ultima::Shared::Gfx::Sprites::load("t1ktown.bin", 4, 8, 8);
Shared::Gfx::Sprites::load("t1ktown.bin", 4, 8, 8);
}
bool Sprites::FrameMsg(CFrameMsg &msg) {
@@ -58,7 +58,7 @@ void Sprites::animateWater() {
Common::copy(lineBuffer, lineBuffer + 16, sprite.getBasePtr(0, 0));
}
::Ultima::Shared::Gfx::Sprite &Sprites::operator[](uint idx) {
Shared::Gfx::Sprite &Sprites::operator[](uint idx) {
int offset = 2;
if ((_frameCtr % 6) == 0)
offset = 0;
@@ -67,25 +67,25 @@ void Sprites::animateWater() {
if (!_isOverworld) {
// Don't do overworld tile animations within the cities and castles
return ::Ultima::Shared::Gfx::Sprites::operator[](idx);
return Shared::Gfx::Sprites::operator[](idx);
} else if (idx == 4 && offset != 2) {
// Castle flag waving
return ::Ultima::Shared::Gfx::Sprites::operator[](4 + offset);
return Shared::Gfx::Sprites::operator[](4 + offset);
} else if (idx == 6) {
// City flag waving
return ::Ultima::Shared::Gfx::Sprites::operator[](7 + ((_frameCtr & 3) ? 1 : 0));
return Shared::Gfx::Sprites::operator[](7 + ((_frameCtr & 3) ? 1 : 0));
} else {
if (idx >= 7)
idx += 2;
if (idx == 14 || idx == 25) {
// Transports
return ::Ultima::Shared::Gfx::Sprites::operator[](idx + (_frameCtr & 1));
return Shared::Gfx::Sprites::operator[](idx + (_frameCtr & 1));
} else if (idx >= 19 && idx <= 47) {
// Random monster animation
return ::Ultima::Shared::Gfx::Sprites::operator[](idx + (g_vm->getRandomNumber(1, 100) & 1));
return Shared::Gfx::Sprites::operator[](idx + (g_vm->getRandomNumber(1, 100) & 1));
} else {
return ::Ultima::Shared::Gfx::Sprites::operator[](idx);
return Shared::Gfx::Sprites::operator[](idx);
}
}
}
@@ -20,11 +20,12 @@
*
*/
#ifndef ULTIMA_ULTIMA1_GFX_SPRITES_H
#define ULTIMA_ULTIMA1_GFX_SPRITES_H
#ifndef ULTIMA_ULTIMA1_U1GFX_SPRITES_H
#define ULTIMA_ULTIMA1_U1GFX_SPRITES_H
#include "ultima/shared/gfx/sprites.h"
#include "ultima/shared/core/tree_item.h"
#include "ultima/shared/early/ultima_early.h"
#include "ultima/shared/engine/messages.h"
namespace Ultima {
@@ -36,7 +37,7 @@ using Shared::CFrameMsg;
/**
* Displays the total hits, food, experience, and coins you have
*/
class Sprites : public ::Ultima::Shared::Gfx::Sprites, public Shared::TreeItem {
class Sprites : public Shared::Gfx::Sprites, public Shared::TreeItem {
DECLARE_MESSAGE_MAP;
bool FrameMsg(CFrameMsg &msg);
private:
@@ -49,7 +50,7 @@ private:
void animateWater();
public:
CLASSDEF;
Sprites(TreeItem *parent) : ::Ultima::Shared::Gfx::Sprites(), TreeItem(), _isOverworld(false), _frameCtr(0) {
Sprites(TreeItem *parent) : Shared::Gfx::Sprites(), TreeItem(), _isOverworld(false), _frameCtr(0) {
addUnder(parent);
}
virtual ~Sprites() {}
@@ -57,7 +58,7 @@ public:
/**
* Return a specific sprite
*/
virtual ::Ultima::Shared::Gfx::Sprite &operator[](uint idx);
virtual Shared::Gfx::Sprite &operator[](uint idx);
/**
* Loads the Ultima 1 sprites
@@ -20,7 +20,7 @@
*
*/
#include "ultima/ultima1/gfx/status.h"
#include "ultima/ultima1/u1gfx/status.h"
#include "ultima/ultima1/game.h"
#include "ultima/shared/core/game_state.h"
#include "ultima/ultima1/core/resources.h"
@@ -20,8 +20,8 @@
*
*/
#ifndef ULTIMA_ULTIMA1_GFX_STATUS_H
#define ULTIMA_ULTIMA1_GFX_STATUS_H
#ifndef ULTIMA_ULTIMA1_U1GFX_STATUS_H
#define ULTIMA_ULTIMA1_U1GFX_STATUS_H
#include "ultima/shared/gfx/visual_item.h"
@@ -47,6 +47,6 @@ public:
} // End of namespace U1Gfx
} // End of namespace Ultima1
} // End of namespace Ultima
} // End of namespace Xeen
#endif
@@ -20,12 +20,12 @@
*
*/
#include "ultima/ultima1/gfx/text_cursor.h"
#include "ultima/ultima1/u1gfx/text_cursor.h"
#include "common/system.h"
namespace Ultima {
namespace Ultima1 {
namespace Gfx {
namespace U1Gfx {
#define CURSOR_ANIM_FRAME_TIME 100
@@ -42,6 +42,6 @@ uint32 U1TextCursor::getTime() {
return g_system->getMillis();
}
} // End of namespace Gfx
} // End of namespace U1Gfx
} // End of namespace Ultima1
} // End of namespace Ultima
@@ -20,14 +20,14 @@
*
*/
#ifndef ULTIMA_ULTIMA1_TEXT_CURSOR_H
#define ULTIMA_ULTIMA1_TEXT_CURSOR_H
#ifndef ULTIMA_ULTIMA1_U1GFX_TEXT_CURSOR_H
#define ULTIMA_ULTIMA1_U1GFX_TEXT_CURSOR_H
#include "ultima/shared/gfx/text_cursor.h"
namespace Ultima {
namespace Ultima1 {
namespace Gfx {
namespace U1Gfx {
class U1TextCursor : public Shared::Gfx::TextCursor {
private:
@@ -55,7 +55,7 @@ public:
virtual void draw();
};
} // End of namespace Gfx
} // End of namespace U1Gfx
} // End of namespace Ultima1
} // End of namespace Ultima
@@ -20,7 +20,7 @@
*
*/
#include "ultima/ultima1/gfx/viewport_dungeon.h"
#include "ultima/ultima1/u1gfx/viewport_dungeon.h"
#include "ultima/ultima1/core/dungeon_widgets.h"
#include "ultima/shared/early/ultima_early.h"
@@ -20,8 +20,8 @@
*
*/
#ifndef ULTIMA_ULTIMA1_GFX_VIEWPORT_DUNGEON_H
#define ULTIMA_ULTIMA1_GFX_VIEWPORT_DUNGEON_H
#ifndef ULTIMA_ULTIMA1_U1GFX_VIEWPORT_DUNGEON_H
#define ULTIMA_ULTIMA1_U1GFX_VIEWPORT_DUNGEON_H
#include "ultima/shared/gfx/viewport_dungeon.h"
@@ -20,14 +20,14 @@
*
*/
#include "ultima/ultima1/gfx/viewport_map.h"
#include "ultima/ultima1/gfx/sprites.h"
#include "ultima/ultima1/u1gfx/viewport_map.h"
#include "ultima/ultima1/u1gfx/sprites.h"
namespace Ultima {
namespace Ultima1 {
namespace U1Gfx {
ViewportMap::ViewportMap(TreeItem *parent) : Shared::ViewportMap(parent), _mapType(MAP_OVERWORLD) {
ViewportMap::ViewportMap(Shared::TreeItem *parent) : Shared::ViewportMap(parent), _mapType(MAP_OVERWORLD) {
_sprites = new Sprites(this);
}
@@ -37,7 +37,7 @@ public:
/**
* Constructor
*/
ViewportMap(TreeItem *parent);
ViewportMap(Shared::TreeItem *parent);
/**
* Destructor
+5 -5
View File
@@ -25,16 +25,16 @@
#include "ultima/shared/core/map.h"
#include "ultima/shared/gfx/info.h"
#include "ultima/ultima1/game.h"
#include "ultima/ultima1/gfx/drawing_support.h"
#include "ultima/ultima1/gfx/status.h"
#include "ultima/ultima1/gfx/viewport_dungeon.h"
#include "ultima/ultima1/gfx/viewport_map.h"
#include "ultima/ultima1/u1gfx/drawing_support.h"
#include "ultima/ultima1/u1gfx/status.h"
#include "ultima/ultima1/u1gfx/viewport_dungeon.h"
#include "ultima/ultima1/u1gfx/viewport_map.h"
#include "ultima/ultima1/actions/move.h"
#include "ultima/ultima1/actions/climb.h"
#include "ultima/ultima1/actions/enter.h"
#include "ultima/ultima1/core/resources.h"
#include "ultima/shared/gfx/bitmap.h"
#include "ultima/shared/engine/messages.h"
#include "ultima/shared/gfx/bitmap.h"
namespace Ultima {
namespace Ultima1 {