OpenEnroth 73e68f7
|
Functions | |
static int | roundIntDownToBase (int i, int base) |
int | itemOffset (int widthOrHeight) |
itemOffset Calculate offsets for placing items on a grid. More... | |
int itemOffset | ( | int | dimension | ) |
itemOffset Calculate offsets for placing items on a grid.
dimension | width or height of the item |
Inventory grid have 32x32 cells. Items don't exactly fit into the grid, but are slightly smaller or larger. The function calculates offsets for the item to be centered. Calculations are the same for length and width.
|
inlinestatic |