mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Separate CustomEntity global positions internally
This makes it so that `CustomEntity`s, at least internally, do not use global tile position. Instead, they will use room-x and room-y coordinates, which will be separate from their x- and y- positions. This makes it much easier to deal with `CustomEntity`s, because you don't have to divide and modulo everywhere to use them. Since editorclass::add_entity and editorclass::get_entity_at expect global tile position in their arguments, I've added room-x and room-y arguments to these functions too. Of course, due to compatibility reasons, the XML files will still have to use global tile position. For the same reason, warp token destinations are still using global tile position too.
This commit is contained in:
@@ -133,11 +133,11 @@ public:
|
||||
|
||||
void show_note(const char* text);
|
||||
|
||||
void add_entity(int xp, int yp, int tp, int p1 = 0, int p2 = 0, int p3 = 0, int p4 = 0, int p5 = 320, int p6 = 240);
|
||||
void add_entity(int rx, int ry, int xp, int yp, int tp, int p1 = 0, int p2 = 0, int p3 = 0, int p4 = 0, int p5 = 320, int p6 = 240);
|
||||
|
||||
void remove_entity(int t);
|
||||
|
||||
int get_entity_at(int xp, int yp);
|
||||
int get_entity_at(int rx, int ry, int xp, int yp);
|
||||
|
||||
void set_tile(int x, int y, int t);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user