diff options
author | Max Horn | 2009-02-22 19:45:53 +0000 |
---|---|---|
committer | Max Horn | 2009-02-22 19:45:53 +0000 |
commit | 8997a45773a51583b2e686907cfa60f85b79bfc2 (patch) | |
tree | 1b08841cd79189a716a24dcd421e759968312684 /engines/sci/gfx | |
parent | a5e6684151c65cd0a16659692256a699c52ceba8 (diff) | |
download | scummvm-rg350-8997a45773a51583b2e686907cfa60f85b79bfc2.tar.gz scummvm-rg350-8997a45773a51583b2e686907cfa60f85b79bfc2.tar.bz2 scummvm-rg350-8997a45773a51583b2e686907cfa60f85b79bfc2.zip |
SCI: Replaced two uses of sci_fopen by Common::File; moved is_print_str() to the only spot it is used
svn-id: r38791
Diffstat (limited to 'engines/sci/gfx')
-rw-r--r-- | engines/sci/gfx/gfx_resource.h | 6 | ||||
-rw-r--r-- | engines/sci/gfx/resource/sci_pal_1.cpp | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/engines/sci/gfx/gfx_resource.h b/engines/sci/gfx/gfx_resource.h index 8fc26d2d2c..b306d0d68b 100644 --- a/engines/sci/gfx/gfx_resource.h +++ b/engines/sci/gfx/gfx_resource.h @@ -31,6 +31,10 @@ #include "sci/gfx/gfx_system.h" #include "sci/gfx/gfx_driver.h" +namespace Common { + class File; +} + namespace Sci { /*** Styles for pic0 drawing ***/ @@ -355,7 +359,7 @@ gfx_pixmap_color_t *gfxr_read_pal1(int id, int *colors_nr, byte *resource, int s ** Returns : (gfx_pixmap_color_t *) *colors_nr color_t entries with the colors */ -gfx_pixmap_color_t *gfxr_read_pal1_amiga(int *colors_nr, FILE *f); +gfx_pixmap_color_t *gfxr_read_pal1_amiga(int *colors_nr, Common::File &file); /* Reads an SCI1 palette ** Parameters: (int *) colors_nr: Pointer to the variable the number of colors ** will be stored in diff --git a/engines/sci/gfx/resource/sci_pal_1.cpp b/engines/sci/gfx/resource/sci_pal_1.cpp index 97280cef25..544f6db4f3 100644 --- a/engines/sci/gfx/resource/sci_pal_1.cpp +++ b/engines/sci/gfx/resource/sci_pal_1.cpp @@ -25,6 +25,7 @@ /* SCI1 palette resource defrobnicator */ +#include "common/file.h" #include "sci/include/sci_memory.h" #include "sci/gfx/gfx_system.h" #include "sci/gfx/gfx_resource.h" @@ -132,7 +133,7 @@ gfx_pixmap_color_t *gfxr_read_pal1(int id, int *colors_nr, byte *resource, int s return retval; } -gfx_pixmap_color_t *gfxr_read_pal1_amiga(int *colors_nr, FILE *f) { +gfx_pixmap_color_t *gfxr_read_pal1_amiga(int *colors_nr, Common::File &file) { int i; gfx_pixmap_color_t *retval; @@ -141,8 +142,8 @@ gfx_pixmap_color_t *gfxr_read_pal1_amiga(int *colors_nr, FILE *f) { for (i = 0; i < 32; i++) { int b1, b2; - b1 = fgetc(f); - b2 = fgetc(f); + b1 = file.readByte(); + b2 = file.readByte(); if (b1 == EOF || b2 == EOF) { GFXERROR("Palette file ends prematurely\n"); |