static void drawedge(PathNode* from, PathNode* to, uint32 rgb) { RenderSurface* screen = GUIApp::get_instance()->getScreen(); sint32 cx, cy, cz; GUIApp::get_instance()->getGameMapGump()->GetCameraLocation(cx, cy, cz); Pentagram::Rect d; screen->GetSurfaceDims(d); sint32 x0, y0, x1, y1; cx = from->state.x - cx; cy = from->state.y - cy; cz = from->state.z - cz; x0 = (d.w/2) + (cx - cy)/2; y0 = (d.h/2) + (cx + cy)/4 - cz*2; GUIApp::get_instance()->getGameMapGump()->GetCameraLocation(cx, cy, cz); cx = to->state.x - cx; cy = to->state.y - cy; cz = to->state.z - cz; x1 = (d.w/2) + (cx - cy)/2; y1 = (d.h/2) + (cx + cy)/4 - cz*2; screen->DrawLine32(rgb, x0, y0, x1, y1); }
static void drawbox(Item* item) { RenderSurface* screen = GUIApp::get_instance()->getScreen(); sint32 cx, cy, cz; GUIApp::get_instance()->getGameMapGump()->GetCameraLocation(cx, cy, cz); Pentagram::Rect d; screen->GetSurfaceDims(d); sint32 ix, iy, iz; item->getLocation(ix, iy, iz); sint32 xd, yd, zd; item->getFootpadWorld(xd, yd, zd); ix -= cx; iy -= cy; iz -= cz; sint32 x0,y0,x1,y1,x2,y2,x3,y3; x0 = (d.w/2) + (ix - iy)/2; y0 = (d.h/2) + (ix + iy)/4 - iz*2; x1 = (d.w/2) + (ix - iy)/2; y1 = (d.h/2) + (ix + iy)/4 - (iz+zd)*2; x2 = (d.w/2) + (ix-xd - iy)/2; y2 = (d.h/2) + (ix-xd + iy)/4 - iz*2; x3 = (d.w/2) + (ix - iy+yd)/2; y3 = (d.h/2) + (ix + iy-yd)/4 - iz*2; screen->Fill32(0xFF0000FF, x0-1, y0-1, 3, 3); screen->DrawLine32(0xFF00FF00, x0, y0, x1, y1); screen->DrawLine32(0xFF00FF00, x0, y0, x2, y2); screen->DrawLine32(0xFF00FF00, x0, y0, x3, y3); }