03e45685b16b2c1b3908a2039cce8508c0203939
[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
11 struct world_gates
12 {
13 glmesh mesh;
14 mdl_submesh sm_surface, sm_marker[4];
15 vg_camera cam;
16
17 v3f userportal_co;
18 }
19 extern world_gates;
20
21 void world_gates_init(void);
22 void gate_transform_update( ent_gate *gate );
23 int render_gate( world_instance *world, world_instance *world_inside,
24 ent_gate *gate, vg_camera *cam );
25
26 int gate_intersect( ent_gate *gate, v3f pos, v3f last );
27 u32 world_intersect_gates( world_instance *world, v3f pos, v3f last );
28
29 void ent_gate_call( world_instance *world, ent_call *call );
30 void ent_gate_get_mdl_mtx( ent_gate *gate, m4x3f mmdl );
31
32 void world_link_nonlocal_async( void *payload, u32 size );
33 void world_unlink_nonlocal( world_instance *world );
34 void render_gate_unlinked( world_instance *world,
35 ent_gate *gate, vg_camera *cam );