mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-23 07:00:30 +02:00
215 lines
4.4 KiB
C
215 lines
4.4 KiB
C
/*
|
|
EDITOR_FLYING_CAMERA.C
|
|
|
|
symbols in this file:
|
|
00075E70 00d0:
|
|
_editor_camera_new (0000)
|
|
00075F40 0080:
|
|
_editor_camera_get_focus (0000)
|
|
00075FC0 0080:
|
|
_editor_camera_set_focus (0000)
|
|
00076040 00a0:
|
|
_editor_camera_set_position (0000)
|
|
000760E0 0040:
|
|
_editor_camera_bump_speed (0000)
|
|
00076120 0010:
|
|
_editor_camera_get_speed (0000)
|
|
00076130 0030:
|
|
_editor_camera_use_roll (0000)
|
|
00076160 0010:
|
|
_editor_camera_get_unit_focus (0000)
|
|
00076170 00e0:
|
|
_editor_camera_set_mode (0000)
|
|
00076250 0010:
|
|
_editor_camera_get_mode (0000)
|
|
00076260 0010:
|
|
_editor_camera_get_scripted (0000)
|
|
00076270 0070:
|
|
_code_00076270 (0000)
|
|
000762E0 0010:
|
|
_editor_camera_get_field_of_view (0000)
|
|
000762F0 0080:
|
|
_editor_camera_move_to_point (0000)
|
|
00076370 01b0:
|
|
_editor_camera_set_position_and_roll (0000)
|
|
00076520 0070:
|
|
_editor_camera_set_unit_focus (0000)
|
|
00076590 0130:
|
|
_editor_camera_update (0000)
|
|
000766C0 01b0:
|
|
_editor_camera_set_scripted (0000)
|
|
00076870 0060:
|
|
_code_00076870 (0000)
|
|
000768D0 0580:
|
|
_code_000768d0 (0000)
|
|
00076E50 0460:
|
|
_code_00076e50 (0000)
|
|
00256C64 0030:
|
|
_rdata_00256c64 (0000)
|
|
00256C94 0008:
|
|
??_C@_07NACDKLFL@exiting?$AA@ (0000)
|
|
00256C9C 0010:
|
|
??_C@_0BA@NDFANOEE@orbiting?5camera?$AA@ (0000)
|
|
00256CAC 000e:
|
|
??_C@_0O@GNANFALA@flying?5camera?$AA@ (0000)
|
|
00256CBC 0007:
|
|
??_C@_06GNEAMJOC@angles?$AA@ (0000)
|
|
00256CC4 0009:
|
|
??_C@_08OAGMDKAF@position?$AA@ (0000)
|
|
00256CD0 002d:
|
|
??_C@_0CN@ELKCHNLL@c?3?2halo?2SOURCE?2camera?2editor_fly@ (0000)
|
|
00256D00 0011:
|
|
??_C@_0BB@JCBBBJE@speed?5is?5now?5x?$CFf?$AA@ (0000)
|
|
00256D14 0025:
|
|
??_C@_0CF@ONCNFIFO@translate_funcs?$FLmode?$FN?$FL_translate@ (0000)
|
|
00256D3C 002e:
|
|
??_C@_0CO@LELHEFFL@translate_funcs?$FLcamera_mode?$FN?$FL_tr@ (0000)
|
|
00256D6C 001a:
|
|
??_C@_0BK@JFLLMCBA@update_funcs?$FLcamera_mode?$FN?$AA@ (0000)
|
|
00256D88 0018:
|
|
??_C@_0BI@CHKFHLBI@?$CFs?5scripted?5camera?5mode?$AA@ (0000)
|
|
00256DA0 0004:
|
|
__real@3fc8a8ea (0000)
|
|
00256DA4 0004:
|
|
__real@bfc8a8ea (0000)
|
|
00256DA8 0009:
|
|
??_C@_08JLGBNAMD@controls?$AA@ (0000)
|
|
00256DB4 0004:
|
|
__real@3fa0d97c (0000)
|
|
00256DB8 0004:
|
|
__real@bfa0d97c (0000)
|
|
002DCC28 0034:
|
|
_data_002dcc28 (0000)
|
|
_editor_custom_render (0008)
|
|
0031D438 007c:
|
|
_bss_0031d438 (0000)
|
|
*/
|
|
|
|
/* ---------- headers */
|
|
|
|
#include "editor_flying_camera.h"
|
|
|
|
/* ---------- constants */
|
|
|
|
/* ---------- macros */
|
|
|
|
/* ---------- structures */
|
|
|
|
struct editor_camera_data
|
|
{
|
|
real speed;
|
|
long unit_focus;
|
|
};
|
|
|
|
struct editor_flying_camera
|
|
{
|
|
real_point3d position;
|
|
real_euler_angles2d orientation;
|
|
real roll;
|
|
real field_of_view;
|
|
};
|
|
|
|
struct editor_camera_focus
|
|
{
|
|
real_point3d position;
|
|
real_euler_angles2d angles;
|
|
};
|
|
|
|
struct editor_camera_globals
|
|
{
|
|
boolean scripted;
|
|
boolean use_roll;
|
|
boolean initialized;
|
|
byte _unknown03;
|
|
struct editor_camera_focus focus;
|
|
struct editor_flying_camera *camera;
|
|
byte _unknown1c[0x10];
|
|
short mode;
|
|
};
|
|
|
|
struct editor_camera_constants
|
|
{
|
|
long speed_steps[5];
|
|
real field_of_view_by_mode[7];
|
|
};
|
|
|
|
/* ---------- prototypes */
|
|
|
|
/* ---------- globals */
|
|
|
|
extern struct editor_camera_data data_002dcc28;
|
|
extern struct editor_camera_globals bss_0031d438;
|
|
extern struct editor_camera_constants const rdata_00256c64;
|
|
|
|
/* ---------- public code */
|
|
|
|
void editor_camera_get_focus(
|
|
real_point3d *position,
|
|
real_euler_angles2d *angles)
|
|
{
|
|
match_assert("c:\\halo\\SOURCE\\camera\\editor_flying_camera.c", 120, position);
|
|
match_assert("c:\\halo\\SOURCE\\camera\\editor_flying_camera.c", 121, angles);
|
|
|
|
*position = bss_0031d438.focus.position;
|
|
*angles = bss_0031d438.focus.angles;
|
|
|
|
return;
|
|
}
|
|
|
|
void editor_camera_set_focus(
|
|
real_point3d const *position,
|
|
real_euler_angles2d const *angles)
|
|
{
|
|
match_assert("c:\\halo\\SOURCE\\camera\\editor_flying_camera.c", 129, position);
|
|
match_assert("c:\\halo\\SOURCE\\camera\\editor_flying_camera.c", 130, angles);
|
|
|
|
bss_0031d438.focus.position = *position;
|
|
bss_0031d438.focus.angles = *angles;
|
|
|
|
return;
|
|
}
|
|
|
|
long editor_camera_get_speed(
|
|
void)
|
|
{
|
|
return (long)data_002dcc28.speed;
|
|
}
|
|
|
|
boolean editor_camera_use_roll(
|
|
boolean new_use_roll)
|
|
{
|
|
boolean previous_use_roll = bss_0031d438.use_roll;
|
|
|
|
bss_0031d438.use_roll = new_use_roll;
|
|
if (!new_use_roll && bss_0031d438.camera)
|
|
bss_0031d438.camera->roll = 0.0f;
|
|
|
|
return previous_use_roll;
|
|
}
|
|
|
|
long editor_camera_get_unit_focus(
|
|
void)
|
|
{
|
|
return data_002dcc28.unit_focus;
|
|
}
|
|
|
|
short editor_camera_get_mode(
|
|
void)
|
|
{
|
|
return bss_0031d438.mode;
|
|
}
|
|
|
|
boolean editor_camera_get_scripted(
|
|
void)
|
|
{
|
|
return bss_0031d438.scripted;
|
|
}
|
|
|
|
real editor_camera_get_field_of_view(
|
|
void)
|
|
{
|
|
return rdata_00256c64.field_of_view_by_mode[5 + bss_0031d438.mode];
|
|
}
|
|
|
|
/* ---------- private code */
|