Library of Subroutines

From BotF-Wiki
Jump to: navigation, search

Suggested syntax: asm-address, short description (optional: Input / Output -registers)

438630: Save Game

call @45866A = automatic save
call @4F003D = manual save

4387F0: Load Game

call @4D0816 = continue
call @4F00D4 = load menu

439F90: Morale Event (eax=race ID, edx=event ID / )
43A684: Get shipyard IDs for majors (eax=race ID / eax=building ID)
43B380: Add star system to owner (eax=race ID, edx=system ID / )
43D6C0: start new game
443300: Shipyard powered? (eax=system ID / eax 0=no)
444D40: Shipyard present? (eax=system ID / eax 1=yes)
445270: Building output-type present? (eax=system ID, edx=output ID / eax 0=no)
445300: Building output-type present? (eax=system ID, edx=output ID / eax 0=no)
445770: Building present? (eax=system ID, edx=building ID / eax 0=no)
445DF0: Add building (eax=system ID, edx=building ID / )
4464F0: Shipyard check (eax=system ID / )
4491D0: Remove Ship (eax=fleet ID , edx=ship ID / )
4504B0: load edifice.bst entry (eax=building ID, edx=address / )
453680: GetRaceTechLevel (eax=race ID, edx=tech ID / eax=tech level)
458120: End Turn

call @4B9F74 = strategic timer
jmp  @4D8550 = user invoke

48B2E0: load lexicon.dic entry (eax=text string index / eax=pointer (memory address) to the loaded string)
4AED50: load race.rst entry (eax=race ID, esi=address / )