mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 20:59:00 +00:00
ULTIMA8: Rename remorse_* to cru_* for things also used by No Regret
This is a simple renaming with no functionality change. I originally named some classes Remorse* but they were also useful as-is in Regret. This gives them the more generic Cru prefix for consistency with a bunch of other classes that already use it.
This commit is contained in:
parent
3b82662d05
commit
f84b967b32
@ -386,8 +386,8 @@ MODULE_OBJS := \
|
||||
ultima8/audio/midi_player.o \
|
||||
ultima8/audio/music_flex.o \
|
||||
ultima8/audio/music_process.o \
|
||||
ultima8/audio/cru_music_process.o \
|
||||
ultima8/audio/raw_audio_sample.o \
|
||||
ultima8/audio/remorse_music_process.o \
|
||||
ultima8/audio/sonarc_audio_sample.o \
|
||||
ultima8/audio/sound_flex.o \
|
||||
ultima8/audio/speech_flex.o \
|
||||
@ -403,10 +403,10 @@ MODULE_OBJS := \
|
||||
ultima8/filesys/raw_archive.o \
|
||||
ultima8/filesys/savegame.o \
|
||||
ultima8/filesys/u8_save_file.o \
|
||||
ultima8/games/cru_game.o \
|
||||
ultima8/games/game.o \
|
||||
ultima8/games/game_data.o \
|
||||
ultima8/games/game_info.o \
|
||||
ultima8/games/remorse_game.o \
|
||||
ultima8/games/start_crusader_process.o \
|
||||
ultima8/games/start_u8_process.o \
|
||||
ultima8/games/treasure_loader.o \
|
||||
@ -451,10 +451,12 @@ MODULE_OBJS := \
|
||||
ultima8/gumps/container_gump.o \
|
||||
ultima8/gumps/credits_gump.o \
|
||||
ultima8/gumps/cru_ammo_gump.o \
|
||||
ultima8/gumps/cru_credits_gump.o \
|
||||
ultima8/gumps/cru_demo_gump.o \
|
||||
ultima8/gumps/cru_energy_gump.o \
|
||||
ultima8/gumps/cru_health_gump.o \
|
||||
ultima8/gumps/cru_inventory_gump.o \
|
||||
ultima8/gumps/cru_menu_gump.o \
|
||||
ultima8/gumps/cru_pickup_area_gump.o \
|
||||
ultima8/gumps/cru_pickup_gump.o \
|
||||
ultima8/gumps/cru_stat_gump.o \
|
||||
@ -480,8 +482,6 @@ MODULE_OBJS := \
|
||||
ultima8/gumps/paperdoll_gump.o \
|
||||
ultima8/gumps/quit_gump.o \
|
||||
ultima8/gumps/readable_gump.o \
|
||||
ultima8/gumps/remorse_menu_gump.o \
|
||||
ultima8/gumps/remorse_credits_gump.o \
|
||||
ultima8/gumps/resizable_gump.o \
|
||||
ultima8/gumps/scroll_gump.o \
|
||||
ultima8/gumps/shape_viewer_gump.o \
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "ultima/ultima8/audio/audio_mixer.h"
|
||||
#include "ultima/ultima8/audio/audio_process.h"
|
||||
#include "ultima/ultima8/audio/u8_music_process.h"
|
||||
#include "ultima/ultima8/audio/remorse_music_process.h"
|
||||
#include "ultima/ultima8/audio/cru_music_process.h"
|
||||
#include "ultima/ultima8/audio/audio_channel.h"
|
||||
#include "ultima/ultima8/audio/midi_player.h"
|
||||
#include "ultima/ultima8/kernel/kernel.h"
|
||||
@ -59,7 +59,7 @@ void AudioMixer::createProcesses() {
|
||||
if (GAME_IS_U8) {
|
||||
kernel->addProcess(new U8MusicProcess(_midiPlayer));
|
||||
} else if (GAME_IS_CRUSADER) {
|
||||
kernel->addProcess(new RemorseMusicProcess());
|
||||
kernel->addProcess(new CruMusicProcess());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "common/system.h"
|
||||
#include "ultima/ultima8/ultima8.h"
|
||||
#include "ultima/ultima8/audio/remorse_music_process.h"
|
||||
#include "ultima/ultima8/audio/cru_music_process.h"
|
||||
#include "ultima/ultima8/filesys/file_system.h"
|
||||
#include "audio/mods/mod_xm_s3m.h"
|
||||
|
||||
@ -94,20 +94,20 @@ static const int REGRET_MAP_TRACKS[] = {
|
||||
15, 9, 12, 10, 19, 14, 21, 0};
|
||||
|
||||
|
||||
DEFINE_RUNTIME_CLASSTYPE_CODE(RemorseMusicProcess)
|
||||
DEFINE_RUNTIME_CLASSTYPE_CODE(CruMusicProcess)
|
||||
|
||||
RemorseMusicProcess::RemorseMusicProcess() : MusicProcess(), _currentTrack(0), _savedTrack(0), _m16offset(0) {
|
||||
CruMusicProcess::CruMusicProcess() : MusicProcess(), _currentTrack(0), _savedTrack(0), _m16offset(0) {
|
||||
_maxTrack = (GAME_IS_REMORSE ? MAX_TRACK_REMORSE : MAX_TRACK_REGRET);
|
||||
_trackNames = (GAME_IS_REMORSE ? TRACK_FILE_NAMES_REMORSE
|
||||
: TRACK_FILE_NAMES_REGRET);
|
||||
}
|
||||
|
||||
RemorseMusicProcess::~RemorseMusicProcess() {
|
||||
CruMusicProcess::~CruMusicProcess() {
|
||||
// We shouldn't need to do anything here - the mixer will
|
||||
// clean up the stream for us.
|
||||
}
|
||||
|
||||
void RemorseMusicProcess::playMusic(int track) {
|
||||
void CruMusicProcess::playMusic(int track) {
|
||||
if (GAME_IS_REGRET && track == 0x45) {
|
||||
// Play the default track for the current map
|
||||
uint32 curmap = World::get_instance()->getCurrentMap()->getNum();
|
||||
@ -127,34 +127,34 @@ void RemorseMusicProcess::playMusic(int track) {
|
||||
playMusic_internal(track);
|
||||
}
|
||||
|
||||
void RemorseMusicProcess::playCombatMusic(int track) {
|
||||
void CruMusicProcess::playCombatMusic(int track) {
|
||||
// Only U8 has combat music.. ignore it.
|
||||
}
|
||||
|
||||
void RemorseMusicProcess::queueMusic(int track) {
|
||||
void CruMusicProcess::queueMusic(int track) {
|
||||
playMusic_internal(track);
|
||||
}
|
||||
|
||||
void RemorseMusicProcess::unqueueMusic() {
|
||||
void CruMusicProcess::unqueueMusic() {
|
||||
|
||||
}
|
||||
|
||||
void RemorseMusicProcess::restoreMusic() {
|
||||
void CruMusicProcess::restoreMusic() {
|
||||
|
||||
}
|
||||
|
||||
void RemorseMusicProcess::saveTrackState() {
|
||||
void CruMusicProcess::saveTrackState() {
|
||||
assert(!_savedTrack);
|
||||
_savedTrack = _currentTrack;
|
||||
}
|
||||
|
||||
void RemorseMusicProcess::restoreTrackState() {
|
||||
void CruMusicProcess::restoreTrackState() {
|
||||
int saved = _savedTrack;
|
||||
_savedTrack = 0;
|
||||
playMusic_internal(saved);
|
||||
}
|
||||
|
||||
void RemorseMusicProcess::playMusic_internal(int track) {
|
||||
void CruMusicProcess::playMusic_internal(int track) {
|
||||
if (track < 0 || track > _maxTrack) {
|
||||
warning("Not playing track %d (max is %d)", track, _maxTrack);
|
||||
playMusic_internal(0);
|
||||
@ -198,7 +198,7 @@ void RemorseMusicProcess::playMusic_internal(int track) {
|
||||
}
|
||||
}
|
||||
|
||||
void RemorseMusicProcess::run() {
|
||||
void CruMusicProcess::run() {
|
||||
Audio::Mixer *mixer = Ultima8Engine::get_instance()->_mixer;
|
||||
assert(mixer);
|
||||
if (mixer->isSoundHandleActive(_soundHandle)) {
|
||||
@ -210,7 +210,7 @@ void RemorseMusicProcess::run() {
|
||||
playMusic_internal(_currentTrack);
|
||||
}
|
||||
|
||||
void RemorseMusicProcess::saveData(Common::WriteStream *ws) {
|
||||
void CruMusicProcess::saveData(Common::WriteStream *ws) {
|
||||
Process::saveData(ws);
|
||||
|
||||
ws->writeUint32LE(static_cast<uint32>(_currentTrack));
|
||||
@ -218,7 +218,7 @@ void RemorseMusicProcess::saveData(Common::WriteStream *ws) {
|
||||
ws->writeByte(_m16offset);
|
||||
}
|
||||
|
||||
bool RemorseMusicProcess::loadData(Common::ReadStream *rs, uint32 version) {
|
||||
bool CruMusicProcess::loadData(Common::ReadStream *rs, uint32 version) {
|
||||
if (!Process::loadData(rs, version)) return false;
|
||||
|
||||
_currentTrack = static_cast<int32>(rs->readUint32LE());
|
||||
@ -235,19 +235,19 @@ bool RemorseMusicProcess::loadData(Common::ReadStream *rs, uint32 version) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RemorseMusicProcess::isPlaying() {
|
||||
bool CruMusicProcess::isPlaying() {
|
||||
Audio::Mixer *mixer = Ultima8Engine::get_instance()->_mixer;
|
||||
return _currentTrack != 0 && mixer && mixer->isSoundHandleActive(_soundHandle);
|
||||
}
|
||||
|
||||
void RemorseMusicProcess::pauseMusic() {
|
||||
void CruMusicProcess::pauseMusic() {
|
||||
Audio::Mixer *mixer = Ultima8Engine::get_instance()->_mixer;
|
||||
assert(mixer);
|
||||
if (mixer->isSoundHandleActive(_soundHandle))
|
||||
mixer->pauseHandle(_soundHandle, true);
|
||||
}
|
||||
|
||||
void RemorseMusicProcess::unpauseMusic() {
|
||||
void CruMusicProcess::unpauseMusic() {
|
||||
Audio::Mixer *mixer = Ultima8Engine::get_instance()->_mixer;
|
||||
assert(mixer);
|
||||
if (mixer->isSoundHandleActive(_soundHandle))
|
@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ULTIMA8_AUDIO_REMORSEMUSICPROCESS_H
|
||||
#define ULTIMA8_AUDIO_REMORSEMUSICPROCESS_H
|
||||
#ifndef ULTIMA8_AUDIO_CRUMUSICPROCESS_H
|
||||
#define ULTIMA8_AUDIO_CRUMUSICPROCESS_H
|
||||
|
||||
#include "ultima/ultima8/audio/music_process.h"
|
||||
#include "ultima/ultima8/misc/classtype.h"
|
||||
@ -34,7 +34,7 @@ namespace Ultima8 {
|
||||
class Debugger;
|
||||
class MidiPlayer;
|
||||
|
||||
class RemorseMusicProcess : public MusicProcess {
|
||||
class CruMusicProcess : public MusicProcess {
|
||||
friend class Debugger;
|
||||
|
||||
protected:
|
||||
@ -56,8 +56,8 @@ private:
|
||||
const char **_trackNames;
|
||||
|
||||
public:
|
||||
RemorseMusicProcess();
|
||||
~RemorseMusicProcess() override;
|
||||
CruMusicProcess();
|
||||
~CruMusicProcess() override;
|
||||
|
||||
ENABLE_RUNTIME_CLASSTYPE()
|
||||
|
@ -23,14 +23,14 @@
|
||||
#include "common/config-manager.h"
|
||||
|
||||
#include "ultima/ultima8/misc/pent_include.h"
|
||||
#include "ultima/ultima8/games/remorse_game.h"
|
||||
#include "ultima/ultima8/games/cru_game.h"
|
||||
#include "ultima/ultima8/games/start_crusader_process.h"
|
||||
#include "ultima/ultima8/filesys/file_system.h"
|
||||
#include "ultima/ultima8/graphics/palette_manager.h"
|
||||
#include "ultima/ultima8/gumps/movie_gump.h"
|
||||
#include "ultima/ultima8/gumps/gump_notify_process.h"
|
||||
#include "ultima/ultima8/gumps/main_menu_process.h"
|
||||
#include "ultima/ultima8/gumps/remorse_credits_gump.h"
|
||||
#include "ultima/ultima8/gumps/cru_credits_gump.h"
|
||||
#include "ultima/ultima8/gumps/cru_demo_gump.h"
|
||||
#include "ultima/ultima8/kernel/object_manager.h"
|
||||
#include "ultima/ultima8/kernel/kernel.h"
|
||||
@ -46,10 +46,10 @@
|
||||
namespace Ultima {
|
||||
namespace Ultima8 {
|
||||
|
||||
RemorseGame::RemorseGame() : Game() {
|
||||
CruGame::CruGame() : Game() {
|
||||
}
|
||||
|
||||
RemorseGame::~RemorseGame() {
|
||||
CruGame::~CruGame() {
|
||||
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ static bool loadPalette(const char *path, PaletteManager::PalIndex index) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RemorseGame::loadFiles() {
|
||||
bool CruGame::loadFiles() {
|
||||
// Load palette
|
||||
pout << "Load Palettes" << Std::endl;
|
||||
|
||||
@ -91,7 +91,7 @@ bool RemorseGame::loadFiles() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RemorseGame::startGame() {
|
||||
bool CruGame::startGame() {
|
||||
// NOTE: assumes the entire engine has been reset!
|
||||
|
||||
pout << "Starting new Crusader: No Remorse game." << Std::endl;
|
||||
@ -136,7 +136,7 @@ bool RemorseGame::startGame() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RemorseGame::startInitialUsecode(int saveSlot) {
|
||||
bool CruGame::startInitialUsecode(int saveSlot) {
|
||||
Process* proc = new StartCrusaderProcess(saveSlot);
|
||||
Kernel::get_instance()->addProcess(proc);
|
||||
return true;
|
||||
@ -153,21 +153,21 @@ static ProcId playMovie(const char *movieID, bool fade, bool noScale) {
|
||||
return gump->GetNotifyProcess()->getPid();
|
||||
}
|
||||
|
||||
ProcId RemorseGame::playIntroMovie(bool fade) {
|
||||
ProcId CruGame::playIntroMovie(bool fade) {
|
||||
const char *name = (GAME_IS_REMORSE ? "T01" : "origin");
|
||||
return playMovie(name, fade, true);
|
||||
}
|
||||
|
||||
ProcId RemorseGame::playIntroMovie2(bool fade) {
|
||||
ProcId CruGame::playIntroMovie2(bool fade) {
|
||||
const char *name = (GAME_IS_REMORSE ? "T02" : "ANIM01");
|
||||
return playMovie(name, fade, false);
|
||||
}
|
||||
|
||||
ProcId RemorseGame::playEndgameMovie(bool fade) {
|
||||
ProcId CruGame::playEndgameMovie(bool fade) {
|
||||
return playMovie("O01", fade, false);
|
||||
}
|
||||
|
||||
void RemorseGame::playDemoScreen() {
|
||||
void CruGame::playDemoScreen() {
|
||||
Process *menuproc = new MainMenuProcess();
|
||||
Kernel::get_instance()->addProcess(menuproc);
|
||||
|
||||
@ -189,7 +189,7 @@ void RemorseGame::playDemoScreen() {
|
||||
}
|
||||
|
||||
|
||||
void RemorseGame::playCredits() {
|
||||
void CruGame::playCredits() {
|
||||
Process *menuproc = new MainMenuProcess();
|
||||
Kernel::get_instance()->addProcess(menuproc);
|
||||
|
||||
@ -208,7 +208,7 @@ void RemorseGame::playCredits() {
|
||||
<< bmp_filename << Std::endl;
|
||||
return;
|
||||
}
|
||||
Gump *creditsgump = new RemorseCreditsGump(txtrs, bmprs);
|
||||
Gump *creditsgump = new CruCreditsGump(txtrs, bmprs);
|
||||
creditsgump->InitGump(nullptr);
|
||||
creditsgump->CreateNotifier();
|
||||
Process *notifyproc = creditsgump->GetNotifyProcess();
|
||||
@ -218,7 +218,7 @@ void RemorseGame::playCredits() {
|
||||
}
|
||||
}
|
||||
|
||||
void RemorseGame::writeSaveInfo(Common::WriteStream *ws) {
|
||||
void CruGame::writeSaveInfo(Common::WriteStream *ws) {
|
||||
}
|
||||
|
||||
} // End of namespace Ultima8
|
@ -20,18 +20,18 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ULTIMA8_GAMES_REMORSEGAME_H
|
||||
#define ULTIMA8_GAMES_REMORSEGAME_H
|
||||
#ifndef ULTIMA8_GAMES_CRUGAME_H
|
||||
#define ULTIMA8_GAMES_CRUGAME_H
|
||||
|
||||
#include "ultima/ultima8/games/game.h"
|
||||
|
||||
namespace Ultima {
|
||||
namespace Ultima8 {
|
||||
|
||||
class RemorseGame : public Game {
|
||||
class CruGame : public Game {
|
||||
public:
|
||||
RemorseGame();
|
||||
~RemorseGame() override;
|
||||
CruGame();
|
||||
~CruGame() override;
|
||||
|
||||
//! load/init game's data files
|
||||
bool loadFiles() override;
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include "ultima/ultima8/misc/pent_include.h"
|
||||
#include "ultima/ultima8/games/u8_game.h"
|
||||
#include "ultima/ultima8/games/remorse_game.h"
|
||||
#include "ultima/ultima8/games/cru_game.h"
|
||||
#include "ultima/ultima8/graphics/palette_manager.h"
|
||||
#include "ultima/ultima8/kernel/kernel.h"
|
||||
#include "ultima/ultima8/gumps/main_menu_process.h"
|
||||
@ -51,7 +51,7 @@ Game *Game::createGame(const GameInfo *info) {
|
||||
return new U8Game();
|
||||
case GameInfo::GAME_REMORSE:
|
||||
case GameInfo::GAME_REGRET:
|
||||
return new RemorseGame();
|
||||
return new CruGame();
|
||||
default:
|
||||
CANT_HAPPEN_MSG("createGame: invalid _game");
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
|
||||
#include "ultima/ultima8/games/start_crusader_process.h"
|
||||
#include "ultima/ultima8/games/remorse_game.h"
|
||||
#include "ultima/ultima8/games/cru_game.h"
|
||||
#include "ultima/ultima8/world/actors/main_actor.h"
|
||||
#include "ultima/ultima8/ultima8.h"
|
||||
#include "ultima/ultima8/kernel/kernel.h"
|
||||
@ -54,7 +54,7 @@ void StartCrusaderProcess::run() {
|
||||
}
|
||||
} else if (!_skipStart && _initStage == PlaySecondMovie) {
|
||||
_initStage = ShowMenu;
|
||||
RemorseGame *game = dynamic_cast<RemorseGame *>(Game::get_instance());
|
||||
CruGame *game = dynamic_cast<CruGame *>(Game::get_instance());
|
||||
assert(game);
|
||||
ProcId moviepid = game->playIntroMovie2(false);
|
||||
Process *movieproc = Kernel::get_instance()->getProcess(moviepid);
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "common/config-manager.h"
|
||||
#include "image/bmp.h"
|
||||
|
||||
#include "ultima/ultima8/gumps/remorse_credits_gump.h"
|
||||
#include "ultima/ultima8/gumps/cru_credits_gump.h"
|
||||
|
||||
#include "ultima/ultima8/ultima8.h"
|
||||
#include "ultima/ultima8/kernel/mouse.h"
|
||||
@ -38,14 +38,14 @@
|
||||
namespace Ultima {
|
||||
namespace Ultima8 {
|
||||
|
||||
DEFINE_RUNTIME_CLASSTYPE_CODE(RemorseCreditsGump)
|
||||
DEFINE_RUNTIME_CLASSTYPE_CODE(CruCreditsGump)
|
||||
|
||||
RemorseCreditsGump::RemorseCreditsGump()
|
||||
CruCreditsGump::CruCreditsGump()
|
||||
: ModalGump(), _timer(0), _background(nullptr), _nextScreenStart(0),
|
||||
_screenNo(-1) {
|
||||
}
|
||||
|
||||
RemorseCreditsGump::RemorseCreditsGump(Common::SeekableReadStream *txtrs,
|
||||
CruCreditsGump::CruCreditsGump(Common::SeekableReadStream *txtrs,
|
||||
Common::SeekableReadStream *bmprs,
|
||||
uint32 flags, int32 layer)
|
||||
: ModalGump(0, 0, 640, 480, 0, flags, layer),
|
||||
@ -102,7 +102,7 @@ RemorseCreditsGump::RemorseCreditsGump(Common::SeekableReadStream *txtrs,
|
||||
}
|
||||
}
|
||||
|
||||
RemorseCreditsGump::~RemorseCreditsGump() {
|
||||
CruCreditsGump::~CruCreditsGump() {
|
||||
delete _background;
|
||||
|
||||
for (Common::Array<RenderedText *>::iterator iter = _currentLines.begin(); iter != _currentLines.end(); iter++) {
|
||||
@ -110,7 +110,7 @@ RemorseCreditsGump::~RemorseCreditsGump() {
|
||||
}
|
||||
}
|
||||
|
||||
void RemorseCreditsGump::InitGump(Gump *newparent, bool take_focus) {
|
||||
void CruCreditsGump::InitGump(Gump *newparent, bool take_focus) {
|
||||
ModalGump::InitGump(newparent, take_focus);
|
||||
|
||||
Mouse::get_instance()->pushMouseCursor();
|
||||
@ -125,7 +125,7 @@ void RemorseCreditsGump::InitGump(Gump *newparent, bool take_focus) {
|
||||
}
|
||||
}
|
||||
|
||||
void RemorseCreditsGump::Close(bool no_del) {
|
||||
void CruCreditsGump::Close(bool no_del) {
|
||||
Mouse::get_instance()->popMouseCursor();
|
||||
|
||||
ModalGump::Close(no_del);
|
||||
@ -135,7 +135,7 @@ void RemorseCreditsGump::Close(bool no_del) {
|
||||
//if (musicproc) musicproc->restoreMusic();
|
||||
}
|
||||
|
||||
void RemorseCreditsGump::run() {
|
||||
void CruCreditsGump::run() {
|
||||
ModalGump::run();
|
||||
|
||||
_timer++;
|
||||
@ -179,7 +179,7 @@ void RemorseCreditsGump::run() {
|
||||
}
|
||||
}
|
||||
|
||||
void RemorseCreditsGump::PaintThis(RenderSurface *surf, int32 lerp_factor, bool scaled) {
|
||||
void CruCreditsGump::PaintThis(RenderSurface *surf, int32 lerp_factor, bool scaled) {
|
||||
surf->Blit(_background->getRawSurface(), 0, 0, 640, 480, 0, 0);
|
||||
|
||||
unsigned int nlines = _currentLines.size();
|
||||
@ -200,7 +200,7 @@ void RemorseCreditsGump::PaintThis(RenderSurface *surf, int32 lerp_factor, bool
|
||||
}
|
||||
}
|
||||
|
||||
bool RemorseCreditsGump::OnKeyDown(int key, int mod) {
|
||||
bool CruCreditsGump::OnKeyDown(int key, int mod) {
|
||||
if (key == Common::KEYCODE_ESCAPE)
|
||||
Close();
|
||||
|
@ -20,8 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ULTIMA8_GUMPS_REMORSECREDITSGUMP_H
|
||||
#define ULTIMA8_GUMPS_REMORSECREDITSGUMP_H
|
||||
#ifndef ULTIMA8_GUMPS_CRUCREDITSGUMP_H
|
||||
#define ULTIMA8_GUMPS_CRUCREDITSGUMP_H
|
||||
|
||||
#include "ultima/ultima8/gumps/modal_gump.h"
|
||||
#include "ultima/ultima8/misc/classtype.h"
|
||||
@ -34,14 +34,14 @@ class RenderedText;
|
||||
/**
|
||||
* Full-screen gump for the credits roll in Crusader: No Remorse
|
||||
*/
|
||||
class RemorseCreditsGump : public ModalGump {
|
||||
class CruCreditsGump : public ModalGump {
|
||||
public:
|
||||
ENABLE_RUNTIME_CLASSTYPE()
|
||||
|
||||
RemorseCreditsGump();
|
||||
RemorseCreditsGump(Common::SeekableReadStream *txtrs, Common::SeekableReadStream *bmprs,
|
||||
CruCreditsGump();
|
||||
CruCreditsGump(Common::SeekableReadStream *txtrs, Common::SeekableReadStream *bmprs,
|
||||
uint32 flags = FLAG_PREVENT_SAVE, int32 layer = LAYER_MODAL);
|
||||
~RemorseCreditsGump() override;
|
||||
~CruCreditsGump() override;
|
||||
|
||||
// Init the gump, call after construction
|
||||
void InitGump(Gump *newparent, bool take_focus = true) override;
|
@ -20,7 +20,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ultima/ultima8/gumps/remorse_menu_gump.h"
|
||||
#include "ultima/ultima8/gumps/cru_menu_gump.h"
|
||||
#include "ultima/ultima8/games/game_data.h"
|
||||
#include "ultima/ultima8/graphics/gump_shape_archive.h"
|
||||
#include "ultima/ultima8/graphics/shape.h"
|
||||
@ -44,12 +44,12 @@
|
||||
namespace Ultima {
|
||||
namespace Ultima8 {
|
||||
|
||||
DEFINE_RUNTIME_CLASSTYPE_CODE(RemorseMenuGump)
|
||||
DEFINE_RUNTIME_CLASSTYPE_CODE(CruMenuGump)
|
||||
|
||||
static const int MENU_MUSIC_REMORSE = 20;
|
||||
static const int MENU_MUSIC_REGRET = 18;
|
||||
|
||||
RemorseMenuGump::RemorseMenuGump()
|
||||
CruMenuGump::CruMenuGump()
|
||||
: ModalGump(0, 0, 640, 480, 0, FLAG_DONT_SAVE) {
|
||||
|
||||
Mouse *mouse = Mouse::get_instance();
|
||||
@ -68,11 +68,11 @@ RemorseMenuGump::RemorseMenuGump()
|
||||
MetaEngine::setGameMenuActive(true);
|
||||
}
|
||||
|
||||
RemorseMenuGump::~RemorseMenuGump() {
|
||||
CruMenuGump::~CruMenuGump() {
|
||||
MetaEngine::setGameMenuActive(false);
|
||||
}
|
||||
|
||||
void RemorseMenuGump::Close(bool no_del) {
|
||||
void CruMenuGump::Close(bool no_del) {
|
||||
// Restore old music state and palette.
|
||||
// Music state can be changed by the Intro and Credits
|
||||
MusicProcess *musicprocess = MusicProcess::get_instance();
|
||||
@ -92,7 +92,7 @@ static const int numMenuEntries = 6;
|
||||
static const int menuEntryX[] = {45, 45, 45, 446, 488, 550};
|
||||
static const int menuEntryY[] = {50, 101, 151, 58, 151, 198};
|
||||
|
||||
void RemorseMenuGump::InitGump(Gump *newparent, bool take_focus) {
|
||||
void CruMenuGump::InitGump(Gump *newparent, bool take_focus) {
|
||||
ModalGump::InitGump(newparent, take_focus);
|
||||
|
||||
GumpShapeArchive *shapeArchive = GameData::get_instance()->getGumps();
|
||||
@ -166,11 +166,11 @@ void RemorseMenuGump::InitGump(Gump *newparent, bool take_focus) {
|
||||
}
|
||||
}
|
||||
|
||||
void RemorseMenuGump::PaintThis(RenderSurface *surf, int32 lerp_factor, bool scaled) {
|
||||
void CruMenuGump::PaintThis(RenderSurface *surf, int32 lerp_factor, bool scaled) {
|
||||
Gump::PaintThis(surf, lerp_factor, scaled);
|
||||
}
|
||||
|
||||
bool RemorseMenuGump::OnKeyDown(int key, int mod) {
|
||||
bool CruMenuGump::OnKeyDown(int key, int mod) {
|
||||
if (Gump::OnKeyDown(key, mod)) return true;
|
||||
|
||||
if (key == Common::KEYCODE_ESCAPE) {
|
||||
@ -185,14 +185,14 @@ bool RemorseMenuGump::OnKeyDown(int key, int mod) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void RemorseMenuGump::ChildNotify(Gump *child, uint32 message) {
|
||||
void CruMenuGump::ChildNotify(Gump *child, uint32 message) {
|
||||
ButtonWidget *buttonWidget = dynamic_cast<ButtonWidget *>(child);
|
||||
if (buttonWidget && message == ButtonWidget::BUTTON_CLICK) {
|
||||
selectEntry(child->GetIndex());
|
||||
}
|
||||
}
|
||||
|
||||
void RemorseMenuGump::selectEntry(int entry) {
|
||||
void CruMenuGump::selectEntry(int entry) {
|
||||
switch (entry) {
|
||||
case 1: { // New Game
|
||||
DifficultyGump *gump = new DifficultyGump();
|
||||
@ -223,7 +223,7 @@ void RemorseMenuGump::selectEntry(int entry) {
|
||||
}
|
||||
}
|
||||
|
||||
bool RemorseMenuGump::OnTextInput(int unicode) {
|
||||
bool CruMenuGump::OnTextInput(int unicode) {
|
||||
return Gump::OnTextInput(unicode);
|
||||
}
|
||||
|
@ -32,12 +32,12 @@ namespace Ultima8 {
|
||||
/**
|
||||
* The game menu for Crusader: No Remorse. Different enough to the U8 menu that it's implemented separately.
|
||||
*/
|
||||
class RemorseMenuGump : public ModalGump {
|
||||
class CruMenuGump : public ModalGump {
|
||||
public:
|
||||
ENABLE_RUNTIME_CLASSTYPE()
|
||||
|
||||
RemorseMenuGump();
|
||||
~RemorseMenuGump() override;
|
||||
CruMenuGump();
|
||||
~CruMenuGump() override;
|
||||
|
||||
// Init the gump, call after construction
|
||||
void InitGump(Gump *newparent, bool take_focus = true) override;
|
@ -23,7 +23,7 @@
|
||||
#include "common/config-manager.h"
|
||||
|
||||
#include "ultima/ultima8/gumps/menu_gump.h"
|
||||
#include "ultima/ultima8/gumps/remorse_menu_gump.h"
|
||||
#include "ultima/ultima8/gumps/cru_menu_gump.h"
|
||||
#include "ultima/ultima8/games/game_data.h"
|
||||
#include "ultima/ultima8/graphics/gump_shape_archive.h"
|
||||
#include "ultima/ultima8/graphics/shape.h"
|
||||
@ -268,7 +268,7 @@ void MenuGump::showMenu() {
|
||||
if (GAME_IS_U8)
|
||||
gump = new MenuGump();
|
||||
else
|
||||
gump = new RemorseMenuGump();
|
||||
gump = new CruMenuGump();
|
||||
gump->InitGump(0);
|
||||
gump->setRelativePosition(CENTER);
|
||||
}
|
||||
@ -280,7 +280,7 @@ void MenuGump::inputName() {
|
||||
if (GAME_IS_U8)
|
||||
gump = new MenuGump(true);
|
||||
else
|
||||
gump = new RemorseMenuGump();
|
||||
gump = new CruMenuGump();
|
||||
gump->InitGump(0);
|
||||
gump->setRelativePosition(CENTER);
|
||||
}
|
||||
|
@ -90,7 +90,7 @@
|
||||
#include "ultima/ultima8/world/actors/ambush_process.h"
|
||||
#include "ultima/ultima8/audio/audio_mixer.h"
|
||||
#include "ultima/ultima8/audio/u8_music_process.h"
|
||||
#include "ultima/ultima8/audio/remorse_music_process.h"
|
||||
#include "ultima/ultima8/audio/cru_music_process.h"
|
||||
#include "ultima/ultima8/audio/midi_player.h"
|
||||
#include "ultima/ultima8/gumps/shape_viewer_gump.h"
|
||||
#include "ultima/ultima8/meta_engine.h"
|
||||
@ -239,8 +239,8 @@ bool Ultima8Engine::startup() {
|
||||
ProcessLoader<U8MusicProcess>::load);
|
||||
_kernel->addProcessLoader("U8MusicProcess",
|
||||
ProcessLoader<U8MusicProcess>::load);
|
||||
_kernel->addProcessLoader("RemorseMusicProcess",
|
||||
ProcessLoader<RemorseMusicProcess>::load);
|
||||
_kernel->addProcessLoader("RemorseMusicProcess", // name was changed, keep this for backward-compatibility.
|
||||
ProcessLoader<CruMusicProcess>::load);
|
||||
_kernel->addProcessLoader("AudioProcess",
|
||||
ProcessLoader<AudioProcess>::load);
|
||||
_kernel->addProcessLoader("EggHatcherProcess",
|
||||
|
Loading…
x
Reference in New Issue
Block a user