Process anim_light(flickertype, lightnum);
Private
Lc;
Lc_limit;
orig_lc_limit;
rand_lc_val;
sectorsA_saved_lumos[50];
sectorsA_saved_floor_textures[50];
sectorsA_saved_roof_textures[50];
wallsA_saved_lumos[50];
wallsA_saved_textures[50];
floor_, roof_, luminosity_;
sector2_floor_, sector2_roof_, sector2_luminosity_;
save_env_c;
set_env_c;
light_info_stored;
Begin
SWITCH (flickertype); // Set flicker/blink patterns
CASE 0:
orig_lc_limit=90;
END
CASE 1:
orig_lc_limit=150;
END
END
lc_limit=orig_lc_limit;
write_int(0, 30, 10, 3, &floor_);
write_int(0, 30, 20, 3, &roof_);
write_int(0, 30, 30, 3, &luminosity_);
write_int(0, 60, 10, 3, §or2_floor_);
write_int(0, 60, 20, 3, §or2_roof_);
write_int(0, 60, 30, 3, §or2_luminosity_);
Loop;
get_sector_texture(light_fx_data[lightnum].light_sector_A,
&floor_,
&roof_,
&luminosity_);
get_sector_texture(2,
§or2_floor_,
§or2_roof_,
§or2_luminosity_);
if (KEY(_T));
debug;
end
if (key(_1));
set_sector_texture(light_fx_data[lightnum].light_sector_A,
-1,
lamp_on_roof_tex,
light_fx_data[lightnum].light_sector_A_onlumo);
// SAVE env start
If (light_info_stored==0); // Only gets the info first time
FROM save_env_c = 0 to 49; // Sectors
If (light_fx_data[lightnum].sector_list_A[save_env_c]==-1);
light_info_stored=1; // So it doesnt try to save again
Break;
End
get_sector_texture(light_fx_data[lightnum].sector_list_A[save_env_c],
§orsA_saved_floor_textures[save_env_c],
§orsA_saved_roof_textures[save_env_c],
§orsA_saved_lumos[save_env_c]);
End
End
// SAVE env end
// SET env start
FROM set_env_c = 0 to 49;
If (light_fx_data[lightnum].sector_list_A[set_env_c]==-1);
Break;
End
if (light_fx_data[lightnum].modify_sectorstex_A==1);
set_sector_texture(light_fx_data[lightnum].sector_list_A[set_env_c],
light_fx_data[lightnum].modifyto_floortexture_sectors_A[set_env_c],
light_fx_data[lightnum].modifyto_rooftexture_sectors_A[set_env_c],
light_fx_data[lightnum].sector_lumo_A);
Else
set_sector_texture(light_fx_data[lightnum].sector_list_A[set_env_c],
-1,
-1,
light_fx_data[lightnum].sector_lumo_A);
End
End
// SET env end
end
if(key(_2) and light_info_stored==1)
set_sector_texture(light_fx_data[lightnum].light_sector_A,
-1,
lamp_off_roof_tex,
light_fx_data[lightnum].light_sector_A_offlumo);
FROM set_env_c = 0 to 49;
If (light_fx_data[lightnum].sector_list_A[set_env_c]==-1);
Break;
End
if (light_fx_data[lightnum].modify_sectorstex_A==1);
set_sector_texture(light_fx_data[lightnum].sector_list_A[set_env_c],
sectorsA_saved_floor_textures[set_env_c],
sectorsA_saved_roof_textures[set_env_c],
sectorsA_saved_lumos[set_env_c]);
Else
set_sector_texture(light_fx_data[lightnum].sector_list_A[set_env_c],
-1,
-1,
sectorsA_saved_lumos[set_env_c]);
End
End
end
Frame;
End
End
|