int main( int argc, char *argv[] )
{
+ vg_log_init();
+
char *arg;
while( vg_argp( argc, argv ) ){
if( vg_long_opt( "release-all", NULL ) )
("reset_event",c_int32),
("first",c_uint32),
("camera",c_uint32),
- ("status",c_uint32)] #runtime
+ ("status",c_uint32),
+ ("visible_when_unlocked_id",c_uint32)] #runtime
sr_functions = { 0: 'unlock',
1: 'view',
-1: 'unview' }
first: bpy.props.PointerProperty( \
type=bpy.types.Object, name="First Objective", \
- poll=lambda self,obj: sr_filter_ent_type(obj,['ent_objective','ent_prop']))
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_objective']))
camera: bpy.props.PointerProperty( \
type=bpy.types.Object, name="Camera", \
poll=lambda self,obj: sr_filter_ent_type(obj,['ent_camera','ent_objective']))
+ visible_when_unlocked: bpy.props.PointerProperty( \
+ type=bpy.types.Object, name="Visibile when unlocked", \
+ poll=lambda self,obj: sr_filter_ent_type(obj,['ent_objective','ent_prop','ent_list']))
@staticmethod
- def sr_inspector( layout, data ):#{
+ def sr_inspector( layout, data ):
+ #{
layout.prop( data[0], 'alias' )
layout.prop( data[0], 'camera', text=("Camera" if not data[0].is_story else "Related Objective") )
- layout.prop( data[0], 'first', text=("First Objective" if not data[0].is_story else "Indicator Prop") )
+ layout.prop( data[0], 'first', text=("First Objective") )
+ layout.prop( data[0], 'visible_when_unlocked' )
layout.prop( data[0], 'time_limit' )
layout.prop( data[0], 'is_story' )
SR_OBJECT_ENT_VOLUME.inspect_target( layout, data, 'target', text=("On Activate" if data[0].is_story else "On Complete") )
if data.target3:
cv_draw_arrow( obj.location, data.target3.location, (1,1,1) )
#}
+ elif ent_type == 'ent_list':#{
+ data = obj.SR_data.ent_list[0]
+ for subj in data.entities:
+ #{
+ if subj:
+ cv_draw_arrow( obj.location, subj.target.location, (0.5,0.8,0.2) )
+ #}
+ #}
elif ent_type == 'ent_challenge':#{
data = obj.SR_data.ent_challenge[0]
if data.target:
challenge.reset = sr_entity_id( obj_data.reset )
challenge.reset_event = obj_data.reset_event
challenge.first = sr_entity_id( obj_data.first )
+ challenge.visible_when_unlocked_id = sr_entity_id( obj_data.visible_when_unlocked )
challenge.flags = 0x00
challenge.camera = sr_entity_id( obj_data.camera )
if obj_data.time_limit: challenge.flags |= 0x01
challenge.status = 0
sr_ent_push( challenge )
#}
+ elif ent_type == 'ent_list':
+ #{
+ obj_data = obj.SR_data.ent_list[0]
+ list = ent_list()
+ list.entity_ref_start = _mdl_compiler_ent_count( 'file_entity_ref' )
+ list.entity_ref_count = 0
+ for k in range(len(obj_data.entities)):
+ #{
+ if obj_data.entities[k]:
+ #{
+ list_entry = file_entity_ref()
+ list_entry.index = sr_entity_id( obj_data.entities[k].target )
+ sr_ent_push( list_entry )
+ list.entity_ref_count += 1
+ #}
+ #}
+ sr_ent_push( list )
+ #}
elif ent_type == 'ent_region':#{
region = ent_region()
obj_data = obj.SR_data.ent_region[0]
checkpoint = ent_checkpoint()
checkpoint.gate_index = _mdl_compiler.entity_ids[gate.name]
- checkpoint.path_start = \
- _mdl_compiler_ent_count( 'ent_path_index' )
+ checkpoint.path_start = _mdl_compiler_ent_count( 'ent_path_index' )
checkpoint.path_count = 0
path = solve_graph( dij, gi.name, gj.name )
static audio_clip air_synth = {
.flags = k_audio_format_gen,
.size = 0,
- .func = audio_air_synth_get_samples,
- .data = &air_audio_data
+ .generative_function = audio_air_synth_get_samples,
+ .any_data = &air_audio_data
};
void audio_init(void)
void vg_load(void)
{
- vg_audio.always_keep_compressed = 1;
+ //vg_audio.always_keep_compressed = 1;
vg_loader_step( render_init, NULL );
game_load();
int main( int argc, char *argv[] )
{
+ vg_log_init();
network_set_host( "skaterift.com", NULL );
vg_mem.use_libc_malloc = 0;
vg_set_mem_quota( 200*1024*1024 );
typedef struct ent_prop ent_prop;
typedef struct ent_region ent_region;
typedef struct ent_list ent_list;
+typedef struct file_entity_ref file_entity_ref;
typedef struct ent_glider ent_glider;
typedef struct ent_npc ent_npc;
};
#endif
+struct ent_list
+{
+ u32 entity_ref_start, entity_ref_count;
+};
+
+struct file_entity_ref
+{
+ u32 index;
+};
+
/* v102+ */
enum ent_gate_flag
{
enum prop_flag
{
- k_prop_flag_hidden = 0x1
+ k_prop_flag_hidden = 0x1,
+ k_prop_flag_spinning = 0x2
};
struct ent_prop {
v3f ears = { 1.0f,0.0f,0.0f };
m3x3_mulv( g_render.cam.transform, ears, ears );
- v3_copy( ears, vg_audio.external_listener_ears );
- v3_copy( g_render.cam.transform[3], vg_audio.external_listener_pos );
+ v3_copy( ears, _vg_audio.listener_right_ear_direction );
+ v3_copy( g_render.cam.transform[3], _vg_audio.listener_position );
- if( localplayer.gate_waiting ){
- m4x3_mulv( localplayer.gate_waiting->transport,
- vg_audio.external_listener_pos,
- vg_audio.external_listener_pos );
- }
+ if( localplayer.gate_waiting )
+ m4x3_mulv( localplayer.gate_waiting->transport, _vg_audio.listener_position, _vg_audio.listener_position );
- v3_copy( localplayer.rb.v, vg_audio.external_lister_velocity );
+ v3_copy( localplayer.rb.v, _vg_audio.listener_velocity );
audio_unlock();
vehicle_update_post();
{ NULL, NULL },
};
- return _skaterift_generic_script_template( ev, inf,
- "metascenes/intro.ms", EN, 1 );
+ return _skaterift_generic_script_template( ev, inf, "metascenes/intro.ms", EN, 1 );
}
ent_miniworld,
ent_prop,
ent_region,
- ent_glider;
+ ent_glider,
+ ent_list,
+ file_entity_ref;
/* These share the indexes of ent_challenge.
* So ent_challenge[x] is related to events[x] */
AF_LOAD_ARRAY_STRUCT( af, &world->ent_miniworld, ent_miniworld, heap );
AF_LOAD_ARRAY_STRUCT( af, &world->ent_prop, ent_prop, heap );
AF_LOAD_ARRAY_STRUCT( af, &world->ent_glider, ent_glider, heap );
+ AF_LOAD_ARRAY_STRUCT( af, &world->ent_list, ent_list, heap );
+ AF_LOAD_ARRAY_STRUCT( af, &world->file_entity_ref, file_entity_ref, heap );
}
array_file_ptr infos;