mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 18:27:26 +00:00
GLK: TADS: Compilation fixes
This commit is contained in:
parent
c68542dba8
commit
7212924b1e
@ -146,7 +146,8 @@ Picture *Pictures::load(uint32 id) {
|
||||
pal[idx] = pic->format.RGBToColor(palette[idx * 3],
|
||||
palette[idx * 3 + 1], palette[idx * 3 + 2]);
|
||||
|
||||
byte *srcP = (byte *)img->getPixels(), *destP = (byte *)pic->getPixels();
|
||||
const byte *srcP = (const byte *)img->getPixels();
|
||||
byte *destP = (byte *)pic->getPixels();
|
||||
for (int idx = 0; idx < img->w * img->h; ++idx, srcP++, destP += pic->format.bytesPerPixel) {
|
||||
uint val = (*srcP >= palCount) ? 0 : pal[*srcP];
|
||||
if (pic->format.bytesPerPixel == 2)
|
||||
|
@ -33,7 +33,7 @@ int errcxdef::errfmt(char *outbuf, int outbufl, char *fmt, int argc, erradef *ar
|
||||
int argi = 0;
|
||||
int len;
|
||||
char buf[20];
|
||||
char *p = nullptr;
|
||||
const char *p = nullptr;
|
||||
char fmtchar;
|
||||
|
||||
while (*fmt != '\0' && outbufl > 1) {
|
||||
|
@ -51,6 +51,7 @@ glui32 OS::oss_convert_file_type(int type) {
|
||||
}
|
||||
|
||||
glui32 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,
|
||||
digit_flag = false, // Have we put a digit in the string yet?
|
||||
@ -74,10 +75,12 @@ glui32 OS::oss_convert_fileref_to_string(frefid_t file_to_convert, char *buffer,
|
||||
return false;
|
||||
sprintf(buffer, "%s%s%s", OSS_FILEREF_STRING_PREFIX,
|
||||
temp_string, OSS_FILEREF_STRING_SUFFIX);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
frefid_t OS::oss_convert_string_to_fileref(char *buffer, glui32 usage) {
|
||||
#ifdef TODO
|
||||
char temp_string[32];
|
||||
glui32 value = 0, i, multiplier = 1;
|
||||
|
||||
@ -97,6 +100,9 @@ frefid_t OS::oss_convert_string_to_fileref(char *buffer, glui32 usage) {
|
||||
|
||||
// If not, return the new fileref
|
||||
return (glk_fileref_create_by_name(usage, os_get_root_name(buffer), 0));
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool OS::oss_is_string_a_fileref(char *buffer) {
|
||||
|
@ -1069,19 +1069,18 @@ int re_context::match(const char *entire_str, const char *str, size_t origlen,
|
||||
|
||||
case RE_RANGE:
|
||||
case RE_RANGE_EXCL: {
|
||||
int match;
|
||||
int match_val;
|
||||
|
||||
// make sure we have a character to match
|
||||
if (curlen == 0)
|
||||
return -1;
|
||||
|
||||
// see if we match
|
||||
match = re_is_bit_set(tuple->char_range,
|
||||
(int)(unsigned char)*p);
|
||||
match_val = re_is_bit_set(tuple->char_range, (int)(unsigned char)*p);
|
||||
|
||||
// make sure we got what we wanted
|
||||
if ((tuple->ch == RE_RANGE && !match)
|
||||
|| (tuple->ch == RE_RANGE_EXCL && match))
|
||||
if ((tuple->ch == RE_RANGE && !match_val)
|
||||
|| (tuple->ch == RE_RANGE_EXCL && match_val))
|
||||
return -1;
|
||||
|
||||
// skip this character of the input
|
||||
|
Loading…
x
Reference in New Issue
Block a user