Files
Cesarus85--ringfall-mjolnir-vr/source/render/render_debug.c
T

400 lines
8.0 KiB
C

/*
RENDER_DEBUG.C
symbols in this file:
001780E0 00e0:
_render_debug_triangle (0000)
001781C0 0120:
_render_debug_quadrilateral (0000)
001782E0 0090:
_render_debug_polygon (0000)
00178370 00d0:
_code_00178370 (0000)
00178440 0070:
_code_00178440 (0000)
001784B0 00a0:
_code_001784b0 (0000)
00178550 01c0:
_code_00178550 (0000)
00178710 0290:
_code_00178710 (0000)
001789A0 0120:
_render_debug_point (0000)
00178AC0 00b0:
_render_debug_line (0000)
00178B70 00c0:
_render_debug_vector (0000)
00178C30 0070:
_render_debug_tick (0000)
00178CA0 0080:
_render_debug_line_offset (0000)
00178D20 0070:
_render_debug_matrix (0000)
00178D90 0190:
_render_debug_sphere (0000)
00178F20 0190:
_render_debug_cylinder (0000)
001790B0 01c0:
_render_debug_pill (0000)
00179270 0180:
_render_debug_box (0000)
001793F0 00a0:
_render_debug_polygon_edges (0000)
00179490 0070:
_render_debug_string (0000)
00179500 0130:
_render_debug_string_at_point (0000)
00179630 0220:
_code_00179630 (0000)
00179850 0110:
_code_00179850 (0000)
00179960 0080:
_code_00179960 (0000)
001799E0 01e0:
_code_001799e0 (0000)
00179BC0 0070:
_code_00179bc0 (0000)
00179C30 01a0:
_code_00179c30 (0000)
00179DD0 00d0:
_render_debug_point2d (0000)
00179EA0 0120:
_render_debug_line2d (0000)
00179FC0 00f0:
_render_debug_vector2d (0000)
0017A0B0 0130:
_render_debug_circle (0000)
0017A1E0 0040:
_render_debug_vectors (0000)
0017A220 0030:
_render_debug_quaternion (0000)
0017A250 0130:
_render_debug_box2d_outline (0000)
0017A380 0120:
_render_debug_box_outline (0000)
0017A4A0 0240:
_render_debug (0000)
0029FC9C 0007:
??_C@_06IGAKEMNE@point2?$AA@ (0000)
0029FCA4 0007:
??_C@_06KNCHBPBH@point1?$AA@ (0000)
0029FCAC 0007:
??_C@_06LEDMCOFG@point0?$AA@ (0000)
0029FCB4 000a:
??_C@_09MBGEJPJA@immediate?$AA@ (0000)
0029FCC0 0025:
??_C@_0CF@JKFPHJJE@c?3?2halo?2SOURCE?2render?2render_deb@ (0000)
0029FCE8 0007:
??_C@_06JPBBHNJF@point3?$AA@ (0000)
0029FCF0 0023:
??_C@_0CD@CLODFBGE@render?5debug?5cache?5string?5overfl@ (0000)
0029FD18 0008:
__real@3fd921fb60000000 (0000)
0029FD20 001d:
??_C@_0BN@JJPKCCPJ@render?5debug?5cache?5overflow?4?$AA@ (0000)
0029FD40 0007:
??_C@_06LNLHEAAG@height?$AA@ (0000)
0029FD48 0005:
??_C@_04OEJCCLCC@?$HMn?$CFs?$AA@ (0000)
0029FD50 0041:
??_C@_0EB@EGDCEMGJ@?$HMnground_point?$CI?$CF01?42f?0?$CF01?42f?0?$CF01@ (0000)
0029FD94 003d:
??_C@_0DN@EHAAAEJO@point?$CI?$CF01?42f?0?$CF01?42f?0?$CF01?42f?$CJ?5leaf@ (0000)
0029FDD4 0022:
??_C@_0CC@HBIPCGOB@speed?5?$CF5f?$HMnslide?5?$CF5f?$HMnturn?5?5?$CF5f?$CF@ (0000)
0029FDF8 0009:
??_C@_08FHIPOKAI@?$HMnstuck?$CB?$AA@ (0000)
0029FE04 0013:
??_C@_0BD@FCHBBNKP@riding?5an?5elevator?$AA@ (0000)
0029FE18 0004:
??_C@_03PMGGPEJJ@?$CFd?6?$AA@ (0000)
0029FE1C 0011:
??_C@_0BB@GECKHLGI@d?3?2debug_bsp?4txt?$AA@ (0000)
0029FE30 0006:
??_C@_05OPIONHBI@solid?$AA@ (0000)
0029FE38 000a:
??_C@_09PHAEBKPA@?5leaf?5?$CF5d?$AA@ (0000)
0029FE44 000d:
??_C@_0N@IGDJDOFE@?$CF5d?5?$CF5d?5?$CFc?$HMn?$AA@ (0000)
0029FE54 0020:
??_C@_0CA@CADNHOKJ@plane_count?$DMMAXIMUM_BSP3D_DEPTH?$AA@ (0000)
0029FE74 000e:
??_C@_0O@LHEAABKE@?5node?5plane?$HMn?$AA@ (0000)
0029FE84 0004:
__real@3c4aa525 (0000)
0029FE88 0004:
__real@3ccaa525 (0000)
0029FE8C 001f:
??_C@_0BP@NHMLPPIA@can?8t?5add?5box2d?5to?5debug?5cache?$AA@ (0000)
004B8C40 740c:
_bss_004b8c40 (0000)
*/
/* ---------- headers */
#include "cseries/cseries.h"
#include "math/real_math.h"
#include "rasterizer/rasterizer_debug.h"
#include "render/render_debug.h"
#include "render/render_debug_geometry.h"
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
/* ---------- prototypes */
/* ---------- globals */
/* ---------- public code */
void render_debug_triangle(
boolean immediate,
real_point3d const *point0,
real_point3d const *point1,
real_point3d const *point2,
real_argb_color const *color)
{
match_assert(
"c:\\halo\\SOURCE\\render\\render_debug.c",
480,
immediate);
match_assert(
"c:\\halo\\SOURCE\\render\\render_debug.c",
481,
point0);
match_assert(
"c:\\halo\\SOURCE\\render\\render_debug.c",
482,
point1);
match_assert(
"c:\\halo\\SOURCE\\render\\render_debug.c",
483,
point2);
match_assert(
"c:\\halo\\SOURCE\\render\\render_debug.c",
484,
color);
rasterizer_debug_triangle(
point0,
point1,
point2,
color);
return;
}
void render_debug_polygon(
real_point3d const *points,
short point_count,
real_argb_color const *color)
{
short index;
match_assert(
"c:\\halo\\SOURCE\\render\\render_debug.c",
855,
points);
match_assert(
"c:\\halo\\SOURCE\\render\\render_debug.c",
856,
color);
for (index = 1; index<point_count-1; index++)
{
render_debug_triangle(
TRUE,
points,
&points[index],
&points[index+1],
color);
}
return;
}
void render_debug_vector(
boolean immediate,
real_point3d const *point,
real_vector3d const *vector,
real size,
real_argb_color const *color)
{
real_point3d end_point;
match_assert(
"c:\\halo\\SOURCE\\render\\render_debug.c",
388,
point);
match_assert(
"c:\\halo\\SOURCE\\render\\render_debug.c",
389,
vector);
match_assert(
"c:\\halo\\SOURCE\\render\\render_debug.c",
390,
color);
end_point.x = point->x + size*vector->i;
end_point.y = point->y + size*vector->j;
end_point.z = point->z + size*vector->k;
render_debug_line(
immediate,
point,
&end_point,
color);
return;
}
void render_debug_tick(
boolean immediate,
real_point3d const *point,
real_vector3d const *tick_vector,
real tick_size,
real_argb_color const *color)
{
real_point3d point0;
real_point3d point1;
real negative_tick_size;
point0.x = point->x + tick_size*tick_vector->i;
point0.y = point->y + tick_size*tick_vector->j;
point0.z = point->z + tick_size*tick_vector->k;
negative_tick_size = -tick_size;
point1.x = point->x + negative_tick_size*tick_vector->i;
point1.y = point->y + negative_tick_size*tick_vector->j;
point1.z = point->z + negative_tick_size*tick_vector->k;
render_debug_line(
immediate,
&point0,
&point1,
color);
return;
}
void render_debug_line_offset(
boolean immediate,
real_point3d const *p0,
real_point3d const *p1,
real_argb_color const *color,
real offset)
{
real_point3d point0;
real_point3d point1;
point0.x = p0->x + offset*global_up3d->i;
point0.y = p0->y + offset*global_up3d->j;
point0.z = p0->z + offset*global_up3d->k;
point1.x = p1->x + offset*global_up3d->i;
point1.y = p1->y + offset*global_up3d->j;
point1.z = p1->z + offset*global_up3d->k;
render_debug_line(
immediate,
&point0,
&point1,
color);
return;
}
void render_debug_matrix(
boolean immediate,
struct real_matrix4x3 const *matrix,
real size)
{
render_debug_vector(
immediate,
&matrix->position,
&matrix->forward,
size*matrix->scale,
global_real_argb_red);
render_debug_vector(
immediate,
&matrix->position,
&matrix->left,
size*matrix->scale,
global_real_argb_green);
render_debug_vector(
immediate,
&matrix->position,
&matrix->up,
size*matrix->scale,
global_real_argb_blue);
return;
}
void render_debug_polygon_edges(
real_point3d const *points,
short point_count,
real_argb_color const *color)
{
short index;
match_assert(
"c:\\halo\\SOURCE\\render\\render_debug.c",
873,
points);
match_assert(
"c:\\halo\\SOURCE\\render\\render_debug.c",
874,
color);
if (point_count>2)
{
render_debug_line(
TRUE,
&points[point_count-1],
points,
color);
for (index = 1; index<point_count; index++)
{
render_debug_line(
TRUE,
&points[index-1],
&points[index],
color);
}
}
return;
}
void render_debug_vectors(
boolean immediate,
const real_point3d *point,
const real_vector3d *forward,
const real_vector3d *up,
real size)
{
real_matrix4x3 matrix;
matrix4x3_from_point_and_vectors(&matrix, point, forward, up);
render_debug_matrix(immediate, &matrix, size);
return;
}
void render_debug_quaternion(
boolean immediate,
const real_point3d *point,
const real_quaternion *quaternion,
real size)
{
real_matrix4x3 matrix;
matrix4x3_from_point_and_quaternion(&matrix, point, quaternion);
render_debug_matrix(immediate, &matrix, size);
return;
}
/* ---------- private code */