Jo Engine 2026.11.1
Jo Sega Saturn Engine
Loading...
Searching...
No Matches
colors.h File Reference

Jo Engine Standard colors. More...

Go to the source code of this file.

Macros

#define JO_COLOR_INDEX_White
#define JO_COLOR_INDEX_Black
#define JO_COLOR_INDEX_Red
#define JO_COLOR_INDEX_Green
#define JO_COLOR_INDEX_Yellow
#define JO_COLOR_INDEX_Blue
#define JO_COLOR_INDEX_Purple
#define JO_COLOR_White
#define JO_COLOR_Black
#define JO_COLOR_Red
#define JO_COLOR_Green
#define JO_COLOR_Yellow
#define JO_COLOR_Blue
#define JO_COLOR_Purple
#define JO_COLOR_Cyan
#define JO_COLOR_Gray
#define JO_COLOR_DarkRed
#define JO_COLOR_DarkGreen
#define JO_COLOR_DarkYellow
#define JO_COLOR_DarkBlue
#define JO_COLOR_DarkPurple
#define JO_COLOR_DarkCyan
#define JO_COLOR_DarkGray
#define JO_COLOR_MediumRed
#define JO_COLOR_MediumGreen
#define JO_COLOR_MediumYellow
#define JO_COLOR_MediumBlue
#define JO_COLOR_MediumPurple
#define JO_COLOR_MediumCyan
#define JO_COLOR_MediumWhite
#define JO_COLOR_SemiRed
#define JO_COLOR_SemiGreen
#define JO_COLOR_SemiYellow
#define JO_COLOR_SemiBlue
#define JO_COLOR_SemiPurple
#define JO_COLOR_SemiCyan
#define JO_COLOR_Transparent
 Transparent color.
#define JO_COLOR_SATURN(C)
 Internal, you should not use this macro.
#define JO_COLOR_SATURN_RGB(R, G, B)
 Internal, you should not use this macro.
#define JO_COLOR_SATURN_MSB
 Internal, you should not use this macro.
#define JO_COLOR_SATURN_GET_R(C)
#define JO_COLOR_SATURN_GET_G(C)
#define JO_COLOR_SATURN_GET_B(C)
#define JO_COLOR_RGB(R, G, B)
 Get jo_color type from RGB additive color model.

Functions

static __jo_force_inline jo_color jo_color_mix (const jo_color a, const jo_color b, const int t)
 A color between 2 colors (each component interpolated).
void jo_set_screen_color_filter_a (const jo_scroll_screen screens, const short r, const short g, const short b)
 Set color filter A for scroll screen.
void jo_set_screen_color_filter_b (const jo_scroll_screen screens, const short r, const short g, const short b)
 Set color filter A for scroll screen.
void jo_disable_screen_color_filter (const jo_scroll_screen screens)
 Disable color filter for scroll screen.
void jo_fade_screens (const jo_scroll_screen screens, const short from, const short to, const int frames)
 Fade scroll screens: their color filter A from a level to another, a step at each VBLANK (waits for the end).
static __jo_force_inline void jo_disable_all_screen_color_filter (void)
 Disable color filter for all scroll screen.

Detailed Description

Jo Engine Standard colors.

Author
Johannes Fetz
Bug
No known bugs.

Macro Definition Documentation

◆ JO_COLOR_Black

#define JO_COLOR_Black

◆ JO_COLOR_Blue

#define JO_COLOR_Blue

◆ JO_COLOR_Cyan

#define JO_COLOR_Cyan

◆ JO_COLOR_DarkBlue

#define JO_COLOR_DarkBlue

◆ JO_COLOR_DarkCyan

#define JO_COLOR_DarkCyan

◆ JO_COLOR_DarkGray

#define JO_COLOR_DarkGray

◆ JO_COLOR_DarkGreen

#define JO_COLOR_DarkGreen

◆ JO_COLOR_DarkPurple

#define JO_COLOR_DarkPurple

◆ JO_COLOR_DarkRed

#define JO_COLOR_DarkRed

◆ JO_COLOR_DarkYellow

#define JO_COLOR_DarkYellow

◆ JO_COLOR_Gray

#define JO_COLOR_Gray

◆ JO_COLOR_Green

#define JO_COLOR_Green

◆ JO_COLOR_INDEX_Black

#define JO_COLOR_INDEX_Black

◆ JO_COLOR_INDEX_Blue

#define JO_COLOR_INDEX_Blue

◆ JO_COLOR_INDEX_Green

#define JO_COLOR_INDEX_Green

◆ JO_COLOR_INDEX_Purple

#define JO_COLOR_INDEX_Purple

◆ JO_COLOR_INDEX_Red

#define JO_COLOR_INDEX_Red

◆ JO_COLOR_INDEX_White

#define JO_COLOR_INDEX_White

◆ JO_COLOR_INDEX_Yellow

#define JO_COLOR_INDEX_Yellow

◆ JO_COLOR_MediumBlue

#define JO_COLOR_MediumBlue

◆ JO_COLOR_MediumCyan

#define JO_COLOR_MediumCyan

◆ JO_COLOR_MediumGreen

#define JO_COLOR_MediumGreen

◆ JO_COLOR_MediumPurple

#define JO_COLOR_MediumPurple

◆ JO_COLOR_MediumRed

#define JO_COLOR_MediumRed

◆ JO_COLOR_MediumWhite

#define JO_COLOR_MediumWhite

◆ JO_COLOR_MediumYellow

#define JO_COLOR_MediumYellow

◆ JO_COLOR_Purple

#define JO_COLOR_Purple

◆ JO_COLOR_Red

#define JO_COLOR_Red

◆ JO_COLOR_RGB

#define JO_COLOR_RGB ( R,
G,
B )

Get jo_color type from RGB additive color model.

Parameters
RRed [0, 255]
GGreen [0, 255]
BBlue [0, 255]
Returns
jo_color

◆ JO_COLOR_SATURN

#define JO_COLOR_SATURN ( C)

Internal, you should not use this macro.

◆ JO_COLOR_SATURN_GET_B

#define JO_COLOR_SATURN_GET_B ( C)

◆ JO_COLOR_SATURN_GET_G

#define JO_COLOR_SATURN_GET_G ( C)

◆ JO_COLOR_SATURN_GET_R

#define JO_COLOR_SATURN_GET_R ( C)

◆ JO_COLOR_SATURN_MSB

#define JO_COLOR_SATURN_MSB

Internal, you should not use this macro.

MSB of a Saturn color (RGB color flag)

◆ JO_COLOR_SATURN_RGB

#define JO_COLOR_SATURN_RGB ( R,
G,
B )

Internal, you should not use this macro.

◆ JO_COLOR_SemiBlue

#define JO_COLOR_SemiBlue

◆ JO_COLOR_SemiCyan

#define JO_COLOR_SemiCyan

◆ JO_COLOR_SemiGreen

#define JO_COLOR_SemiGreen

◆ JO_COLOR_SemiPurple

#define JO_COLOR_SemiPurple

◆ JO_COLOR_SemiRed

#define JO_COLOR_SemiRed

◆ JO_COLOR_SemiYellow

#define JO_COLOR_SemiYellow

◆ JO_COLOR_Transparent

#define JO_COLOR_Transparent

Transparent color.

◆ JO_COLOR_White

#define JO_COLOR_White

◆ JO_COLOR_Yellow

#define JO_COLOR_Yellow

Function Documentation

◆ jo_color_mix()

__jo_force_inline jo_color jo_color_mix ( const jo_color a,
const jo_color b,
const int t )
static

A color between 2 colors (each component interpolated).

Parameters
aFirst color (t = 0)
bSecond color (t = 256)
t0 to 256
Returns
jo_color

◆ jo_disable_all_screen_color_filter()

__jo_force_inline void jo_disable_all_screen_color_filter ( void )
static

Disable color filter for all scroll screen.

◆ jo_disable_screen_color_filter()

void jo_disable_screen_color_filter ( const jo_scroll_screen screens)

Disable color filter for scroll screen.

Parameters
screensScroll screens (You can pass multiple value using pipe(|). Example: JO_SPRITE_SCREEN|JO_NBG0_SCREEN)

◆ jo_fade_screens()

void jo_fade_screens ( const jo_scroll_screen screens,
const short from,
const short to,
const int frames )

Fade scroll screens: their color filter A from a level to another, a step at each VBLANK (waits for the end).

Parameters
screensScroll screens (You can pass multiple value using pipe(|). Example: JO_SPRITE_SCREEN|JO_NBG1_SCREEN)
fromFirst level (-255: black, 0: the colors as they are, 255: white)
toLast level (the color filter A stays at it: 0 then jo_disable_screen_color_filter())
framesNumber of VBLANK of the fade
Remarks
Used before jo_core_run() too (a loading screen): the VBLANK interrupt applies the registers

◆ jo_set_screen_color_filter_a()

void jo_set_screen_color_filter_a ( const jo_scroll_screen screens,
const short r,
const short g,
const short b )

Set color filter A for scroll screen.

Parameters
screensScroll screens (You can pass multiple value using pipe(|). Example: JO_SPRITE_SCREEN|JO_NBG0_SCREEN)
rRed offset value (signed 9 bits)
gGreen offset value (signed 9 bits)
bBlue offset value (signed 9 bits)

◆ jo_set_screen_color_filter_b()

void jo_set_screen_color_filter_b ( const jo_scroll_screen screens,
const short r,
const short g,
const short b )

Set color filter A for scroll screen.

Parameters
screensScroll screens (You can pass multiple value using pipe(|). Example: JO_SPRITE_SCREEN|JO_NBG0_SCREEN)
rRed offset value (signed 9 bits)
gGreen offset value (signed 9 bits)
bBlue offset value (signed 9 bits)