mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-31 02:14:09 +03:00
Use SDL_Point instead of rolling our own point struct
The `point` struct was a relic of ActionScript and was added because of the Flash 'point' object. However, it seems like Simon Roth didn't realize that SDL has its own point struct. With this, `Maths.h` can be un-included from a couple headers, which exposes the fact that `preloader.cpp` was relying on `Maths.h` being transitively included from `Graphics.h`.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user