Skip to content

Screen effects

The full-screen effects scripts call for: the six effects ScreenQueueEffect(type, seconds) queues, the thirteen looks CfgScrFx configures (each a screen tint and a motion-blur strength the screen blends to) and the four effect layers the weather bindings start and end. Every view has its own screen-effects manager (Graphics: screen effects).

What is complete

All six queue types, thirteen look slots and four layers are listed. The queue's handlers and the layers' tags are read from the executable; the looks' numbers are the CfgScrFx calls of config_preload2.lua (looks 3 and 4 have none). Who uses looks 1, 6, 11 and 12 is not traced.

23 entries. Data: research/references/screen-effects.yaml.

queue

6 entries.

Number Code Calls Scripts What
0 0x0018d49c 176 37bfa135, 6ecd70b0, global.lua, hifi.lua, level100.lua, level100main.lua Fade in from black
1 0x0018d4c8 300 36763710, global.lua, level1.lua, level100.lua, level100main.lua, level101.lua Fade out to black; also ends look 2 for the view's player
2 0x0018d534 69 36763710, level11.lua, level11_chapter6.lua, level14.lua, level20.lua, level2_clinic.lua Letterbox in: two black bars, each up to 12% of the screen high; clears the HUD's panels
3 0x0018d564 108 36763710, level101.lua, level102.lua, level103.lua, level104.lua, level105.lua Letterbox out
4 0x0018d57c Start look 5's blur pulse: it rises over the look's in time, holds, then ends itself
5 0x0018d59c End the blur pulse over the look's out time (at once when the seconds are 0)

look

13 entries.

Number Colour In (ms) Out (ms) Blur Set by What
0 0, 0, 0, 0 50 3000 150 0x00284280 The flash's ghost grid (Flash_Use); ends through look 4
1 0, 0, 0, 0 0 0 75
2 51, 25, 0, 80 1000 5000 150 0x00236d28 (sets human flag 0x80000); ended by 0x00236fb8 and ScreenQueueEffect(1) Rage: a dark brown tint and the ghost grid of the last frame, strongest at the edges (the rage look)
3 after look 2 ends (0x0018b950) Rage's end: the ghost grid fading over 2,500 ms, then look 8
4 after look 0 ends (0x0018b950) The flash's end: the ghost grid, flat alpha 200, fading over 1,500 ms, then look 8
5 1250 4000 ScreenQueueEffect 4 and 5 The blur or glow pulse, drawn through the device's blur slot (+0x108)
6 255, 255, 255, 255 30 30 0 A white flash (from its colour and 30 ms times)
7 0, 0, 0, 0 1000 5000 1 EnableHeat Heat haze
8 0, 0, 0, 0 0 0 15 its out time ends look 3 (0x0018b950) The hand-back: the motion blur turns it into the base look
9 0, 0, 0, 0 0 0 15 SetLevelColour; ExitStore returns to it The level's colour tint
10 0, 0, 0, 0 0 0 15 EnterStore The look inside a store
11 0, 0, 0, 0 0 0 15
12 0, 0, 0, 0 0 0 0

layer

4 entries.

Number Class Bindings Calls Scripts What
0 OE_Rain StartRain, EndRain 67 global.lua, level101.lua, level102.lua, level103.lua, level104.lua, level105.lua Rain
1 OE_Fog StartFog, EndFog 34 global.lua, level101.lua, level102.lua, level103.lua, level104.lua, level105.lua Fog
2 OE_FilmGrain StartFilmGrain, EndFilmGrain Film grain; StartFilmGrain does nothing in this build, so no script starts it
3 OE_RoomSmoke StartRoomSmoke, EndRoomSmoke 47 a1ab63b7, global.lua, level101.lua, level102.lua, level103.lua, level104.lua Smoke filling a room

Sources and evidence

Evidence levels used: confirmed-code, confirmed-runtime, speculative.

  • SLUS_212.15, ScreenEffectsManager.cpp (0x0018b168-0x0018e7c0); config_preload2.lua, CfgScrFx

Fields

Field Type Hand-written Meaning
id str Our stable id: queue-<n> (a ScreenQueueEffect type), look-<n> (a CfgScrFx slot) or layer-<n> (an effect layer).
kind str queue, look or layer.
number int The number the binding takes: effect type, slot or layer.
handler hex Queue: the code the effect's jump-table entry runs, read from the executable.
class str Layer: the class tag its object is allocated with, read from the executable.
colour list Look: {r, g, b, a} (0-255) CfgScrFx gives it (colour form).
in_ms int Look: milliseconds to blend in (slot +0x10, kept in seconds).
out_ms int Look: milliseconds to blend out (slot +0x14).
value int Look: the colour form's fifth number (slot +0x18, the motion-blur alpha).
hold_ms int Look: milliseconds kept as 60 Hz frames (slot +0x20; look 5: the pulse's hold).
value2 int Look: the colour form's seventh number (slot +0x1c).
strength int Look 5: the pulse's strength (manager +0x148).
factors list Look 5: the two floats of the numeric form (manager +0x14c, +0x150).
set_by str Who switches to it or makes it.
bindings list Layer: the bindings that start and end it.
calls int Script calls: ScreenQueueEffect with the type, or the layer's bindings.
scripts list The scripts that make those calls (at most six).
meaning str yes What it shows, 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.