Jo Engine  2024.04.28
Jo Sega Saturn Engine
effects.h
Go to the documentation of this file.
1 /*
2 ** Jo Sega Saturn Engine
3 ** Copyright (c) 2012-2024, 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 */
35 #ifndef __JO_EFFECTS_H__
36 # define __JO_EFFECTS_H__
37 
38 #ifdef JO_COMPILE_WITH_EFFECTS_SUPPORT
39 
40 /*
41 ██╗ ██╗ ██████╗ ███╗ ███╗██╗███╗ ██╗ ██████╗ ██╗ █████╗ ███████╗███████╗██████╗
42 ██║ ██║██╔═══██╗████╗ ████║██║████╗ ██║██╔════╝ ██║ ██╔══██╗██╔════╝██╔════╝██╔══██╗
43 ███████║██║ ██║██╔████╔██║██║██╔██╗ ██║██║ ███╗ ██║ ███████║███████╗█████╗ ██████╔╝
44 ██╔══██║██║ ██║██║╚██╔╝██║██║██║╚██╗██║██║ ██║ ██║ ██╔══██║╚════██║██╔══╝ ██╔══██╗
45 ██║ ██║╚██████╔╝██║ ╚═╝ ██║██║██║ ╚████║╚██████╔╝ ███████╗██║ ██║███████║███████╗██║ ██║
46 ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝
47 */
48 
51 typedef struct
52 {
63  int sprite_id;
66 
75 void jo_init_homing_laser(jo_homing_laser * const homing_laser, const int sprite_id, const unsigned short thickness,
76  const int z, const unsigned short nb_sections);
77 
82 void jo_draw_homing_laser(jo_homing_laser * const homing_laser);
83 
84 #endif /* !JO_COMPILE_WITH_EFFECTS_SUPPORT */
85 
86 #endif /* !__JO_EFFECTS_H__ */
87 
88 /*
89 ** END OF FILE
90 */
jo_homing_laser::target
jo_vector_fixed target
Definition: effects.h:58
jo_homing_laser::use_intermediate_point_b
bool use_intermediate_point_b
Definition: effects.h:56
jo_homing_laser::section_step
jo_fixed section_step
Definition: effects.h:62
jo_homing_laser::length
jo_fixed length
Definition: effects.h:59
jo_homing_laser::source
jo_vector_fixed source
Definition: effects.h:53
jo_homing_laser::horizontal_thickness
jo_fixed horizontal_thickness
Definition: effects.h:60
jo_homing_laser::center_sprites_according_to_thickness
bool center_sprites_according_to_thickness
Definition: effects.h:64
jo_homing_laser::use_intermediate_point_a
bool use_intermediate_point_a
Definition: effects.h:54
jo_homing_laser
Homing laser effect definition.
Definition: effects.h:52
jo_fixed
int jo_fixed
Fixed point Q16.16 number.
Definition: types.h:49
jo_vector_fixed
Vector for 3D computation using fixed number.
Definition: types.h:150
jo_homing_laser::intermediate_point_b
jo_vector_fixed intermediate_point_b
Definition: effects.h:57
jo_homing_laser::intermediate_point_a
jo_vector_fixed intermediate_point_a
Definition: effects.h:55
jo_homing_laser::vertical_thickness
jo_fixed vertical_thickness
Definition: effects.h:61
jo_init_homing_laser
void jo_init_homing_laser(jo_homing_laser *const homing_laser, const int sprite_id, const unsigned short thickness, const int z, const unsigned short nb_sections)
Init jo_homing_laser struct.
jo_homing_laser::sprite_id
int sprite_id
Definition: effects.h:63
jo_draw_homing_laser
void jo_draw_homing_laser(jo_homing_laser *const homing_laser)
Draw homing laser effect.