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:
Misa
2023-03-29 00:18:42 -07:00
parent 98feeade02
commit 71dbe95dcb
5 changed files with 75 additions and 70 deletions

View File

@@ -10,6 +10,7 @@
class CustomEntity
{
public:
int rx, ry;
int x, y, t;
//parameters
int p1, p2, p3, p4, p5, p6;