Jo Engine 2026.11.1
Jo Sega Saturn Engine
Loading...
Searching...
No Matches
glow.h
Go to the documentation of this file.
1/*
2** Jo Sega Saturn Engine
3** Copyright (c) 2012-2026, Johannes Fetz (johannesfetz@gmail.com)
4** All rights reserved.
5**
6** Redistribution and use in source and binary forms, with or without
7** modification, are permitted provided that the following conditions are met:
8** * Redistributions of source code must retain the above copyright
9** notice, this list of conditions and the following disclaimer.
10** * Redistributions in binary form must reproduce the above copyright
11** notice, this list of conditions and the following disclaimer in the
12** documentation and/or other materials provided with the distribution.
13** * Neither the name of the Johannes Fetz nor the
14** names of its contributors may be used to endorse or promote products
15** derived from this software without specific prior written permission.
16**
17** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20** DISCLAIMED. IN NO EVENT SHALL Johannes Fetz BE LIABLE FOR ANY
21** DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27*/
49
50#ifndef __JO_GLOW_H__
51# define __JO_GLOW_H__
52
53#ifdef JO_COMPILE_WITH_3D_SUPPORT
54
56# define JO_3D_GLOW_MAX (48)
57
67int jo_3d_glow_add(const jo_pos3D_fixed * const position, const unsigned char r, const unsigned char g,
68 const unsigned char b, const int radius, const int intensity);
69
74void jo_3d_glow_set_intensity(const int id, const int intensity);
75
80void jo_3d_glow_set_position(const int id, const jo_pos3D_fixed * const position);
81
88void jo_3d_glow_set_color(const int id, const unsigned char r, const unsigned char g, const unsigned char b);
89
92
98void jo_3d_glows_set_rays(const int light, const int diagonal_light);
99
104bool jo_3d_glows_enable(const bool enabled);
105
109void jo_3d_glows_set_occlusion(bool (*hit)(const jo_pos3D_fixed * const origin, const jo_pos3D_fixed * const dir,
110 const jo_fixed max_t));
111
117void jo_3d_glows_set_clip(bool (*clip)(const jo_pos3D_fixed * const position, jo_3d_rect * const rect));
118
123void jo_3d_glows_draw(const jo_pos3D_fixed * const camera);
124
125#endif /* !JO_COMPILE_WITH_3D_SUPPORT */
126
127#endif /* !__JO_GLOW_H__ */
128
129/*
130** END OF FILE
131*/
A rectangle of the screen (pixels, the edges are in it).
Definition 3d.h:1383
void jo_3d_glow_set_intensity(const int id, const int intensity)
Change the intensity of a glow (a lamp that flickers, an alarm).
void jo_3d_glows_set_occlusion(bool(*hit)(const jo_pos3D_fixed *const origin, const jo_pos3D_fixed *const dir, const jo_fixed max_t))
The walls hide the glows behind them (a ray from the camera to the lamp, a few each frame).
void jo_3d_glows_set_rays(const int light, const int diagonal_light)
The light of the rays of the glows (the star around the disc), before jo_3d_glows_enable() (its chara...
void jo_3d_glows_clear(void)
Remove all the glows.
bool jo_3d_glows_enable(const bool enabled)
Turn the glows on or off: the VDP2 layers (see the remarks of this file: the 3D planes are hidden whi...
void jo_3d_glow_set_position(const int id, const jo_pos3D_fixed *const position)
Move a glow.
int jo_3d_glow_add(const jo_pos3D_fixed *const position, const unsigned char r, const unsigned char g, const unsigned char b, const int radius, const int intensity)
Add a glow.
void jo_3d_glows_draw(const jo_pos3D_fixed *const camera)
Place the glows seen from the camera (once per frame, after the camera: its matrix is the current mat...
void jo_3d_glows_set_clip(bool(*clip)(const jo_pos3D_fixed *const position, jo_3d_rect *const rect))
The glows are seen only in a rectangle of the screen: the rectangle where the place of the lamp is se...
void jo_3d_glow_set_color(const int id, const unsigned char r, const unsigned char g, const unsigned char b)
Change the color of a glow.
int jo_fixed
Fixed point Q16.16 number.
Definition types.h:48
3D position using fixed numbers
Definition types.h:92