aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2016-09-27 07:53:50 +0200
committerEugene Sandulenko2017-01-25 22:41:56 +0100
commit01f10cc4ee369b51baaf30804ca5c8d1578434a5 (patch)
tree81713dc9175134beaebf512e066f8d2e4aa945c5
parentbb15a2617999a0880478b04203f090f81dee32ab (diff)
downloadscummvm-rg350-01f10cc4ee369b51baaf30804ca5c8d1578434a5.tar.gz
scummvm-rg350-01f10cc4ee369b51baaf30804ca5c8d1578434a5.tar.bz2
scummvm-rg350-01f10cc4ee369b51baaf30804ca5c8d1578434a5.zip
CRYO: Some more renaming
-rw-r--r--engines/cryo/clhnm.cpp8
-rw-r--r--engines/cryo/cryolib.h2
-rw-r--r--engines/cryo/eden.cpp90
-rw-r--r--engines/cryo/eden.h22
4 files changed, 66 insertions, 56 deletions
diff --git a/engines/cryo/clhnm.cpp b/engines/cryo/clhnm.cpp
index b1ab6a8790..6471748f61 100644
--- a/engines/cryo/clhnm.cpp
+++ b/engines/cryo/clhnm.cpp
@@ -577,7 +577,7 @@ void CLHNM_SoundMono(bool isMono) {
use_mono = isMono;
}
-int16 CLHNM_NextElement(hnm_t *hnm) {
+bool CLHNM_NextElement(hnm_t *hnm) {
int sz;
int16 id;
char h6, h7;
@@ -587,9 +587,9 @@ int16 CLHNM_NextElement(hnm_t *hnm) {
pred_l = pred_r = 0;
}
if (hnm->frame == hnm->header.nframe)
- return 0;
+ return false;
if (!CLHNM_LoadFrame(hnm))
- return 0;
+ return false;
for (;;) {
sz = PLE32(hnm->data_ptr) & 0xFFFFFF;
hnm->data_ptr += 4;
@@ -694,7 +694,7 @@ end_frame:
;
if (use_preload) {
}
- return 1;
+ return true;
}
void CLHNM_ReadHeader(hnm_t *hnm) {
diff --git a/engines/cryo/cryolib.h b/engines/cryo/cryolib.h
index 7a7ffe1909..5f07f4107d 100644
--- a/engines/cryo/cryolib.h
+++ b/engines/cryo/cryolib.h
@@ -351,7 +351,7 @@ void CLHNM_LoadDecompTable(int16 *buffer);
void CLHNM_DecompADPCM(byte *buffer, int16 *output, int size);
void CLHNM_SoundInADPCM(int16 is_adpcm);
void CLHNM_SoundMono(int16 is_mono);
-int16 CLHNM_NextElement(hnm_t *hnm);
+bool CLHNM_NextElement(hnm_t *hnm);
void CLHNM_ReadHeader(hnm_t *hnm);
int16 CLHNM_GetVersion(hnm_t *hnm);
int CLHNM_GetFrameNum(hnm_t *hnm);
diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp
index da35cd21bc..c0cb5042ee 100644
--- a/engines/cryo/eden.cpp
+++ b/engines/cryo/eden.cpp
@@ -62,7 +62,7 @@ void EdenGame::removeConsole() {
}
void EdenGame::scroll() {
- restaurefrises();
+ restoreFriezes();
p_mainview->norm.src_left = scroll_pos;
p_mainview->zoom.src_left = scroll_pos;
}
@@ -70,7 +70,7 @@ void EdenGame::scroll() {
void EdenGame::resetScroll() {
old_scroll_pos = scroll_pos;
scroll_pos = 0;
- restaurefrises(); //TODO: inlined scroll() ?
+ restoreFriezes(); //TODO: inlined scroll() ?
p_mainview->norm.src_left = 0;
p_mainview->zoom.src_left = 0;
}
@@ -98,7 +98,7 @@ void EdenGame::displayFrescoes() {
void EdenGame::gametofresques() {
frescoTalk = false;
rundcurs();
- sauvefrises();
+ saveFriezes();
displayFrescoes();
p_global->displayFlags = DisplayFlags::dfFrescoes;
}
@@ -226,10 +226,10 @@ void EdenGame::gametomiroir(byte arg1) {
int16 bank;
if (p_global->displayFlags != DisplayFlags::dfFlag2) {
rundcurs();
- restaurefrises();
+ restoreFriezes();
drawTopScreen();
showObjects();
- sauvefrises();
+ saveFriezes();
}
bank = p_global->roomBgBankNum;
if (bank == 76 || bank == 128)
@@ -285,7 +285,7 @@ void EdenGame::quitMirror() {
rundcurs();
afficher();
resetScroll();
- sauvefrises();
+ saveFriezes();
p_global->displayFlags = DisplayFlags::dfFlag1;
p_global->ff_100 = 0xFF;
p_global->eventType = EventType::etEventC;
@@ -828,22 +828,26 @@ void EdenGame::final() {
p_global->narratorSequence = 54;
}
-void EdenGame::goto_nord() {
+// Original name: goto_nord
+void EdenGame::moveNorth() {
if (p_global->curObjectId == 0)
move(kCryoNorth);
}
-void EdenGame::goto_est() {
+// Original name: goto_est
+void EdenGame::moveEast() {
if (p_global->curObjectId == 0)
move(kCryoEast);
}
-void EdenGame::goto_sud() {
+// Original name: goto_sud
+void EdenGame::moveSouth() {
if (p_global->curObjectId == 0)
move(kCryoSouth);
}
-void EdenGame::goto_ouest() {
+// Original name: goto_ouest
+void EdenGame::moveWest() {
if (p_global->curObjectId == 0)
move(kCryoWest);
}
@@ -880,12 +884,14 @@ void EdenGame::afficher128() {
}
}
-void EdenGame::sauvefrises() {
- sauvefriseshaut(0);
- sauvefrisesbas();
+// Original name: sauvefrises
+void EdenGame::saveFriezes() {
+ saveTopFrieze(0);
+ saveBottomFrieze();
}
-void EdenGame::sauvefriseshaut(int16 x) { // Save top bar
+// Original name: sauvefriseshaut
+void EdenGame::saveTopFrieze(int16 x) { // Save top bar
underTopBarScreenRect.sy = 0; //TODO: wrong fields order?
underTopBarScreenRect.sx = x;
underTopBarScreenRect.ex = x + 320 - 1;
@@ -897,24 +903,28 @@ void EdenGame::sauvefriseshaut(int16 x) { // Save top bar
CLBlitter_CopyViewRect(p_mainview, p_underBarsView, &underTopBarScreenRect, &underTopBarBackupRect);
}
-void EdenGame::sauvefrisesbas() { // Save bottom bar
+// Original name: sauvefrisesbas
+void EdenGame::saveBottomFrieze() { // Save bottom bar
underBottomBarScreenRect.sx = 0;
underBottomBarScreenRect.ex = 320 - 1;
CLBlitter_CopyViewRect(p_mainview, p_underBarsView, &underBottomBarScreenRect, &underBottomBarBackupRect);
}
-void EdenGame::restaurefrises() {
- restaurefriseshaut();
- restaurefrisesbas();
+// Original name: restaurefrises
+void EdenGame::restoreFriezes() {
+ restoreTopFrieze();
+ restoreBottomFrieze();
}
-void EdenGame::restaurefriseshaut() {
+// Original name: restaurefriseshaut
+void EdenGame::restoreTopFrieze() {
underTopBarScreenRect.sx = scroll_pos;
underTopBarScreenRect.ex = scroll_pos + 320 - 1;
CLBlitter_CopyViewRect(p_underBarsView, p_mainview, &underTopBarBackupRect, &underTopBarScreenRect);
}
-void EdenGame::restaurefrisesbas() {
+// Original name: restaurefrisesbas
+void EdenGame::restoreBottomFrieze() {
underBottomBarScreenRect.sx = scroll_pos;
underBottomBarScreenRect.ex = scroll_pos + 320 - 1;
CLBlitter_CopyViewRect(p_underBarsView, p_mainview, &underBottomBarBackupRect, &underBottomBarScreenRect);
@@ -1490,14 +1500,14 @@ void EdenGame::affplanval() { // Draw mini-map
}
if (p_global->area_ptr->citadelLevel)
affrepere(34, p_global->area_ptr->citadelRoom->location);
- sauvefriseshaut(0);
+ saveTopFrieze(0);
loc = p_global->roomNum & 0xFF;
if (loc >= 16)
affrepereadam(loc);
- restaurefriseshaut();
+ restoreTopFrieze();
} else {
- sauvefriseshaut(0);
- restaurefriseshaut();
+ saveTopFrieze(0);
+ restoreTopFrieze();
}
}
@@ -5094,7 +5104,7 @@ void EdenGame::afsalle() {
p_global->displayFlags |= DisplayFlags::dfPanable;
p_global->ff_F4 = 0;
rundcurs();
- sauvefrises();
+ saveFriezes();
use_bank(room->bank - 1);
noclipax_avecnoir(0, 0, 16);
use_bank(room->bank);
@@ -5641,7 +5651,7 @@ void EdenGame::entergame() {
}
showObjects();
drawTopScreen();
- sauvefrises();
+ saveFriezes();
showBlackBars = 1;
p_global->ff_102 = 1;
maj_salle(p_global->roomNum);
@@ -5827,16 +5837,16 @@ void EdenGame::update_cursor() {
void EdenGame::mouse() {
static void (EdenGame::*mouse_actions[])() = {
- &EdenGame::goto_nord,
- &EdenGame::goto_est,
- &EdenGame::goto_sud,
- &EdenGame::goto_ouest,
+ &EdenGame::moveNorth,
+ &EdenGame::moveEast,
+ &EdenGame::moveSouth,
+ &EdenGame::moveWest,
&EdenGame::plaquemonk,
&EdenGame::fresquesgraa,
&EdenGame::pushpierre,
&EdenGame::tetesquel,
&EdenGame::tetemomie,
- &EdenGame::goto_nord,
+ &EdenGame::moveNorth,
&EdenGame::roiparle1,
&EdenGame::roiparle2,
&EdenGame::roiparle3,
@@ -5849,8 +5859,8 @@ void EdenGame::mouse() {
&EdenGame::ret,
&EdenGame::ret,
&EdenGame::final,
- &EdenGame::goto_nord,
- &EdenGame::goto_sud,
+ &EdenGame::moveNorth,
+ &EdenGame::moveSouth,
&EdenGame::visiter,
&EdenGame::dinosoufle,
&EdenGame::fresqueslasc,
@@ -6116,8 +6126,8 @@ void EdenGame::mouse() {
}
////// film.c
-void EdenGame::showfilm(char arg1) {
- int16 playing;
+// Original name: showfilm
+void EdenGame::showMovie(char arg1) {
CLHNM_Prepare2Read(p_hnmcontext, 0);
CLHNM_ReadHeader(p_hnmcontext);
if (p_global->curVideoNum == 92) {
@@ -6125,7 +6135,7 @@ void EdenGame::showfilm(char arg1) {
CLSoundChannel_SetVolumeLeft(hnmsound_ch, 0);
CLSoundChannel_SetVolumeRight(hnmsound_ch, 0);
}
- playing = 1;
+ bool playing = true;
if (CLHNM_GetVersion(p_hnmcontext) != 4)
return;
CLHNM_AllocMemory(p_hnmcontext);
@@ -6208,9 +6218,9 @@ void EdenGame::playHNM(int16 num) {
needToFade = 0;
}
if (num == 2012 || num == 98 || num == 171)
- showfilm(0);
+ showMovie(0);
else
- showfilm(1);
+ showMovie(1);
curs_keepx = curs_keepy = -1;
p_mainview->doubled = doubled;
if (specialTextMode) {
@@ -6530,7 +6540,7 @@ void EdenGame::showObjects() {
}
needPaletteUpdate = 1;
if ((p_global->displayFlags & DisplayFlags::dfMirror) || (p_global->displayFlags & DisplayFlags::dfPanable)) {
- sauvefrisesbas();
+ saveBottomFrieze();
scroll();
}
}
@@ -6974,7 +6984,7 @@ void EdenGame::panelrestart() {
CLBlitter_FillView(p_mainview, 0);
drawTopScreen();
showObjects();
- sauvefrises();
+ saveFriezes();
showBlackBars = 1;
maj_salle(p_global->roomNum);
}
diff --git a/engines/cryo/eden.h b/engines/cryo/eden.h
index b5574fd408..23bb04ed16 100644
--- a/engines/cryo/eden.h
+++ b/engines/cryo/eden.h
@@ -94,18 +94,18 @@ private:
void gotoval();
void visiter();
void final();
- void goto_nord();
- void goto_est();
- void goto_sud();
- void goto_ouest();
+ void moveNorth();
+ void moveEast();
+ void moveSouth();
+ void moveWest();
void afficher();
void afficher128();
- void sauvefrises();
- void sauvefriseshaut(int16 x);
- void sauvefrisesbas();
- void restaurefrises();
- void restaurefriseshaut();
- void restaurefrisesbas();
+ void saveFriezes();
+ void saveTopFrieze(int16 x);
+ void saveBottomFrieze();
+ void restoreFriezes();
+ void restoreTopFrieze();
+ void restoreBottomFrieze();
void use_main_bank();
void use_bank(int16 bank);
void sundcurs(int16 x, int16 y);
@@ -318,7 +318,7 @@ private:
icon_t *scan_icon_list(int16 x, int16 y, int16 index);
void update_cursor();
void mouse();
- void showfilm(char arg1);
+ void showMovie(char arg1);
void playHNM(int16 num);
void displayHNMSubtitles();
void musique();