Skip to content

Commit

Permalink
Fix emote bubbles to always appear above actors
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismaltby committed May 17, 2019
1 parent db22f65 commit 1d22af9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions appData/src/gb/include/Scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
#define ACTOR_HALF_WIDTH 8
#define ACTOR_MOVE_ENABLED 0x80
#define ACTOR_NOCLIP 0x40
#define ACTOR_SPRITE_OFFSET 2

#define BUBBLE_SPRITE_LEFT 38
#define BUBBLE_SPRITE_RIGHT 39
#define BUBBLE_SPRITE_LEFT 0
#define BUBBLE_SPRITE_RIGHT 1
#define BUBBLE_ANIMATION_FRAMES 15
#define BUBBLE_TOTAL_FRAMES 60

Expand Down
6 changes: 3 additions & 3 deletions appData/src/gb/src/Scene_b.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ void SceneRenderActors_b()

for (i = 0; i != scene_num_actors; ++i)
{
s = MUL_2(i);
s = MUL_2(i) + ACTOR_SPRITE_OFFSET;
x = MUL_4(ACTOR_SPRITE(ptr) + ACTOR_FRAME(ptr) + ACTOR_FRAME_OFFSET(ptr));
if (ACTOR_FLIP(ptr))
{
Expand All @@ -865,7 +865,7 @@ void SceneRenderActors_b()

for (i = 0; i != scene_num_actors; ++i)
{
s = MUL_2(i);
s = MUL_2(i) + ACTOR_SPRITE_OFFSET;
x = ACTOR_X(ptr) - SCX_REG;
y = ACTOR_Y(ptr) - SCY_REG;

Expand All @@ -887,7 +887,7 @@ void SceneRenderActor_b(UBYTE i)
{
UBYTE s, flip, frame, fo;

s = MUL_2(i);
s = MUL_2(i) + ACTOR_SPRITE_OFFSET;
fo = 0;

flip = actors[i].flip;
Expand Down

0 comments on commit 1d22af9

Please sign in to comment.