SHARE
TWEET

EA MAP to TXT

Nicknine Nov 14th, 2019 (edited) 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. idstring "PFDx"
  2. endian big
  3. get VER byte
  4. get INTRO_SEG byte
  5. get NUM_SEGMENTS byte
  6. get NUM_SECTIONS byte
  7. goto 0x03 0 SEEK_CUR // Zeroes
  8. get NUM_EVENTS byte
  9. get BNAME basename
  10.  
  11. log MEMORY_FILE 0 0
  12.  
  13. math INTRO_SEG + 1
  14. string DEBUG p "Intro node - %d" INTRO_SEG
  15. put DEBUG line MEMORY_FILE
  16.  
  17. put "" line MEMORY_FILE
  18. put "Nodes" line MEMORY_FILE
  19. for i = 0 < NUM_SEGMENTS
  20.     get EV byte
  21.     get SEC_RECS byte
  22.     get DUMMY short
  23.     xmath SEG "i + 1"
  24.     string DEBUG p "Node %d - Event %d" SEG EV
  25.     put DEBUG line MEMORY_FILE
  26.     put "{" line MEMORY_FILE
  27.    
  28.     for j = 0 < 8
  29.         if j >= SEC_RECS
  30.             goto 0x03 0 SEEK_CUR
  31.             continue
  32.         endif
  33.    
  34.         get MIN_INT byte
  35.         get MAX_INT byte
  36.         get NEXT_SEG byte
  37.         math NEXT_SEG + 1
  38.         put 0x09 byte MEMORY_FILE # Tab
  39.         string DEBUG p "Heat %d-%d -> %d" MIN_INT MAX_INT NEXT_SEG
  40.         put DEBUG line MEMORY_FILE
  41.     next j
  42.    
  43.     put "}" line MEMORY_FILE
  44. next i
  45.  
  46. put "" line MEMORY_FILE
  47. put "Events" line MEMORY_FILE
  48. for i = 0 < NUM_EVENTS
  49.     string DEBUG p "Event %d" i
  50.     put DEBUG line MEMORY_FILE
  51.     put "{" line MEMORY_FILE
  52.    
  53.     for j = 0 < NUM_SECTIONS
  54.         get VAL byte
  55.         math VAL + 1
  56.         put 0x09 byte MEMORY_FILE # Tab
  57.         string DEBUG p "Section %d -> %d" j VAL
  58.         put DEBUG line MEMORY_FILE
  59.     next j
  60.    
  61.     put "}" line MEMORY_FILE
  62. next i
  63.  
  64. for i = 0 < NUM_SEGMENTS
  65.     get OFFSET long
  66. next i
  67.  
  68. string NAME p "%s_MAP.TXT" BNAME
  69. get SIZE asize MEMORY_FILE
  70. log NAME 0 SIZE MEMORY_FILE
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top