start turret
This commit is contained in:
@@ -30,7 +30,9 @@ SDL_Color breakingBarColor = {128, 128, 0, 255};
|
||||
|
||||
void setActivePlayerSlot(Player *plr, ItemType activeSlotIndex) {
|
||||
activeSlotIndex = activeSlotIndex % itemRegistryIndex;
|
||||
if((activeSlotIndex < tileTypeIndex || (activeSlotIndex < itemRegistryIndex && activeSlotIndex >= ITEMREGISTRY_SIZE / 2)) && activeSlotIndex > 0) {
|
||||
plr->inventory.activeSlotIndex = activeSlotIndex;
|
||||
}
|
||||
}
|
||||
|
||||
void moveActivePlayerSlot(Player *plr, bool up, bool seek) {
|
||||
@@ -174,7 +176,7 @@ void renderPlayer(Player *plr) {
|
||||
ItemType itemIndex = plr->inventory.activeSlotIndex;
|
||||
//SDL_Texture *itemTex;
|
||||
char itemStringCount[6];
|
||||
if (itemIndex < itemRegistryIndex && itemIndex > 0) {
|
||||
if ((itemIndex < tileTypeIndex || (itemIndex < itemRegistryIndex && itemIndex >= ITEMREGISTRY_SIZE / 2)) && itemIndex > 0) {
|
||||
plr->cursor.heldItemRect.x = plr->cursor.windowX;
|
||||
plr->cursor.heldItemRect.y = plr->cursor.windowY;
|
||||
//itemTex = ItemRegistry[itemIndex].textureOnBelt[plr->cursor.direction];
|
||||
|
Reference in New Issue
Block a user