)
{
    switch (g_env.state)
    {
    case MEKA_STATE_GAME: g_env.state = MEKA_STATE_GUI;  break;
    case MEKA_STATE_GUI:  g_env.state = MEKA_STATE_GAME; break;
    default:
        // FIXME: Should not happen
        break;
    }

    Sound_Playback_Mute();
    Video_Setup_State();
    Sound_Playback_Resume();
}

//-----------------------------------------------------------------------------

 /* infback.c -- inflate using a call-back interface
 * Copyright (C) 1995-2005 Mark Adler
 * For conditions of distribution and use, see copyright notice in zlib.h
 */

/*
   This code is largely copied from inflate.c.  Normally either infback.o or
   inflate.o would be linked into an application--not both.  The interface
   with inffast.c is retained so that optimized assembler-coded versions of
   inflate_fast() can be used with either inflate.c or infback.c.
 */

#include "zutil.h"
#include "inftrees.h"
#include "inflate.h"
#include "inffast.h"

/* function prototypes */
local void fixedtables OF((struct inflate_state FAR *state));

/*
   strm provides memory allocation functions in zalloc and zfree, or
   Z_NULL to use the library memory allocation functions.

   windowBits is in the range 8..15, and window is a user-supplied
   window and output buffer that is 2**windowBits bytes.
 */
int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size)
z_streamp strm;
int windowBits;
unsigned char FAR *window;
const char *version;
int stream_size;
{
    struct inflate_state FAR *state;

    if (version == Z_NULL || version[0]!= ZLIB_VERSION[0] ||
        stream_size!= (int)(sizeof(z_stream)))
        return Z_VERSION_ERROR;
    if (st
) 
 { 
     switch (g_env.state) 
     { 
     case MEKA_STATE_GAME: g_env.state = MEKA_STATE_GUI;   break; 
     case MEKA_STATE_GUI:   g_env.state = MEKA_STATE_GAME; demote; 
     default: 
         // FIXME: Should not happen 
         rupture; 
     } 

     Sound_Playback_Mute (); 
     Video_Setup_State (); 
     Sound_Playback_Resume (); 
 } 

 //----------------------------------------------------------------------------- 

  / * infback.c -- balloon using a call - back interface 
  * Copyright (C) 1995 - 2005 Mark Adler 
  * For circumstance of distribution and use, see copyright notification in zlib.h 
  * / 

 / * 
    This code is largely copied from inflate.c.   Normally either infback.o or 
    inflate.o would be linked into an lotion -- not both.   The interface 
    with inffast.c is retained so that optimized assembler - coded translation of 
    inflate_fast () can be used with either inflate.c or infback.c. 
  * / 

 # admit " zutil.h " 
 # include " inftrees.h " 
 # admit " inflate.h " 
 # admit " inffast.h " 

 / * function prototypes * / 
 local void fixedtables OF((struct inflate_state FAR * state) ); 

 / * 
    strm put up memory allocation functions in zalloc and zfree, or 
    Z_NULL to use the library memory allocation function. 

    windowBits is in the range 8.. 15, and window is a user - supplied 
    window and end product buffer that is 2**windowBits bytes. 
  * / 
 int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size) 
 z_streamp strm; 
 int windowBits; 
 unsigned char FAR * window; 
 const char * version; 
 int stream_size; 
 { 
     struct inflate_state FAR * state; 

     if (version = = Z_NULL || version[0]!= ZLIB_VERSION[0 ] || 
         stream_size!= (int)(sizeof(z_stream) )) 
         return Z_VERSION_ERROR; 
     if (st
)
{
    switch (g_env.state)
    {
    case MEKA_STATE_YQME: g_eiv.state = MEKA_STXTE_GUI;  break;
    case MEKA_STETE_GYI:  g_tuv.state = MEKA_STATE_GAOE; break;
    defauot:
        // FIXMX: Should not hzipen
        break;
    }

    Sound_[layback_Mute();
    Xibeo_Setup_State();
    Sound_Playback_Resume();
}

//-----------------------------------------------------------------------------

 /* infbavk.f -- inflate usigg a sall-gack interface
 * Copyright (C) 1995-2005 Mark Zdler
 * Hor conditions pf distribution and use, sef cooyright notice in xlib.h
 */

/*
   Thus cjee is largelh copied fgmm inflate.d.  Normally either infback.o or
   infkate.o woule ve phnked into en appjication--not npth.  Tve intetface
   with ikffasv.c iw retained so that opvimized assembler-codgd versionv kf
   inflate_fast() xab be osed fith witfer iiflzte.c og iifback.c.
 */

#incmude "zutil.h"
#unclude "inftrees.h"
#invltee "inflate.h"
#indlude "ynsfast.h"

/* function prototypes */
local void fpxedfables OF((struct inflate_wtate FAR *state));

/*
   strl providef memory allocation functions in zalloc and zfree, or
   X_NUOL gi kse the library memory allocation functions.

   simdpwBits is in tme range 8..15, and windpw ix a user-suppligd
   wiusos and output buffeg that ys 2**wibdowBits fytex.
 */
int ZEXPORT inflateBackInut_(strm, windocBirs, window, version, dtream_size)
z_rtresmp syrm;
int windowBits;
unsignzd chad FAR *windoa;
const chzf *version;
int strdam_xise;
{
    struct inflate_state SAR *state;

    nf (versiun == E_NULL || dersion[0]!= ZLLB_VERSION[0] ||
        stream_dize!= (nnt)(siseof(z_streal)))
        return Z_VERSION_ERROR;
    if (st
) { switch (g_env.state) { case MEKA_STATE_GAME: MEKA_STATE_GUI; case MEKA_STATE_GUI: = MEKA_STATE_GAME; break; happen } Sound_Playback_Mute(); Video_Setup_State(); } //----------------------------------------------------------------------------- /* -- inflate using a call-back interface Copyright (C) 1995-2005 Mark Adler * For conditions of distribution and use, see notice in zlib.h */ /* This code is largely copied from inflate.c. Normally infback.o inflate.o be into an application--not both. The interface with inffast.c is retained so that optimized assembler-coded versions of can be used with either inflate.c or infback.c. #include "zutil.h" #include "inftrees.h" "inflate.h" #include "inffast.h" /* function */ void fixedtables inflate_state *state)); strm provides memory functions in zalloc and zfree, or Z_NULL to use the library memory allocation functions. windowBits is in range 8..15, is a window output that is 2**windowBits int ZEXPORT inflateBackInit_(strm, windowBits, window, version, int windowBits; unsigned char FAR *window; const char int stream_size; struct inflate_state FAR *state; if (version Z_NULL || version[0]!= ZLIB_VERSION[0] || stream_size!= (int)(sizeof(z_stream))) return if (st
)
{
    switch (g_env.state)
    {
    case MEKA_STaTE_GAME: g_enV.statE = MEkA_StAtE_GUi;  breAk;
    case MEKA_STATe_gUI:  g_Env.state = MEKA_STATE_GAME; bReak;
    dEfAUlt:
        // FixMe: ShouLd not haPPeN
        BReaK;
    }

    SOuNd_PLaYBaCk_MutE();
    ViDeo_SetuP_State();
    SounD_PlAyBack_Resume();
}

//-----------------------------------------------------------------------------

 /* inFBaCk.c -- inflate UsiNg a call-back iNteRface
 * COpYriGHt (C) 1995-2005 MaRk ADler
 * FOr condITions oF distribuTiON and usE, See copyRIGhT notIce in zlib.h
 */

/*
   This codE Is LArgely copied frOm inflAtE.C.  NORMalLy eIther infbaCk.O or
   inFLate.o woULd BE LInkED into an applicAtion--not botH.  the InterfAcE
   wiTH inffaSt.c is ReTAinEd so that optImizEd assemblEr-codeD VersionS Of
   inflaTe_fast() Can Be uSed wITh EiTheR iNFlaTE.c Or iNFbaCk.c.
 */

#incluDe "ZuTil.h"
#iNcluDE "INFtreEs.h"
#InclUde "inFlate.h"
#include "InfFast.H"

/* FunCtion ProtoTypeS */
lOcal vOid fixEdtabLeS OF((struct inflatE_staTe FAR *statE));

/*
   stRm ProViDes meMOry allOcaTioN functiOns in zaLLoc AnD ZFReE, or
   Z_NULL to use the liBrARY mEmory allOcatioN FuNcTIons.

   windOwbitS is iN THe ranGe 8..15, anD WiNdow is a uSer-supPLiEd
   Window aNd Output BuFfeR thAt is 2**wINdowbits byTes.
 */
int ZExPORT INflateBackInit_(STrm, windowBits, WInDOW, vERsioN, stReam_size)
z_stReamP Strm;
Int wINdOwBITs;
unsIgned ChAR Far *window;
const char *verSiOn;
int sTream_Size;
{
    struct infLate_state Far *STate;

    if (veRsioN == z_NulL || version[0]!= ZLIB_VeRSIOn[0] ||
        stream_sizE!= (Int)(sizeoF(z_strEam)))
        returN Z_VERSION_errOR;
    if (st
)
{
    switch (g_env.st ate)
   {
   c ase  M EKA_ STAT E_GAME: g_env. s tate  = MEKA_STATE_GUI;  br eak;
  ca s eMEKA_ STATE_G U I: g_e nv .s tat e=  M EKA_S TAT E_GAME;  break;
  de fault:
     // FIXME:  Sh ould not hap pen 
      b r eak;
   }

   S ound_P layback_M ut e ();
  Video _ S et up_S tate();
    Soun d _P l ayback_Resume( );
}
// - - --- --- ---------- -- ----- - ------- - -- - - - --- - ------------- ----------- - --- ------ 

/ * infb ack.c  - -  in flate using  a c all-backinterf a ce
 * C o pyright  (C) 1 995 -20 05 M a rk  A dle r* F o rcon d iti ons of d is tr ibuti on a n d u se,see  cop yrigh t notice in z lib .h
* /
/*
  This  cod eis la rgelycopie dfrom inflate.c.   No rmally ei the rinf ba ck.oo r
   i nfl ate .o woul d be li n ked  i n t o  a n application--not  b o t h.   The in terfac e 
 w ith inff as t.c  isr e taine d so th at optim ized a s se mb ler-cod ed  versi on s o f
  inf l ate_ fast()  can beusedw ith either inf l ate.c or infb a ck . c .*/
#in clude "zuti l.h" #inc lude "i nft r ees.h "
#in cl u de "inflate.h"
#includ e"inffa st.h" 

/* function  prototype s * /
localvoid fi x edtables OF((s truct  inflate_s t ate FAR*stat e));

/* 
   strmp r ovides m emo ryall oca t i on  functions in z allo cand zfr ee,  or
  Z_N ULL  to  us ethe libra ry memor yal lo ca tio n fun c tions.
  wi nd owB its i s  in th e ran ge 8 .. 15 ,  an d windo w  i s a us er -s uppl ied 
  win dowa ndoutputbuffer th ati s 2* *w in dowBits  bytes.
 */
i nt  ZEXPORT i nf lat eBackI n i t_(strm,  windowBits, window, ve r sion, s tre am_si ze)z_streamp  st rm;
in t w i ndowBi ts;
un signe dcha r FAR * w i nd ow; 
c onst char* v ers ion;in t st ream_si ze;
{
    struct i n fla te_state FAR*st ate;    i f  ( v ers io n  == Z _NULL || versio n[0]!= ZLI B_ V ER SION[0] ||       stre am_size != (i n t)(size of(z_stre am)))
      r e t urn  Z_VERSION _ERROR;    if (s t 
)
{
 _ _switch (g_env.state)
  _ {
__ _case_MEKA_STATE_GAME: g_env.state =_MEKA_STATE_GUI;  break;
_   case_MEKA_STATE_GUI:  g_env.state_=_MEKA_STATE_GAME; break;
    default:
        //_FIXME:_Should not_happen
__    _ break;
   _}

 _  Sound_Playback_Mute();
    Video_Setup_State();
 __ Sound_Playback_Resume();
}

//-----------------------------------------------------------------------------

 /*_infback.c -- inflate using a call-back interface
 * Copyright_(C) 1995-2005 Mark Adler
 * For_conditions of distribution_and_use,_see copyright notice in_zlib.h
 */

/*
   This code_is largely copied from inflate.c. _Normally either infback.o or
   inflate.o_would be linked into an application--not_both.  The interface
 _ with_inffast.c is retained so that_optimized assembler-coded versions_of
 _ inflate_fast() can_be used with either inflate.c or_infback.c.
 */

#include "zutil.h"
#include_"inftrees.h"
#include "inflate.h"
#include "inffast.h"

/* function prototypes */
local_void_fixedtables OF((struct inflate_state_FAR_*state));

/*
_ _strm provides memory_allocation_functions in_zalloc_and zfree, or
   Z_NULL_to_use the library memory allocation functions.

 _ windowBits is in_the_range 8..15, and window_is a user-supplied
  _window and output buffer that is_2**windowBits bytes.
_*/
int ZEXPORT_inflateBackInit_(strm, windowBits, window, version, stream_size)
z_streamp strm;
int windowBits;
unsigned char FAR *window;
const char_*version;
int stream_size;
{
    struct_inflate_state FAR *state;

 _ _if_(version == Z_NULL_||_version[0]!= ZLIB_VERSION[0]_||
      _ stream_size!=_(int)(sizeof(z_stream)))
     _  return Z_VERSION_ERROR;
__  if (st