Jo Engine  2024.04.28
Jo Sega Saturn Engine
Functions
hitbox.h File Reference

Jo Engine Hitbox and tools. More...

Go to the source code of this file.

Functions

static __jo_force_inline bool jo_hitbox_detection (const int sprite_id1, const int x1, const int y1, const int sprite_id2, const int x2, const int y2)
 Fast method to get if two sprites intersects (HitBox processing) More...
 
static __jo_force_inline bool jo_hitbox_detection_custom_boundaries (const int sprite_id1, const int x1, const int y1, const int x2, const int y2, const int w2, const int h2)
 Fast method to get if the sprite intersects with the box (HitBox processing) More...
 

Detailed Description

Jo Engine Hitbox and tools.

Author
Johannes Fetz

Function Documentation

◆ jo_hitbox_detection()

static __jo_force_inline bool jo_hitbox_detection ( const int  sprite_id1,
const int  x1,
const int  y1,
const int  sprite_id2,
const int  x2,
const int  y2 
)
static

Fast method to get if two sprites intersects (HitBox processing)

Parameters
sprite_id1Sprite Id of the first sprite
x1Horizontal position of the first sprite
y1Vertical position of the first sprite
sprite_id2Sprite Id of the second sprite
x2Horizontal position of the second sprite
y2Vertical position of the second sprite
Returns
true if sprites collides otherwise false

◆ jo_hitbox_detection_custom_boundaries()

static __jo_force_inline bool jo_hitbox_detection_custom_boundaries ( const int  sprite_id1,
const int  x1,
const int  y1,
const int  x2,
const int  y2,
const int  w2,
const int  h2 
)
static

Fast method to get if the sprite intersects with the box (HitBox processing)

Parameters
sprite_id1Sprite Id of the first sprite
x1Horizontal position of the first sprite
y1Vertical position of the first sprite
x2Horizontal position of the second box
y2Vertical position of the second box
w2Width of the second box
h2Height of the second box
Returns
true if sprites collides otherwise false