aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gfx/resource/sci_font.cpp
diff options
context:
space:
mode:
authorMax Horn2009-03-08 08:16:08 +0000
committerMax Horn2009-03-08 08:16:08 +0000
commit877629cb2e9c24622cd03d9e3433ab37c7207902 (patch)
tree6c566e740e47eb6cad60ffdf89b87d818b9ba813 /engines/sci/gfx/resource/sci_font.cpp
parentaad0ad3fa69979754ef2be0fa17766314b507aa4 (diff)
downloadscummvm-rg350-877629cb2e9c24622cd03d9e3433ab37c7207902.tar.gz
scummvm-rg350-877629cb2e9c24622cd03d9e3433ab37c7207902.tar.bz2
scummvm-rg350-877629cb2e9c24622cd03d9e3433ab37c7207902.zip
SCI: replaced get_int_16 by READ_LE_UINT16, and got rid of inverse_16
svn-id: r39212
Diffstat (limited to 'engines/sci/gfx/resource/sci_font.cpp')
-rw-r--r--engines/sci/gfx/resource/sci_font.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/sci/gfx/resource/sci_font.cpp b/engines/sci/gfx/resource/sci_font.cpp
index 9813c1350d..c208fe16f0 100644
--- a/engines/sci/gfx/resource/sci_font.cpp
+++ b/engines/sci/gfx/resource/sci_font.cpp
@@ -77,8 +77,8 @@ gfx_bitmap_font_t *gfxr_read_font(int id, byte *resource, int size) {
return NULL;
}
- font->chars_nr = chars_nr = get_int_16(resource + FONT_MAXCHAR_OFFSET);
- font->line_height = max_height = get_int_16(resource + FONT_HEIGHT_OFFSET);
+ font->chars_nr = chars_nr = READ_LE_UINT16(resource + FONT_MAXCHAR_OFFSET);
+ font->line_height = max_height = READ_LE_UINT16(resource + FONT_HEIGHT_OFFSET);
if (chars_nr < 0 || chars_nr > 256 || max_height < 0) {
if (chars_nr < 0 || chars_nr > 256)
@@ -99,7 +99,7 @@ gfx_bitmap_font_t *gfxr_read_font(int id, byte *resource, int size) {
font->widths = (int*)sci_malloc(sizeof(int) * chars_nr);
for (i = 0; i < chars_nr; i++) {
- int offset = get_int_16(resource + (i << 1) + 6);
+ int offset = READ_LE_UINT16(resource + (i << 1) + 6);
if (offset >= size) {
GFXERROR("Font %04x: Error: Character 0x%02x is at offset 0x%04x (beyond 0x%04x)\n", id, i, offset, size);
@@ -128,7 +128,7 @@ gfx_bitmap_font_t *gfxr_read_font(int id, byte *resource, int size) {
font->data = (byte *)sci_calloc(font->char_size, chars_nr);
for (i = 0; i < chars_nr; i++) {
- int offset = get_int_16(resource + (i << 1) + 6);
+ int offset = READ_LE_UINT16(resource + (i << 1) + 6);
if (calc_char(font->data + (font->char_size * i), font->row_size, max_height, resource + offset, size - offset)) {
GFXERROR("Problem occured in font %04x, char %d/%d\n", id, i, chars_nr);