[Scummvm-git-logs] scummvm master -> 47f8d53b5e5cd50928f45ac28741b3e71d662054
dreammaster
noreply at scummvm.org
Thu Apr 14 02:23:07 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
47f8d53b5e GLK: AmigaOS compilation fixes
Commit: 47f8d53b5e5cd50928f45ac28741b3e71d662054
https://github.com/scummvm/scummvm/commit/47f8d53b5e5cd50928f45ac28741b3e71d662054
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2022-04-13T19:21:49-07:00
Commit Message:
GLK: AmigaOS compilation fixes
Changed paths:
engines/glk/comprehend/game.cpp
engines/glk/comprehend/game.h
engines/glk/comprehend/game_data.cpp
engines/glk/comprehend/game_oo.cpp
engines/glk/comprehend/game_oo.h
engines/glk/comprehend/game_tr1.cpp
engines/glk/comprehend/game_tr1.h
engines/glk/comprehend/game_tr2.cpp
engines/glk/comprehend/game_tr2.h
engines/glk/scott/scott.cpp
engines/glk/scott/scott.h
engines/glk/scott/types.h
diff --git a/engines/glk/comprehend/game.cpp b/engines/glk/comprehend/game.cpp
index 9287ce9c29a..73b72379825 100644
--- a/engines/glk/comprehend/game.cpp
+++ b/engines/glk/comprehend/game.cpp
@@ -461,14 +461,13 @@ void ComprehendGame::updateRoomDesc() {
void ComprehendGame::update() {
Room *room = get_room(_currentRoom);
- unsigned room_type, room_desc_string;
+ uint room_type, room_desc_string;
update_graphics();
/* Check if the room is special (dark, too bright, etc) */
room_desc_string = room->_stringDesc;
- room_type = roomIsSpecial(_currentRoom,
- &room_desc_string);
+ room_type = roomIsSpecial(_currentRoom, &room_desc_string);
if (_updateFlags & UPDATE_ROOM_DESC) {
Common::String desc = stringLookup(room_desc_string);
diff --git a/engines/glk/comprehend/game.h b/engines/glk/comprehend/game.h
index 4cd365327bf..0234b89e3e4 100644
--- a/engines/glk/comprehend/game.h
+++ b/engines/glk/comprehend/game.h
@@ -171,7 +171,7 @@ public:
*/
virtual void handleAction(Sentence *sentence);
- virtual int roomIsSpecial(unsigned room_index, unsigned *room_desc_string) {
+ virtual int roomIsSpecial(uint room_index, uint *room_desc_string) {
return ROOM_IS_NORMAL;
}
virtual void handleSpecialOpcode() {}
diff --git a/engines/glk/comprehend/game_data.cpp b/engines/glk/comprehend/game_data.cpp
index e8092ed3dd4..0af29e05c22 100644
--- a/engines/glk/comprehend/game_data.cpp
+++ b/engines/glk/comprehend/game_data.cpp
@@ -479,7 +479,7 @@ done:
return string;
}
-void GameData::parse_string_table(FileBuffer *fb, unsigned start_addr,
+void GameData::parse_string_table(FileBuffer *fb, uint start_addr,
uint32 end_addr, StringTable *table) {
if (start_addr < end_addr) {
fb->seek(start_addr);
diff --git a/engines/glk/comprehend/game_oo.cpp b/engines/glk/comprehend/game_oo.cpp
index 28f47328295..0c924b07e5b 100644
--- a/engines/glk/comprehend/game_oo.cpp
+++ b/engines/glk/comprehend/game_oo.cpp
@@ -118,7 +118,7 @@ void OOToposGame::beforeGame() {
g_comprehend->glk_window_clear(g_comprehend->_bottomWindow);
}
-int OOToposGame::roomIsSpecial(unsigned room_index, unsigned *roomDescString) {
+int OOToposGame::roomIsSpecial(uint room_index, uint *roomDescString) {
Room *room = &_rooms[room_index];
// Is the room dark
diff --git a/engines/glk/comprehend/game_oo.h b/engines/glk/comprehend/game_oo.h
index 81406e6c5e8..76fd190568e 100644
--- a/engines/glk/comprehend/game_oo.h
+++ b/engines/glk/comprehend/game_oo.h
@@ -81,7 +81,7 @@ public:
void beforeTurn() override;
void beforePrompt() override;
void afterPrompt() override;
- int roomIsSpecial(unsigned room_index, unsigned *room_desc_string) override;
+ int roomIsSpecial(uint room_index, uint *room_desc_string) override;
void handleSpecialOpcode() override;
bool handle_restart() override;
void synchronizeSave(Common::Serializer &s) override;
diff --git a/engines/glk/comprehend/game_tr1.cpp b/engines/glk/comprehend/game_tr1.cpp
index 56c94b1e06e..a6065b91742 100644
--- a/engines/glk/comprehend/game_tr1.cpp
+++ b/engines/glk/comprehend/game_tr1.cpp
@@ -130,8 +130,7 @@ bool TransylvaniaGame1::isMonsterInRoom(const TransylvaniaMonster *monsterInfo)
return monster->_room == _currentRoom;
}
-int TransylvaniaGame1::roomIsSpecial(unsigned room_index,
- unsigned *roomDescString) {
+int TransylvaniaGame1::roomIsSpecial(uint room_index, uint *roomDescString) {
Room *room = &_rooms[room_index];
if (room_index == 0x28) {
diff --git a/engines/glk/comprehend/game_tr1.h b/engines/glk/comprehend/game_tr1.h
index 8848f283822..c25574e160f 100644
--- a/engines/glk/comprehend/game_tr1.h
+++ b/engines/glk/comprehend/game_tr1.h
@@ -44,7 +44,7 @@ public:
void beforeGame() override;
void beforeTurn() override;
void synchronizeSave(Common::Serializer &s) override;
- int roomIsSpecial(unsigned room_index, unsigned *roomDescString) override;
+ int roomIsSpecial(uint room_index, uint *roomDescString) override;
void handleSpecialOpcode() override;
};
diff --git a/engines/glk/comprehend/game_tr2.cpp b/engines/glk/comprehend/game_tr2.cpp
index 82ff66afa19..21d222631cc 100644
--- a/engines/glk/comprehend/game_tr2.cpp
+++ b/engines/glk/comprehend/game_tr2.cpp
@@ -123,8 +123,7 @@ bool TransylvaniaGame2::isMonsterInRoom(const TransylvaniaMonster *monsterInfo)
return monster->_room == _currentRoom;
}
-int TransylvaniaGame2::roomIsSpecial(unsigned room_index,
- unsigned *roomDescString) {
+int TransylvaniaGame2::roomIsSpecial(uint room_index, uint *roomDescString) {
Room *room = &_rooms[room_index];
if (room_index == 0x28) {
diff --git a/engines/glk/comprehend/game_tr2.h b/engines/glk/comprehend/game_tr2.h
index 7607767d16b..f0d065483c8 100644
--- a/engines/glk/comprehend/game_tr2.h
+++ b/engines/glk/comprehend/game_tr2.h
@@ -44,7 +44,7 @@ public:
void beforeGame() override;
void beforeTurn() override;
void synchronizeSave(Common::Serializer &s) override;
- int roomIsSpecial(unsigned room_index, unsigned *roomDescString) override;
+ int roomIsSpecial(uint room_index, uint *roomDescString) override;
void handleSpecialOpcode() override;
};
diff --git a/engines/glk/scott/scott.cpp b/engines/glk/scott/scott.cpp
index b1f08c4a51c..ba50aa68bff 100644
--- a/engines/glk/scott/scott.cpp
+++ b/engines/glk/scott/scott.cpp
@@ -1407,7 +1407,7 @@ void Scott::flushRoomDescription(char *buf) {
int rows, length;
char *textWithBreaks = lineBreakText(buf, _topWidth, &rows, &length);
- glui32 bottomheight;
+ uint bottomheight;
glk_window_get_size(_G(_bottomWindow), nullptr, &bottomheight);
winid_t o2 = glk_window_get_parent(_G(_topWindow));
if (!(bottomheight < 3 && _topHeight < rows)) {
@@ -1576,7 +1576,7 @@ void Scott::closeGraphicsWindow() {
}
winid_t Scott::findGlkWindowWithRock(glui32 rock) {
- glui32 rockptr;
+ uint rockptr;
winid_t win = glk_window_iterate(nullptr, &rockptr);
while (win) {
if (rockptr == rock)
@@ -1589,7 +1589,7 @@ winid_t Scott::findGlkWindowWithRock(glui32 rock) {
void Scott::openGraphicsWindow() {
if (!glk_gestalt(gestalt_Graphics, 0))
return;
- glui32 graphwidth, graphheight, optimalWidth, optimalHeight;
+ uint graphwidth, graphheight, optimalWidth, optimalHeight;
if (_G(_topWindow) == nullptr)
_G(_topWindow) = findGlkWindowWithRock(GLK_STATUS_ROCK);
@@ -1609,7 +1609,7 @@ void Scott::openGraphicsWindow() {
}
// Set the graphics window background to match the main window background, best as we can, and clear the window.
- glui32 backgroundColor;
+ uint backgroundColor;
if (glk_style_measure(_G(_bottomWindow), style_Normal, stylehint_BackColor, &backgroundColor)) {
glk_window_set_background_color(_G(_graphics), backgroundColor);
glk_window_clear(_G(_graphics));
@@ -1628,11 +1628,11 @@ void Scott::openGraphicsWindow() {
}
}
-glui32 Scott::optimalPictureSize(glui32 *width, glui32 *height) {
+glui32 Scott::optimalPictureSize(uint *width, uint *height) {
*width = 255;
*height = 96;
int multiplier = 1;
- glui32 graphwidth, graphheight;
+ uint graphwidth, graphheight;
glk_window_get_size(_G(_graphics), &graphwidth, &graphheight);
multiplier = graphheight / 96;
if (static_cast<glui32>(255 * multiplier) > graphwidth)
@@ -2138,7 +2138,7 @@ void Scott::printTitleScreenGrid() {
rows++;
winid_t titlewin = glk_window_open(_G(_bottomWindow), winmethod_Above | winmethod_Fixed, rows + 2,
wintype_TextGrid, 0);
- glui32 width, height;
+ uint width, height;
glk_window_get_size(titlewin, &width, &height);
if (width < 40 || height < static_cast<glui32>(rows + 2)) {
glk_window_close(titlewin, nullptr);
diff --git a/engines/glk/scott/scott.h b/engines/glk/scott/scott.h
index f81b5fa8ccf..b916e7a4f62 100644
--- a/engines/glk/scott/scott.h
+++ b/engines/glk/scott/scott.h
@@ -181,7 +181,7 @@ private:
void closeGraphicsWindow();
winid_t findGlkWindowWithRock(glui32 rock);
void openGraphicsWindow();
- glui32 optimalPictureSize(glui32 *width, glui32 *height);
+ glui32 optimalPictureSize(uint *width, uint *height);
void openTopWindow();
void cleanupAndExit();
void drawBlack();
diff --git a/engines/glk/scott/types.h b/engines/glk/scott/types.h
index 2bc5f4427f2..33340ef9eca 100644
--- a/engines/glk/scott/types.h
+++ b/engines/glk/scott/types.h
@@ -27,7 +27,9 @@
namespace Glk {
namespace Scott {
+#if !defined(SIZE_MAX)
#define SIZE_MAX 0xFFFFFFFF
+#endif
typedef uint8 uint8_t;
typedef uint16 uint16_t;
More information about the Scummvm-git-logs
mailing list