Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Language::Zcode::Runtime::State 0.8

    Download button

    No screenshots available
    Downloads: 257  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Language::Zcode::Runtime::State team | More programs
    Perl Artistic License / FREE
    July 5th, 2007, 09:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Language::Zcode::Runtime::State description

    A Perl module to handle saving, restoring, etc. the game state.

    Language::Zcode::Runtime::State is a Perl module to handle saving, restoring, etc. the game state.

    restoring

    Getter/setter: currently in the process of restoring or not?

    start_machine

    Start executing the Z-machine.

    In the normal case (starting a new game, or restarting), this is as simple as calling the Z-machine subroutine whose address is stored in the header.
    If we're restoring from a save file, it's more complicated. See "resume_execution".

    z_call

    Wrapper around Z-code subroutine calls. The main reason we need it is for save/restore.

    In the normal case, z_call just calls the Z-code subroutine at address arg0 with the given args (arg5-argn), if any. Args 1-4 aren't used by z_call, but (hack alert!) they go into the Perl call stack, which is needed for saving Z-machine state.

    Input: subroutine address to call, local variables & eval stack (arrayrefs), next PC, store variable, args to the Z-sub.

    See "The call stack" for far more detail on this sub and save/restore.

    save_state

    Implement the @save opcode, saving the current Z-machine state (as opposed to writing a table to a file, the other use of the @save opcode)

    Note that this sub also gets called at the very end of the restoring process.

    Returns 0 for failed save, 1 for successful save, 2 for "just finished restoring".

    build_save_stack

    Create a Z-machine call stack by peeking at the Perl call stack.

    When calling Z_machine subroutines, we call z_call with all the information contained in a Z stack frame. We retrieve that information from the Perl call stack and build a Z-machine call stack with it.

    restore_state

    Implement the @restore opcode, restoring the current Z-machine state (as opposed to reading a table from a file, the other use of the @restore opcode)

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    handle saving | handle restoring | game state | Language | handle | saving

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM