|
OpenBF1942-Plus
Refractor 1, rebuilt from scratch
|
Status: .font decoded and drawn: font/bf1942.font and its gray TGA, checked in a screenshot. Minimap from the colour tiles and setMinimapIcon; health bar and magazine textures. .dif not decoded. The original HUD layout and textures are not read: our layout is a stand-in. Code: engine/hud.*, drawn by Renderer::hud.
font/bf1942.font and font/copy of bf1942.font.
The font/<language>/ folders hold trebuchet ms8/11/14/18 and standard6, each in a plain and a - latin variant, with a TGA per .dif. The .dif files are text: a header line, a version (2), the face name, the texture size (256), then glyphs <count> and tab-separated rows.
uint32 record count, uint32 strings per record (9 in bf1942), then UTF-16LE zero-terminated strings: per record a key and one text per language. The first record is LANGUAGE with the language names: English, French, Italian, Spanish, German, Japanese, Korean, Chinese. bf1942 has 1,693 records, 1,655 distinct keys. The radio uses RADIO_HEADING_<x> for menu entries and RADIO_<x> for sent messages (RADIO_HEADING_LOCAL_FIRE_IN_HOLE = "FIRE IN THE HOLE!", RADIO_LOCAL_FIRE_IN_HOLE = "Fire in the hole!").
Key layout from the Mac client decompilation (Radio::handleRadioInput; F1 as the first key is inferred). Closed, F1–F7 open a category; F8 shows / hides the category list. In a category, F1–F7 send:
| Category | Keys |
|---|---|
| F1 radio confirm | F1 roger, F2 negative |
| F2 request | F1 pickup, F2 reinforcement, F3 anti-tank, F4 naval, F5 air, F6 artillery ready, F7 APC |
| F3 spotted | F1 armor, F2 infantry, F3 unit, F4 ship, F5 submarine, F6 airplane, F7 scout |
| F4 game (conquest) | F1–F3 control points 1–3, F4 the closest, F5–F7 points 4–6: "defend" if the sender's team holds it, else "attack" (CTF: F4–F7 flag messages, not done) |
| F5 local confirm | F3 defending, F4 attacking, F5 roger, F6 negative |
| F6 local alarms | F1 wait, F2 fire, F3 hold fire, F4 fire in the hole, F5 medic (in a vehicle: need repairs), F6 take cover (aircraft: check your six), F7 bail out (ship: abandon ship) |
| F7 local tactics | F1 cover me, F2 hold position, F3 go for enemy flag, F4 fall back, F5 stick together (in a vehicle: get in), F6 follow me, F7 go |
The maintainer's captures of the original client show the same layout (each category opened once) and how it is drawn: a row of buttons at the top left, each a 64 × 32 texture from menu/texture/radio/ holding the frame and icon (icon_f1–icon_f8 for the categories, icon_roger, icon_pickup, icon_controlpoint_1–7 and _closest, icon_cancel…), with the key ("F1") written on it and a label below (RADIO_HEADING_<x>; RADIO_HEADING_ON_OFF for F8). Closed: the eight categories in slots at x 31, 96, 160, 225, then 331, 396, 461, 526 (800 × 600 units), labels at y 30. Open: the category's button above its slot, its messages and F8 CANCEL in the row below (y 29), labels on two alternating lines (y 56, 67). Some buttons are drawn greyed; the rule is not known (we draw all lit). F8 shows or hides the closed row.
Radio messages reach the whole team; local ones only teammates within 70 m (GameServer::radioMessage). The AI only receives (AIRadio); bots send nothing.
A screen-space overlay drawn after the 3D scene:
The pixel scale is height / 480, rounded. The weapon line shows rounds / spare magazines and RELOADING.
Each seat's PlayerControlObject names it: setVehicleIcon "Vehicle/Icon_sherman.tga" (a 128 × 128 picture, menu/texture/vehicle/), setVehicleIconPos 54/103 (the seat's spot on it, texels; the gunner's seat of the same tank says 32/61), setNumberOfWeaponIcons, setPrimaryAmmoIcon / setSecondaryAmmoIcon (menu/texture/ammo/icon_cannon…, 64 × 64, art in the lower half) and setPrimaryAmmoBar / setSecondaryAmmoBar (ABAmmoBarReloadBar, ABAmmoBarHeatBar).
Measured on the captures (800 × 600 units): the soldier's health bar stays; the vehicle's green bar (vehicle_healthbar_*_32x64) at (174, 525.5); the picture at (199, 450), 128 × 128, with a blue dot at the icon position (matches within a unit); per weapon, primary from x 550 and secondary from 670: a small bar (reload: green and segmented; heat: dark) at y 547, the ammunition bar (ammobar_*_32x64) 19 to the right, then the panel (ammobar_vehicle_panel_64x64) with the icon 40 to the right, the count at its top left (we show the seat's rounds on the primary and fill its bar by rounds / magSize; the secondary is not fired, so its bar stays full without a count). A single weapon icon goes in the right slot (guessed). Also seen: a soldier posture figure beside the health bar and, for a tank's turret, a direction dial at the bottom centre (icon_tank_turn_*); neither drawn.
Templates name their marker with setMinimapIcon "Minimap/minimap_icon_tank_16x16.tga" (read as menu/texture/minimap/<name>, .dds in menu.rfa) and its size with setMinimapIconSize (16 when absent; 32 and 64 for ships). Soldier templates set their national flag (flag_us.tga, menu/texture/flag_us). menu/texture/minimap/ also holds map_circle, map_dot, class icons and Objectives/Objective000–100 (capture progress, not drawn).
No level ships a map picture: the level's colour tiles are the top view. We shrink them into a 512² texture (nearest texel, as the terrain shader samples them: tile Tx<a>x<b> covers x from a, z from b) and tint what lies under the water level.
Drawn top right as measured above, north up, 2 × 200 m around the player (estimated from the grid lines in a capture; the original's zoom levels are not read), with the level's grid (8 × 8 cells; the capture labels the player's cell, G6: not drawn). Markers: control points (the owner's flag, else a grey circle), vehicles with an icon turned to their heading (crew colour, empty ones grey), teammates on foot (dots), the player (yellow). Enemies are not shown.