News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Jumping to Label

Started by LordAdef, April 15, 2018, 03:39:49 PM

Previous topic - Next topic

LordAdef

#15
So, I'm coding a Game Control center to control and centralize various things in the game. Where music starts, where it ends, fade in, fade out, Check Points etc... things that will be controlled in real time and where logic may change according to the game stage. A script in short.

Game developers in many cases even create a whole new language to do this stuff. So I'm trying to cheat by saving the label's addresses. I'll keep you guys posted


edited to add: Seems to be working rather nicely!!

daydreamer

first you make PROC that suppose to be port of a class and second PROC contains additional code and a jmp to first class,emulating subclassing a class
might be useful for Finite State Machine code,where you jmp to different PROC depending on what state FSM is
jumptable, where each proc is exactly the same size is possible,instead of conditional jump, you load eax with first label and add eax with procsize*number of proc
take a look here for an example
http://masm32.com/board/index.php?topic=7008.15
well if you want it to be easier understood by written in script language, maybe its time to try out making macros?
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding