SHARE
TWEET

Today's Ugly GB Code Snippet

ISSOtm Sep 3rd, 2017 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Some strings...
  2.    
  3.     set_text_prefix TestMapSign
  4.    
  5.     dname
  6.     db "Test sign",0
  7.    
  8.     dline 0
  9.     db "Startham village",0
  10.    
  11.     dline 1
  12.     db "We don't have",0
  13.    
  14.     dline 2
  15.     db "roads, but we have",0
  16.    
  17.     dline 3
  18.     db "Wi-Fi!",0
  19.  
  20. ; The goal is to have a "TestMapSignLineXX" label before each string.
  21. ; Here are the macros.
  22.  
  23. set_text_prefix: MACRO
  24. line_prefix EQUS "\1Line"
  25. ENDM
  26.  
  27. dline: MACRO
  28.     dline_internal "{line_prefix}", "\1"
  29. ENDM
  30.  
  31. dline_internal: MACRO
  32. line_label EQUS STRCAT(\1, \2)
  33. line_label::
  34. PURGE line_label
  35. ENDM
  36.  
  37. ; Your eyes burning yet ?
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top