#include <stdio.h>#include <stdlib.h>#include <stdarg.h>#include <math.h>#include <string.h>#include "inferno.h"#include "segment.h"#include "editor/editor.h"#include "gameseg.h"#include "fix.h"#include "mono.h"#include "error.h"#include "wall.h"#include "editor/kdefs.h"#include "bm.h"#include "effects.h"#include "fvi.h"Classes | |
| struct | hash_info |
Defines | |
| #define | MAX_LIGHT_SEGS 16 |
| #define | LIGHT_DISTANCE_THRESHOLD (F1_0*80) |
| #define | FVI_HASH_SIZE 8 |
| #define | FVI_HASH_AND_MASK (FVI_HASH_SIZE - 1) |
Functions | |
| void | cast_all_light_in_mine (int quick_flag) |
| fix | area_on_side (side *sidep) |
| int | area_on_all_sides (void) |
| fix | average_connectivity (void) |
| fix | get_average_light_at_vertex (int vnum, short *segs) |
| void | set_average_light_at_vertex (int vnum) |
| void | set_average_light_on_side (segment *segp, int sidenum) |
| int | set_average_light_on_curside (void) |
| void | set_average_light_on_all_fast (void) |
| int | set_average_light_on_all (void) |
| int | set_average_light_on_all_quick (void) |
| fix | compute_uv_dist (uvl *uv0, uvl *uv1) |
| void | compress_uv_coordinates (side *sidep) |
| void | compress_uv_coordinates_on_side (side *sidep) |
| void | validate_uv_coordinates_on_side (segment *segp, int sidenum) |
| void | compress_uv_coordinates_in_segment (segment *segp) |
| void | compress_uv_coordinates_all (void) |
| void | check_lighting_side (segment *sp, int sidenum) |
| void | check_lighting_segment (segment *segp) |
| void | check_lighting_all (void) |
| void | assign_default_lighting_on_side (segment *segp, int sidenum) |
| void | assign_default_lighting (segment *segp) |
| void | assign_default_lighting_all (void) |
| void | validate_uv_coordinates (segment *segp) |
| void | copy_uvs_from_side_to_faces (segment *segp, int sidenum, uvl uvls[]) |
| fix | zhypot (fix a, fix b) |
| void | assign_light_to_side (segment *sp, int sidenum) |
| void | assign_uvs_to_side (segment *segp, int sidenum, uvl *uva, uvl *uvb, int va, int vb) |
| void | assign_default_uvs_to_side (segment *segp, int side) |
| void | stretch_uvs_from_curedge (segment *segp, int side) |
| void | assign_default_uvs_to_segment (segment *segp) |
| void | med_assign_uvs_to_side (segment *con_seg, int con_common_side, segment *base_seg, int base_common_side, int abs_id1, int abs_id2) |
| void | get_side_ids (segment *base_seg, segment *con_seg, int base_side, int con_side, int abs_id1, int abs_id2, int *base_common_side, int *con_common_side) |
| void | propagate_tmaps_to_segment_side (segment *base_seg, int base_side, segment *con_seg, int con_side, int abs_id1, int abs_id2, int uv_only_flag) |
| void | med_propagate_tmaps_to_back_side (segment *base_seg, int back_side, int uv_only_flag) |
| int | fix_bogus_uvs_on_side (void) |
| void | fix_bogus_uvs_on_side1 (segment *sp, int sidenum, int uvonly_flag) |
| void | fix_bogus_uvs_seg (segment *segp) |
| int | fix_bogus_uvs_all (void) |
| void | med_propagate_tmaps_to_any_side (segment *base_seg, int back_side, int tmap_num, int uv_only_flag) |
| void | propagate_tmaps_to_segment_sides (segment *base_seg, int base_side, segment *con_seg, int con_side, int uv_only_flag) |
| void | med_propagate_tmaps_to_segments (segment *base_seg, segment *con_seg, int uv_only_flag) |
| void | copy_uvs_seg_to_seg (segment *destseg, segment *srcseg) |
| void | cast_light_from_side (segment *segp, int light_side, fix light_intensity, int quick_light) |
| void | calim_zero_light_values (void) |
| void | cast_light_from_side_to_center (segment *segp, int light_side, fix light_intensity, int quick_light) |
| void | calim_process_all_lights (int quick_light) |
| int | normal_near (vms_vector *v1, vms_vector *v2) |
| void | print_normals (void) |
Variables | |
| int | Doing_lighting_hack_flag |
| fix | Stretch_scale_x = F1_0 |
| fix | Stretch_scale_y = F1_0 |
| int | Vmag = VMAG |
| byte | Edge_between_sides [MAX_SIDES_PER_SEGMENT][MAX_SIDES_PER_SEGMENT][2] |
| fix | Magical_light_constant = (F1_0*16) |
| hash_info | fvi_cache [FVI_HASH_SIZE] |
| int | Hash_hits = 0 |
| int | Hash_retries = 0 |
| int | Hash_calcs = 0 |
| vms_vector | Normals [MAX_SEGMENTS *12] |
| int | Normal_nearness = 4 |
| int | Total_normals = 0 |
| int | Diff_normals = 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
|
|
|
|
|
||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||
|
|
|
|
|
|
||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
Initial value: {
{ {-1,-1}, { 3, 7}, {-1,-1}, { 2, 6}, { 6, 7}, { 2, 3} },
{ { 3, 7}, {-1,-1}, { 0, 4}, {-1,-1}, { 4, 7}, { 0, 3} },
{ {-1,-1}, { 0, 4}, {-1,-1}, { 1, 5}, { 4, 5}, { 0, 1} },
{ { 2, 6}, {-1,-1}, { 1, 5}, {-1,-1}, { 5, 6}, { 1, 2} },
{ { 6, 7}, { 4, 7}, { 4, 5}, { 5, 6}, {-1,-1}, {-1,-1} },
{ { 2, 3}, { 0, 3}, { 0, 1}, { 1, 2}, {-1,-1}, {-1,-1} }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.6