6339f1d98f9bd9c19bdc7757c9a036dabd814b6f
[carveJwlIkooP6JGAAIwe30JlM.git] / world_gate.h
1 /*
2 * Copyright (C) 2021-2024 Mt.ZERO Software, Harry Godden - All Rights Reserved
3 */
4
5 #pragma once
6
7 #include "vg/vg_camera.h"
8 #include "world.h"
9 #include "shaders/model_gate.h"
10 #include "entity.h"
11
12 struct world_gates
13 {
14 glmesh mesh;
15 mdl_submesh sm_surface, sm_marker[4];
16 vg_camera cam;
17
18 v3f userportal_co;
19 }
20 extern world_gates;
21
22 void world_gates_init(void);
23 void gate_transform_update( ent_gate *gate );
24 int render_gate( world_instance *world, world_instance *world_inside,
25 ent_gate *gate, vg_camera *cam );
26
27 int gate_intersect( ent_gate *gate, v3f pos, v3f last );
28 u32 world_intersect_gates( world_instance *world, v3f pos, v3f last );
29
30 void ent_gate_call( world_instance *world, ent_call *call );
31 void ent_gate_get_mdl_mtx( ent_gate *gate, m4x3f mmdl );
32
33 void world_link_nonlocal_async( void *payload, u32 size );
34 void world_unlink_nonlocal( world_instance *world );
35 void render_gate_unlinked( world_instance *world,
36 ent_gate *gate, vg_camera *cam );