Camera types and switches¶
The camera classes the game makes, by the type number each class reports, and the switches CamEnable
turns on and off (Camera, camera bindings). A script
holds a camera by handle; the type says which class the handle is.
What is complete
All fourteen classes the code makes are listed: types 10, 14 and 15 belong to no class. The types, tags and
vtables are read from the executable; sizes and makers are from the factory 0x0011e1b0 and the getters. All
fourteen switches (0-13) are listed with the flag each sets and its default; switch 8's part in the rail camera's
choice of targets is not traced further.
28 entries. Data: research/references/cameras.yaml.
type¶
14 entries.
| Number | Class | Made by | Calls | Scripts | What | Notes |
|---|---|---|---|---|---|---|
| 0 | Cam_Fixed |
CameraCreateFixed |
11 | 36763710, level3_chase.lua, level51_chapter9.lua, level52.lua, level54.lua, level55_lizziesattack.lua |
A camera at a set place that turns to look at a target | |
| 1 | Cam_Locked |
CameraCreateLocked |
355 | 36763710, 670ba2b0, level1.lua, level100.lua, level111_hifi_init.lua, level11_chapter2.lua |
A camera with a set place and direction; CamLockLocked gives it humans to track |
|
| 2 | Cam_Follow |
CamSetupFollow |
1 | global.lua |
The player's follow camera (Camera) | |
| 3 | Cam_Spline |
CamSetupPoizo |
6 | level14.lua, level3_chase.lua, level55_punkfight.lua, level87_chap1_tutorial.lua, level87_chap4_street2.lua, level9_chap3_escape.lua |
The scripted camera path (CamSetupPoizo, CamAddPoizoPoint) |
|
| 4 | Cam_Scene |
The camera of scenes and in-engine movies; game time is not capped while it is current (Boot) | Made by the scene start 0x0039d870, 0x00354558 and the movie player 0x0042a938. |
|||
| 5 | Cam_Transition |
CameraMakeActive |
627 | 36763710, 670ba2b0, 6ecd70b0, d26c7832, f2ede7bf, global.lua |
The blend between the previous and the new camera (CameraMakeActive with a blend time) |
|
| 6 | Cam_Power |
The power-move camera: a finisher clip's frame events (0x39 begin, 0x3b shot, 0x3a cut, 0x3d end, read by 0x00101dd8) cut it to fixed shots while switch 9 is on |
||||
| 7 | Cam_Mug |
The mugging camera, made by human code (0x0022cb00) |
||||
| 8 | Cam_Mini |
The mini-game camera (its name string is Minigame), made by human code (0x0022d030) |
||||
| 9 | Cam_Rail |
CamSetupRail |
46 | level11_chapter6.lua, level2.lua, level3_chase.lua, level51_chapter8.lua, level51_chapter9.lua, level54.lua |
A camera that runs along a rail of points after its target (CamAddRailPoint) |
|
| 11 | Cam_Hood |
CamSetupHood |
4 | level51_chapter9.lua, level84_chase.lua |
A camera mounted on a vehicle | |
| 12 | Cam_Failed |
CamUseDeathCamera |
33 | level101.lua, level102.lua, level103.lua, level104.lua, level105.lua, level107.lua |
The death camera | The factory only returns the existing one (it calls the getter with 0). |
| 13 | Cam_Win |
CameraCreateWin |
33 | level101.lua, level102.lua, level103.lua, level104.lua, level105.lua, level107.lua |
The level-won camera that circles a human | The factory only returns the existing one (it calls the getter with 0). |
| 16 | Cam_3rdPerson |
CameraCreateThird |
3 | level3_chase.lua, level81_chatterbox.lua |
A third-person camera behind a target |
switch¶
14 entries.
| Number | Sets | Scope | Default | Calls | Scripts | What |
|---|---|---|---|---|---|---|
| 0 | 0x0050b1b8[player] |
per player |
1 | 52 | level101.lua, level102.lua, level103.lua, level104.lua, level105.lua, level107.lua |
Right-stick turning and the zoom buttons for the player: off, the stick step returns |
| 1 | 0x0050b1cc |
global |
0 | 6 | level60.lua, level61.lua, level62.lua, level63.lua, level64.lua, level84_chase.lua |
An extra sphere test (0x001303c8) in the follow camera's world collision |
| 2 | rail camera +0x3e6 |
per player |
0 | 1 | level83_c5_apartment.lua |
Rail framing: the keep-in-frame tests (0x00140ad0, 0x00140d68) also weigh how near the target is to the current segment's rail points (within 2 m) |
| 3 | 0x0050b1c0 |
global |
1 | 216 | hifi.lua, kinghill.lua, level101.lua, level102.lua, level103.lua, level104.lua |
Two-player views: a view shows only while its player still counts (0x00123500); off, both always show |
| 4 | 0x0050b1c8 |
global |
1 | 74 | caps.lua, hifi.lua, kinghill.lua, level101.lua, level102.lua, level103.lua |
With 0x0050b1c4 (set by 0x00418ac8), a player is a camera target only while he still counts |
| 5 | follow camera +0x468 |
per player |
1 | 2 | level81_chase.lua, level81_cracker.lua |
The follow camera's sprint zoom |
| 6 | 0x0050b1d0 |
global |
1 | 7 | level60.lua, level61.lua, level62.lua, level63.lua, level64.lua |
Camera shake: off, the shake offset is not added to the view (the pad still rumbles) |
| 7 | 0x0050b2ac |
global |
1 | 1 | level54_park.lua |
Leading rail modes: on, the camera stands off the rail, the lead (+0x35c) from the target in plan; off, it stays on the rail |
| 8 | 0x0050b2b0 |
global |
1 | 1 | level81_chase.lua |
Part of the rail camera's choice of targets; not traced |
| 9 | 0x0050b1d4 |
global |
1 | 3 | level55_subway.lua, level99_lesson2.lua |
Lets a power move's animation events (0x39 begin, 0x3b shot, 0x3a cut) use the power camera (type 6); the end 0x3d ignores it |
| 10 | 0x0050b248, 0x0050b249 |
both pads |
1 | 1 | level55_punkfight.lua |
Auto-follow: the follow camera swings behind the player |
| 11 | 0x0050b23c |
global |
1 | The look-behind button: off, the reverse-camera button never turns the view round (Human_SetWheelchairControl clears it) |
||
| 12 | 0x0050b2b4 |
global |
1 | 2 | level82_chapter5.lua, level93_chapter6.lua |
Part of the rail camera's choice of targets: off, a player is a target only while he still counts |
| 13 | 0x0050b1e0 |
global |
0 | 3 | level31_birdie.lua, level86_chapter4.lua, wchair.lua |
Keeps both two-player views shown even when a player no longer counts |
Sources and evidence¶
Evidence levels used: confirmed-code, inferred.
- SLUS_212.15, camera factory 0x0011e1b0 and CamEnable 0x0011de58
Fields¶
| Field | Type | Hand-written | Meaning |
|---|---|---|---|
id |
str | Our stable id: type-<n> for a camera type, switch-<n> for a CamEnable switch. |
|
kind |
str | type or switch. |
|
number |
int | The type (what the class's type function returns) or the switch number. | |
class |
str | Type: the class tag the game allocates it with, read from the executable. | |
vtable |
hex | Type: the class's vtable. | |
size |
hex | Type: the object's size in bytes. | |
made |
str | Type: how the game makes one: the factory 0x0011e1b0, or a getter that keeps it. |
|
made_by |
list | Type: the bindings that make or set it up. | |
sets |
str | Switch: the flag CamEnable writes. |
|
scope |
str | Switch: one flag for all, one per player, or one per camera. | |
default |
int | Switch: its value after a level's camera reset (0x00122b80). |
|
read_by |
str | Switch: the code that reads it. | |
calls |
int | Script calls: of the bindings that make the type, or CamEnable with the switch. |
|
scripts |
list | The scripts that make those calls (at most six). | |
meaning |
str | yes | What it is or does, in our words. |
source |
str | yes | Where the entry comes from: a script and binding, an address, a chunk. |
evidence |
str | yes | How we know: confirmed-code, confirmed-runtime, inferred or speculative (evidence levels). |
notes |
str | yes | Our own short notes. |