diff --git a/source/game.cpp b/source/game.cpp index 7021a1f..8da5b00 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -2552,7 +2552,7 @@ Uint8 Game::dropItem() // Crea un objeto item void Game::createItem(Uint8 kind, float x, float y) { - Item *item = new Item(kind, x, y, itemTextures[kind], itemAnimations[kind], renderer); + Item *item = new Item(kind, x, y, itemTextures[kind - 1], itemAnimations[kind - 1], renderer); items.push_back(item); } diff --git a/source/item.h b/source/item.h index 925f474..487cdaf 100644 --- a/source/item.h +++ b/source/item.h @@ -8,12 +8,12 @@ #define ITEM_H // Tipos de objetos -#define ITEM_POINTS_1_DISK 0 -#define ITEM_POINTS_2_GAVINA 1 -#define ITEM_POINTS_3_PACMAR 2 -#define ITEM_CLOCK 3 -#define ITEM_COFFEE 4 -#define ITEM_COFFEE_MACHINE 5 +#define ITEM_POINTS_1_DISK 1 +#define ITEM_POINTS_2_GAVINA 2 +#define ITEM_POINTS_3_PACMAR 3 +#define ITEM_CLOCK 4 +#define ITEM_COFFEE 5 +#define ITEM_COFFEE_MACHINE 6 // Clase Item class Item