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

142 lines
3.6 KiB
C

/*
RENDER_SPRITE.C
symbols in this file:
0017C760 0130:
_code_0017c760 (0000)
0017C890 0070:
_code_0017c890 (0000)
0017C900 0090:
_build_sprite_prepare_for_window (0000)
0017C990 0180:
_code_0017c990 (0000)
0017CB10 00a0:
_build_sprites_begin (0000)
0017CBB0 0130:
_build_sprites_end (0000)
0017CCE0 01e0:
_code_0017cce0 (0000)
0017CEC0 0070:
_build_sprite_compute_vertex_fade (0000)
0017CF30 0610:
_build_sprite (0000)
0017D540 0280:
_build_sprite_rotational (0000)
002A00F4 0004:
_one_over_full_circle (0000)
002A00F8 001b:
??_C@_0BL@MGMOMNLP@perpendicular?5to?5direction?$AA@ (0000)
002A0114 0016:
??_C@_0BG@KINAGGNG@parallel?5to?5direction?$AA@ (0000)
002A012C 000e:
??_C@_0O@GDBPHPAN@screen?5facing?$AA@ (0000)
002A013C 0019:
??_C@_0BJ@NOODAMK@?$CBuntransformed_direction?$AA@ (0000)
002A0158 0016:
??_C@_0BG@PMLDPFAJ@transformed_direction?$AA@ (0000)
002A0170 0013:
??_C@_0BD@IDBJDPKL@transformed_origin?$AA@ (0000)
002A0184 0015:
??_C@_0BF@ILAHHFNF@untransformed_origin?$AA@ (0000)
002A019C 0026:
??_C@_0CG@EFAPFCGE@c?3?2halo?2SOURCE?2render?2render_spr@ (0000)
002A01C4 0022:
??_C@_0CC@MKHFOGBB@?5?5?5coverage?3?5?$CF?41f?5big?5sprites?3?5?$CF@ (0000)
002A01E8 0031:
??_C@_0DB@IJJJGION@build_sprite?5failed?5to?5allocate?5@ (0000)
002A021C 0010:
??_C@_0BA@BMIFFLPI@group?9?$DOvertices?$AA@ (0000)
002A022C 003d:
??_C@_0DN@EKFLFNFF@a?5build_sprites_begin?5call?5can?5a@ (0000)
002A026C 002c:
??_C@_0CM@LNKKNFPA@?$CBTEST_FLAG?$CIflags?0?5_build_sprites@ (0000)
002A0298 0041:
??_C@_0EB@NNMLIIBJ@?$CD?$CD?$CD?5ERROR?5sprites?5rendered?5with?5@ (0000)
002A02DC 0031:
??_C@_0DB@ILMICBDJ@TEST_FLAG?$CIdata?9?$DOflags?0?5_build_sp@ (0000)
002A0310 003b:
??_C@_0DL@OIGDNGND@build_sprite?5only?5supports?5norma@ (0000)
002A034C 0024:
??_C@_0CE@EJDAIAFL@build_sprite?5sprite?5count?5exceed@ (0000)
002A0370 004c:
??_C@_0EM@DGAJPPIN@the?5bitmap?5group?5?$CFs?5sequence?5?$CFd?5@ (0000)
002A03C0 0068:
??_C@_0GI@GFCEGJMK@mode?$DN?$DN_build_sprite_normal?5?$HM?$HM?5?$CIu@ (0000)
002A0428 0004:
__real@3ecf817a (0000)
002A042C 001f:
??_C@_0BP@HLIODOFJ@untransformed_axis_of_rotation?$AA@ (0000)
0030E778 0018:
_data_0030e778 (0000)
_global_sprite_render_orientations_enum (000c)
004C0518 0001:
_bss_004c0518 (0000)
*/
/* ---------- headers */
#include "cseries/cseries.h"
#include "math/real_math.h"
#include "render/render.h"
#include "render/render_debug.h"
/* ---------- constants */
/* ---------- macros */
/* ---------- structures */
struct build_sprite_globals_data
{
boolean initialized;
boolean debug_flag;
word pad02;
real screen_coverage;
short big_sprite_count;
word pad0A;
real screen_area_scale;
real_vector3d viewer_space_world_up;
real_vector3d viewer_space_world_forward;
};
typedef char build_sprite_globals_data_size_assert[
sizeof(struct build_sprite_globals_data) == 0x28 ? 1 : -1];
/* ---------- prototypes */
/* ---------- globals */
extern boolean debug_sprites;
extern struct build_sprite_globals_data build_sprite_globals;
/* ---------- public code */
void build_sprite_prepare_for_window(void)
{
char string[512];
if (debug_sprites)
{
sprintf(
string,
" coverage: %.1f big sprites: %d",
build_sprite_globals.screen_coverage,
build_sprite_globals.big_sprite_count);
render_debug_string(FALSE, string);
}
build_sprite_globals.screen_coverage = 0.f;
build_sprite_globals.big_sprite_count = 0;
matrix4x3_transform_normal(
&render.frustum.world_to_view,
global_up3d,
&build_sprite_globals.viewer_space_world_up);
matrix4x3_transform_normal(
&render.frustum.world_to_view,
global_left3d,
&build_sprite_globals.viewer_space_world_forward);
return;
}
/* ---------- private code */