Advertisement
ZoriaRPG

How to Add ZScript Commands to ZC

Dec 8th, 2016
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.83 KB | None | 0 0
  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.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement