X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_gate.h;h=a071e4bb20ee575e59c5f1722ade8b4da0ac0dab;hb=5fa590f62aa7e62a8b6b07e10556c2ecc54cdca6;hp=b45c70d86c0f1ce3efb3896d1fa11dd79a3a97cc;hpb=2dd61c7f0185ec525658ca398801f46e6adccf23;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_gate.h b/world_gate.h index b45c70d..a071e4b 100644 --- a/world_gate.h +++ b/world_gate.h @@ -1,31 +1,36 @@ /* - * Copyright (C) 2021-2023 Mt.ZERO Software, Harry Godden - All Rights Reserved + * Copyright (C) 2021-2024 Mt.ZERO Software, Harry Godden - All Rights Reserved */ -#ifndef WORLD_GATE_H -#define WORLD_GATE_H +#pragma once -#include "camera.h" +#include "vg/vg_camera.h" #include "world.h" #include "shaders/model_gate.h" +#include "entity.h" -struct world_gates{ +struct world_gates +{ glmesh mesh; mdl_submesh sm_surface, sm_marker[4]; - camera cam; + vg_camera cam; + + v3f userportal_co; } -static world_gates; +extern world_gates; -VG_STATIC void world_gates_init(void); -VG_STATIC void gate_transform_update( ent_gate *gate ); -VG_STATIC void world_link_nonlocal_async( void *payload, u32 size ); -VG_STATIC void world_unlink_nonlocal( world_instance *world ); -VG_STATIC int render_gate( world_instance *world_inside, - ent_gate *gate, camera *cam, int layer_depth ); +void world_gates_init(void); +void gate_transform_update( ent_gate *gate ); +int render_gate( world_instance *world, world_instance *world_inside, + ent_gate *gate, vg_camera *cam ); -VG_STATIC int gate_intersect( ent_gate *gate, v3f pos, v3f last ); -VG_STATIC ent_gate *world_intersect_gates( world_instance *world, - v3f pos, v3f last ); +int gate_intersect( ent_gate *gate, v3f pos, v3f last ); +u32 world_intersect_gates( world_instance *world, v3f pos, v3f last ); +entity_call_result ent_gate_call( world_instance *world, ent_call *call ); +void ent_gate_get_mdl_mtx( ent_gate *gate, m4x3f mmdl ); -#endif /* WORLD_GATE_H */ +void world_link_gates_async( void *payload, u32 size ); +void world_unlink_nonlocal( world_instance *world ); +void render_gate_unlinked( world_instance *world, + ent_gate *gate, vg_camera *cam );