102 Dalmatians: Puppies to the Rescue
Decompilation Source Reference | GitLab repository
Loading...
Searching...
No Matches
constants.h
Go to the documentation of this file.
1#ifndef PCDOGS_PHYSICS_CONSTANTS_H
2#define PCDOGS_PHYSICS_CONSTANTS_H
3
5
6#define PHYSICS_FIXED_FRACTION_BITS 12
7#define PHYSICS_FIXED_ONE 0x1000
8#define PHYSICS_ANGLE_MASK 0xfff
9#define PHYSICS_ANGLE_QUARTER_TURN 0x400
10#define PHYSICS_ANGLE_HALF_TURN 0x800
11#define PHYSICS_Q14_ONE 0x4000
12#define PHYSICS_ANIMATION_FRAME_TICKS 0x40
13#define PHYSICS_PERCENT_SCALE 100
14#define PHYSICS_WORD_SHIFT_MASK 0x1f
15#define PHYSICS_BYTE_SHIFT_MASK 7
16
17#define PHYSICS_POSITION_FRACTION_MASK 0x3f
18#define PHYSICS_Q12_FRACTION_MASK 0xfff
19#define PHYSICS_SIGNED_PHASE_MASK 0xfff000
20
21/* Modes select facing/input acceleration and whether airborne roll is enabled. */
29
30#define PHYSICS_Q12_PRODUCT_HIGH_SHIFT (32 - PHYSICS_FIXED_FRACTION_BITS)
31#define PHYSICS_QUATERNION_MATRIX_SHIFT 15
32#define PHYSICS_QUATERNION_DIAGONAL_HALF_Q28 0x8000000
33#define PHYSICS_REPULSION_SCALE_Q24 0x2000000
34#define PHYSICS_GROUND_NORMAL_THRESHOLD_Q24 0xb50000
35#define PHYSICS_MOVEMENT_DURATION_SCALE_Q24 0x1000000
36#define PHYSICS_GROUND_TILT_BLEND_SCALE 0x100000
37#define PHYSICS_GROUND_NEAR_POSITION_SQUARED 0x1c
38#define PHYSICS_FIXED_HALF 0x800
39#define PHYSICS_INPUT_UNIT_THRESHOLD_Q12 0xffb
40#define PHYSICS_TURN_FORWARD_DOT_THRESHOLD_Q24 0xb50481
41#define PHYSICS_SPEED_LIMIT_SLOP 0x22
42#define PHYSICS_SETTLED_VERTICAL_SPEED_SLOP 0x66
43#define PHYSICS_MOVEMENT_VERTICAL_THRESHOLD 0x155
44#define PHYSICS_AIR_ROLL_LIMIT 0x200
45#define PHYSICS_AIR_ROLL_STEP 0x20
46#define PHYSICS_GROUND_YAW_ERROR_SLOP 0x40
47#define PHYSICS_GROUND_YAW_ERROR_RANGE 0x80
48#define PHYSICS_BRIDGE_WORLD_Z_MIN (-550)
49#define PHYSICS_BRIDGE_WORLD_Z_MAX (-400)
50#define PHYSICS_BRIDGE_CENTER_Z_MIN (-533)
51#define PHYSICS_BRIDGE_CENTER_Z_MAX (-415)
52#define PHYSICS_BRIDGE_WORLD_X_MIN 0x78
53#define PHYSICS_BRIDGE_WORLD_X_MAX 0x10e
54#define PHYSICS_BRIDGE_HEIGHT_MAX 0x28
55#define PHYSICS_BRIDGE_HEIGHT_MAX_Q12 0x28000
56
57#endif
Physics_MovementMode
Definition constants.h:23
@ PHYSICS_MOVE_FREE_STEERING
Definition constants.h:24
@ PHYSICS_MOVE_FACING_DRIVE
Definition constants.h:25
@ PHYSICS_MOVE_FACING_DRIVE_AIR_ROLL
Definition constants.h:26
@ PHYSICS_MOVE_FREE_STEERING_AIR_ROLL
Definition constants.h:27