|
Jo Engine
2024.04.28
Jo Sega Saturn Engine
|
Go to the documentation of this file.
37 #ifndef __JO_BACKGROUND_H__
38 # define __JO_BACKGROUND_H__
225 #if JO_COMPILE_USING_SGL
266 # define JO_SCROLL_TABLE_SIZE JO_NBG1_SCROLL_TABLE_SIZE
static __jo_force_inline void jo_vdp2_draw_bitmap_nbg1_square(const int x, const int y, const short width, const short height, const jo_color color)
Draw a square on NBG1.
Definition: vdp2.h:315
static __jo_force_inline void jo_zoom_background(const float factor)
Zoom background.
Definition: background.h:110
static __jo_force_inline void jo_clear_background(const jo_color color)
Clear the background.
Definition: background.h:74
static __jo_force_inline void jo_vdp2_zoom_nbg1f(const float width_factor, const float height_factor)
Zoom NBG1 width and height independently.
Definition: vdp2.h:226
static __jo_force_inline void jo_draw_background_line(int x0, int y0, int x1, int y1, const jo_color color)
Draw a line using Bresenham's line algorithm.
Definition: background.h:133
int * jo_vdp2_enable_nbg1_line_scroll(void)
Enable NBG1 horizontal line scroll effect.
void jo_vdp2_set_nbg1_8bits_image(jo_img_8bits *img, int palette_id, bool vertical_flip)
Add 8 bits NBG1 image.
static __jo_force_inline void jo_background_3d_plane_b_draw(const bool use_scroll_format_matrix)
Draw plane A.
Definition: background.h:238
static __jo_force_inline void jo_disable_background_horizontal_line_scroll(void)
Disable horizontal line scroll effect.
Definition: background.h:279
static __jo_force_inline void jo_vdp2_draw_rbg0_plane_b(const bool use_scroll_format_matrix)
Draw plane A.
Definition: vdp2.h:411
static __jo_force_inline void jo_disable_background_3d_plane(jo_color background_color)
Disable 3D planes.
Definition: background.h:195
void jo_vdp2_compute_nbg1_line_scroll(unsigned short offset)
Compute NBG1 horizontal line scroll effect using specific offset.
void jo_vdp2_disable_nbg1_line_scroll(void)
Disable NBG1 horizontal line scroll effect.
void jo_set_default_background_color(const jo_color background_color)
Set default background color.
static __jo_force_inline void jo_set_background_sprite(const jo_img *const img, const unsigned short left, const unsigned short top)
Add background sprite.
Definition: background.h:66
void jo_vdp2_draw_bitmap_nbg1_line(int x0, int y0, int x1, int y1, const jo_color color)
Draw a NBG1 line using Bresenham's line algorithm.
static __jo_force_inline void jo_set_background_8bits_sprite(jo_img_8bits *img, int palette_id, bool vertical_flip)
Add 8 bits background sprite.
Definition: background.h:56
void jo_vdp2_disable_rbg0(void)
Disable 3D planes.
unsigned short jo_color
15 bits color type
Definition: types.h:42
static __jo_force_inline void jo_vdp2_move_nbg1(const int x, const int y)
Move NBG1 (scrolling)
Definition: vdp2.h:212
8 bits image struct
Definition: types.h:234
#define __jo_force_inline
force inline attribute (and prevent Doxygen prototype parsing bug)
Definition: types.h:39
static __jo_force_inline void jo_background_3d_plane_b_img(jo_img_8bits *img, int palette_id, bool repeat, bool vertical_flip)
Setup plane B.
Definition: background.h:220
static __jo_force_inline int * jo_enable_background_horizontal_line_scroll(void)
Enable horizontal line scroll effect.
Definition: background.h:272
static __jo_force_inline void jo_vdp2_draw_rbg0_plane_a(const bool use_scroll_format_matrix)
Draw plane A.
Definition: vdp2.h:403
void jo_vdp2_set_nbg1_image(const jo_img *const img, const unsigned short left, const unsigned short top)
Set NBG1 bitmap image.
static __jo_force_inline void jo_put_pixel_in_background_rgb(const int x, const int y, unsigned char r, unsigned char g, unsigned char b)
Put pixel in background using composite color.
Definition: background.h:167
void jo_vdp2_set_rbg0_plane_a_8bits_image(jo_img_8bits *img, int palette_id, bool repeat, bool vertical_flip)
Setup plane A.
static __jo_force_inline void jo_vdp2_put_pixel_bitmap_nbg1(const int x, const int y, const jo_color color)
Put pixel in NBG1 using color.
Definition: vdp2.h:328
static __jo_force_inline void jo_zoom_background2(const float width_factor, const float height_factor)
Zoom background width and height independently.
Definition: background.h:102
static __jo_force_inline void jo_draw_background_square(const int x, const int y, const short width, const short height, const jo_color color)
Draw a square on the background.
Definition: background.h:145
static __jo_force_inline void jo_background_3d_plane_a_img(jo_img_8bits *img, int palette_id, bool repeat, bool vertical_flip)
Setup plane A.
Definition: background.h:208
static __jo_force_inline void jo_put_pixel_in_background(const int x, const int y, const jo_color color)
Put pixel in background using color.
Definition: background.h:155
void jo_vdp2_clear_bitmap_nbg1(const jo_color color)
Clear NBG1 bitmap.
static __jo_force_inline void jo_enable_background_3d_plane(jo_color background_color)
Enable 3D planes.
Definition: background.h:186
static __jo_force_inline void jo_vdp2_put_pixel_bitmap_nbg1_rgb(const int x, const int y, unsigned char r, unsigned char g, unsigned char b)
Put pixel in NBG1 using composite color.
Definition: vdp2.h:340
void jo_vdp2_enable_rbg0(void)
Enable 3D planes.
15 bits image struct
Definition: types.h:226
static __jo_force_inline void jo_move_background(const int x, const int y)
Move background (scrolling)
Definition: background.h:93
static __jo_force_inline void jo_background_3d_plane_a_draw(const bool use_scroll_format_matrix)
Draw plane A.
Definition: background.h:230
static __jo_force_inline void jo_compute_background_horizontal_line_scroll(unsigned short offset)
Compute horizontal line scroll effect using specific offset.
Definition: background.h:287
void jo_vdp2_set_rbg0_plane_b_8bits_image(jo_img_8bits *img, int palette_id, bool repeat, bool vertical_flip)
Setup plane B.