Skip to content

Commit

Permalink
Merge pull request #62 from Sinislosion/master
Browse files Browse the repository at this point in the history
pullback
  • Loading branch information
cablechords committed Feb 9, 2024
2 parents 498221c + df34e17 commit da5e20a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/Raquet.h
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,6 @@ void Raquet_DrawPoint(Palette pal, int x, int y, int alpha)
*************************
*/

// TODO: Make a new example program to showcase and test the WIP Actor system

typedef struct Actor
{
// where we are in virtual space
Expand All @@ -636,6 +634,8 @@ typedef struct Actor
int bbox_x2; // default is 0 (top)
int bbox_y1; // default is the virt width
int bbox_y2; // default is the virt width

SDL_RendererFlip flip;

} Actor;

Expand All @@ -647,6 +647,7 @@ Actor Raquet_CreateActor(Raquet_CHR tex)
act.origin.x = 0;
act.origin.y = 0;
act.angle = 0;
act.flip = SDL_FLIP_NONE;
if (tex != NULL)
{
Raquet_Point size = Raquet_SizeofCHR(tex);
Expand All @@ -665,7 +666,7 @@ Actor Raquet_CreateActor(Raquet_CHR tex)

void Raquet_DrawActor(Actor act)
{
PlaceCHR_ext(act.cur_image, act.x, act.y, act.width, act.height, act.angle, act.origin, SDL_FLIP_NONE);
PlaceCHR_ext(act.cur_image, act.x, act.y, act.width, act.height, act.angle, act.origin, act.flip);
}

int Raquet_ActorColliding(int x, int y, Actor act1, Actor act2)
Expand Down

0 comments on commit da5e20a

Please sign in to comment.