Difference between revisions of "Library of Subroutines"

From BotF-Wiki
Jump to: navigation, search
(Created page with 'Suggested syntax: asm-address, short description (optional: Input '''/''' Output -registers)<br/> 439F90: Morale Event (eax=race ID, edx=event ID / )<br/> 43A684: Get shipyard …')
 
(added load/save game & start new game & end turn)
Line 1: Line 1:
 
Suggested syntax: asm-address, short description (optional: Input '''/''' Output -registers)<br/>
 
Suggested syntax: asm-address, short description (optional: Input '''/''' Output -registers)<br/>
  
 
+
438630: Save Game<br/>
 +
call @45866A = automatic save
 +
call @4F003D = manual save
 +
4387F0: Load Game<br/>
 +
call @4D0816 = continue
 +
call @4F00D4 = load menu
 
439F90: Morale Event (eax=race ID, edx=event ID / )<br/>
 
439F90: Morale Event (eax=race ID, edx=event ID / )<br/>
 
43A684: Get shipyard IDs for majors (eax=race ID / eax=building ID)<br/>
 
43A684: Get shipyard IDs for majors (eax=race ID / eax=building ID)<br/>
 
43B380: Add star system to owner (eax=race ID, edx=system ID / )<br/>
 
43B380: Add star system to owner (eax=race ID, edx=system ID / )<br/>
 +
43D6C0: start new game<br/>
 
443300: Shipyard powered? (eax=system ID / eax 0=no)<br/>
 
443300: Shipyard powered? (eax=system ID / eax 0=no)<br/>
 
444D40: Shipyard present? (eax=system ID / eax 1=yes)<br/>
 
444D40: Shipyard present? (eax=system ID / eax 1=yes)<br/>
Line 15: Line 21:
 
4504B0: load edifice.bst entry (eax=building ID, edx=address / )<br/>
 
4504B0: load edifice.bst entry (eax=building ID, edx=address / )<br/>
 
453680: GetRaceTechLevel (eax=race ID, edx=tech ID / eax=tech level)<br/>
 
453680: GetRaceTechLevel (eax=race ID, edx=tech ID / eax=tech level)<br/>
 +
458120: End Turn<br/>
 +
call @4B9F74 = strategic timer
 +
jmp  @4D8550 = user invoke
 
4AED50: load race.rst entry (eax=race ID, esi=address / )<br/>
 
4AED50: load race.rst entry (eax=race ID, esi=address / )<br/>

Revision as of 16:59, 11 March 2011

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

4AED50: load race.rst entry (eax=race ID, esi=address / )