diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-07-10 23:06:59 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-07-10 23:06:59 +0100 |
commit | 1ae6a63f79edd72aa39c7f7e2bca5182a68592b4 (patch) | |
tree | 5c928964bd367019bdbd76db27841211680f7f0d /src/pickup.c | |
parent | acb17f540cd8bc3a1e50ae4ab22b97620b55673b (diff) | |
download | gold-mine-run-1ae6a63f79edd72aa39c7f7e2bca5182a68592b4.tar.gz gold-mine-run-1ae6a63f79edd72aa39c7f7e2bca5182a68592b4.zip |
Draw entities in order
This makes a difference on the less powerful machines and helps avoiding
flickering.
Diffstat (limited to 'src/pickup.c')
-rw-r--r-- | src/pickup.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pickup.c b/src/pickup.c index 7036891..afc5ef2 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -109,6 +109,7 @@ static const Rect *frames_bonuses[] = void pickup_time_init(Entity *e) { + e->used = USED_BG; e->frames = (const Rect *)frames_in; e->flags = PICKUP_TIME; e->counter = MAX_TTL * 2 + (rand() % MAX_TTL); @@ -117,6 +118,7 @@ void pickup_time_init(Entity *e) void pickup_bonus_init(Entity *e) { + e->used = USED_BG; e->frames = (const Rect *)frames_in; e->flags = PICKUP_BONUS; e->counter = MAX_TTL + (rand() % MAX_TTL); @@ -125,6 +127,7 @@ void pickup_bonus_init(Entity *e) void pickup_pickaxe_init(Entity *e) { + e->used = USED_BG; e->frames = (const Rect *)frames_in; e->flags = PICKUP_PICKAXE; e->counter = MAX_TTL / 2 + (rand() % MAX_TTL); @@ -207,7 +210,7 @@ void pickup_update(Entity *e) add_pickaxe(); break; } - e->used = 0; + e->used = USED_FREE; sound_play_efx(EFX_PICKUP); } } |