mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
GLK: AmigaOS compilation fixes
This commit is contained in:
parent
c24756975a
commit
47f8d53b5e
@ -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);
|
||||
|
@ -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() {}
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user