/* * This file is part of the DXX-Rebirth project . * It is copyright by its individual contributors, as recorded in the * project's Git history. See COPYING.txt at the top level for license * terms and a link to the Git history. */ /* * * Instancing routines * */ #include #include "dxxerror.h" #include "3d.h" #include "globvars.h" #define MAX_INSTANCE_DEPTH 5 namespace { struct instance_context { vms_matrix m; vms_vector p; }; } static array instance_stack; int instance_depth = 0; //instance at specified point with specified orientation //if matrix==NULL, don't modify matrix. This will be like doing an offset void g3_start_instance_matrix(const vms_vector &pos,const vms_matrix *orient) { Assert(instance_depth= 0); View_position = instance_stack[instance_depth].p; View_matrix = instance_stack[instance_depth].m; }