mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 01:48:08 +01:00
fix: Transferred sprite pathes to constants
This commit is contained in:
parent
412dc89336
commit
94075506f6
2 changed files with 10 additions and 6 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/07/17 14:54:36 by kcolin #+# #+# */
|
/* Created: 2025/07/17 14:54:36 by kcolin #+# #+# */
|
||||||
/* Updated: 2025/08/14 19:50:28 by tchampio ### ########.fr */
|
/* Updated: 2025/08/14 21:23:25 by tchampio ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -35,6 +35,10 @@
|
||||||
// Sprite consts
|
// Sprite consts
|
||||||
# define SPRITE_TRANPARENCY_COLOR 0xff00dc
|
# define SPRITE_TRANPARENCY_COLOR 0xff00dc
|
||||||
# define MAX_SPRITES 30
|
# define MAX_SPRITES 30
|
||||||
|
# define JUGG_TEX "ressources/juggernog.xpm"
|
||||||
|
# define REV_TEX "ressources/revive.xpm"
|
||||||
|
# define DBLTAP_TEX "ressources/doubletap.xpm"
|
||||||
|
# define MYSTERY_TEX "ressources/box.xpm"
|
||||||
|
|
||||||
# ifdef BONUS
|
# ifdef BONUS
|
||||||
# define COMPILED_TEXT "Compiled with bonuses"
|
# define COMPILED_TEXT "Compiled with bonuses"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: tchampio <tchampio@student.42lehavre.fr> +#+ +:+ +#+ */
|
/* By: tchampio <tchampio@student.42lehavre.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/08/12 15:43:19 by tchampio #+# #+# */
|
/* Created: 2025/08/12 15:43:19 by tchampio #+# #+# */
|
||||||
/* Updated: 2025/08/12 16:14:27 by tchampio ### ########.fr */
|
/* Updated: 2025/08/14 21:24:03 by tchampio ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -34,15 +34,15 @@ t_sprite *place_right_sprite(t_cub3d_data *data, char c, double x, double y)
|
||||||
t_sprite *sprite;
|
t_sprite *sprite;
|
||||||
|
|
||||||
if (c == 'M')
|
if (c == 'M')
|
||||||
sprite = create_sprite(data, "ressources/box.xpm", x + 0.5, y + 0.5);
|
sprite = create_sprite(data, MYSTERY_TEX, x + 0.5, y + 0.5);
|
||||||
if (c == 'Q')
|
if (c == 'Q')
|
||||||
sprite = create_sprite(data,
|
sprite = create_sprite(data,
|
||||||
"ressources/revive.xpm", x + 0.5, y + 0.5);
|
REV_TEX, x + 0.5, y + 0.5);
|
||||||
if (c == 'J')
|
if (c == 'J')
|
||||||
sprite = create_sprite(data,
|
sprite = create_sprite(data,
|
||||||
"ressources/juggernog.xpm", x + 0.5, y + 0.5);
|
JUGG_TEX, x + 0.5, y + 0.5);
|
||||||
if (c == 'D')
|
if (c == 'D')
|
||||||
sprite = create_sprite(data,
|
sprite = create_sprite(data,
|
||||||
"ressources/doubletap.xpm", x + 0.5, y + 0.5);
|
DBLTAP_TEX, x + 0.5, y + 0.5);
|
||||||
return (sprite);
|
return (sprite);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue