Front end

The screens the game shows outside a mission: the main menu, the pilots, the settings, the briefings and the rest. interface.cpp holds them, and GenILib's interf.cpp runs them.

Unverified: the files of the code between the two files' known code (0x004282C6 to 0x004296A0, Source files). interface_run and the front end's start-up run the screens, so OpenReliant puts them with GenILib's interf.cpp; the main menu and its drawing are one of the game's screens rather than what runs them, so they go with interface.cpp.

In OpenReliant

genilib/interf.zig runs the screens (interface_run) and opens what they draw with. game/interface/ holds the screens: the front end's screen and pointer in canvas.zig, the main menu in main_menu.zig, GAME OPTIONS in game_options.zig, the settings screen in settings.zig, the mods screen in mod_manager.zig, the pilot roster in pilot_roster.zig, the saved games in saved_games.zig, and the YES or NO dialog and the box saying a save failed in dialog.zig. The picture behind the screens is matmanager.Background (game/matmanager.zig). The loading screens are in game/xtrabits/loading.zig.

OpenReliant opens in the front end unless --mission names a mission. The pilot roster's START GAME, or a game its LOAD GAME loads, leads into the Reliant's rooms (The Reliant's rooms). A mission the front end or the rooms start flies at once, after the music's fade and the hangar's movie but for INSTANT ACTION's and the simulator pod's (The simulator pod). As a mission of the campaign ends, OpenReliant plays the landing or a chapter's end (Movies), and the campaign goes on to the next mission's briefing, or turns to the restart screen (After a mission). INSTANT ACTION's goes back to the main menu.

Ported so far: the screen loop, the main menu, QUIT's dialog, INSTANT ACTION, GAME OPTIONS (GAME OPTIONS), the audio, the controls and the video, on OpenReliant's settings screen (The settings screen), the mods screen (The mods screen), the pilot roster with SET GAME DIFFICULTY, the saved games (The saved games), the Reliant's rooms with a new pilot's induction, the news report and the in-game options, the briefing (Briefing), the loading screens, the intro and the transitions between the screens ported, the movies around a mission (Movies), and the restart screen. Not yet:

  • The remaining multiplayer setup controls (#404).
  • The movies between the screens not yet ported, which come with their screens (Movies).

Fix: a screen takes no press until the button held as it was entered comes up. The movie between two screens gives the press that chose the second time to end; where the transitions are off, the game lets it go on to what lies under the pointer on the new screen.

Improvements, each marked so in the code:

  • The game switches the display to 640 by 480 for the front end. OpenReliant keeps the window as it is, and draws the front end as large as fits in it, centred, so that it keeps its shape.
  • A screen's background picture is scaled to the screen's height, keeping its proportions, and centred horizontally, where the original stretches it over the screen. The original pictures, which are 4:3, cover the screen the same way, and a wider picture from a mod extends past the sides to fill a wider window (Modding).
  • The pointer is where the system's is over the window, rather than DirectInput's movements added up.
  • The mouse's wheel scrolls the lists, the saved games' and the controls', three rows a notch, as the system scrolls text by default; the game reads no wheel.
  • The front end, loading screens, pause menus and in-game options show OpenReliant's version in dim text at the bottom right of the window (Pause menu, The Reliant's rooms). This includes the multiplayer browser and lobbies. The ITAC and the Reliant's rooms omit the tag.

Server browser

MULTI PLAYER opens the browser on the hologram backdrop (interface\sinfade.tga). StarLancer drew its connection options with interface\frntend3.spr at 0x004345B0. OpenReliant uses the same buttons for the Internet and LAN lists and for Direct Connect. The two panels share their top and bottom edges. The selected server's description wraps above Join Game. More rows fit at higher resolutions inside the same 4:3 frame.

Enter a server IP or paste an invite under Direct Connect. Enter or Connect opens the game connection. The arena shows the host's ships in chase view. It uses the flight HUD and runs the installed mods' player scripts through the same display layer as a local mission. Keyboard, mouse and controller input use the usual flight bindings. The host applies those commands and sends back speed, throttle, fuel and objective counts for the HUD. Escape leaves the server.

Session lobby

Host opens a game type chooser. Deathmatch opens the lobby immediately, starts a LAN listener on UDP port 27020 and reserves a place for the local pilot. Co-op opens a lobby for the campaign with four seats. Friends use Direct Connect with the host's LAN IP. The lobby shows them the same roster and writes their own callsign in white. In co-op, guests click Ready. The host can select Start Game once at least two pilots are present and all guests are ready. The co-op host can select a guest in the roster and remove them from the lobby. Joining a deathmatch in progress takes the pilot straight to flight. Back or Escape leaves the lobby for the browser. Main Menu leaves the lobby for the main menu. The dedicated server uses the same simulation and admission checks and starts on its existing two-pilot threshold.

The original's Host Co-op opens multiplayer_sessions_screen (0x0043CA50). Host Deathmatch opens session_loadout_screen (0x0044B950). Both screens open the network session on entry for the host (directplay_create_session, 0x004BC550). The deathmatch screen combines setup and the waiting roster. Its Start Game action returns to WinMain to launch (0x0044CAC2). The co-op screen has a ready check and needs at least two pilots before launch (0x0043D680). These setup screens are the lobbies. Co-op opens the campaign briefing and deathmatch starts the selected arena from its setup screen. Both screens use interface\\mulfade.tga and the controls from interface\\frntend3.spr. The co-op roster starts at (355, 179) and spaces its four rows 13 pixels apart. The deathmatch roster starts at (431, 126) and spaces its eight rows 14 pixels apart. The co-op draw function uses string 0xC0 both above the game name and on the second line of Start Game. The French disc translates that entry as OPTIONS.

The deathmatch description uses the original scroll arrows and appends the mode's team rules. Its text shares the ship field's inset, so the outline glyphs clear the frame on every side. The mouse wheel can also scroll the description when the pointer is over it.

Asteroid Field is the default for a new deathmatch lobby (0x0044C18E). The host can enable TEAMPLAY on Asteroid Field, Dark Reign, Tag Bomb and Hunt the Shadow. The option follows the scenario table (mp_update_team_option, 0x0044CB30). The four team colours and the field's dropdown follow session_loadout_draw (0x0044CC58, 0x0044DB5E).

The original ends deathmatch by unloading the arena, closing DirectPlay and opening Main Menu (0x004A999E to 0x004A99C7). Improvement: when the LAN host chooses Leave Mission, all pilots in that session return to its deathmatch setup screen. The host can pick a different arena and start again. Fighter choices, team choices and callsigns stay with their admissions. The next match starts with fresh ships, scores and objectives. A guest choosing Leave Mission leaves that session. Back from the host's setup screen closes the session.

Improvement: clicking the mode list opens the detailed mode picker with the descriptions and team-play notes from the installed language file. The ship selector shows the installed ITAC fighter pictures, class, armament and special abilities. Pilots joining a dedicated server or a match already in progress can open the same selector from the browser. The lobby uses the pilot's profile callsign and the original translated New Session name. The host opens a fresh campaign when choosing Co-op. New resets the selection and Load opens the saved game screen over the lobby (0x0043D555 and 0x0043D586). Loading selects the saved mission and checkpoint on the host. The host sends the selected mission to the waiting crew through the roster, as the original does with message 8 (net_send_coop_session, 0x004BA2D0). The deathmatch host can change AI Turrets, Target Players and, in modes that support it, Teamplay. The first two switches use the original positions and installed labels from session_loadout_draw (0x0044D022 onward). AI Turrets starts off and Target Players starts on (session_loadout_screen, 0x0044C14B and 0x0044C179). The host keeps the settings when the group returns to setup for another match.

The co-op lobby shows nine chat lines and the deathmatch lobby six, as variants 0 and 2 of multiplayer_chat_panel (0x004AE2D0) do. The stock arrows scroll the last 30 lines. Click the field or press Enter to start typing, then press Enter to send. Escape leaves the field. The host supplies the sender's callsign and the lobby shows the original %s: %s format (0x00503184). The cursor blinks every 25 game ticks (0x004AE652). When a co-op guest changes readiness, chat shows the installed system message for that callsign (0x004B7160 and 0x004B721A). Improvement: readiness notices have a separate display budget so repeated toggles cannot fill the chat history. The host still applies every readiness change.

The browser reads matching labels from the installed language table, with English fallbacks. The browser and the mode and fighter pickers fill selected rows to the inner edges of their frames and centre the text vertically. In the pickers, the pointer lights the label under it. A pilot returns to the browser with the host-departure message (string 0x3B7 from the session loss path at 0x004B6C11) if the host closes the session. A connection lost to a transport failure uses the separate connection warning (string 0x5F1).

Automatic discovery and internet joining for player hosts are tracked in #957 and #363.

Multiplayer UI fidelity

The retail front end draws in a 640 by 480 coordinate space. OpenReliant fits that space and its backdrop together in a 4:3 frame. The minimum supported window is 800 by 600. OpenReliant uses sharper outline fonts where they are available. The original font metrics still set the positions and line breaks.

The retail PC recording shows the connection screen at 0:10, the co-op host lobby at 8:20, the host debrief at 20:00, and the guest debrief after a pilot is killed at 41:10. Use the stills to check the display and the executable's draw functions for the coordinates and palettes.

Screen Retail reference OpenReliant behavior and remaining differences
Connection multiplayer_connection_screen (0x00432FC0) The Internet and LAN lists, IP and invite entry and hologram backdrop are deliberate replacements for the legacy provider choices. The browser uses installed button art and labels.
Co-op setup multiplayer_sessions_draw (0x0043DA40) The host and guest have the stock field and roster positions, Ready, chat and navigation. The host can remove the selected guest, select New or load a campaign.
Deathmatch setup session_loadout_screen (0x0044B950) and session_loadout_draw (0x0044CB60) The mode list, team controls, description, ship field, roster, chat and navigation use the stock layout. The detailed mode and ITAC fighter pickers and the return to setup for a rematch are deliberate additions.
Co-op briefing and loadout WinMain (0x004A9AB0) and interface_briefing (0x00437010) The existing campaign briefing and loadout code supplies the rooms, ship and rack views. The host coordinates launch and the crew's choices over the current network protocol.
Co-op debrief multiplayer_debrief_render (0x00429DC0), multiplayer_debrief_text (0x00425240), and multiplayer_chat_panel variant 1 (0x004AE2D0) The retail backdrop, letter, two scroll controls, chat, figures, roster and buttons use the original art and coordinates. Save Game opens the existing save screen over the stock in-game-options backdrop.
Pause, session loss, and standings pause_screen_multiplayer (0x0048E510), pause_session_lost (0x0048E370), and mp_draw_scoreboard (0x004AF650) The pause and flight standings use the stock sprites. The pause controls and connection-loss dialog use the original pause art. Host-only shared pause and scrolling beyond stock capacity are deliberate changes. See Pause menu.

The browser, host game chooser and lobby use the ITAC tooltip art. They read the installed strings for controls shared with retail and fall back to English. The original registers its tooltips in multiplayer_connection_screen, multiplayer_sessions_screen and session_loadout_screen.

The screens

interface_run (0x004289D0) runs the screen whose number interface_screen (0x0051DAC4) holds, each until it returns nonzero. A screen that leads to another sets the number and returns 0. Between screens the render hook (sr + 0x88) is 0x0043E730.

Screen Function Issue
0, the main menu main_menu (0x00428B60)
1, GAME OPTIONS (GAME OPTIONS) game_options (0x0042A620)
3, the audio (Audio) audio_screen (0x0042DAB0)
15, the video (Video) video_screen (0x0042E9B0)
16, the controls (Controls) controls_screen (0x0042B690)
100, the mods screen (The mods screen), which OpenReliant adds #497
101, a mod's options (The mod's options), which OpenReliant adds
102, the game modes screen (The game modes screen), which OpenReliant adds
103, a game mode's briefing (The game modes screen), which OpenReliant adds
104, a game mode's ending (The game modes screen), which OpenReliant adds
105, the GET MODS screen (The GET MODS screen), which OpenReliant adds
7, the briefing (Briefing) interface_briefing (0x00437010)
8, the landing movie: a second's wait, then play_landing_movie (Movies), and 3 landing_movie_screen (0x0043CA30)
10 and 11, the multiplayer sessions multiplayer_sessions_screen (0x0043CA50), with 0x0051D54C set or clear #404
12, the pilot roster 0x00430490
13, the saved games (The saved games) saved_games (0x00431730)
14, the multiplayer connection multiplayer_connection_screen (0x00432FC0) Server browser
17 and 18, a session's loadout session_loadout_screen (0x0044B950), with 0x0051D54C set or clear #404

Any other number returns 3. Unknown: what selects screen 8: WinMain plays the landing itself. What interface_run returns tells WinMain what to do:

Returned Meaning
1 The single-player campaign: the Reliant's rooms before the mission (The Reliant's rooms), or, where skip_briefing is set, the mission without its briefing
2 Fly the mission
3 Quit
4, 5 Set the display up again, then the front end again

Start-up

interface_init (0x004288E0) reads bank_stdsmp from stdsmp.fat, and opens three fonts: handel.fnt (interface_font_handel), interface\optfnt.fnt (interface_font_large) and interface\smlfnt2.fnt (interface_font_small). It makes interface_text_remap (0x00520284), 0xFF for level 0 and each level 1 to 15 itself.

Text

The front end writes with hud_text and hud_text_wrapped through interface_text_remap, ramped by interface_palette_ramp (0x004287C0), the front end's copy of hud_palette_ramp (Pause menu): entries 1 to 15 of VFX's global palette, a ramp of a 0xRRGGBB colour at palette_ramp_brightness. Level 16, which a few glyphs of the fonts use in their first column, reads past the table into the low byte of dialog_button (0x00520294): -1, clear, while no dialog's button is under the pointer, and otherwise palette entry 0 or 1. Fix: OpenReliant leaves it clear.

Improvement: the menu text is drawn with outline fonts at the window's resolution (the built-in Newtown, or a font from a mod), with the bitmap fonts' layout and a black outline like the original text (Outline fonts). --bitmap-fonts, --original and the OUTLINE FONTS setting (Video) draw the bitmap fonts instead.

Improvement: with the crisp filter, the default, a bitmap font's text is drawn at the window's size as VFX writes it: each of a glyph's pixels an opaque square in the grey of its level, eased into the next over a pixel of the frame, so that the letters keep the fonts' own shapes and greys and the dark edge their faint pixels give them, crisp, at any size, where a glyph magnified as it stands comes out soft (Renderer). --original draws them as they stand, bilinearly.

Colour Where
0x40BCFF The main menu's labels, the pilot roster's, and the dialogs
0xFDB951 A panel's labels under the pointer
0xFFFFFF On the pilot roster, the call sign while it is typed, the list's call signs, and a button's label under the pointer; in the in-game options and on the controls screen, a button's label under the pointer; on the controls screen, the row waiting for a key
0xFFFF00 On the controls screen, ! NOT ASSIGNED !
0xFF0000 The developers' text

The pointer

interface_pointer_update (0x004360D0), once a pass of a screen's loop:

  • DirectInput's movement moves interface_pointer_x and interface_pointer_y (0x00520274, 0x00520270), which stay on the screen.
  • interface_pointer_ticks (0x0051DABC) runs on by the ticks since the last call, back to 0 once it reaches 64. The pointer is shape 1 + ticks / 4 of the screen's set: 16 shapes, 4 ticks each.
  • interface_pointer_down (0x0051DA0C) is whether the left button is down; 0x0051D9D4 whether the right is.

The pointer stays on the screen, but its shape stands off its point by the offset its sprite gives: the front end's arrow (frontend.spr) 2 right and 2 down, and the rooms' straight arrow (vrgfx.spr's shape 12) 19 right and 6 down. At the right and bottom edges the shape reaches past the screen, where the game's screen cuts it off. OpenReliant fits the screen into a window of any size, so it cuts the pointer at the screen's edges the same way, rather than showing it beside the screen (canvas.Canvas.onScreen).

A screen chooses what lies under the pointer while the left button is down, rather than as it goes down. interface_hit (0x0043EB30) finds the first of a list of rectangles, each four shorts (corner and size), that holds the pointer, the edges left out.

The main menu

main_menu (0x00428B60) shows interface\sl_splash2.tga behind itself (background_set) and reads interface\frontend.spr (interface_shapes, 0x0051D60C, which holds the shown screen's shapes), which it frees as it leaves. Each screen sets its background and shapes up so before its loop draws its first frame, after the transition movie that led to it; OpenReliant enters a screen before it draws it (Interface.enterShown). It starts the pointer at (320, 200), music\New_Pensive.wav at 127 where no music is playing, and a new campaign (campaign_new). OpenReliant flies each mission of a campaign from the variables the campaign's last mission left, and a mission outside a campaign from a new campaign's (Script VM).

Its items are main_menu_hotspots (0x004E5B90), six shorts each: the corner and size where the pointer finds the item, what choosing it returns, and the shape a panel shows lit. The buttons' shape, 24, goes unused: the drawing lights them with shape 0x1C.

Item Corner Size Returns Shape Leads to
SINGLE PLAYER (27, 123) 184 by 290 0 18 Screen 12
MULTI PLAYER (203, 125) 184 by 290 0 19 Screen 14
GAME OPTIONS (421, 165) 184 by 290 0 20 Screen 1
QUIT (332, 441) 20 by 15 3 24 Its dialog
INSTANT ACTION (300, 441) 20 by 15 0 24 Mission 29

Each pass of its loop:

  1. Escape asks whether to quit.
  2. The next letter of POTATO typed with Control moves the developers' code on; the last sets developer_mode (0x005D5641) until the game quits. With it set, the developers' keys follow.
  3. The pointer, and the item under it (main_menu_item, 0x0051D544). With the left button down over an item, the click plays, sound 11 of bank_stdsmp at 127, panned to the middle. QUIT asks whether to quit, and the others lead where the table says, SINGLE PLAYER, MULTI PLAYER and GAME OPTIONS after a transition movie (0x004AB6E0).

interface_confirm asks whether to quit, with Do you really want to Quit? (string 0x374). YES returns 3.

INSTANT ACTION (0x0042905B to 0x004290E4) flies mission 29 in ship type 2 in the simulator: simulator (0x0057E044) set, and the game's mode (simulator_mode, 0x00524FE4) 2, which the loading screen names "Preparing for Instant Action", as it names mode 1, the Reliant's simulator's training, "Calibrating Simulator". The music fades, the loadout's ship is type 2, and the mission starts again for as long as the pause menu's RESTART asks (mission_restart); then mission_number and the pilot's kills go back to what they were, and the main menu comes back.

In the simulator the wingmen's keys go unheard (Controls), the display's clock counts the script's countdown down (Display), the player's ship is armed by loadout tier 0 where the script replenishes it (ReplenishWeapons), and the wing takes no pilots from the roster.

OpenReliant flies mission 29 so, RESTART starting it again as for any mission, and comes back to the main menu as it ends.

Improvement: while the mods' scripts have registered game modes, OpenReliant adds GAME MODES to the menu: a button like QUIT's and INSTANT ACTION's, at (40, 441), 20 by 15, with its label to its right. It opens the game modes screen (The game modes screen).

Improvement: the menu shows the player a newer release of OpenReliant, which OpenReliant checks for as it starts (Newer releases). While no dialog is up and the pointer's button is up, so that a click under way doesn't answer it, the menu puts up QUIT's dialog with "A new version of OpenReliant, 0.10.0, is available. Open its download page?" in interface_font_large. YES opens the release's page in the web browser. Either answer, or Escape, closes the dialog, and it doesn't come back for that release.

The developers' keys

With developer_mode set:

  • A number key types a digit of mission_number: after one digit it adds a second, after two it starts again.
  • Enter with Shift flies the mission without its briefing, in ship type 0, as Shift with F1 does (skip_briefing).
  • Enter with Control leads to the mission's briefing from the loadout on (briefing_from_loadout, Briefing), in ship type 0 and the campaign's tier 0, and from there back to the main menu.
  • Shift with F1 to F10, F11 or F12 flies it without its briefing, in ship type 0 to 11.

Drawing

main_menu_draw (0x004291C0), the render hook:

  1. The panels' labels, two lines each, centred, in interface_font_large: SINGLE PLAYER at (116, 340) and (116, 356), MULTI PLAYER at (320, 340) and (320, 356), GAME OPTIONS at (524, 340) and (524, 356).
  2. In interface_font_small: QUIT to the right of (360, 439), INSTANT ACTION to the left of (296, 439).
  3. Shape 0x1B at (332, 441) and at (300, 441), the two buttons.
  4. The item under the pointer: a panel's lit shape at its corner, with its labels again in gold, or shape 0x1C in the button's place.
  5. The dialogs (interface_confirm_draw, interface_message_draw).
  6. The pointer.
  7. With developer_mode set, M and mission_number at (5, 5) in red, in font_01.fnt.

The shapes take the palette of their block's set: the pointer's the first, the lit panels' block 0x11, the buttons' block 0x16.

GAME OPTIONS

game_options (0x0042A620), screen 1, which the main menu's GAME OPTIONS opens after interface\main2opt.bik, shows interface\main2opt.tga behind itself, and reads interface\frntend4.spr. Its items, in the order interface_hit tries them:

Item Corner Size Does
AUDIO (30, 165) 152 by 127 interface\optfade.bik over interface\optfade.tga, then the audio (screen 3, Audio)
CONTROL DEVICES (219, 165) 152 by 127 The same, then the controls (screen 16, Controls)
VIDEO (408, 165) 152 by 127 The same, then the video (screen 15, Video)
MAIN MENU (292, 441) 25 by 16 interface\opt2main.bik, then the main menu
QUIT (324, 441) 25 by 16 QUIT's dialog (The dialogs), whose YES quits the game
ABOUT STARLANCER (292, 421) 25 by 16 The about box (The in-game options)
MODS, which OpenReliant adds (324, 421) 25 by 16 interface\optfade.bik, then the mods screen (The mods screen)

An item acts while the left button is down over it. Escape leads to the main menu, as MAIN MENU does.

Its drawing (game_options_draw, 0x0042AFB0), the render hook:

  1. The buttons, shape 0x1B at (292, 421), (324, 421), (292, 441) and (324, 441).
  2. The item under the pointer (roster_item, 0x00520130): an icon's lit shape, 0x13 at (35, 155), 0x14 at (202, 160) or 0x15 at (392, 161), or shape 0x1C on a button. Its label is written white, then in blue again with the others, so it stays blue.
  3. In blue, SELECT AN OPTION (0x108) centred on (320, 95), and the icons' labels, AUDIO (0x109), CONTROL DEVICES (0x10A) and VIDEO (0x10B), centred on (133, 319), (320, 319) and (511, 319), in interface_font_large; ABOUT STARLANCER (0x10C) to the left of (288, 420), MAIN MENU (0xBB) to the left of (288, 440) and QUIT (0xBC) from (353, 440), in interface_font_small; MODS from (353, 420) in the same font.
  4. The about box, where it is up, the dialogs, then the pointer.

Improvement: ABOUT STARLANCER is ABOUT OPENRELIANT, as in the in-game options. MODS is a button of OpenReliant's, right of it as QUIT is right of MAIN MENU.

The settings screen

OpenReliant shows one settings screen where the game has a screen for each setting's kind: GAME OPTIONS' and the in-game options' AUDIO, CONTROL DEVICES and VIDEO (screens 3, 16 and 15), and the pause menu's audio, controls and video (Pause menu). It is laid out on the front end's screen as the game's are, with their buttons and their shapes: interface\frntend5.spr, the audio and video screens' set, which holds the controls screen's widgets too, its buttons in a smoother palette than screen 16's own. A tab for each kind stands in place of their titles, in interface_font_large, each above its icon's column in GAME OPTIONS: AUDIO (0x109) centred on (133, 95), CONTROL DEVICES (0x10A) on (320, 95) and VIDEO (0x10B) on (511, 95), the shown tab's white, the one under the pointer gold, the others blue. A click on a label shows its tab; leaving the controls ends a row's wait. Each menu's AUDIO, CONTROL DEVICES and VIDEO open the screen on that tab, as F1 does in flight on the controls.

Opened from Movie in Behind OK, Escape MAIN MENU
GAME OPTIONS interface\optfade.bik interface\optfade.tga interface\optfade2.bik, then GAME OPTIONS interface\opfad2mm.bik, then the main menu
The in-game options interface\igofade.bik interface\igoptfad.tga for the audio and the video, interface\igofade.tga for the controls interface\igofade2.bik, then the in-game options interface\igof2mm.bik, then the main menu
The pause menu, and F1 The mission, darkened The pause menu's main screen CONTINUE (0x180) in its place, the mission again

The buttons are shape 0x28, 0x29 under the pointer, with their labels in interface_font_small, blue, white under the pointer: OK (0x316) at (299, 422), to the left of (292, 421); MAIN MENU (0xBB) at (299, 443), to the left of (292, 442); RESET DEFAULTS (0x183) at (329, 422), from (357, 421); CANCEL CHANGES (0x5A9) at (329, 443), from (357, 442). The pointer finds OK and MAIN MENU 120 by 15 from x 199, and the other two 100 by 15 from x 329, each at its shape's height. RESET DEFAULTS and CANCEL CHANGES act on the tab shown; leaving writes every tab's settings, the controls only where they are not what the file gives already (Controls). A click acts once, until the button comes up, but for the list's arrows and the audio's knobs.

Improvement: the screen is OpenReliant's own design, built from the game's screens: one screen with tabs, the same from the front end, the Reliant's rooms and the pause menu, where the game has a screen for each kind, and the pause menu has screens of its own.

Audio

The audio is audio_screen (0x0042DAB0), screen 3, which draws with audio_screen_draw (0x0042E2E0). Opening, it keeps the four volumes for CANCEL CHANGES, and the 3D provider (sound_3d_provider, 0x005D5630).

What Where Drawn
Labels SPEECH VOLUME (0x576), SOUND EFFECTS VOLUME (0x2EE), MUSIC VOLUME (0x2EF) and MASTER VOLUME (0x577) to the left of x 295, at y 131, 191, 251 and 311 Small, blue
The sliders' tracks Shape 0x2D, 9 by 9, every 45 from x 313 to 538, at y 136, 196, 256 and 316
The knobs Shape 0x2C, 15 by 27, at y 126, 186, 246 and 306, from x 313 at a volume of 0 to 488 at 127 (audio_knobs, 0x004E76D0, where the pointer finds them)
3D SOUND (0x2F0) To the left of (291, 371); the arrows, shapes 0x13 and 0x14, at (300, 369) and (322, 369), each found 19 by 26, 0x15 and 0x16 under the pointer; the choice from (346, 371) Small, blue

A knob held follows the pointer, 4 pixels to its left, from x 313 to 488, while the button is down over it, and its volume is its place over its travel, 0 to 127; the music's and the master volume change as it moves (AIL_set_stream_volume). Letting go of the sound effects' knob plays stdsmp.fat's sound 14 at its volume, in the middle. The game's 3D SOUND steps back and on through its 3D providers (sound_3d_reopen, 0x0042E2B0): NONE (0x1B3, Miles's own), Aureal A3D Interactive (TM) (0x2F2), Creative Labs EAX (TM) (0x2F1) and Software 3D Audio - RSX (0x416), passing over any that won't open, and keeps the one chosen as [Sound] 3DProvider. RESET TO DEFAULT (0x112) sets the volumes to their defaults, the speech and the master volume at 127 and the effects and the music at 80, and the provider to NONE, and writes them at once; CANCEL CHANGES puts back what the screen opened with. Leaving writes the volumes to [Sound].

Improvements:

  • Every volume changes as its knob moves, where the game changes the effects' and the speech's as the screen is left.
  • The volume is the knob's place over its travel exactly, where the game multiplies by its rounded reciprocal (0x004DC6A4).
  • 3D SOUND chooses how OpenAL Soft renders the 3D sounds (Sound in OpenReliant): AUTOMATIC, by the output, HEADPHONES, with HRTF, or SPEAKERS, where the game's chooses one of Miles's providers, which OpenReliant has none of. REVERB and COMPRESSOR, OpenReliant's own words, turn the reverbs and the master bus's compressor on and off, from the box at (45, 349) and (45, 373). They change the sound at once, and are written to [OpenReliant] (Configuration). With the software Miles of --original, 3D SOUND and REVERB, OpenAL Soft's, are dimmed.
  • RESET DEFAULTS and CANCEL CHANGES set OpenReliant's options too.

Controls

The controls are controls_screen (0x0042B690), screen 16, which draws with controls_screen_draw (0x0042CD30). Opening, it reads the bindings again from default.txt and starlancer.ini over it (key_config_defaults, load_key_config; Controls), keeps the settings and the 74 bindings for CANCEL CHANGES, and shows the list from its top.

What Where Drawn
The panes (45, 136), 324 by 184; (401, 136), 195 by 184 interface_box
Heads FUNCTION (0x17B) from (50, 117), CONTROL (0x17C) from (405, 117) interface_font_large, blue
The list's rows, twelve 15 apart from y 139: the action's name, its string at ControlBinding + 0x2C, from x 50; its binding from x 406. The pointer finds a row 550 by 10 from x 50 Small, blue, the row waiting white; ! NOT ASSIGNED ! (0x5B1) in yellow for an action bound to nothing, but the one waiting
A divider Two lines, 6 and 7 below where a row's text starts, from x 45 to 367 and from 401 to 594 Blue
The arrows (374, 136) and (374, 156); the pointer finds each 28 by 16 from x 370 Shapes 0x1E and 0x1F, 0x20 and 0x21 under the pointer with its button up
PRIMARY CONTROLLER (0x234) From (45, 327) Small, blue
JOYSTICK (0x235), MOUSE (0x236), KEYBOARD ONLY (0x237) Boxes at (45, 349), (45, 373) and (45, 397), labels from x 67 Shape 0x1A, the tick 0x1B three pixels in for the controller steering; JOYSTICK dimmed without a joystick
FORCE FEEDBACK (0x17D), INVERT PITCH (0x17E), HAT ENABLE (0x17F), JOYSTICK ROLL (0x233) Boxes at (349, 325), (349, 349), (349, 373) and (349, 397), labels from x 367; the pointer finds a box 16 by 16 from x 345 Shape 0x1A, ticked with 0x1B where it can be changed and is on

A binding is written SHIFT + K (0x311), CONTROL + K (0x312) or K, then AND (0x545) JOY n (0x32C) for a joystick button, numbered from 0 as the file numbers it. Alt is never written. What can't be used is dimmed to half: FORCE FEEDBACK but from a joystick that has it, steering, and HAT ENABLE and JOYSTICK ROLL but while the joystick steers. INVERT PITCH is ticked while pitch is as the stick has it, JoystickInvert 1.

  • A check box, or a controller, changes where it can be used, and its KeyConfig entry is written at once (0x0042BBB4 to 0x0042BF8C). JOYSTICK ROLL is TwistEnable.
  • An arrow scrolls the list a row, and again each 5 ticks while it is held (0x0042BD09).
  • The list and a conflict's question write the keys by the names the keyboard's layout gives them (Key names).
  • A click on an action's row clears its binding, and the row waits: each pass, the first of the 89 keys of key_names pressed alone, with Shift or with Ctrl is taken, then the lowest joystick button down, which holds the screen until it comes up. Taking one doesn't end the wait: a row takes a key and a button, and a later key replaces the first. A key or a button another action holds asks first (control_binding_find, 0x0042C5F0), with "K", "SHIFT + K", "CONTROL + K" or "JOY n", then This Key is already assigned to (0x5AF) and the action, then Redefine Anyway? (0x5B0), a line each: YES takes it from that action, NO puts the waiting row's binding back, the row waiting on. Escape, Shift, Ctrl and Alt on their own, the lock keys, Pause and Print Screen are not among the keys, so none of them can be bound.
  • A click on another action's row, or on nothing, ends the wait, the old binding back where the row took nothing. A click on a divider puts the old binding back so, but leaves the row waiting; a click on a check box, a controller, a button or an arrow leaves it waiting as it is.
  • Escape asks Would you like to save your changes before leaving this screen? (0x5AB) where a binding has changed; NO reads the settings and the bindings again from the file. Escape, OK and MAIN MENU then write the bindings (save_key_config, 0x0042C630).
  • RESET DEFAULTS sets the defaults, from default.txt (key_config_defaults; Controls), and writes them at once; CANCEL CHANGES puts back what the screen opened with.

Fixes:

  • The game leaves out of the search for a key's holder the action at the key's place in key_names (0x0042C119), where it means the waiting row's, so that pressing again the key a row has just taken asks whether to take it from the row itself, and YES leaves the row without it. OpenReliant leaves out the waiting row's action.
  • A key taken without the question counts as a change, which Escape asks about, as a button and a key taken from another action do; the game asks only after those.
  • Leaving the screen, by Escape, OK or MAIN MENU, while a row waits having taken nothing puts its binding back; the game writes the action unbound.

Improvements:

  • PRIMARY CONTROLLER offers MOUSE, Controller 2, which steers by the mouse (Controls). The game has its case (0x0042BF15) and its string, but neither a place nor a label, so only the file sets it.
  • JOYSTICK is followed by the joystick's name, in capitals, cut short where it would reach the check boxes.
  • A row waiting with nothing taken shows PRESS (0x5AE, the string the game's training prompts write), where the game leaves it blank.
  • Escape while a row waits only ends the wait, as a click on nothing does; the game leaves the screen.
  • Up and Down scroll the list as its arrows do while no row waits, and the mouse's wheel scrolls it; the game scrolls it by its arrows alone.

Video

The video is video_screen (0x0042E9B0), screen 15, which draws with video_screen_draw (0x0042F440). Opening, it keeps what CANCEL CHANGES puts back: the display's mode, the device, the details, the light maps, the view and the transitions (0x0042EA41 on), and the brightness. Its eight rows stand 37 apart from y 129, each label to the left of x 280 and its value from x 352, in interface_font_small, blue:

Row What
129 RESOLUTION (0x10E): the device's display modes, written %dx%d (0x004E8638)
166 3D RENDER MODE (0x10F): the 3D device, by its name
203 TEXTURE DETAIL (0x110): LOW (0x11D) or HIGH (0x11B)
240 GRAPHIC DETAIL (0x111): LOW, MEDIUM (0x11C) or HIGH
277 DEFAULT VIEW (0x28A): COCKPIT VIEW (0x28B), CHASE VIEW (0x28C) or NO COCKPIT VIEW (0x57F)
314 BRIGHTNESS (0x113), where the device has a gamma ramp
351 LIGHT MAPS (0x114)
388 VR TRANSITIONS (0x2D4)

A row with choices has the arrows' box, shape 0x2E, 33 by 26, a pixel above it at x 301; the pointer finds its halves 12 by 23 from x 301 and 318 (video_items, 0x004E76F0), lit under the pointer with 0x2F and 0x30. A row that is on or off has a box, shape 0x1A, two pixels below it at x 311, ticked with 0x1B. The brightness's knob, shape 0x2C, slides from x 347 at 0.5 to 522 at 2 (video_brightness_knob, 0x004E7778), over its track, shape 0x2D, every 45 from x 347 until 572, 10 below the knob's top. The buttons are the controls screen's.

  • An arrow steps its row's choice back or on, round from the last to the first. A view the game doesn't know steps on to the first, and back by one. TEXTURE DETAIL steps between Tdetail 0, LOW, and 1, HIGH, and shows a file's 2 as LOW (0x0042ED4F on, 0x0042F83C); GRAPHIC DETAIL steps round Gdetail 0 to 2, LOW, MEDIUM and HIGH; LIGHT MAPS turns Lmaps on and off.
  • DEFAULT VIEW and VR TRANSITIONS take effect at once, and are written to [Device] View and Transitions at once (0x0042EE3F, 0x0042EFC9 on).
  • The knob held follows the pointer, 4 pixels to its left, and the brightness, 0.5 and its place over its travel times 1.5, sets the display's gamma ramp at once (sr + 0x54): srd3d.dll's set_gamma (0x10005270) sets each of the ramp's 256 levels to its share of the way up, at its power 1 over the brightness, the same for red, green and blue. The device has a gamma ramp, which sets bit 0 of sr + 0x38, where its primary surface takes one (DDCAPS2_PRIMARYGAMMA, 0x10005204); without one, the brightness is hidden.
  • Leaving by Escape, OK or MAIN MENU writes the brightness to [Device] gamma, in hundredths (0x0042F2B3, 0x0042F0AF), and starts the renderer again where the mode, the device, the details or the light maps changed, which writes them to [Device] (0x004A8716 on).
  • RESET TO DEFAULT (0x112) sets the defaults at 0x004E5BF4: the first mode of the second device, the details LOW, the light maps off, the view from the cockpit and the transitions on, and the brightness's knob in the middle of its track.
  • DEFAULT VIEW sets the camera's cockpit mode too, as the pause menu's video screen does (Pause menu).

OpenReliant's VIDEO tab holds OpenReliant's graphics options above the game's rows. Its rows keep the game's columns 20 to the right, each label to the left of x 300, its arrows' box at x 321 and its value from x 372, and stand 30 apart, their arrows' boxes 4 apart. The tab keeps 9 pixels between the tabs' labels, GRAPHICS, the pane and the rows below it:

What Where
GRAPHICS A row at y 121: ORIGINAL, MODERN or CUSTOM; RESTART TO APPLY, in gold, to the left of x 565 while an option waits for the next start
The graphics' pane From (45, 155), 520 by 97, framed as the controls' panes are, its rows 30 apart from y 162, three at a time; its arrows at (570, 155) and (570, 175), as the controls' list has them
RESOLUTION, FRAME RATE LIMIT, DEFAULT VIEW, BRIGHTNESS, FIELD OF VIEW Rows from y 262; the sliders' knobs from x 367, their tracks until 592, and FIELD OF VIEW's degrees from x 600
FULL SCREEN, VSYNC, VR TRANSITIONS, CHECK FOR UPDATES Boxes at (45, 262), (45, 292), (45, 322) and (45, 352), beside the first four rows, their labels from x 67, where the controls have their controllers

GRAPHICS sets every graphics option at once but UI SCALE and MOD EFFECTS, which it leaves as they are: its arrows flip between ORIGINAL, the original's look as --original gives it, and MODERN, OpenReliant's, every improvement on. It shows CUSTOM once an option differs from both, and from CUSTOM its arrow on sets ORIGINAL and its arrow back MODERN. ORIGINAL also brings back, from the next start, the original's way with everything the tab has no row for, as --original does, but for the sound, which stays as the AUDIO tab has it (Configuration).

The pane holds the options, a row each: the game's TEXTURE DETAIL, GRAPHIC DETAIL and LIGHT MAPS, then PER-PIXEL LIGHTING, LINEAR LIGHT, MATERIALS, SHADOWS (OFF, LOW or HIGH), COCKPIT SHADOWS, SHOT LIGHTS (EVERY SHOT or LATEST TWO), REAL LIGHTS, BLOOM, DITHER, TEXTURE FILTER (ORIGINAL, TRILINEAR or CRISP), ANTI-ALIASING (OFF, or 2, 4 or 8 SAMPLES a pixel, as many as the GPU offers), COLOR DEPTH (32-BIT or 16-BIT), SMOOTH MOTION, OUTLINE FONTS, UI SCALE (50% to 100% in steps of 10, 80% by default) and MOD EFFECTS. UI SCALE sets how large the display, the pause menu and the settings screen the pause menu opens are drawn, as a share of the size the front end is drawn at (HUD), and changes at once. MOD EFFECTS turns the mods' shaders on and off: their post effects and their surface and lighting functions at once (Post effects), and their replacements for OpenReliant's shaders from the next start, and changes at once. Its arrows scroll it a row, and again each 5 ticks while one is held, and Up, Down and the mouse's wheel scroll it as they scroll the controls' list. A row is dimmed, and can't be changed, where its option has no effect: SHADOWS and MATERIALS without PER-PIXEL LIGHTING, COCKPIT SHADOWS without the shadows, and LINEAR LIGHT in 16-bit colour.

The options change the picture at once and are written to [OpenReliant] at once, but for ORIGINAL's base, the game's three details, REAL LIGHTS, which the models are built with, LINEAR LIGHT and COLOR DEPTH, which change the GPU's formats, and OUTLINE FONTS, which take effect at the next start: while one of them differs from what the game runs with, RESTART TO APPLY stands beside GRAPHICS. The details are written to [Device], as the game's renderer writes them, Tdetail 0 to 2 for LOW, MEDIUM and HIGH, Gdetail 0 to 2, and Lmaps 1 or 0: TEXTURE DETAIL caps the textures' sides at 128 or 256 (Texture cache); GRAPHIC DETAIL sets how many bits the explosions keep flying, how far the shields' levels reach, how fine the gates' tunnels are, how many rocks the Ice Field has, the loadout's ships' level of detail while they move, and the levels of detail's divisor, which OpenReliant holds at 1.5, 2 or 3 (game.main.detailDivisor); LIGHT MAPS draws the models' second passes (Rendering). GRAPHICS' presets leave them at their highest.

OpenReliant's own rows below change at once, as the driver applies them, and are written to [OpenReliant] (Configuration): RESOLUTION steps through NATIVE, the window's own size, and 75, 50 and 25 percent of it, each as tall as the front end's 480 rows or more; FULL SCREEN fills the display, as Alt and Enter do; VSYNC waits for the display; CHECK FOR UPDATES turns OpenReliant's check for a newer release on or off from the next start (Newer releases); FRAME RATE LIMIT steps through DISPLAY, the display's rate where vsync is off, 30, 60, 120, 144 and 240 frames a second, and NONE; FIELD OF VIEW's knob sets how far the views the player flies in see up and down, in whole degrees, from 34 at the start of its travel to 94 at its end, the game's 64 in the middle, and the degrees are written past its track, with the degree sign the menus' fonts have at 0xB0 (Camera).

RESET DEFAULTS sets the game's defaults and OpenReliant's, MODERN among them, and CANCEL CHANGES puts back what the tab opened with.

Fixes:

  • RESET DEFAULTS and CANCEL CHANGES set the view and the transitions, and write them. The game shows them set, but takes RESET DEFAULTS' view only where OK or MAIN MENU start the renderer again, its transitions never, and writes neither; and CANCEL CHANGES leaves the game, and the file, with the view and the transitions chosen since.
  • RESET DEFAULTS sets the brightness 1. The game puts the knob in the middle of its track, which is 1.25, beside setting the file's value to 100.

Improvements:

  • RESOLUTION chooses the size the frames are drawn at, which the window shows scaled, where the game's chooses the display's mode. FULL SCREEN, VSYNC, FRAME RATE LIMIT and FIELD OF VIEW are OpenReliant's own, and so are GRAPHICS, its presets and the options in the pane but the game's three details.
  • TEXTURE DETAIL cycles through all three values in the file, LOW, MEDIUM and HIGH. The original screen only switches between the first two, which it calls LOW and HIGH, and shows the file's highest value as LOW. HIGH sets no size limit, where the original limits textures to 2048, which none of the original textures reach, so a mod's picture keeps its full size. A file without Tdetail uses HIGH, where the original uses 1.
  • The brightness is the knob's place over its travel exactly, where the game multiplies by a rounded reciprocal (0x004DC6A4).
  • The settings change at once, where the game starts its renderer again to change the mode.

Not ported: 3D RENDER MODE, which OpenReliant has no Direct3D devices for.

The mods screen

Improvement: the original can't load mods. GAME OPTIONS' MODS button opens OpenReliant's mods screen (mod_manager.zig, #497) after interface\optfade.bik, on the settings screen's shapes and background (interface\frntend5.spr, interface\optfade.tga), laid out as its controls tab is:

  • MODS, in white, centred on (320, 95), where the settings screen has its tabs.
  • A framed list of the mods in the mods folder, from (45, 136), 324 by 250, with nine rows 26 pixels apart. Each row is a check box, ticked while the mod is on, and the mod's name and version from its manifest, or its folder name if it has none. The chosen row's name is white, a mod that is on but doesn't load is red, a mod the catalogue offers in a newer version is gold, and a mod that is off is dim. The lists' arrows right of the frame scroll it, as the mouse wheel and the Up and Down keys do.
  • A framed panel from (401, 136), 195 by 250, with the chosen mod's thumbnail where it has one, fitted to a box 175 by 70 at its top; its name, version and author; in gold, UPDATE AVAILABLE IN GET MODS with the version where the catalogue offers a newer one that this OpenReliant can run, for an archive and not for a folder copied in by hand (Getting mods from the catalogue); its description and page; the mods whose files it replaces (REPLACES FILES OF) and the mods below it that replace its own (FILES REPLACED BY), each up to two lines; and in red why it doesn't load: an archive that doesn't match its checksum file, or a mod it needs that is missing, off, or below it. The description takes the lines the rest leaves.
  • A gold box of up and down arrows (shape 0x2A, lit with 0x2B and 0x27) at the foot of the gap between the frames, which moves the chosen mod up or down the order.
  • The settings screen's buttons: OK and MAIN MENU in the left column, and in the right column REFRESH, where RESET DEFAULTS stands on the settings screen, and CANCEL CHANGES. REFRESH reads the mods folder again, to find mods added or removed since OpenReliant started, and keeps the chosen mod chosen. CANCEL CHANGES puts the mods back as they were when the screen opened, or at the last REFRESH. OK and Escape end the screen, back to GAME OPTIONS.
  • OPTIONS, in the foot of the panel, where the chosen mod's scripts offer a page of options (The mod's options). It is a button of the settings screen's shapes (0x28, lit 0x29) with its label right of it.
  • RESTART TO APPLY, in gold over the right frame, while the mods that load, in their order, differ from the ones OpenReliant started with.

Each change is written to starlancer.ini at once, in the section [OpenReliantMods] (Load order), and takes effect at the next start. A mod whose folder name can't be a key of the settings file (it has an equals sign, starts with a bracket or has spaces at either end) stays on, in name order after the mods the list names. The screen lists at most 255 mods. It stays shut with --no-mods.

The GET MODS screen

Improvement: the original has no mods, and never reads the web. GET MODS on the mods screen opens the catalogue of mods on the web (mod_catalogue.zig, bigfile/catalogue.zig), at once and with no movie, on the same shapes and background as the mods screen, with the same layout. The words OpenReliant adds to its screens use American spelling, so the notes say CATALOG:

  • GET MODS in white, centred on (320, 95).
  • The framed list from (45, 136), with the catalogue's mods grouped by their top category, the first folder of their category path: a heading row for each group, in the large font and blue as the controls tab's headings are, with the group's name in capitals (- SHIPS), then the group's mods sorted by their full path and their name, indented by 14 pixels, each as its name and version from the index. A click on a heading folds the group, which hides its mods and turns the heading's - into a +; another click unfolds it. Mods without a category come last, under OTHER MODS. A mod that needs a newer OpenReliant is red; otherwise the selected mod is white, a mod installed in an older version is gold, and an installed mod is dimmed. While the repositories are read, the list says READING THE CATALOG. If none can be read, the list says CAN'T READ THE CATALOG and why, in red. If one of several can't be read, its name and the reason are in red above the list, ending at the panel's right edge where the mods screen's RESTART TO APPLY is, and the others' mods are listed. An empty catalogue says THE CATALOG OFFERS NO MODS. The screen lists at most 127 mods, since each mod and each group takes one of the list's 255 rows.
  • The framed panel from (401, 136), which says CHOOSE A MOD while nothing is selected, and otherwise shows the selected mod's thumbnail, downloaded when the mod is selected and fitted into the same box as on the mods screen; its name; right under it, its status line, in gold: INSTALLED with the installed version, BY HAND where the settings file doesn't record the install, and UPDATE TO with the catalogue's version where it is newer, INSTALLED BY HAND AS A FOLDER: INSTALL WON'T REPLACE IT where a folder mod of the name is in the mods folder, DOWNLOADING with the percentage, CANCELING once CANCEL was pressed, or INSTALLED: RESTART TO APPLY; in red: NEEDS OPENRELIANT with the version, or why the install failed. Then its version and author; its full category, as IN SHIPS / FIGHTERS / ALLIANCE; the repository that lists it, as FROM openreliant-mods; the OpenReliant it needs, in red when it is newer than this one; its size and its description, which takes the lines left. During a download, a progress bar at the bottom of the panel, measured against the size the catalogue gives.
  • The settings screen's buttons: OK and MAIN MENU in the left column. In the right column, INSTALL (or UPDATE when an older version is installed) where RESET DEFAULTS is, dimmed when there is nothing to do, and RELOAD where CANCEL CHANGES is, which reads the repositories again and tries again the thumbnails that failed. While a mod downloads, one download runs at a time and the catalogue can't change under it, so RELOAD is dimmed, and INSTALL reads CANCEL while the downloading mod is chosen and is dimmed while another is. CANCEL stops the download, which deletes its part file; the panel says CANCELING until the download's thread has stopped, then shows the mod as it was before. OK and Escape go back to the mods screen, which rereads the mods folder if a mod was installed.

The repositories starlancer.ini names (Repositories) are read one after another into one catalogue, where the first repository to list an id wins, and the catalogue is kept until RELOAD or until the front end closes. A mod without the keys it needs (id, archive, sha256, size), whose id can't name a mod, or whose size is over 4294967295 bytes, the most a HOG archive's 32-bit offsets reach, is skipped with a line in the log, which escapes the id; an index in a newer format fails with THE CATALOG NEEDS A NEWER OPENRELIANT. Every download goes through web.zig, on a thread of its own with its own HTTP client, and over HTTPS: http is changed to https before each request and each redirect, which the download follows itself, five at most; any other scheme is refused. Each request sends OpenReliant as its user agent. The player's own machine (localhost and the names under it, 127.0.0.0/8 and 0.0.0.0 in every form the system's resolver reads, such as 127.1, and ::1, :: and the IPv4 addresses mapped into IPv6) is read only for a repository whose URL names it, and for the thumbnails and archives its index links, over plain HTTP. Anywhere else, a link to the player's machine, or a redirect to it from another host, fails with THE CATALOG POINTS AT THIS COMPUTER, so that a repository on the web can't make OpenReliant send requests to the services on the player's machine. A host name that the system's resolver turns into the player's own address isn't caught, since only the link itself is checked, but such a link is read over HTTPS, so a service there gets the start of a secure connection that it can't complete, never a request. A failure says what happened: the server's name can't be found, a secure connection can't be made, the system's certificates can't be loaded, too many redirects, a bad redirect, and so on. An index or a thumbnail gives up after 60 seconds, or after 15 seconds without anything arriving, and an archive after 30 seconds without anything arriving, with THE SERVER DOESN'T ANSWER. An index is read up to 4 MiB and a thumbnail up to 2 MiB; an archive is read up to the size the catalogue gives, and a download that goes past it, or that the server announces at another size, stops at once. INSTALL downloads the archive into <id>.hog.part in the mods folder, hashing the bytes on their way to the file. Once the archive is complete and matches the catalogue's digest, the digest is written as <id>.hog.sha256.part, the archive's part is renamed to <id>.hog, replacing an older copy, and the checksum file's part is renamed to <id>.hog.sha256; then the install is recorded in [OpenReliantInstalledMods] with the repository's name, so that the loader refuses the archive without its checksum file from then on. A download that fails or doesn't match leaves nothing behind; if the checksum file can't be put in place, the archive is removed again, with the checksum file of the copy it replaced. Leaving the screen lets a download continue. CANCEL stops it: its thread cancels the request, deletes the archive's part file and ends, and only then does the screen let the install go, so that an install of the same mod started right after can't run into the part file being deleted. Closing the front end lets go of a download without waiting, so that quitting is never held up, not even by a lookup of a host's address, which nothing can interrupt: the download's thread cancels it and ends on its own, deleting an archive's part file, unless OpenReliant has ended first, in which case the next install of the mod replaces the part file. The mods screen uses the catalogue too, to say which of its mods have an update: with CHECK FOR UPDATES on (Newer releases), entering it starts this reading in the background, once per run, and each of its passes takes in what has arrived, as this screen's passes do; with it off, nothing is read, but a catalogue this screen has read serves all the same. Opened from the mods screen, GET MODS chooses the mod the mods screen had chosen, unfolding its group, where the catalogue lists it. The GET MODS button on the mods screen uses the settings screen's shapes, at (45, 116) with its label to its right, and is shown only when the settings file names a repository.

The mod's options

Improvement: the original can't load mods. OPTIONS on the mods screen opens the page of options the chosen mod's scripts declare (mod_options.zig, options.zig, #597), at once and with no movie, on the same shapes and background as the mods screen. It is laid out as the VIDEO tab's graphics list is (Video):

  • The page's title in white, centred on (320, 95), as the mods screen has MODS.
  • A framed list from (45, 136), as tall as its rows, up to eight, 30 pixels apart, with the list's arrows right of it. Each row ends its label at x 300. A toggle is a check box, and a choice or a number is an arrows box with its value written beside it: a choice's label, or the number written out. A choice steps round from the last to the first; a number steps by its step and stops at its ends. A slider is the audio tab's slider (Audio), from where a check box stands, with a knob that slides 135 pixels rather than 175 so that its value fits beside it. The knob held follows the pointer, even off the row, until the button is up, and sets the number on its steps. A text is its line in a box from where the arrows stand, 234 by 18. A click in the box starts typing it, in white with a cursor that blinks as a saved game's name's does; Enter or a click elsewhere keeps it, and the click goes on to what it is on; Escape puts it back. A heading is its label alone, in white from 35 pixels inside the frame, which the pointer passes over.
  • The settings screen's buttons: OK and MAIN MENU in the left column, and RESET DEFAULTS and CANCEL CHANGES in the right. RESET DEFAULTS sets every option to its default, CANCEL CHANGES to what it was when the page opened. OK and Escape go back to the mods screen as it was left, keeping the chosen mod and what REFRESH found.
  • While the pointer is on a row, the option's description under the list, in the small font, blue, centred.

Each change is kept at once in the mod's storage, and told to the scripting (Options). An option that is the same as it was isn't set again.

The game modes screen

Improvement: the original has no game modes but its campaign, INSTANT ACTION and multiplayer. GAME MODES on the main menu opens OpenReliant's game modes screen (game_modes.zig, #560), which lists the game modes the mods' scripts register (Menus, game modes and campaigns). It has the mods screen's shapes, background and layout (The mods screen):

  • GAME MODES, in white, centred on (320, 95).
  • The list of the modes in the left frame, by their labels, with the lists' arrows.
  • The chosen mode in the right frame: its label, the mod it comes from, its missions (how many, and whether it loops, or for a campaign the mission it carries on from), and its description.
  • PLAY, where the settings screen has OK, which starts the chosen mode, and MAIN MENU. Escape goes back to the main menu.

A mode's missions are flown as INSTANT ACTION's is, one after the other. Where the mode names a briefing, the front end shows its screen 103 before each mission, with the mods screen's background: the mod's screen stands in for it, and flies the mission or goes back to the main menu. Without a briefing, or once its script has stopped, the mission follows at once. A mode can also brief each mission in the game's briefing room (A game mode's briefing), debrief it in the ITAC (DEBRIEFINGS), and show the restart screen after a lost mission (The restart screen). After its last mission, where the mode names an ending, the front end shows its screen 104, which the mod's screen stands in for until it goes back to the main menu. Without an ending, the main menu follows at once.

Mods' screens can also stand in for the front end's own screens (interf.Scripted): the front end then draws the screen's background, the mod's screen over it, and the pointer on top, and goes where the mod's screen asks.

The dialogs

interface_confirm (0x0042AA80) reads quit.spr (dialog_shapes) and asks a question, a string or dialog_text for -1, until Escape, which answers NO, or a click on YES or NO (dialog_buttons, 0x004E5CB8: (286, 269) and (326, 269), 25 by 16), answered once the button comes up. It returns true for YES. While it is up (dialog_open), the screen's render hook draws it (interface_confirm_draw, 0x0042AB60):

  1. The box, shape 6 at (114, 177).
  2. The buttons, shape 3, the one under the pointer shape 4.
  3. The question, centred on (320, 208) in lines at most 400 wide, 14 apart, at most 10: a string in interface_font_large, dialog_text in interface_font_small.
  4. YES to the left of (282, 263), NO to the right of (354, 263), in interface_font_large.

interface_message_draw (0x0042ADE0) draws the front end's other dialog, a message with OK, while 0x0051D7D8 is set.

interface_box (0x00435C60) frames a box on the screen: its top and left edges in 0x00A7FF, its right and bottom in 0x005785, each a pixel short of the corner the other starts from, and a second frame a pixel inside in 0x0086CD.

The pilot roster

pilot_roster (0x00430490), screen 12, which SINGLE PLAYER leads to, shows interface\main2sin.tga behind itself and reads interface\frntend2.spr (interface_shapes), which it frees as it leaves. Its render hook is pilot_roster_draw (0x00430C60). As it starts, the pilot is male (pilot_female, 0x00562F16), the call sign is typed afresh (0x0052019C) with the characters typed so far let go (typed_keys_clear, 0x004AADA0), its cursor shows (0x0052016C), and the list of call signs is closed (0x005202B8). While the roster is up (0x005D6088), the window's procedure refuses the characters a file's name can't hold, \/:*?<>|" (0x0050954C), since the call sign names the pilot's saved games.

Its items, in the order interface_hit tries them:

Item Corner Size Does
The male pilot (62, 145) 111 by 228 The pilot male
The female pilot (239, 151) 102 by 275 The pilot female
LOAD GAME (397, 295) 133 by 20 Screen 13, the saved games, after a transition movie
START GAME (397, 249) 145 by 20 SET GAME DIFFICULTY
MAIN MENU (292, 441) 25 by 16 Screen 0, after a transition movie
The call sign (397, 177) 138 by 45 The call sign typed afresh, with the characters typed so far let go
QUIT (324, 441) 60 by 16 QUIT's dialog, whose YES quits the game (0x004AAA30)
The list's arrow (543, 200) 27 by 15 Opens or closes the list, once for each press

Each pass of its loop:

  1. Escape leads to the main menu, as MAIN MENU does.
  2. The cursor turns on or off once 25 ticks have passed since it last did (0x00520164).
  3. Enter, or the keypad's Enter, ends the typing. So does the left button down anywhere but on the call sign. The pilot's profile takes the call sign as the pilot's name (0x00562CFC) and is written (profile_save), and callsign_add puts the call sign in the list.
  4. While the list is open, its ten rows stand down from (400, 223), each 136 by 20 and 25 below the last, and cover START GAME and LOAD GAME. With the left button down over a row, its call sign becomes the pilot's and the profile's name, the profile is written, the list closes, and the loop waits for the button to come up.
  5. With the left button down over an item, what the table says.

pilot_roster_draw types the call sign (call_sign, 0x00562DCC, 32 bytes), one character each frame while it is typed (text_entry_step, 0x004812F0): a backspace takes the last character off, and any other goes on where the call sign stays narrower than 125 pixels in interface_font_small.

The call signs

callsign_list (0x005D5E8C) holds the call signs of the last ten pilots, 50 bytes each, which starlancer.ini keeps as name00 to name09 under [CallsignList]. Every place is a row of the list, an empty one too (callsign_count, 0x00595D98). As the game starts, WinMain reads them (callsigns_load, 0x004AAE00), the first PLAYER (string 0xBF) where the file has none, and writes them straight back (callsigns_save, 0x004AAEE0, which then reads them again).

Improvement: callsigns are vertically centred within their dropdown rows. --original uses the retail text position.

callsign_add (0x00430B80) leaves a call sign the list holds as it is. Another goes in the first empty place, or, once the list is full, in the last, the rest moved up a place and the first let go; then the list is saved.

SET GAME DIFFICULTY

START GAME puts up difficulty_dialog (0x00430300) over the roster (0x0051D534) and sets the difficulty (0x00562F14) to medium. Its two arrows, at (253, 222) and (270, 222), each 16 by 26, step the difficulty down and up, going round; START at (276, 269) and BACK at (338, 269), each 25 by 16, close it. A press acts once, until the button comes up. Escape and BACK go back to the roster, the difficulty as the arrows left it. START ends the roster: it frees the shapes, starts a new campaign (campaign_new), resets the campaign's wingmen's pilots (0x0049CD20), and returns 1.

Drawing

pilot_roster_draw, the render hook:

  1. The pilot chosen, lit: shape 19 at (34, 114) for the male pilot, shape 20 at (200, 114) for the female.
  2. In blue, in interface_font_large: SELECT PILOT (string 0xB7) centred on (217, 105), CALL SIGN (Alpha 2) (0xB8) from (396, 168), START GAME (0xB9) from (433, 247) and LOAD GAME (0xBA) from (433, 298); in interface_font_small, MAIN MENU (0xBB) to the left of (288, 440) and QUIT (0xBC) from (353, 440).
  3. The call sign's frame, interface_box at (398, 192), 140 by 28, and the call sign from (402, 197) in interface_font_small, white while it is typed and blue once it isn't. While it is typed and its cursor shows, _ follows it in blue, at 200 down.
  4. The list's arrow, shape 24 at (543, 200), or shape 25 under the pointer; the large buttons, shape 22 at (398, 249) and (398, 300), and the small ones, shape 26 at (292, 441) and (324, 441).
  5. The button under the pointer lit, shape 23 or 27, with its label again in white.
  6. The list, where it is open: each row framed by interface_box at (398, 221 + 25 × row), 140 by 24, wiped black from (400, 223 + 25 × row) to (536, 243 + 25 × row), and its call sign from (404, 225 + 25 × row) in white, in interface_font_small.
  7. SET GAME DIFFICULTY, where it is up: its box, shape 34 at (114, 177); the arrows, shape 30 at (253, 222), with the one under the pointer lit, shape 31 there or shape 32 at (270, 222); the buttons, shape 26 at (276, 269) and (338, 269), shape 27 under the pointer. Then in blue, in interface_font_large: SET GAME DIFFICULTY (0x2A6) centred on (320, 185), EASY, MEDIUM or HARD (0x2A7, 0x11C, 0x2A8) from (289, 222), BACK (0xF7) from (370, 264), and START (0x14A) to the left of (268, 264).
  8. QUIT's dialog, where it is up, and the pointer.

What the missions take

The pilot's sex and the difficulty are what the missions take from the roster: the radio says the pilot's own lines in the female voice for a female pilot (Radio), and the difficulty scales damage (Destruction). Both start at 0 as the game starts: male, and easy until SET GAME DIFFICULTY sets it, so INSTANT ACTION, chosen first, is flown on easy. The call sign names the pilot's profile and saved games.

OpenReliant keeps what the roster sets in Interface.pilot, which flies every mission the front end starts. --difficulty sets the difficulty the game starts with. The call sign is the pilot's profile's as the game starts, as the main menu opens and as START GAME begins a campaign, and empty where the game's folder has no profile (The pilot's profile).

Fixes:

  • The game copies a call sign into the list, the profile's name or the call sign whatever its length; OpenReliant keeps what fits.
  • The call sign's typing goes on adding characters while the call sign stays narrow enough, whatever room its buffer has, which a call sign of narrow characters overruns; OpenReliant stops at the buffer's end.

The saved games

saved_games (0x00431730), screen 13, lists the pilot's saved games, to load one or to save the game as one (Saved games); saved_games_saving (0x0051D5F4) picks which. The pilot roster's LOAD GAME opens it to load, after interface\sinfade.bik, over interface\sinfade.tga; the in-game options' SAVE and LOAD open it over the Reliant's rooms and the briefing's loadout, after interface\igofade.bik, over interface\igoptfad.tga (The in-game options). It reads interface\frntend2.spr and draws with saved_games_draw (0x00432480). As it starts, loading, the autosave is selected where there is one; the typed name is empty, and the saves are found (saved_games_scan, 0x004315C0): the call sign's, from slot 0 on, up to the first file missing, so that without the autosave nothing is listed.

What Where Drawn
Title Centred on (320, 86) LOAD GAME FOR (0x55F) or SAVE GAME FOR (0x560), then the call sign in capitals, large, blue
The list's frame, the details' frame (45, 126), 530 by 175; (45, 321), 550 by 38 interface_box
Heads y 107 GAMES (0xE3) from x 45, PILOT (0xE4) centred on 320, MISSION (0xE5) to the left of 575, small, blue
Rows, ten at most 17 apart from (49, 126), each 400 by 17 The save's name starts at x 49, the pilot is centred on 320, and the displayed mission number ends at x 570. The selected row uses white text on a blue bar, from y 2 to 19 below the row's start.
Details GAME INFORMATION (0xE6) at (49, 302); Callsign: at (49, 322), Rank: at (49, 339), Level: at (290, 322), Time: at (290, 339) The selected save's pilot at (113, 322), rank at (113, 339) and level at (350, 322), from its MISS; the date its file was written at (350, 339), as %02d:%02d then two spaces and ddd',' MMM dd yyyy
Arrows (579, 250) and (579, 268), each 26 by 16 Shape 28, lit 29 up or 25 down under the pointer
Buttons BACK (292, 421), LOAD GAME or NEW SAVE GAME (324, 421), MAIN MENU (292, 441), QUIT (324, 441), each 25 by 16 Shape 26, lit 27 under the pointer, the label small, blue, white under the pointer
The name, saving Its frame (45, 380), 358 by 20; the name at (49, 378), large, white, with _ after it; OK at (562, 384), 32 by 20 Shape 22, lit 23; SAVE GAME (0x54D) to the left of (562, 384)

Improvement: the selected save uses the multiplayer browser's muted highlight and fills the list frame to its inner edges. The save name, pilot and mission share a vertically centred baseline. --original uses the retail blue, bar inset and text positions.

Each pass, Escape leaves, and Down and Up scroll the list a row while held, where it holds more than ten. A press acts on the pass it is first seen, but for the arrows', which scroll a row each pass it is held. Rows never light under the pointer; a click on a row selects it, and a second click on the row selected loads it, or, saving, starts typing its name. Saving, the autosave can't be selected. LOAD GAME loads the row selected, and waits for the button to come up. The name typed takes 18 characters at most, and its cursor turns every 25 ticks; Enter, or a click on OK, saves the game under it in the slot selected. NEW SAVE GAME, once a visit, saves the game in the slot after the last found, named Empty Save Game (0x179), selects it with the game's rank and level, loads it back, and starts typing its name from Empty Save Game; leaving without saving removes it. A save that fails puts up a box saying so (save_error_dialog, 0x0042A870), which OK closes. There is no DELETE, and no question before a save goes over another.

Way out Movie Then
BACK, Escape Loading: interface\sinfade2.bik to the roster, igofade2.bik to the in-game options. Saving: igofade2.bik to the in-game options Back where it was opened from
MAIN MENU Loading: interface\sifad2mm.bik from the roster, igof2mm.bik from the in-game options The main menu
QUIT Do you really want to Quit?; YES quits
A game loaded From the roster, WinMain takes it as START GAME's, into the rooms before its mission (0x004AA1AB on); from the in-game options, the rooms start again from the first view of its mission's carrier
The game saved Back to the rooms

Fixes:

  • Where NEW SAVE GAME fails, leaving removes nothing; the game removes whatever file its buffer names. With every slot taken, NEW SAVE GAME does nothing, where the game saves over the restart point's file.
  • A name taken from a save is kept to the typed name's room, and a listed name to the list's, where the game copies either whatever its length. A rank or a level past the game's names is taken as the highest.
  • A file with no SAVE form is listed with no name, pilot or mission, where the game shows what its buffers held.

Improvement: the day's and the month's names in the date are English, where the game takes the system's language's.

The co-op host opens the same screen from Load in the lobby (multiplayer_sessions_screen, 0x0043D586). The lobby background stays visible and the connection keeps running. Save Game in the co-op debrief uses the in-game-options backdrop and hides Main Menu and Quit (multiplayer_debriefing, 0x00429C56 to 0x00429C73). The save uses the original IFF format. It keeps the shared flags and wing data supplied by the host and the pilot's own record. A result that advances the campaign saves the next mission. OpenReliant also saves the host's rescue totals for the named pilots in that wing. Use the same call signs when resuming to restore their totals. Older saves still restore the host pilot's total. The pilot's mission record goes into profile.bin (mission_end_record, 0x00475C2D); the network path skips the solo autosave (0x00475BF4). Improvement: co-op keeps the attempt's restart point in memory, so replay uses the starting record and the solo restart file can still be used for the single-player campaign.

net_mark_campaign_out (0x004B9DA0) marks pilots who cannot advance. Next Mission waits for eligible pilots and carries only those pilots into the next briefing. Replay waits for everyone and keeps the whole crew. If nobody can advance, the lowest occupied seat leads the replay (multiplayer_debriefing, 0x004296A0). A LAN host that cannot advance still runs the session while they remain on the multiplayer screen.

Backgrounds

background_set (0x00494B50) shows a picture behind the frames, loading it with background_load (0x00494A70) unless background_name (0x00588744) is it already, case aside. background_load reads the TGA and hands it to the device (sr + 0x50), or runs background_hook (0x00588740) in its place where one is set.

The loading screens show one too (The loading screens).

The loading screens

The game shows a loading screen as its renderer starts and before each attempt at a mission: a picture over the whole screen, and a line of its strings centred across it, the line's top 40 pixels above the screen's foot (loading_line_draw, 0x004AB2B0). The line is in interface\optfnt.fnt, drawn through the last of text_ramps (0x005955A0), which maps the font's levels onto the greys at the top of the renderer's palette, up to white.

  • As the renderer starts, renderer_load (0x004AB4B0) shows interface\splash.tga alone, then with LOADING (string 0x32A) before each part of the game it loads after the ships' stats: the particles, the backdrop and the nebula, the attachments' models, the engine glows, the guns, the missiles, the shields, the ejection, the AI and the pilots' stats (loading_step, 0x004AB470), running the message pump each time.
  • Before each attempt at a mission, mission_load (0x004AD0A0) shows interface\sl_splash.tga, sl_splash800.tga or sl_splash1024.tga, one picture at three sizes, by the screen's width, alone (loading_screen, 0x004AB3F0). Once it has set the renderer, the textures and the display up again, it adds a line by the simulator's mode (simulator_mode): PREPARING FOR LAUNCH (string 0xE2) for none, Calibrating Simulator (0x14B) for the Reliant's simulator's training, and Preparing for Instant Action (0x289) for any other. In a network session each player's name follows down the left, 18 pixels apart, with READY beside it once the player is ready (loading_players_draw, 0x004AB300).

OpenReliant shows both as it draws the front end: laid out as the game lays them out on a screen 640 by 480, as large as fits in the window. It shows the start-up's LOADING before each of a few parts it loads. It sets the renderer and the textures up once, as it starts, so the mission's two frames follow each other at once. Meanwhile the system's events wait for the loop.

Not ported: the players' names in a network session (#404).

Improvements:

  • Before a mission OpenReliant shows the largest picture, sl_splash1024.tga, whatever the window's width. --original picks it by the width, as the game does.
  • OpenReliant's version is written in the window's corner, as on the front end's screens.

Edit this page on GitHub. The documentation is under CC BY-SA 4.0.