equal
deleted
inserted
replaced
1 -- Library for miscellaneous utilitiy functions |
1 -- Library for miscellaneous utilitiy functions and global helper variables |
2 |
2 |
|
3 --[[ FUNCTIONS ]] |
3 -- Check if a gear is inside a box |
4 -- Check if a gear is inside a box |
4 function gearIsInBox(gear, x, y, w, h) |
5 function gearIsInBox(gear, x, y, w, h) |
5 gx, gy = GetGearPosition(gear) |
6 gx, gy = GetGearPosition(gear) |
6 if gx >= x and gy >= y and gx <= x + w and gy <= y + h then |
7 if gx >= x and gy >= y and gx <= x + w and gy <= y + h then |
7 return true |
8 return true |
42 -- If flush is false, FlushPoints() is not called. |
43 -- If flush is false, FlushPoints() is not called. |
43 function eraseMap(flush) |
44 function eraseMap(flush) |
44 drawFullMap(true, flush) |
45 drawFullMap(true, flush) |
45 end |
46 end |
46 |
47 |
|
48 |
|
49 --[[ GLOBAL VARIABLES ]] |
|
50 |
|
51 -- Shared common land color values for land sprites. |
|
52 -- These are useful if you want to make the land type visible. |
|
53 -- To be used as tint argument of PlaceSprite. |
|
54 U_LAND_TINT_NORMAL = 0xFFFFFFFF -- tint for normal land |
|
55 U_LAND_TINT_INDESTRUCTIBLE = 0x960000FF -- tint for indestructible land |
|
56 U_LAND_TINT_ICE = 0x00FAFAFA -- tint for icy land |
|
57 U_LAND_TINT_BOUNCY = 0x00FA00FF -- tint for bouncy land |