From 8fda06e232bc80d95523472a53e54561976ab9fa Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Sat, 13 Jul 2024 13:56:58 +0200 Subject: [PATCH] =?UTF-8?q?FIX:=20El=20item=20"disco"=20no=20aparec=C3=ADa?= =?UTF-8?q?=20nunca?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/game.cpp | 2 +- source/item.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) 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