aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/tads
diff options
context:
space:
mode:
authorPaul Gilbert2018-12-09 11:36:20 -0800
committerPaul Gilbert2018-12-09 11:36:20 -0800
commit7637edb5a2e84c0abbf1c1aa156772ce1f7906c3 (patch)
tree4c35ef8cf96ffd4148a19dafaf082a0209d0416a /engines/glk/tads
parent9809e19f48f750c79068baf3a0681c6a0233a083 (diff)
downloadscummvm-rg350-7637edb5a2e84c0abbf1c1aa156772ce1f7906c3.tar.gz
scummvm-rg350-7637edb5a2e84c0abbf1c1aa156772ce1f7906c3.tar.bz2
scummvm-rg350-7637edb5a2e84c0abbf1c1aa156772ce1f7906c3.zip
GLK: Change all references to glui32 and glsi32 to uint and int
This should finally fix compilation for the Amiga, which had difference sized types. And the renamed types are clearer for ScummVM anyway
Diffstat (limited to 'engines/glk/tads')
-rw-r--r--engines/glk/tads/tads.h4
-rw-r--r--engines/glk/tads/tads2/os.cpp24
-rw-r--r--engines/glk/tads/tads2/os.h14
3 files changed, 21 insertions, 21 deletions
diff --git a/engines/glk/tads/tads.h b/engines/glk/tads/tads.h
index ec9ea93f7d..49f59f5bf5 100644
--- a/engines/glk/tads/tads.h
+++ b/engines/glk/tads/tads.h
@@ -35,8 +35,8 @@ namespace TADS {
class TADS : public GlkAPI {
protected:
winid_t story_win, status_win;
- glui32 mainfg, mainbg;
- glui32 statusfg, statusbg;
+ uint mainfg, mainbg;
+ uint statusfg, statusbg;
public:
/**
* Constructor
diff --git a/engines/glk/tads/tads2/os.cpp b/engines/glk/tads/tads2/os.cpp
index 17bdc346e5..15a291a87b 100644
--- a/engines/glk/tads/tads2/os.cpp
+++ b/engines/glk/tads/tads2/os.cpp
@@ -36,13 +36,13 @@ void OS::os_terminate(int rc) {
glk_exit();
}
-glui32 OS::oss_convert_prompt_type(int type) {
+uint OS::oss_convert_prompt_type(int type) {
if (type == OS_AFP_OPEN)
return filemode_Read;
return filemode_ReadWrite;
}
-glui32 OS::oss_convert_file_type(int type) {
+uint OS::oss_convert_file_type(int type) {
if (type == OSFTSAVE)
return fileusage_SavedGame;
if (type == OSFTLOG || type == OSFTTEXT)
@@ -50,15 +50,15 @@ glui32 OS::oss_convert_file_type(int type) {
return fileusage_Data;
}
-glui32 OS::oss_convert_fileref_to_string(frefid_t file_to_convert, char *buffer, int buf_len) {
+uint OS::oss_convert_fileref_to_string(frefid_t file_to_convert, char *buffer, int buf_len) {
#ifdef TODO
char temp_string[32];
- glui32 value, i = 0, digit,
+ uint value, i = 0, digit,
digit_flag = false, // Have we put a digit in the string yet?
divisor = 1e9; // The max 32-bit integer is 4294967295
// This could probably be done by using sprintf("%s%ld%s") but I don't want to risk it
- value = (glui32)file_to_convert;
+ value = (uint)file_to_convert;
while (divisor != 1) {
digit = (char)(value / divisor);
if (digit != 0 || digit_flag) { // This lets us handle, eg, 102
@@ -79,10 +79,10 @@ glui32 OS::oss_convert_fileref_to_string(frefid_t file_to_convert, char *buffer,
return true;
}
-frefid_t OS::oss_convert_string_to_fileref(char *buffer, glui32 usage) {
+frefid_t OS::oss_convert_string_to_fileref(char *buffer, uint usage) {
#ifdef TODO
char temp_string[32];
- glui32 value = 0, i, multiplier = 1;
+ uint value = 0, i, multiplier = 1;
// Does the buffer contain a hashed fileref?
if (oss_is_string_a_fileref(buffer)) {
@@ -92,7 +92,7 @@ frefid_t OS::oss_convert_string_to_fileref(char *buffer, glui32 usage) {
temp_string[i] = 0;
while (i != 0) {
i--;
- value += ((glui32)(temp_string[i] - '0') * multiplier);
+ value += ((uint)(temp_string[i] - '0') * multiplier);
multiplier *= 10;
}
return ((frefid_t)value);
@@ -115,7 +115,7 @@ bool OS::oss_is_string_a_fileref(char *buffer) {
return false;
}
-unsigned char OS::oss_convert_keystroke_to_tads(glui32 key) {
+unsigned char OS::oss_convert_keystroke_to_tads(uint key) {
// Characters 0 - 255 we return per normal */
if (key <= 255)
return ((unsigned char)key);
@@ -169,8 +169,8 @@ void OS::oss_revert_path() {
// No implementation
}
-osfildef *OS::oss_open_stream(char *buffer, glui32 tadsusage, glui32 tbusage,
- glui32 fmode, glui32 rock) {
+osfildef *OS::oss_open_stream(char *buffer, uint tadsusage, uint tbusage,
+ uint fmode, uint rock) {
frefid_t fileref;
strid_t osf;
int changed_dirs;
@@ -226,7 +226,7 @@ void OS::oss_put_string_with_hilite(winid_t win, const char *str, size_t len) {
}
void OS::oss_draw_status_line(void) {
- glui32 width, height, division;
+ uint width, height, division;
if (status_win == nullptr) return; // In case this is a CheapGlk port
diff --git a/engines/glk/tads/tads2/os.h b/engines/glk/tads/tads2/os.h
index ecd046858e..45ab804f95 100644
--- a/engines/glk/tads/tads2/os.h
+++ b/engines/glk/tads/tads2/os.h
@@ -57,12 +57,12 @@ protected:
/**
* Change a TADS prompt type (OS_AFP_*) into a Glk prompt type.
*/
- glui32 oss_convert_prompt_type(int type);
+ uint oss_convert_prompt_type(int type);
/**
* Change a TADS file type (OSFT*) into a Glk file type.
*/
- glui32 oss_convert_file_type(int type);
+ uint oss_convert_file_type(int type);
/**
* Change a fileref ID (frefid_t) to a special string and put it in the
@@ -73,7 +73,7 @@ protected:
* 64-bit pointers I'll have to start using a hash table or use hex
* numbers.
*/
- glui32 oss_convert_fileref_to_string(frefid_t file_to_convert, char *buffer, int buf_len);
+ uint oss_convert_fileref_to_string(frefid_t file_to_convert, char *buffer, int buf_len);
/**
* Turn a filename or a special fileref string into an actual fileref.
@@ -81,7 +81,7 @@ protected:
* call oss_check_path, which should do the OS-dependent path changing
* in the event that the filename contains path information
*/
- frefid_t oss_convert_string_to_fileref(char *buffer, glui32 usage);
+ frefid_t oss_convert_string_to_fileref(char *buffer, uint usage);
/**
* Tell us if the passed string is a hashed fileref or not
@@ -91,7 +91,7 @@ protected:
/**
* Change a Glk key into a TADS one, using the CMD_xxx codes
*/
- unsigned char oss_convert_keystroke_to_tads(glui32 key);
+ unsigned char oss_convert_keystroke_to_tads(uint key);
/**@}*/
@@ -117,8 +117,8 @@ protected:
* TADS filemode (OSFT*); tbusage is either fileusage_TextMode or
* fileusage_BinaryMode (from Glk).
*/
- osfildef *oss_open_stream(char *buffer, glui32 tadsusage, glui32 tbusage,
- glui32 fmode, glui32 rock);
+ osfildef *oss_open_stream(char *buffer, uint tadsusage, uint tbusage,
+ uint fmode, uint rock);
/**
* Get a pointer to the root name portion of a filename. This is the part