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_COLLISION_CONSTANTS_H
2#define PCDOGS_COLLISION_CONSTANTS_H
3
4/* Values are the tagged source layouts consumed by the collision resolver. */
11
17
18/* Int-valued masks preserve the promotions of the original immediate operands. */
19#define COLLISION_RESOLVER_CONTACT_INITIALIZED 0x01
20#define COLLISION_RESOLVER_VELOCITY_FRAME 0x02
21#define COLLISION_RESOLVER_SOURCE_STATIONARY 0x04
22#define COLLISION_RESOLVER_TRANSFORM_NORMAL 0x08
23#define COLLISION_RESOLVER_WORLD_SOURCE 0x10
24#define COLLISION_RESOLVER_MOTION_CORRECTED 0x20
25
26#define COLLISION_POLYGON_TRIANGLE 0x1
27#define COLLISION_POLYGON_PLATFORM_CONTACT_ENABLED 0x2
28#define COLLISION_POLYGON_GROUND_ADJACENCY 0x4
29#define COLLISION_POLYGON_STEEP_GROUND_REJECT 0x40
30#define COLLISION_POLYGON_CAMERA_PROBE_SKIP 0x200
31#define COLLISION_POLYGON_REVERSE_FACE 0x400
32#define COLLISION_POLYGON_GROUND_EXCLUSION_LOW 0x800
33#define COLLISION_POLYGON_GROUND_EXCLUSION_HIGH 0x1000
34#define COLLISION_POLYGON_WALL_RESPONSE 0x2000
35#define COLLISION_POLYGON_EDGE_CONTACT 0x4000
36
37#define COLLISION_NODE_COLLIDABLE 0x40
38#define COLLISION_NODE_SKIP_GROUND_QUERY 0x10
39#define COLLISION_NODE_SPECIAL_CONTACT 0x80
40#define COLLISION_NODE_CAMERA_PROBE_SKIP 0x100
41#define COLLISION_NODE_SKIP_POLYGON_QUERY 0x200
42#define COLLISION_NODE_SKIP_OBSTACLE_QUERY 0x400
43#define COLLISION_NODE_PROXY_GEOMETRY 0x2000
44
45#define COLLISION_CALLBACK_CONTACT_PROBE (-2)
46#define COLLISION_CALLBACK_DAMAGE_PROBE (-1)
47#define COLLISION_PROJECTILE_RESPONSE_POLARITY 0x400
48#define COLLISION_HIT_COOLDOWN_FRAMES 15
49#define COLLISION_MAX_PROJECTILE_CONTACTS 6
50#define COLLISION_GROUND_NORMAL_MIN_Q12 0xb50
51#define COLLISION_NEAR_VERTICAL_NORMAL_Q12 0xff9
52#define COLLISION_PLANE_TOLERANCE_Q4 0x550
53#define COLLISION_SEPARATION_BIAS_Q6 0x55
54#define COLLISION_DEEP_PENETRATION_TOLERANCE_Q4 0xaa0
55#define COLLISION_GROUND_HEIGHT_TOLERANCE_Q6 0x555
56
57/* Both independently trigger the same matrix-transform path; original names remain unknown. */
58#define COLLISION_NODE_TRANSFORM_PRIMARY 0x2
59#define COLLISION_NODE_TRANSFORM_SECONDARY 0x20
60#define COLLISION_NODE_CULL_DISABLED 0x1
61#define COLLISION_NODE_CULL_FORCE_HIDDEN 0x80
62#define COLLISION_CULL_CENTER_TEST 0x8000
63#define COLLISION_PLANE_REVERSE_TEST 0x1
64#define COLLISION_ATTACHMENT_SKIP_ACTOR_SCAN 0x1
65
72
77
78#define COLLISION_NODE_REFRESH_GROUND_CONTACT 0x1000
79#define COLLISION_DAMAGEABLE_CHAIN_MAX_RENDER_LAYER 11
80#define COLLISION_PROBE_GROUND_RADIUS_LIMIT_Q6 0xc0
81#define COLLISION_EDGE_SWEEP_PADDING_Q6 0x154
82#define COLLISION_MINIMUM_FRACTION_MOTION_Q12 0x352
83#define COLLISION_CLIP_NORMAL_COMPONENT_LIMIT 0x4000
84#define COLLISION_CLIP_NORMAL_COMPONENT_RANGE 0x8000
85#define COLLISION_UNSET_CONTACT_DEPTH_Q12 0x7ffff000
86#define COLLISION_REJECTED_CONTACT_DEPTH_BITS 0x80001000
87
95
96#define COLLISION_SURFACE_TRAIL_SHIFT 7
97#define COLLISION_SURFACE_TRAIL_MASK 3
98#define COLLISION_EDGE_INDEX_MASK 3
99
104
105#define COLLISION_TRIANGLE_HEIGHT_MIN_NORMAL_Q12 0x8e
106#define COLLISION_GROUND_SLOPE_THRESHOLD_Q24 0xb50000
107#define COLLISION_NO_GROUND_HEIGHT_BITS 0xc0000800
108#define COLLISION_WALL_PLANE_CAPACITY 16
109#define COLLISION_WALL_VERTEX_CAPACITY 64
110#define COLLISION_EXCLUDED_REGION_MIN_X 0x118
111#define COLLISION_EXCLUDED_REGION_MAX_X 0x190
112#define COLLISION_EXCLUDED_REGION_MIN_Z (-470)
113#define COLLISION_EXCLUDED_REGION_MAX_Z (-370)
114#define COLLISION_EXCLUDED_REGION_MIN_Y 6
115#define COLLISION_EXCLUDED_REGION_MAX_Y 12
116#define COLLISION_PLANE_ALIGNMENT_REJECTION_Q24 0x12000
117#define COLLISION_MOTION_PROJECTION_TOLERANCE_Q4 5
118#define COLLISION_DEBUG_POLYGON_LIST_CAPACITY 10
119#define COLLISION_BOUNCE_NORMALIZATION_NUMERATOR 0xaaa0000
120#define COLLISION_SOUND_COOLDOWN_RECORD_OFFSET 0xc8
121
122#define COLLISION_CORRECTION_SQUARED_TOLERANCE 7
123
129
130#endif
Collision_ProbeResult
Definition constants.h:125
@ COLLISION_PROBE_SKIP_PAIR
Definition constants.h:126
@ COLLISION_PROBE_NO_RESPONSE
Definition constants.h:127
Collision_SurfaceTrailMode
Definition constants.h:101
@ COLLISION_SURFACE_TRAIL_IMPACT
Definition constants.h:102
Collision_ActorClass
Definition constants.h:67
@ COLLISION_ACTOR_CLASS_POWERUP
Definition constants.h:70
@ COLLISION_ACTOR_CLASS_PROJECTILE
Definition constants.h:69
@ COLLISION_ACTOR_CLASS_CHARACTER
Definition constants.h:68
Collision_ExtentEncoding
Definition constants.h:74
@ COLLISION_EXTENTS_PACKED_PAIRS
Definition constants.h:75
Collision_TargetKind
Definition constants.h:89
@ COLLISION_TARGET_MESH
Definition constants.h:90
@ COLLISION_TARGET_CHAIN
Definition constants.h:93
@ COLLISION_TARGET_ORIENTED_BOX
Definition constants.h:91
@ COLLISION_TARGET_ACTOR
Definition constants.h:92
Collision_ProbeClass
Definition constants.h:13
@ COLLISION_CLASS_WALL_PROBE
Definition constants.h:14
@ COLLISION_CLASS_CAMERA_PROBE
Definition constants.h:15
Collision_NodeKind
Definition constants.h:6
@ COLLISION_NODE_ACTOR
Definition constants.h:9
@ COLLISION_NODE_MESH
Definition constants.h:7
@ COLLISION_NODE_ORIENTED_BOX
Definition constants.h:8