projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update helpers/location to 'frosted' ui
[carveJwlIkooP6JGAAIwe30JlM.git]
/
ent_challenge.c
diff --git
a/ent_challenge.c
b/ent_challenge.c
index 9499d0fed8e7b0e6ce9f51fcd1cf0a161d373c55..d30a5dcd90d3994af9fd1e43a71f8c1f136a00ab 100644
(file)
--- a/
ent_challenge.c
+++ b/
ent_challenge.c
@@
-36,9
+36,9
@@
entity_call_result ent_challenge_call( world_instance *world, ent_call *call )
gui_helper_clear();
vg_str text;
if( gui_new_helper( input_button_list[k_srbind_maccept], &text ))
gui_helper_clear();
vg_str text;
if( gui_new_helper( input_button_list[k_srbind_maccept], &text ))
- vg_strcat( &text, "
s
tart" );
+ vg_strcat( &text, "
S
tart" );
if( gui_new_helper( input_button_list[k_srbind_mback], &text ))
if( gui_new_helper( input_button_list[k_srbind_mback], &text ))
- vg_strcat( &text, "
e
xit" );
+ vg_strcat( &text, "
E
xit" );
}
return k_entity_call_result_OK;
}
}
return k_entity_call_result_OK;
}
@@
-46,15
+46,18
@@
entity_call_result ent_challenge_call( world_instance *world, ent_call *call )
return k_entity_call_result_unhandled;
}
return k_entity_call_result_unhandled;
}
-void ent_challenge_preupdate( ent_
challenge *challenge, int active
)
+void ent_challenge_preupdate( ent_
focus_context *ctx
)
{
{
- world_instance *world = world_current_instance();
+ world_instance *world = ctx->world;
+ ent_challenge *challenge = mdl_arritm( &world->ent_challenge, ctx->index );
/* maximum distance from active challenge */
/* maximum distance from active challenge */
- if( !active ){
+ if( !ctx->active )
+ {
f32 min_dist2 = 999999.9f;
f32 min_dist2 = 999999.9f;
- if( mdl_entity_id_type( challenge->first ) == k_ent_objective ){
+ if( mdl_entity_id_type( challenge->first ) == k_ent_objective )
+ {
u32 next = challenge->first;
while( mdl_entity_id_type(next) == k_ent_objective ){
u32 index = mdl_entity_id_id( next );
u32 next = challenge->first;
while( mdl_entity_id_type(next) == k_ent_objective ){
u32 index = mdl_entity_id_id( next );