diff options
author | Eugene Sandulenko | 2004-10-04 23:09:38 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-10-04 23:09:38 +0000 |
commit | 8b7740d8afda1b9796f8df91242a41f5eed62190 (patch) | |
tree | 13c82c40ef575f574018971e25b6d90889b45534 /saga | |
parent | 05412066b1cbcd8ce202c25f892f69009ab9ee34 (diff) | |
download | scummvm-rg350-8b7740d8afda1b9796f8df91242a41f5eed62190.tar.gz scummvm-rg350-8b7740d8afda1b9796f8df91242a41f5eed62190.tar.bz2 scummvm-rg350-8b7740d8afda1b9796f8df91242a41f5eed62190.zip |
R_POINT -> Common::Point, R_RECT -> Common::Rect. Less R_ prefixes.
svn-id: r15414
Diffstat (limited to 'saga')
-rw-r--r-- | saga/actionmap.cpp | 6 | ||||
-rw-r--r-- | saga/actionmap.h | 2 | ||||
-rw-r--r-- | saga/actor.cpp | 16 | ||||
-rw-r--r-- | saga/actor.h | 24 | ||||
-rw-r--r-- | saga/console.cpp | 2 | ||||
-rw-r--r-- | saga/events.cpp | 2 | ||||
-rw-r--r-- | saga/gfx.cpp | 34 | ||||
-rw-r--r-- | saga/gfx.h | 26 | ||||
-rw-r--r-- | saga/input.cpp | 4 | ||||
-rw-r--r-- | saga/interface.cpp | 20 | ||||
-rw-r--r-- | saga/interface.h | 12 | ||||
-rw-r--r-- | saga/isomap.cpp | 2 | ||||
-rw-r--r-- | saga/objectmap.cpp | 18 | ||||
-rw-r--r-- | saga/objectmap.h | 6 | ||||
-rw-r--r-- | saga/render.cpp | 4 | ||||
-rw-r--r-- | saga/saga.h | 4 | ||||
-rw-r--r-- | saga/scene.cpp | 2 | ||||
-rw-r--r-- | saga/sfuncs.cpp | 10 | ||||
-rw-r--r-- | saga/sprite.cpp | 6 |
19 files changed, 100 insertions, 100 deletions
diff --git a/saga/actionmap.cpp b/saga/actionmap.cpp index 12469508c3..b37485c05c 100644 --- a/saga/actionmap.cpp +++ b/saga/actionmap.cpp @@ -58,7 +58,7 @@ ActionMap::~ActionMap(void) { int ActionMap::loadMap(const byte * exmap_res, size_t exmap_res_len) { // Loads exit map data from specified exit map resource R_ACTIONMAP_ENTRY *exmap_entry; - R_POINT *exmap_pt_tbl; + Point *exmap_pt_tbl; int exit_ct; int i, pt; @@ -92,7 +92,7 @@ int ActionMap::loadMap(const byte * exmap_res, size_t exmap_res_len) { return R_FAILURE; } - exmap_pt_tbl = (R_POINT *)malloc(exmap_entry[i].pt_count * sizeof *exmap_pt_tbl); + exmap_pt_tbl = (Point *)malloc(exmap_entry[i].pt_count * sizeof *exmap_pt_tbl); if (exmap_pt_tbl == NULL) { warning("Memory allocation failure"); return R_MEM; @@ -171,7 +171,7 @@ int ActionMap::draw(R_SURFACE * ds, int color) { } void ActionMap::actionInfo(int argc, char *argv[]) { - R_POINT *pt; + Point *pt; int i; int pt_i; diff --git a/saga/actionmap.h b/saga/actionmap.h index b15272e598..0863bd1312 100644 --- a/saga/actionmap.h +++ b/saga/actionmap.h @@ -35,7 +35,7 @@ struct R_ACTIONMAP_ENTRY { int unknown06; int pt_count; - R_POINT *pt_tbl; + Point *pt_tbl; }; class ActionMap { diff --git a/saga/actor.cpp b/saga/actor.cpp index 5e6530f50b..f11c23f267 100644 --- a/saga/actor.cpp +++ b/saga/actor.cpp @@ -727,7 +727,7 @@ int Actor::deleteActor(int index) { return R_SUCCESS; } -int Actor::walkTo(int id, R_POINT *walk_pt, uint16 flags, R_SEMAPHORE *sem) { +int Actor::walkTo(int id, Point *walk_pt, uint16 flags, R_SEMAPHORE *sem) { R_ACTORINTENT actor_intent; R_WALKINTENT *walk_intent; R_WALKINTENT zero_intent; @@ -776,7 +776,7 @@ int Actor::walkTo(int id, R_POINT *walk_pt, uint16 flags, R_SEMAPHORE *sem) { return R_SUCCESS; } -int Actor::setPathNode(R_WALKINTENT *walk_int, R_POINT *src_pt, R_POINT *dst_pt, R_SEMAPHORE *sem) { +int Actor::setPathNode(R_WALKINTENT *walk_int, Point *src_pt, Point *dst_pt, R_SEMAPHORE *sem) { R_WALKNODE new_node; walk_int->wi_active = 1; @@ -960,7 +960,7 @@ int Actor::handleWalkIntent(R_ACTOR *actor, R_WALKINTENT *a_walkint, int *comple return R_SUCCESS; } -int Actor::move(int index, R_POINT *move_pt) { +int Actor::move(int index, Point *move_pt) { YS_DL_NODE *node; R_ACTOR *actor; @@ -992,7 +992,7 @@ int Actor::move(int index, R_POINT *move_pt) { return R_SUCCESS; } -int Actor::moveRelative(int index, R_POINT *move_pt) { +int Actor::moveRelative(int index, Point *move_pt) { YS_DL_NODE *node; R_ACTOR *actor; @@ -1033,14 +1033,14 @@ static int zCompare(const void *elem1, const void *elem2) { } } -int Actor::AtoS(R_POINT *screen, const R_POINT *actor) { +int Actor::AtoS(Point *screen, const Point *actor) { screen->x = (actor->x / R_ACTOR_LMULT); screen->y = (actor->y / R_ACTOR_LMULT); return R_SUCCESS; } -int Actor::StoA(R_POINT *actor, const R_POINT *screen) { +int Actor::StoA(Point *actor, const Point *screen) { actor->x = (screen->x * R_ACTOR_LMULT); actor->y = (screen->y * R_ACTOR_LMULT); @@ -1078,7 +1078,7 @@ static void CF_actor_del(int argc, char *argv[], void *refCon) { static void CF_actor_move(int argc, char *argv[], void *refCon) { int id; - R_POINT move_pt; + Point move_pt; if (argc < 2) return; @@ -1095,7 +1095,7 @@ static void CF_actor_move(int argc, char *argv[], void *refCon) { static void CF_actor_moverel(int argc, char *argv[], void *refCon) { int id; - R_POINT move_pt; + Point move_pt; if (argc < 3) return; diff --git a/saga/actor.h b/saga/actor.h index 210085e9c3..fd5518f021 100644 --- a/saga/actor.h +++ b/saga/actor.h @@ -95,10 +95,10 @@ struct R_WALKINTENT { int time; float slope; int x_dir; - R_POINT org; - R_POINT cur; + Point org; + Point cur; - R_POINT dst_pt; + Point dst_pt; YS_DL_LIST *nodelist; int sem_held; @@ -109,7 +109,7 @@ struct R_WALKINTENT { struct R_WALKNODE { int calc_flag; - R_POINT node_pt; + Point node_pt; }; struct R_SPEAKINTENT { @@ -133,8 +133,8 @@ struct R_ACTOR { int name_i; // Actor's index in actor name string list uint16 flags; - R_POINT a_pt; // Actor's logical coordinates - R_POINT s_pt; // Actor's screen coordinates + Point a_pt; // Actor's logical coordinates + Point s_pt; // Actor's screen coordinates int sl_rn; // Actor's sprite list res # int si_rn; // Actor's sprite index res # @@ -196,13 +196,13 @@ class Actor { int actorExists(uint16 actor_id); int drawList(); - int AtoS(R_POINT *logical, const R_POINT *actor); - int StoA(R_POINT *actor, const R_POINT *screen); + int AtoS(Point *logical, const Point *actor); + int StoA(Point *actor, const Point *screen); - int move(int index, R_POINT *move_pt); - int moveRelative(int index, R_POINT *move_pt); + int move(int index, Point *move_pt); + int moveRelative(int index, Point *move_pt); - int walkTo(int index, R_POINT *walk_pt, uint16 flags, R_SEMAPHORE *sem); + int walkTo(int index, Point *walk_pt, uint16 flags, R_SEMAPHORE *sem); int getActorIndex(uint16 actor_id); @@ -222,7 +222,7 @@ class Actor { private: int handleWalkIntent(R_ACTOR *actor, R_WALKINTENT *a_walk_int, int *complete_p, int msec); int handleSpeakIntent(R_ACTOR *actor, R_SPEAKINTENT *a_speakint, int *complete_p, int msec); - int setPathNode(R_WALKINTENT *walk_int, R_POINT *src_pt, R_POINT *dst_pt, R_SEMAPHORE *sem); + int setPathNode(R_WALKINTENT *walk_int, Point *src_pt, Point *dst_pt, R_SEMAPHORE *sem); int loadActorSpriteIndex(R_ACTOR *actor, int si_rn, int *last_frame_p); SagaEngine *_vm; diff --git a/saga/console.cpp b/saga/console.cpp index 0a98db90c6..3e3b040957 100644 --- a/saga/console.cpp +++ b/saga/console.cpp @@ -191,7 +191,7 @@ int Console::draw(R_SURFACE *ds) { R_CONSOLE_LINE *start_ptr; int txt_fgcolor; int txt_shcolor; - R_RECT fill_rect; + Rect fill_rect; int i; if (!_active) { diff --git a/saga/events.cpp b/saga/events.cpp index b4ce6e43d1..4bf1c354d3 100644 --- a/saga/events.cpp +++ b/saga/events.cpp @@ -316,7 +316,7 @@ int Events::handleOneShot(R_EVENT *event) { case R_BG_EVENT: { R_BUFFER_INFO rbuf_info; - R_POINT bg_pt; + Point bg_pt; if (_vm->_scene->getMode() == R_SCENE_MODE_NORMAL) { diff --git a/saga/gfx.cpp b/saga/gfx.cpp index 7de7bc8242..78712dc485 100644 --- a/saga/gfx.cpp +++ b/saga/gfx.cpp @@ -75,7 +75,7 @@ int Gfx::drawPalette(R_SURFACE *dst_s) { int y; int color = 0; - R_RECT pal_rect; + Rect pal_rect; for (y = 0; y < 16; y++) { pal_rect.top = (y * 8) + 4; @@ -128,7 +128,7 @@ int Gfx::simpleBlit(R_SURFACE *dst_s, R_SURFACE *src_s) { // - The surface must match the logical dimensions of the buffer exactly. // - Returns R_FAILURE on error int Gfx::bufToSurface(R_SURFACE *ds, const byte *src, int src_w, int src_h, - R_RECT *src_rect, R_POINT *dst_pt) { + Rect *src_rect, Point *dst_pt) { const byte *read_p; byte *write_p; @@ -254,7 +254,7 @@ int Gfx::bufToSurface(R_SURFACE *ds, const byte *src, int src_w, int src_h, } int Gfx::bufToBuffer(byte *dst_buf, int dst_w, int dst_h, const byte *src, - int src_w, int src_h, R_RECT *src_rect, R_POINT *dst_pt) { + int src_w, int src_h, Rect *src_rect, Point *dst_pt) { const byte *read_p; byte *write_p; int row; @@ -375,7 +375,7 @@ int Gfx::bufToBuffer(byte *dst_buf, int dst_w, int dst_h, const byte *src, // Fills a rectangle in the surface ds from point 'p1' to point 'p2' using // the specified color. -int Gfx::drawRect(R_SURFACE *ds, R_RECT *dst_rect, int color) { +int Gfx::drawRect(R_SURFACE *ds, Rect *dst_rect, int color) { byte *write_p; int w; @@ -415,7 +415,7 @@ int Gfx::drawRect(R_SURFACE *ds, R_RECT *dst_rect, int color) { return R_SUCCESS; } -int Gfx::drawFrame(R_SURFACE *ds, R_POINT *p1, R_POINT *p2, int color) { +int Gfx::drawFrame(R_SURFACE *ds, Point *p1, Point *p2, int color) { int left, top, right, bottom; int min_x; @@ -423,10 +423,10 @@ int Gfx::drawFrame(R_SURFACE *ds, R_POINT *p1, R_POINT *p2, int color) { int min_y; int max_y; - R_POINT n_p1; /* 1 .. 2 */ - R_POINT n_p2; /* . . */ - R_POINT n_p3; /* . . */ - R_POINT n_p4; /* 4 .. 3 */ + Point n_p1; /* 1 .. 2 */ + Point n_p2; /* . . */ + Point n_p3; /* . . */ + Point n_p4; /* 4 .. 3 */ assert((ds != NULL) && (p1 != NULL) && (p2 != NULL)); @@ -457,8 +457,8 @@ int Gfx::drawFrame(R_SURFACE *ds, R_POINT *p1, R_POINT *p2, int color) { return R_SUCCESS; } -int Gfx::drawPolyLine(R_SURFACE *ds, R_POINT *pts, int pt_ct, int draw_color) { - R_POINT *first_pt = pts; +int Gfx::drawPolyLine(R_SURFACE *ds, Point *pts, int pt_ct, int draw_color) { + Point *first_pt = pts; int last_i = 1; int i; @@ -562,10 +562,10 @@ int Gfx::getClipInfo(R_CLIPINFO *clipinfo) { return R_SUCCESS; } -int Gfx::clipLine(R_SURFACE *ds, const R_POINT *src_p1, const R_POINT *src_p2, - R_POINT *dst_p1, R_POINT *dst_p2) { - const R_POINT *n_p1; - const R_POINT *n_p2; +int Gfx::clipLine(R_SURFACE *ds, const Point *src_p1, const Point *src_p2, + Point *dst_p1, Point *dst_p2) { + const Point *n_p1; + const Point *n_p2; Common::Rect clip; int left, top, right, bottom; @@ -634,7 +634,7 @@ int Gfx::clipLine(R_SURFACE *ds, const R_POINT *src_p1, const R_POINT *src_p2, // Coriolis Group Books, 1997 // // Performs no clipping -void Gfx::drawLine(R_SURFACE *ds, R_POINT *p1, R_POINT *p2, int color) { +void Gfx::drawLine(R_SURFACE *ds, Point *p1, Point *p2, int color) { byte *write_p; int clip_result; int temp; @@ -646,7 +646,7 @@ void Gfx::drawLine(R_SURFACE *ds, R_POINT *p1, R_POINT *p2, int color) { int init_run; int run; int end_run; - R_POINT clip_p1, clip_p2; + Point clip_p1, clip_p2; int left, top, right, bottom; int i, k; diff --git a/saga/gfx.h b/saga/gfx.h index f4399a2000..24247a3507 100644 --- a/saga/gfx.h +++ b/saga/gfx.h @@ -28,14 +28,14 @@ namespace Saga { -typedef Common::Point R_POINT; -typedef Common::Rect R_RECT; +using Common::Point; +using Common::Rect; struct R_CLIPINFO { // input members - const R_RECT *src_rect; - const R_RECT *dst_rect; - const R_POINT *dst_pt; + const Rect *src_rect; + const Rect *dst_rect; + const Point *dst_pt; // output members int nodraw; @@ -65,7 +65,7 @@ struct R_SURFACE { int buf_w; int buf_h; int buf_pitch; - R_RECT clip_rect; + Rect clip_rect; }; #define R_PAL_ENTRIES 256 @@ -88,15 +88,15 @@ class Gfx { public: int simpleBlit(R_SURFACE *dst_s, R_SURFACE *src_s); int drawPalette(R_SURFACE *dst_s); - int bufToSurface(R_SURFACE *ds, const byte *src, int src_w, int src_h, R_RECT *src_rect, R_POINT *dst_pt); + int bufToSurface(R_SURFACE *ds, const byte *src, int src_w, int src_h, Rect *src_rect, Point *dst_pt); int bufToBuffer(byte * dst_buf, int dst_w, int dst_h, const byte *src, - int src_w, int src_h, R_RECT *src_rect, R_POINT *dst_pt); - int drawRect(R_SURFACE *ds, R_RECT *dst_rect, int color); - int drawFrame(R_SURFACE *ds, R_POINT *p1, R_POINT *p2, int color); - int drawPolyLine(R_SURFACE *ds, R_POINT *pts, int pt_ct, int draw_color); + int src_w, int src_h, Rect *src_rect, Point *dst_pt); + int drawRect(R_SURFACE *ds, Rect *dst_rect, int color); + int drawFrame(R_SURFACE *ds, Point *p1, Point *p2, int color); + int drawPolyLine(R_SURFACE *ds, Point *pts, int pt_ct, int draw_color); int getClipInfo(R_CLIPINFO *clipinfo); - int clipLine(R_SURFACE *ds, const R_POINT *src_p1, const R_POINT *src_p2, R_POINT *dst_p1, R_POINT *dst_p2); - void drawLine(R_SURFACE * ds, R_POINT *p1, R_POINT *p2, int color); + int clipLine(R_SURFACE *ds, const Point *src_p1, const Point *src_p2, Point *dst_p1, Point *dst_p2); + void drawLine(R_SURFACE * ds, Point *p1, Point *p2, int color); Gfx(OSystem *system, int width, int height); R_SURFACE *getBackBuffer(); diff --git a/saga/input.cpp b/saga/input.cpp index 62ce7e4103..c9d9199ff5 100644 --- a/saga/input.cpp +++ b/saga/input.cpp @@ -35,7 +35,7 @@ namespace Saga { int SagaEngine::processInput() { OSystem::Event event; - R_POINT imouse_pt; + Point imouse_pt; while (g_system->pollEvent(event)) { int in_char; @@ -129,7 +129,7 @@ int SagaEngine::processInput() { return R_SUCCESS; } -R_POINT SagaEngine::getMousePos() { +Point SagaEngine::getMousePos() { return _mousePos; } diff --git a/saga/interface.cpp b/saga/interface.cpp index ab438458d0..72d38dc5fa 100644 --- a/saga/interface.cpp +++ b/saga/interface.cpp @@ -251,8 +251,8 @@ int Interface::draw() { int lportrait_x; int lportrait_y; - R_RECT rect; - R_POINT origin; + Rect rect; + Point origin; back_buf = _vm->_gfx->getBackBuffer(); @@ -302,7 +302,7 @@ int Interface::draw() { return R_SUCCESS; } -int Interface::update(R_POINT *imouse_pt, int update_flag) { +int Interface::update(Point *imouse_pt, int update_flag) { R_GAME_DISPLAYINFO g_di; R_SURFACE *back_buf; @@ -347,7 +347,7 @@ int Interface::update(R_POINT *imouse_pt, int update_flag) { int Interface::drawStatusBar(R_SURFACE *ds) { R_GAME_DISPLAYINFO g_di; - R_RECT rect; + Rect rect; int string_w; @@ -370,7 +370,7 @@ int Interface::drawStatusBar(R_SURFACE *ds) { return R_SUCCESS; } -int Interface::handleCommandClick(R_SURFACE *ds, R_POINT *imouse_pt) { +int Interface::handleCommandClick(R_SURFACE *ds, Point *imouse_pt) { int hit_button; int ibutton_num; @@ -421,7 +421,7 @@ int Interface::handleCommandClick(R_SURFACE *ds, R_POINT *imouse_pt) { return R_SUCCESS; } -int Interface::handleCommandUpdate(R_SURFACE *ds, R_POINT *imouse_pt) { +int Interface::handleCommandUpdate(R_SURFACE *ds, Point *imouse_pt) { int hit_button; int ibutton_num; @@ -475,13 +475,13 @@ int Interface::handleCommandUpdate(R_SURFACE *ds, R_POINT *imouse_pt) { return R_SUCCESS; } -int Interface::handlePlayfieldClick(R_SURFACE *ds, R_POINT *imouse_pt) { +int Interface::handlePlayfieldClick(R_SURFACE *ds, Point *imouse_pt) { int hit_object; int object_num; uint16 object_flags = 0; int script_num; - R_POINT iactor_pt; + Point iactor_pt; hit_object = _vm->_objectMap->hitTest(imouse_pt, &object_num); @@ -516,7 +516,7 @@ int Interface::handlePlayfieldClick(R_SURFACE *ds, R_POINT *imouse_pt) { return R_SUCCESS; } -int Interface::handlePlayfieldUpdate(R_SURFACE *ds, R_POINT *imouse_pt) { +int Interface::handlePlayfieldUpdate(R_SURFACE *ds, Point *imouse_pt) { const char *object_name; int object_num; uint16 object_flags = 0; @@ -556,7 +556,7 @@ int Interface::handlePlayfieldUpdate(R_SURFACE *ds, R_POINT *imouse_pt) { return R_SUCCESS; } -int Interface::hitTest(R_POINT *imouse_pt, int *ibutton) { +int Interface::hitTest(Point *imouse_pt, int *ibutton) { R_INTERFACE_BUTTON *buttons; int nbuttons; diff --git a/saga/interface.h b/saga/interface.h index 7ce3163735..59915055df 100644 --- a/saga/interface.h +++ b/saga/interface.h @@ -160,16 +160,16 @@ class Interface { int deactivate(); int setStatusText(const char *new_txt); int draw(); - int update(R_POINT *imouse_pt, int update_flag); + int update(Point *imouse_pt, int update_flag); private: - int hitTest(R_POINT *imouse_pt, int *ibutton); + int hitTest(Point *imouse_pt, int *ibutton); int drawStatusBar(R_SURFACE *ds); - int handleCommandUpdate(R_SURFACE *ds, R_POINT *imouse_pt); - int handleCommandClick(R_SURFACE *ds, R_POINT *imouse_pt); - int handlePlayfieldUpdate(R_SURFACE *ds, R_POINT *imouse_pt); - int handlePlayfieldClick(R_SURFACE *ds, R_POINT *imouse_pt); + int handleCommandUpdate(R_SURFACE *ds, Point *imouse_pt); + int handleCommandClick(R_SURFACE *ds, Point *imouse_pt); + int handlePlayfieldUpdate(R_SURFACE *ds, Point *imouse_pt); + int handlePlayfieldClick(R_SURFACE *ds, Point *imouse_pt); private: SagaEngine *_vm; diff --git a/saga/isomap.cpp b/saga/isomap.cpp index 6cc3dc6a79..ccb2398bbb 100644 --- a/saga/isomap.cpp +++ b/saga/isomap.cpp @@ -133,7 +133,7 @@ int IsoMap::loadMetamap(const byte *mm_res_p, size_t mm_res_len) { int IsoMap::draw(R_SURFACE *dst_s) { R_GAME_DISPLAYINFO disp_info; GAME_GetDisplayInfo(&disp_info); - R_RECT iso_rect(disp_info.logical_w - 1, disp_info.scene_h - 1); + Rect iso_rect(disp_info.logical_w - 1, disp_info.scene_h - 1); _gfx->drawRect(dst_s, &iso_rect, 0); drawMetamap(dst_s, -1000, -500); diff --git a/saga/objectmap.cpp b/saga/objectmap.cpp index 021cff534d..1880e24c0a 100644 --- a/saga/objectmap.cpp +++ b/saga/objectmap.cpp @@ -69,7 +69,7 @@ ObjectMap::~ObjectMap() { int ObjectMap::load(const byte *om_res, size_t om_res_len) { R_OBJECTMAP_ENTRY *object_map; R_CLICKAREA *clickarea; - R_POINT *point; + Point *point; int i, k, m; @@ -115,7 +115,7 @@ int ObjectMap::load(const byte *om_res, size_t om_res_len) { clickarea->n_points = readS.readUint16LE(); assert(clickarea->n_points != 0); - clickarea->points = (R_POINT *)malloc(clickarea->n_points * sizeof *(clickarea->points)); + clickarea->points = (Point *)malloc(clickarea->n_points * sizeof *(clickarea->points)); if (clickarea->points == NULL) { warning("Error: Memory allocation failed"); return R_MEM; @@ -287,7 +287,7 @@ int ObjectMap::getEPNum(int object, int *ep_num) { // Uses Gfx::drawLine to display all clickareas for each object in the // currently loaded object map resource. -int ObjectMap::draw(R_SURFACE *ds, R_POINT *imouse_pt, int color, int color2) { +int ObjectMap::draw(R_SURFACE *ds, Point *imouse_pt, int color, int color2) { R_OBJECTMAP_ENTRY *object_map; R_CLICKAREA *clickarea; @@ -348,14 +348,14 @@ int ObjectMap::draw(R_SURFACE *ds, R_POINT *imouse_pt, int color, int color2) { return R_SUCCESS; } -static bool MATH_HitTestPoly(R_POINT *points, unsigned int npoints, R_POINT test_point) { +static bool MATH_HitTestPoly(Point *points, unsigned int npoints, Point test_point) { int yflag0; int yflag1; bool inside_flag = false; unsigned int pt; - R_POINT *vtx0 = &points[npoints - 1]; - R_POINT *vtx1 = &points[0]; + Point *vtx0 = &points[npoints - 1]; + Point *vtx1 = &points[0]; yflag0 = (vtx0->y >= test_point.y); for (pt = 0; pt < npoints; pt++, vtx1++) { @@ -373,11 +373,11 @@ static bool MATH_HitTestPoly(R_POINT *points, unsigned int npoints, R_POINT test return inside_flag; } -int ObjectMap::hitTest(R_POINT * imouse_pt, int *object_num) { - R_POINT imouse; +int ObjectMap::hitTest(Point * imouse_pt, int *object_num) { + Point imouse; R_OBJECTMAP_ENTRY *object_map; R_CLICKAREA *clickarea; - R_POINT *points; + Point *points; int n_points; int i, k; diff --git a/saga/objectmap.h b/saga/objectmap.h index 3205809c28..3a5b31823d 100644 --- a/saga/objectmap.h +++ b/saga/objectmap.h @@ -34,7 +34,7 @@ enum R_OBJECT_FLAGS { struct R_CLICKAREA { int n_points; - R_POINT *points; + Point *points; }; struct R_OBJECTMAP_ENTRY { @@ -62,8 +62,8 @@ public: int getName(int object, const char **name); int getFlags(int object, uint16 *flags); int getEPNum(int object, int *ep_num); - int draw(R_SURFACE *draw_surface, R_POINT *imouse_pt, int color, int color2); - int hitTest(R_POINT *imouse_pt, int *object_num); + int draw(R_SURFACE *draw_surface, Point *imouse_pt, int color, int color2); + int hitTest(Point *imouse_pt, int *object_num); void objectInfo(int argc, char *argv[]); private: int _initialized; diff --git a/saga/render.cpp b/saga/render.cpp index 0193a2642b..b28b1f384e 100644 --- a/saga/render.cpp +++ b/saga/render.cpp @@ -110,10 +110,10 @@ int Render::drawScene() { R_GAME_DISPLAYINFO disp_info; R_SCENE_INFO scene_info; SCENE_BGINFO bg_info; - R_POINT bg_pt; + Point bg_pt; char txt_buf[20]; int fps_width; - R_POINT mouse_pt; + Point mouse_pt; if (!_initialized) { return R_FAILURE; diff --git a/saga/saga.h b/saga/saga.h index 0db43dcca8..6aa4aabe34 100644 --- a/saga/saga.h +++ b/saga/saga.h @@ -143,10 +143,10 @@ public: double percent); int processInput(void); - R_POINT getMousePos(); + Point getMousePos(); private: - R_POINT _mousePos; + Point _mousePos; }; // FIXME: Global var. We use it until everything will be turned into objects diff --git a/saga/scene.cpp b/saga/scene.cpp index 48dab518e5..8250f18cb0 100644 --- a/saga/scene.cpp +++ b/saga/scene.cpp @@ -774,7 +774,7 @@ int Scene::processSceneResources() { int Scene::draw(R_SURFACE *dst_s) { R_GAME_DISPLAYINFO disp_info; R_BUFFER_INFO buf_info; - R_POINT bg_pt; + Point bg_pt; assert(_initialized); diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp index bb45c72048..975b3f5926 100644 --- a/saga/sfuncs.cpp +++ b/saga/sfuncs.cpp @@ -186,7 +186,7 @@ int Script::SF_actorWalkTo(R_SCRIPTFUNC_PARAMS) { SDataWord_T y_parm; int actor_id; int actor_idx; - R_POINT pt; + Point pt; actor_parm = thread->pop(); x_parm = thread->pop(); @@ -346,7 +346,7 @@ int Script::SF_actorWalkToAsync(R_SCRIPTFUNC_PARAMS) { SDataWord_T y_parm; int actor_id; int actor_idx; - R_POINT pt; + Point pt; actor_parm = thread->pop(); x_parm = thread->pop(); @@ -387,7 +387,7 @@ int Script::SF_moveTo(R_SCRIPTFUNC_PARAMS) { int actor_id; int actor_idx; int result; - R_POINT pt; + Point pt; actor_parm = thread->pop(); x_parm = thread->pop(); @@ -437,7 +437,7 @@ int Script::SF_actorWalk(R_SCRIPTFUNC_PARAMS) { SDataWord_T y_parm; SDataWord_T unk_parm; int actor_idx; - R_POINT pt; + Point pt; actor_parm = thread->pop(); x_parm = thread->pop(); @@ -603,7 +603,7 @@ int Script::SF_placeActor(R_SCRIPTFUNC_PARAMS) { int actor_idx; int action_state; int result; - R_POINT pt; + Point pt; actor_parm = thread->pop(); x_parm = thread->pop(); diff --git a/saga/sprite.cpp b/saga/sprite.cpp index 3ded76cd57..497f7c2205 100644 --- a/saga/sprite.cpp +++ b/saga/sprite.cpp @@ -267,9 +267,9 @@ int Sprite::drawOccluded(R_SURFACE *ds, R_SPRITELIST *sprite_list, int sprite_nu int e_slope; // Clipinfo variables - R_POINT spr_pt; - R_RECT spr_src_rect; - R_RECT spr_dst_rect; + Point spr_pt; + Rect spr_src_rect; + Rect spr_dst_rect; R_CLIPINFO ci; // BG mask variables |