![]() |
Jo Engine 2026.11.6
Jo Sega Saturn Engine
|
Class of entities: its callbacks (JO_NULL: nothing to do). More...
#include <entity.h>
Data Fields | |
| const char * | name |
| unsigned int | data_size |
| void(*) | spawn (jo_entity *const entity) |
| The entity is created (its properties can be read). | |
| void(*) | update (jo_entity *const entity, const int elapsed) |
| Each frame of the game, while the entity is awake (near the player or entity->timer > 0). | |
| bool(*) | action (jo_entity *const entity, const int action, const int param, jo_entity *const source) |
| An action is received. | |
| void(*) | death (jo_entity *const entity, jo_entity *const source) |
| The health reached 0 (before the event DEATH). | |
| void(*) | draw (jo_entity *const entity) |
| Draw the entity (the camera matrix is the current matrix), JO_NULL: its model at its position. | |
| void(*) | draw_slave (jo_entity *const entity) |
| Draw the entity on the slave CPU (see jo_entities_draw_slave(): the slave 3D calls, jo_actor_draw_slave()), JO_NULL: the master CPU draws it (its draw callback). An entity without draw callback is drawn by both CPUs. | |
| void(*) | tint (jo_entity *const entity, int *const r, int *const g, int *const b) |
| The tint of the entity (the light of the lamps on it, see jo_3d_point_lights_sample()) before it is drawn: the class changes it (a character hit: red), JO_NULL: the light of the lamps. | |
Class of entities: its callbacks (JO_NULL: nothing to do).
| bool(*) jo_entity_class::action(jo_entity *const entity, const int action, const int param, jo_entity *const source) |
An action is received.
| unsigned int jo_entity_class::data_size |
The health reached 0 (before the event DEATH).
| void(*) jo_entity_class::draw(jo_entity *const entity) |
Draw the entity (the camera matrix is the current matrix), JO_NULL: its model at its position.
| void(*) jo_entity_class::draw_slave(jo_entity *const entity) |
Draw the entity on the slave CPU (see jo_entities_draw_slave(): the slave 3D calls, jo_actor_draw_slave()), JO_NULL: the master CPU draws it (its draw callback). An entity without draw callback is drawn by both CPUs.
| const char* jo_entity_class::name |
| void(*) jo_entity_class::spawn(jo_entity *const entity) |
The entity is created (its properties can be read).
| void(*) jo_entity_class::tint(jo_entity *const entity, int *const r, int *const g, int *const b) |
The tint of the entity (the light of the lamps on it, see jo_3d_point_lights_sample()) before it is drawn: the class changes it (a character hit: red), JO_NULL: the light of the lamps.
| void(*) jo_entity_class::update(jo_entity *const entity, const int elapsed) |
Each frame of the game, while the entity is awake (near the player or entity->timer > 0).
| elapsed | Time since the last update (milliseconds) |