ZoriaRPG

How to Add ZScript Commands to ZC

Dec 8th, 2016
210
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Add a new zscript instruction
  2.  
  3. //Drawing
  4.  
  5. Script_Drawing.cpp
  6. add function
  7. add opcode redirect with ZASM label
  8.  
  9. GlobalSymbols.cpp
  10.  
  11. Add table entry, with proper args values. The entry name should match the ZScript instruction.
  12. Add function to bind the name in the table to the O-Register
  13.  
  14. Bytecode.cpp
  15.  
  16. Add ORegister redirect that returns the ZASM instruction
  17.  
  18. Bytecode.h
  19.  
  20. Add class ORegister entry tat returns the opcode entry in Bytecode.cpp
  21.  
  22. ffasm.cpp
  23.  
  24. Add entry to script command list, using the ZASM label
  25.  
  26. ffscript.cpp
  27.  
  28. Add case statement to switch(script_command) and ensure the args value matches that in GlobalSymbols.cpp
  29.  
  30. Add case entry to switch(scommand), and ensure it is in the script commands case list
  31. Both of these use the ZASM label
  32.  
  33. ffscript.h
  34. Add the ZASM label to the ASM_DEFINE table.
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×