Check Thread Running Status (WORLD.BIN)

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
#   ROUTINE: CHECK THREAD RUNNING STATUS (WORLD.BIN)
#       Find whether or not thread is running / in use
#       This routine is an analog to Check Thread Running Status in BATTLE.BIN.
#       Parameters:
#           r4 = ThreadID
#       Returns:
#           r2 = thread.IsRunning

800ffeec: 3c028015 lui r2,0x8015
800ffef0: 8c42327c lw r2,0x327c(r2)                 #   Base pointer for thread array
800ffef4: 00042280 sll r4,r4,0x0a                   #   ThreadID * sizeof(thread)
800ffef8: 00822021 addu r4,r4,r2                    #   thread
800ffefc: 8c820048 lw r2,0x0048(r4)                 #   return thread.IsRunning
800fff00: 03e00008 jr r31
800fff04: 00000000 nop