diff --git a/desktop_version/src/Editor.cpp b/desktop_version/src/Editor.cpp index 9201e82c..87e707a0 100644 --- a/desktop_version/src/Editor.cpp +++ b/desktop_version/src/Editor.cpp @@ -610,7 +610,7 @@ void editorrender(void) // Draw entities backward to remain accurate with ingame for (int i = customentities.size() - 1; i >= 0; i--) { - point tpoint; + SDL_Point tpoint; SDL_Rect drawRect; //if() on screen @@ -928,7 +928,7 @@ void editorrender(void) if (i <= ed.currentghosts) { // We don't want all of them to show up at once :) if (ed.ghosts[i].rx != ed.levx || ed.ghosts[i].ry != ed.levy) continue; - point tpoint; + SDL_Point tpoint; tpoint.x = ed.ghosts[i].x; tpoint.y = ed.ghosts[i].y; SDL_Color ct = ed.ghosts[i].realcol; diff --git a/desktop_version/src/Entity.cpp b/desktop_version/src/Entity.cpp index 912213bd..9928e2af 100644 --- a/desktop_version/src/Entity.cpp +++ b/desktop_version/src/Entity.cpp @@ -9,6 +9,7 @@ #include "Graphics.h" #include "Localization.h" #include "Map.h" +#include "Maths.h" #include "Music.h" #include "Script.h" #include "UtilityClass.h" @@ -4777,10 +4778,10 @@ void entityclass::collisioncheck(int i, int j, bool scm /*= false*/) if (entities[i].size == 0 && (entities[j].size == 0 || entities[j].size == 12)) { //They're both sprites, so do a per pixel collision - point colpoint1; + SDL_Point colpoint1; colpoint1.x = entities[i].xp; colpoint1.y = entities[i].yp; - point colpoint2; + SDL_Point colpoint2; colpoint2.x = entities[j].xp; colpoint2.y = entities[j].yp; int drawframe1 = entities[i].collisiondrawframe; diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index e3aeb172..6d62c8af 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -13,6 +13,7 @@ #include "GraphicsUtil.h" #include "Localization.h" #include "Map.h" +#include "Maths.h" #include "Music.h" #include "RoomnameTranslator.h" #include "Screen.h" @@ -2006,7 +2007,7 @@ void Graphics::drawcoloredtile( } -bool Graphics::Hitest(SDL_Surface* surface1, point p1, SDL_Surface* surface2, point p2) +bool Graphics::Hitest(SDL_Surface* surface1, SDL_Point p1, SDL_Surface* surface2, SDL_Point p2) { //find rectangle where they intersect: @@ -2255,7 +2256,7 @@ void Graphics::drawentity(const int i, const int yoff) return; } - point tpoint; + SDL_Point tpoint; SDL_Rect drawRect; @@ -2290,7 +2291,7 @@ void Graphics::drawentity(const int i, const int yoff) draw_grid_tile(sprites, obj.entities[i].drawframe, drawRect.x, drawRect.y, 32, 32, ct); //screenwrapping! - point wrappedPoint; + SDL_Point wrappedPoint; bool wrapX = false; bool wrapY = false; diff --git a/desktop_version/src/Graphics.h b/desktop_version/src/Graphics.h index e1be7195..38d051ae 100644 --- a/desktop_version/src/Graphics.h +++ b/desktop_version/src/Graphics.h @@ -7,7 +7,6 @@ #include "Game.h" #include "GraphicsResources.h" -#include "Maths.h" #include "Textbox.h" #include "TowerBG.h" @@ -246,7 +245,7 @@ public: void renderfixedpre(void); void renderfixedpost(void); - bool Hitest(SDL_Surface* surface1, point p1, SDL_Surface* surface2, point p2); + bool Hitest(SDL_Surface* surface1, SDL_Point p1, SDL_Surface* surface2, SDL_Point p2); void drawentities(void); diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index d95237bd..ab14f37c 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -3195,7 +3195,7 @@ void teleporterinput(void) { for (size_t i = 0; i < map.teleporters.size(); i++) { - point& tele = map.teleporters[i]; + SDL_Point& tele = map.teleporters[i]; if (map.isexplored(tele.x, tele.y)) { diff --git a/desktop_version/src/Map.cpp b/desktop_version/src/Map.cpp index 3fc40b34..3889de39 100644 --- a/desktop_version/src/Map.cpp +++ b/desktop_version/src/Map.cpp @@ -10,6 +10,7 @@ #include "Graphics.h" #include "Localization.h" #include "MakeAndPlay.h" +#include "Maths.h" #include "Music.h" #include "Script.h" #include "UtilityClass.h" @@ -156,7 +157,7 @@ void mapclass::setteleporter(int x, int y) return; } - point temp; + SDL_Point temp; temp.x = x; temp.y = y; teleporters.push_back(temp); @@ -169,7 +170,7 @@ void mapclass::settrinket(int x, int y) return; } - point temp; + SDL_Point temp; temp.x = x; temp.y = y; shinytrinkets.push_back(temp); diff --git a/desktop_version/src/Map.h b/desktop_version/src/Map.h index b5b4fe10..65987b87 100644 --- a/desktop_version/src/Map.h +++ b/desktop_version/src/Map.h @@ -5,7 +5,6 @@ #include "Finalclass.h" #include "Labclass.h" -#include "Maths.h" #include "Otherlevel.h" #include "Spacestation2.h" #include "Tower.h" @@ -154,8 +153,8 @@ public: int final_colorframe, final_colorframedelay; //Teleporters and Trinkets on the map - std::vector teleporters; - std::vector shinytrinkets; + std::vector teleporters; + std::vector shinytrinkets; bool showteleporters, showtargets, showtrinkets; diff --git a/desktop_version/src/Maths.h b/desktop_version/src/Maths.h index 97c24186..c17e31e5 100644 --- a/desktop_version/src/Maths.h +++ b/desktop_version/src/Maths.h @@ -13,10 +13,4 @@ float inline fRandom(void) return ( float(rand()) / float(RAND_MAX)) ; } -struct point -{ - int x; - int y; -}; - #endif /* MATHGAME_H */ diff --git a/desktop_version/src/preloader.cpp b/desktop_version/src/preloader.cpp index 0e317107..621370dd 100644 --- a/desktop_version/src/preloader.cpp +++ b/desktop_version/src/preloader.cpp @@ -5,6 +5,7 @@ #include "GraphicsUtil.h" #include "KeyPoll.h" #include "Localization.h" +#include "Maths.h" #include "UtilityClass.h" #include "VFormat.h"