functions.h
changeset 536 aef4753985d3
parent 473 0da86c59e3ae
child 543 e3b43338096b
equal deleted inserted replaced
535:bd5c17ae9447 536:aef4753985d3
    35 	TILE_WRAPPED = (uint)-1
    35 	TILE_WRAPPED = (uint)-1
    36 };
    36 };
    37 
    37 
    38 bool IsValidTile(uint tile);
    38 bool IsValidTile(uint tile);
    39 
    39 
       
    40 static inline Point RemapCoords(int x, int y, int z)
       
    41 {
    40 #if !defined(NEW_ROTATION)
    42 #if !defined(NEW_ROTATION)
    41 static Point FORCEINLINE RemapCoords(int x, int y, int z) { Point pt = { (y-x)*2, y + x -z }; return pt; }
    43 	Point pt = { (y - x) * 2, y + x - z };
    42 #else
    44 #else
    43 static Point FORCEINLINE RemapCoords(int x, int y, int z) { Point pt = { (x + y)*2, x - y -z }; return pt; }
    45 	Point pt = { (x + y) * 2, x - y - z };
    44 #endif
    46 #endif
    45 
    47 	return pt;
    46 static Point FORCEINLINE RemapCoords2(int x, int y) { return RemapCoords(x, y, GetSlopeZ(x, y)); }
    48 }
       
    49 
       
    50 static inline Point RemapCoords2(int x, int y)
       
    51 {
       
    52 	return RemapCoords(x, y, GetSlopeZ(x, y));
       
    53 }
    47 
    54 
    48 /* game.c */
    55 /* game.c */
    49 byte *GetString(byte *buffr, uint16 string);
    56 byte *GetString(byte *buffr, uint16 string);
    50 void InjectDparam(int amount);
    57 void InjectDparam(int amount);
    51 
    58