diff options
author | Jordi Vilalta Prat | 2009-02-28 23:46:50 +0000 |
---|---|---|
committer | Jordi Vilalta Prat | 2009-02-28 23:46:50 +0000 |
commit | 7050c7b03f0f7b107df62488fd4dc2f37b704d3b (patch) | |
tree | 102ee5f2a5cecb29f1de285d0ea9f004477a37f7 /engines/sci/gfx/resource | |
parent | 8e39ac9f12fb95ffda80116389d03f050beabd90 (diff) | |
download | scummvm-rg350-7050c7b03f0f7b107df62488fd4dc2f37b704d3b.tar.gz scummvm-rg350-7050c7b03f0f7b107df62488fd4dc2f37b704d3b.tar.bz2 scummvm-rg350-7050c7b03f0f7b107df62488fd4dc2f37b704d3b.zip |
SCI: Use the ResourceType enum instead of integers where it makes sense
svn-id: r38988
Diffstat (limited to 'engines/sci/gfx/resource')
-rw-r--r-- | engines/sci/gfx/resource/sci_resmgr.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/sci/gfx/resource/sci_resmgr.cpp b/engines/sci/gfx/resource/sci_resmgr.cpp index b2d1c0b9bb..585b3c6166 100644 --- a/engines/sci/gfx/resource/sci_resmgr.cpp +++ b/engines/sci/gfx/resource/sci_resmgr.cpp @@ -71,7 +71,7 @@ void gfxr_interpreter_clear_pic(int version, gfxr_pic_t *pic, void *internal) { int gfxr_interpreter_calculate_pic(gfx_resstate_t *state, gfxr_pic_t *scaled_pic, gfxr_pic_t *unscaled_pic, int flags, int default_palette, int nr, void *internal) { ResourceManager *resmgr = (ResourceManager *)state->misc_payload; - Resource *res = resmgr->findResource(sci_pic, nr, 0); + Resource *res = resmgr->findResource(kResourceTypePic, nr, 0); int need_unscaled = unscaled_pic != NULL; gfxr_pic0_params_t style, basic_style; @@ -149,7 +149,7 @@ gfxr_view_t *gfxr_draw_view11(int id, byte *resource, int size); gfxr_view_t *gfxr_interpreter_get_view(gfx_resstate_t *state, int nr, void *internal, int palette) { ResourceManager *resmgr = (ResourceManager *) state->misc_payload; - Resource *res = resmgr->findResource(sci_view, nr, 0); + Resource *res = resmgr->findResource(kResourceTypeView, nr, 0); int resid = GFXR_RES_ID(GFX_RESOURCE_TYPE_VIEW, nr); gfxr_view_t *result = 0; @@ -188,7 +188,7 @@ gfxr_view_t *gfxr_interpreter_get_view(gfx_resstate_t *state, int nr, void *inte gfx_bitmap_font_t *gfxr_interpreter_get_font(gfx_resstate_t *state, int nr, void *internal) { ResourceManager *resmgr = (ResourceManager *)state->misc_payload; - Resource *res = resmgr->findResource(sci_font, nr, 0); + Resource *res = resmgr->findResource(kResourceTypeFont, nr, 0); if (!res || !res->data) return NULL; @@ -197,7 +197,7 @@ gfx_bitmap_font_t *gfxr_interpreter_get_font(gfx_resstate_t *state, int nr, void gfx_pixmap_t *gfxr_interpreter_get_cursor(gfx_resstate_t *state, int nr, void *internal) { ResourceManager *resmgr = (ResourceManager *) state->misc_payload; - Resource *res = resmgr->findResource(sci_cursor, nr, 0); + Resource *res = resmgr->findResource(kResourceTypeCursor, nr, 0); int resid = GFXR_RES_ID(GFX_RESOURCE_TYPE_CURSOR, nr); if (!res || !res->data) @@ -216,7 +216,7 @@ gfx_pixmap_t *gfxr_interpreter_get_cursor(gfx_resstate_t *state, int nr, void *i int *gfxr_interpreter_get_resources(gfx_resstate_t *state, gfx_resource_type_t type, int version, int *entries_nr, void *internal) { ResourceManager *resmgr = (ResourceManager *) state->misc_payload; - int restype; + ResourceType restype; int *resources; int count = 0; int top = sci_max_resource_nr[version] + 1; @@ -224,19 +224,19 @@ int *gfxr_interpreter_get_resources(gfx_resstate_t *state, gfx_resource_type_t t switch (type) { case GFX_RESOURCE_TYPE_VIEW: - restype = sci_view; + restype = kResourceTypeView; break; case GFX_RESOURCE_TYPE_PIC: - restype = sci_pic; + restype = kResourceTypePic; break; case GFX_RESOURCE_TYPE_CURSOR: - restype = sci_cursor; + restype = kResourceTypeCursor; break; case GFX_RESOURCE_TYPE_FONT: - restype = sci_font; + restype = kResourceTypeFont; break; default: @@ -270,7 +270,7 @@ gfx_pixmap_color_t *gfxr_interpreter_get_palette(gfx_resstate_t *state, int vers if (version < SCI_VERSION_01_VGA) return NULL; - res = resmgr->findResource(sci_palette, nr, 0); + res = resmgr->findResource(kResourceTypePalette, nr, 0); if (!res || !res->data) return NULL; |