projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a change to rigidbody semantics
[carveJwlIkooP6JGAAIwe30JlM.git]
/
world.h
diff --git
a/world.h
b/world.h
index 41191b8462d98bf3aa1bb5d42814bb35524dde25..c99cfdc1807ca6a752c5121ce0ff71156f3f1657 100644
(file)
--- a/
world.h
+++ b/
world.h
@@
-19,6
+19,7
@@
typedef struct world_instance world_instance;
#include "bvh.h"
#include "model.h"
#include "entity.h"
#include "bvh.h"
#include "model.h"
#include "entity.h"
+#include "font.h"
#include "shaders/scene_standard.h"
#include "shaders/scene_standard_alphatest.h"
#include "shaders/scene_standard.h"
#include "shaders/scene_standard_alphatest.h"
@@
-54,16
+55,14
@@
enum geo_type
static const float k_light_cube_size = 8.0f;
static const float k_light_cube_size = 8.0f;
-struct world_instance
-{
+struct world_instance {
/* Fixed items
* -------------------------------------------------------
*/
char world_name[ 64 ];
/* Fixed items
* -------------------------------------------------------
*/
char world_name[ 64 ];
- struct
- {
+ struct{
boxf depthbounds;
int depth_computed;
boxf depthbounds;
int depth_computed;
@@
-74,8
+73,7
@@
struct world_instance
water;
/* STD140 */
water;
/* STD140 */
- struct ub_world_lighting
- {
+ struct ub_world_lighting{
v4f g_cube_min,
g_cube_inv_range;
v4f g_cube_min,
g_cube_inv_range;
@@
-138,8
+136,7
@@
struct world_instance
GLuint *textures;
u32 texture_count;
GLuint *textures;
u32 texture_count;
- struct world_surface
- {
+ struct world_surface{
mdl_material info;
mdl_submesh sm_geo,
sm_no_collide;
mdl_material info;
mdl_submesh sm_geo,
sm_no_collide;
@@
-182,11
+179,10
@@
struct world_instance
mesh_no_collide,
mesh_water;
mesh_no_collide,
mesh_water;
- r
igidbody rb_geo; /* todo.. ... */
+ r
b_object rb_geo;
};
};
-VG_STATIC struct world_global
-{
+VG_STATIC struct world_global{
/*
* Allocated as system memory
* --------------------------------------------------------------------------
/*
* Allocated as system memory
* --------------------------------------------------------------------------
@@
-205,15
+201,13
@@
VG_STATIC struct world_global
double time, rewind_from, rewind_to, last_use;
/* water rendering */
double time, rewind_from, rewind_to, last_use;
/* water rendering */
- struct
- {
+ struct{
struct framebuffer fbreflect, fbdepth;
}
water;
/* split flap display */
struct framebuffer fbreflect, fbdepth;
}
water;
/* split flap display */
- struct
- {
+ struct{
glmesh mesh_base, mesh_display;
mdl_submesh sm_base;
u32 active_route_board;
glmesh mesh_base, mesh_display;
mdl_submesh sm_base;
u32 active_route_board;
@@
-231,6
+225,26
@@
VG_STATIC struct world_global
world_instance worlds[4];
u32 world_count;
u32 active_world;
world_instance worlds[4];
u32 world_count;
u32 active_world;
+
+ /* text particles */
+ font3d font;
+
+ struct timer_text{
+ char text[8];
+ m4x3f transform;
+ ent_gate *gate;
+ ent_route *route;
+ }
+ timer_texts[4];
+ u32 timer_text_count;
+
+ struct text_particle{
+ rigidbody *rb;
+ ent_glyph *glyph;
+ }
+ text_particles[6*4];
+ u32 text_particle_count;
+
}
world_global;
}
world_global;
@@
-502,8
+516,9
@@
VG_STATIC void world_update( world_instance *world, v3f pos )
world_global.sky_target_rate,
vg.time_delta * 5.0 );
world_global.sky_target_rate,
vg.time_delta * 5.0 );
+ world_routes_update_timer_texts( world );
world_routes_update( world );
world_routes_update( world );
- world_routes_debug( world );
+
//
world_routes_debug( world );
/* ---- SFD ------------ */
/* ---- SFD ------------ */