![]() |
Jo Engine
2024.04.28
Jo Sega Saturn Engine
|
Jo Engine MAP file (sprite map) More...
Go to the source code of this file.
Macros | |
| #define | JO_MAP_NO_COLLISION |
| Value returned by jo_map_hitbox_detection_custom_boundaries();. More... | |
Functions | |
| int | jo_map_per_pixel_vertical_collision (const unsigned int layer, int x, int y, unsigned char *attribute) |
| Method to get vertical distance between our point (x, y) and the surface of the map (example: hill) More... | |
| int | jo_map_hitbox_detection_custom_boundaries (const unsigned int layer, const int x, const int y, const int w, const int h) |
| Fast method to get if a square intersects with the map (HitBox processing) based on screen coord. More... | |
| bool | jo_map_load_from_file (const unsigned int layer, const short depth, const char *const sub_dir, const char *const filename) |
| Load a sprite map on a specific layer using MAP file format. More... | |
| bool | jo_map_create (const unsigned int layer, const unsigned short max_tile_count, const short depth) |
| Create a new sprite map. More... | |
| void | jo_map_add_tile (const unsigned int layer, const short x, const short y, const unsigned char sprite_id, const unsigned char attribute) |
| Add a tile on the specific layer. More... | |
| void | jo_map_add_animated_tile (const unsigned int layer, const short x, const short y, const unsigned char anim_id, const unsigned char attribute) |
| Add an animated tile on the specific layer. More... | |
| void | jo_map_free (const unsigned int layer) |
| Destroy the specific layer. More... | |
| void | jo_map_draw (const unsigned int layer, const short screen_x, const short screen_y) |
| Display the specific layer. More... | |
| void | jo_map_draw_background (const unsigned int layer, const short x, const short y) |
| Draw the specific layer on the background (NBG1) More... | |
| void | jo_map_move_tiles_by_attribute (const unsigned int layer, const unsigned char attribute_filter, const short incr_x, const short incr_y) |
| Move specific tiles by their attributes. More... | |
| void | jo_map_3d_draw (const unsigned int layer, const int x, const int y, const int z) |
Jo Engine MAP file (sprite map)
| #define JO_MAP_NO_COLLISION |
Value returned by jo_map_hitbox_detection_custom_boundaries();.
| void jo_map_3d_draw | ( | const unsigned int | layer, |
| const int | x, | ||
| const int | y, | ||
| const int | z | ||
| ) |
| void jo_map_add_animated_tile | ( | const unsigned int | layer, |
| const short | x, | ||
| const short | y, | ||
| const unsigned char | anim_id, | ||
| const unsigned char | attribute | ||
| ) |
Add an animated tile on the specific layer.
| layer | layer level (between 0 and JO_MAP_MAX_LAYER) |
| x | horizontal position on the map |
| y | vertical position on the map |
| anim_id | Animation ID |
| attribute | User attribute (it's for you) |
| void jo_map_add_tile | ( | const unsigned int | layer, |
| const short | x, | ||
| const short | y, | ||
| const unsigned char | sprite_id, | ||
| const unsigned char | attribute | ||
| ) |
Add a tile on the specific layer.
| layer | layer level (between 0 and JO_MAP_MAX_LAYER) |
| x | horizontal position on the map |
| y | vertical position on the map |
| sprite_id | Sprite ID |
| attribute | User attribute (it's for you) |
| bool jo_map_create | ( | const unsigned int | layer, |
| const unsigned short | max_tile_count, | ||
| const short | depth | ||
| ) |
Create a new sprite map.
| layer | layer level (between 0 and JO_MAP_MAX_LAYER) |
| max_tile_count | Maximum tile count in the entire map |
| depth | Z index (ex 500) |
| void jo_map_draw | ( | const unsigned int | layer, |
| const short | screen_x, | ||
| const short | screen_y | ||
| ) |
Display the specific layer.
| layer | layer level (between 0 and JO_MAP_MAX_LAYER) |
| screen_x | relative horizontal position between the screen and the map |
| screen_y | relative vertical position between the screen and the map |
| void jo_map_draw_background | ( | const unsigned int | layer, |
| const short | x, | ||
| const short | y | ||
| ) |
Draw the specific layer on the background (NBG1)
| layer | layer level (between 0 and JO_MAP_MAX_LAYER) |
| x | relative horizontal position between the background image and the map |
| y | relative vertical position between the background image and the map |
| void jo_map_free | ( | const unsigned int | layer | ) |
Destroy the specific layer.
| layer | layer level (between 0 and JO_MAP_MAX_LAYER) |
| int jo_map_hitbox_detection_custom_boundaries | ( | const unsigned int | layer, |
| const int | x, | ||
| const int | y, | ||
| const int | w, | ||
| const int | h | ||
| ) |
Fast method to get if a square intersects with the map (HitBox processing) based on screen coord.
| layer | layer level (between 0 and JO_MAP_MAX_LAYER) |
| x | Horizontal position of square (based on the screen !, so 0 is the left the screen) |
| y | Vertical position of square (based on the screen !, so 0 is the top the screen) |
| w | Width of the square |
| h | Height of the square |
| bool jo_map_load_from_file | ( | const unsigned int | layer, |
| const short | depth, | ||
| const char *const | sub_dir, | ||
| const char *const | filename | ||
| ) |
Load a sprite map on a specific layer using MAP file format.
| layer | layer level (between 0 and JO_MAP_MAX_LAYER) |
| depth | Z-index |
| sub_dir | Sub directory name (use JO_ROOT_DIR if the file is on the root directory) |
| filename | Filename (upper case and shorter as possible like "A.MAP") |
| void jo_map_move_tiles_by_attribute | ( | const unsigned int | layer, |
| const unsigned char | attribute_filter, | ||
| const short | incr_x, | ||
| const short | incr_y | ||
| ) |
Move specific tiles by their attributes.
| layer | layer level (between 0 and JO_MAP_MAX_LAYER) |
| attribute_filter | Tile attribute value (filtering) |
| incr_x | Horizontal position incrementation |
| incr_y | Vertical position incrementation |
| int jo_map_per_pixel_vertical_collision | ( | const unsigned int | layer, |
| int | x, | ||
| int | y, | ||
| unsigned char * | attribute | ||
| ) |
Method to get vertical distance between our point (x, y) and the surface of the map (example: hill)
| layer | layer level (between 0 and JO_MAP_MAX_LAYER) |
| x | Horizontal position of the point (based on the screen !, so 0 is the left the screen) |
| y | Vertical position of the point (based on the screen !, so 0 is the top the screen) |
| attribute | Tile attribute |
1.8.18