diff options
author | Max Horn | 2010-02-05 22:55:18 +0000 |
---|---|---|
committer | Max Horn | 2010-02-05 22:55:18 +0000 |
commit | f86618f92be1350bf6e56573c2419e604c811548 (patch) | |
tree | 780ad7877423be3aa5d19dee510e187ba77f3477 /engines/sci/engine/kpathing.cpp | |
parent | 25a9df8a817de652a40d2cc48411310b081b5653 (diff) | |
download | scummvm-rg350-f86618f92be1350bf6e56573c2419e604c811548.tar.gz scummvm-rg350-f86618f92be1350bf6e56573c2419e604c811548.tar.bz2 scummvm-rg350-f86618f92be1350bf6e56573c2419e604c811548.zip |
SCI: Add a 'SELECTOR' macro
svn-id: r47918
Diffstat (limited to 'engines/sci/engine/kpathing.cpp')
-rw-r--r-- | engines/sci/engine/kpathing.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index 5598b966a9..2865e0fdac 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -335,15 +335,15 @@ static void draw_point(EngineState *s, Common::Point p, int start, int width, in static void draw_polygon(EngineState *s, reg_t polygon, int width, int height) { SegManager *segMan = s->_segMan; - reg_t points = GET_SEL32(segMan, polygon, points); + reg_t points = GET_SEL32(segMan, polygon, SELECTOR(points)); #ifdef ENABLE_SCI32 if (segMan->isHeapObject(points)) - points = GET_SEL32(segMan, points, data); + points = GET_SEL32(segMan, points, SELECTOR(data)); #endif - int size = GET_SEL32(segMan, polygon, size).toUint16(); - int type = GET_SEL32(segMan, polygon, type).toUint16(); + int size = GET_SEL32V(segMan, polygon, SELECTOR(size)); + int type = GET_SEL32V(segMan, polygon, SELECTOR(type)); Common::Point first, prev; int i; @@ -384,15 +384,15 @@ static void draw_input(EngineState *s, reg_t poly_list, Common::Point start, Com } static void print_polygon(SegManager *segMan, reg_t polygon) { - reg_t points = GET_SEL32(segMan, polygon, points); + reg_t points = GET_SEL32(segMan, polygon, SELECTOR(points)); #ifdef ENABLE_SCI32 if (segMan->isHeapObject(points)) - points = GET_SEL32(segMan, points, data); + points = GET_SEL32(segMan, points, SELECTOR(data)); #endif - int size = GET_SEL32(segMan, polygon, size).toUint16(); - int type = GET_SEL32(segMan, polygon, type).toUint16(); + int size = GET_SEL32V(segMan, polygon, SELECTOR(size)); + int type = GET_SEL32V(segMan, polygon, SELECTOR(type)); int i; Common::Point point; @@ -1034,13 +1034,13 @@ static Polygon *convert_polygon(EngineState *s, reg_t polygon) { // Returns : (Polygon *) The converted polygon, or NULL on error SegManager *segMan = s->_segMan; int i; - reg_t points = GET_SEL32(segMan, polygon, points); - int size = GET_SEL32(segMan, polygon, size).toUint16(); + reg_t points = GET_SEL32(segMan, polygon, SELECTOR(points)); + int size = GET_SEL32V(segMan, polygon, SELECTOR(size)); #ifdef ENABLE_SCI32 // SCI32 stores the actual points in the data property of points (in a new array) if (segMan->isHeapObject(points)) - points = GET_SEL32(segMan, points, data); + points = GET_SEL32(segMan, points, SELECTOR(data)); #endif if (size == 0) { @@ -1048,7 +1048,7 @@ static Polygon *convert_polygon(EngineState *s, reg_t polygon) { return NULL; } - Polygon *poly = new Polygon(GET_SEL32(segMan, polygon, type).toUint16()); + Polygon *poly = new Polygon(GET_SEL32V(segMan, polygon, SELECTOR(type))); int skip = 0; @@ -1119,7 +1119,7 @@ static PathfindingState *convert_polygon_set(EngineState *s, reg_t poly_list, Co if (polygon) { pf_s->polygons.push_back(polygon); - count += GET_SEL32(segMan, node->value, size).toUint16(); + count += GET_SEL32V(segMan, node->value, SELECTOR(size)); } node = s->_segMan->lookupNode(node->succ); @@ -1392,7 +1392,7 @@ reg_t kAvoidPath(EngineState *s, int argc, reg_t *argv) { if (argc < 7) error("[avoidpath] Not enough arguments"); - poly_list = GET_SEL32(s->_segMan, argv[4], elements); + poly_list = GET_SEL32(s->_segMan, argv[4], SELECTOR(elements)); width = argv[5].toUint16(); height = argv[6].toUint16(); if (argc > 7) |