Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

SAL.H File Reference

Go to the source code of this file.

Compounds

struct  SAL_REGION
struct  SAL_RGB32
struct  SAL_WINAREA

Defines

#define SAL_VERSION   "1.00"
#define SAL_VERSION_DATE   "23-May-96"
#define SALEXPORT   WINAPI
#define DXDEC
#define DXDEF
#define YES   1
#define NO   0
#define TRUE   1
#define FALSE   0
#define SAL_FULLSCREEN   0
#define SAL_WINDOW   1
#define SAL_TRY_FULLSCREEN   2
#define SAL_FRONT_SURFACE   0
#define SAL_BACK_SURFACE   1
#define SAL_ALLOW_FRONT_LOCK   0
#define DEFAULT_AFL   NO
#define SAL_BUFFER_IF_NO_LFB   1
#define DEFAULT_BINL   YES
#define SAL_DOS_MONO_DEBUG   2
#define DEFAULT_DMD   YES
#define SAL_MAX_VIDEO_PAGES   3
#define DEFAULT_MVP   3
#define SAL_ALLOW_WINDOW_RESIZE   4
#define DEFAULT_AWR   YES
#define SAL_PREVENT_ALT_MENU_POPUP   5
#define DEFAULT_PAMP   YES
#define SAL_ALWAYS_ON_TOP   6
#define DEFAULT_SAOT   NO
#define SAL_MAXIMIZE_TO_FULLSCREEN   7
#define DEFAULT_MTF   YES
#define N_SAL_PREFS   8

Typedefs

typedef unsigned char U8
typedef unsigned short U16
typedef unsigned long U32
typedef char C8
typedef signed char S8
typedef signed short S16
typedef signed long S32

Functions

typedef void (SALEXPORT *SALFOCUSCB)(S32 status)
DXDEC void __cdecl SAL_debug_printf (char *fmt,...)
DXDEC S32 WINAPI SAL_get_preference (U32 number)
DXDEC S32 WINAPI SAL_set_preference (U32 number, S32 value)
DXDEC void WINAPI SAL_set_palette_entry (S32 index, SAL_RGB32 *entry, S32 wait_flag)
DXDEC void WINAPI SAL_get_palette_entry (S32 index, SAL_RGB32 *entry)
DXDEC void WINAPI SAL_set_palette_range (S32 index, S32 num_entries, SAL_RGB32 *entry_list, S32 wait_flag)
DXDEC void WINAPI SAL_get_palette_range (S32 index, S32 num_entries, SAL_RGB32 *entry_list)
DXDEC void WINAPI SAL_get_pixel_format (S32 *pixel_pitch, S32 *bytes_per_pixel, S32 *R_shift, U32 *R_mask, S32 *R_width, S32 *G_shift, U32 *G_mask, S32 *G_width, S32 *B_shift, U32 *B_mask, S32 *B_width)
DXDEC void WINAPI SAL_flip_surface (void)
DXDEF void WINAPI SAL_blit_surface (void)
DXDEC void WINAPI SAL_wipe_surface (S32 surface, U32 color)
DXDEC void WINAPI SAL_lock_surface (S32 surface, U8 **ptr, S32 *pitch)
DXDEC void WINAPI SAL_release_surface (S32 surface, S32 perform_flip)
DXDEC void WINAPI SAL_lock_region (S32 surface, SAL_REGION region, U8 **ptr, S32 *pitch)
DXDEC void WINAPI SAL_release_region (S32 surface, SAL_REGION region)
DXDEC void WINAPI SAL_show_system_mouse (void)
DXDEC void WINAPI SAL_hide_system_mouse (void)
DXDEC void WINAPI SAL_constrain_mouse (void)
DXDEC void WINAPI SAL_unconstrain_mouse (void)


Define Documentation

#define DEFAULT_AFL   NO
 

Definition at line 128 of file SAL.H.

#define DEFAULT_AWR   YES
 

Definition at line 140 of file SAL.H.

#define DEFAULT_BINL   YES
 

Definition at line 131 of file SAL.H.

#define DEFAULT_DMD   YES
 

Definition at line 134 of file SAL.H.

#define DEFAULT_MTF   YES
 

Definition at line 149 of file SAL.H.

#define DEFAULT_MVP   3
 

Definition at line 137 of file SAL.H.

#define DEFAULT_PAMP   YES
 

Definition at line 143 of file SAL.H.

#define DEFAULT_SAOT   NO
 

Definition at line 146 of file SAL.H.

#define DXDEC
 

Definition at line 76 of file SAL.H.

#define DXDEF
 

Definition at line 77 of file SAL.H.

Referenced by GetDIBHandle(), SAL_blit_surface(), SAL_client_area(), SAL_constrain_mouse(), SAL_debug_printf(), SAL_error_box(), SAL_flip_surface(), SAL_get_palette_entry(), SAL_get_palette_range(), SAL_get_pixel_format(), SAL_get_preference(), SAL_GetBackBufferDC(), SAL_hide_system_mouse(), SAL_is_app_active(), SAL_lock_region(), SAL_lock_surface(), SAL_register_focus_callback(), SAL_register_WNDPROC(), SAL_release_region(), SAL_release_surface(), SAL_ReleaseBackBufferDC(), SAL_serve_message_queue(), SAL_set_display_mode(), SAL_set_main_window(), SAL_set_palette_entry(), SAL_set_palette_range(), SAL_set_preference(), SAL_show_system_mouse(), SAL_shutdown(), SAL_startup(), SAL_unconstrain_mouse(), SAL_window_area(), SAL_window_status(), and SAL_wipe_surface().

#define FALSE   0
 

Definition at line 113 of file SAL.H.

Referenced by BeginMeshes(), BeginModels(), BeginScene(), BeginWorld(), Bot_MoveToPoint(), CombineDLightWithRGBMap(), CombineDLightWithRGBMapWithShadow(), CreateChannel(), D3DMain_ClearBuffers(), D3DMain_CreateBuffers(), D3DMain_CreateD3D(), D3DMain_CreateDDFromName(), D3DMain_CreateDevice(), D3DMain_CreateViewPort(), D3DMain_CreateZBuffer(), D3DMain_EnumDevices(), D3DMain_EnumDisplayModes(), D3DMain_GetSurfaceFormats(), D3DMain_GetTextureMemory(), D3DMain_InitD3D(), D3DMain_PickDevice(), D3DMain_RememberOldMode(), D3DMain_RestoreAllSurfaces(), D3DMain_RestoreDisplayMode(), D3DMain_SetDisplayMode(), D3DMain_ShutdownD3D(), DDEnumCallback(), DDrawBlitDecal(), DDrawBlitDecalToFront(), DeInitNetPlay(), DIB_startup(), DoDDrawInit(), DoEnumeration(), DoModeEnumeration(), DriverHook(), DrvInit(), DSFillSoundBuffer(), DSParseWaveResource(), DupChannel(), EndMeshes(), EndScene(), EnumDeviceFunc(), EnumDisplayModesCallback(), EnumModes2(), EnumModesCB(), EnumSession(), EnumSubDrivers2(), EnumSubDriversCB(), EnumSurfaceFormatsCallback(), EnumTextureFormatsCallback(), FillSoundChannel(), FindClosestLeafIntersection_r(), FreeAllChannels(), FreeChannel(), FSDos_DeleteFile(), FSDos_GetProperties(), FSDos_GetS(), FSDos_Open(), FSDos_Read(), FSDos_RenameFile(), FSDos_SetAttributes(), FSDos_SetSize(), FSDos_SetTime(), FSDos_Write(), GameMgr_ResetMainWindow(), geActor_DestroyDirect(), geEngine_BeginFrame(), geFont_AddBitmapBuffer(), geFont_AddCharacters(), geFont_DrawText(), geFont_DrawTextToBitmap(), GetCDPosition(), GetCPUInfo(), GetSoundData(), GMain_ScreenShot(), GMain_Startup(), InitNetPlay(), IntersectLeafSides2(), IntersectLeafSides_r(), IsKeyDown(), LoadEntitySet(), LockDDrawBackBuffer(), Main_CheckDD(), Main_ClearBackBuffer(), Main_EnumSurfaceFormats(), Main_EnumTextureFormats(), Main_ShowBackBuffer(), ModifyChannel(), NetPlayCreatePlayer(), NetPlayCreateSession(), NetPlayDestroyPlayer(), NetPlayEnumSession(), NetPlayJoinSession(), OutputDriverInfo(), ParseData(), PCache_FlushMiscPolys(), RefreshDDraw(), Render_DrawDecal(), RenderGouraudPoly(), RenderInit(), RenderMiscTexturePoly(), RenderSubModels(), RenderWorldPoly(), RenderWorldPolys(), RestoreAll(), SAL_set_display_mode(), SAL_startup(), ScreenShot(), SendPlayersToClients(), Server_ClientConnect(), Server_PlaySound(), SetupTexture(), SoftDrv_BeginScene(), SoftDrv_EndScene(), SoftDrv_EnumModes(), SoftDrv_EnumSubDrivers(), SoftDrv_Init(), SoftDrv_ScreenShot(), StartSoundChannel(), StopSoundChannel(), Surf_InSurfBoundingBox(), SysInit(), Test_CPU_bits(), THandle_CreateSurfaces(), Trace_BBoxInVisibleLeaf(), Trace_MiscCollision(), Trace_MiscCollision2(), Trace_ModelCollisionBBox(), Trace_TestModelMove(), Trace_WorldCollisionBBox(), Trace_WorldCollisionExact(), Trace_WorldCollisionExact2(), UnlockDDrawBackBuffer(), UpdateLTypeTables(), WinMain(), WndProc(), and World_PolyPrepVerts().

#define N_SAL_PREFS   8
 

Definition at line 151 of file SAL.H.

#define NO   0
 

Definition at line 105 of file SAL.H.

#define SAL_ALLOW_FRONT_LOCK   0
 

Definition at line 127 of file SAL.H.

#define SAL_ALLOW_WINDOW_RESIZE   4
 

Definition at line 139 of file SAL.H.

#define SAL_ALWAYS_ON_TOP   6
 

Definition at line 145 of file SAL.H.

#define SAL_BACK_SURFACE   1
 

Definition at line 121 of file SAL.H.

Referenced by BeginScene(), DIB_shutdown(), and EndScene().

#define SAL_BUFFER_IF_NO_LFB   1
 

Definition at line 130 of file SAL.H.

#define SAL_DOS_MONO_DEBUG   2
 

Definition at line 133 of file SAL.H.

#define SAL_FRONT_SURFACE   0
 

Definition at line 120 of file SAL.H.

#define SAL_FULLSCREEN   0
 

Definition at line 116 of file SAL.H.

Referenced by SAL_serve_message_queue(), SAL_set_display_mode(), and SAL_startup().

#define SAL_MAX_VIDEO_PAGES   3
 

Definition at line 136 of file SAL.H.

#define SAL_MAXIMIZE_TO_FULLSCREEN   7
 

Definition at line 148 of file SAL.H.

#define SAL_PREVENT_ALT_MENU_POPUP   5
 

Definition at line 142 of file SAL.H.

#define SAL_TRY_FULLSCREEN   2
 

Definition at line 118 of file SAL.H.

Referenced by SAL_set_display_mode().

#define SAL_VERSION   "1.00"
 

Definition at line 26 of file SAL.H.

#define SAL_VERSION_DATE   "23-May-96"
 

Definition at line 27 of file SAL.H.

#define SAL_WINDOW   1
 

Definition at line 117 of file SAL.H.

Referenced by DrvInit(), SAL_serve_message_queue(), and SAL_set_display_mode().

#define SALEXPORT   WINAPI
 

Definition at line 75 of file SAL.H.

#define TRUE   1
 

Definition at line 109 of file SAL.H.

Referenced by BBoxInVisibleLeaf_r(), BeginMeshes(), BeginModels(), BeginScene(), BeginWorld(), Bot_MoveToPoint(), BSPIntersect(), BSPIntersectMisc(), BSPIntersectMisc2(), ChooseAction(), ClearWorldCache(), CombineDLightWithRGBMap(), CombineDLightWithRGBMapWithShadow(), CreateChannel(), D3DMain_ClearBuffers(), D3DMain_CreateBuffers(), D3DMain_CreateD3D(), D3DMain_CreateDDFromName(), D3DMain_CreateDevice(), D3DMain_CreateViewPort(), D3DMain_CreateZBuffer(), D3DMain_EnumDevices(), D3DMain_EnumDisplayModes(), D3DMain_GetClientWindowOffset(), D3DMain_GetSurfaceFormats(), D3DMain_GetTextureMemory(), D3DMain_InitD3D(), D3DMain_PickDevice(), D3DMain_RememberOldMode(), D3DMain_RestoreAllSurfaces(), D3DMain_RestoreDisplayMode(), D3DMain_SetDisplayMode(), D3DMain_ShutdownD3D(), DDEnumCallback(), DDrawBlitDecal(), DDrawBlitDecalDelayed(), DDrawBlitDecalToFront(), DDRAWDisplay_GetDisplayInfo(), DeInitNetPlay(), DIB_startup(), DlgProc(), DllMain(), DoDDrawInit(), DoEnumeration(), DoModeEnumeration(), DPEnumConnectionsCallback(), DrawDecal(), DriverHook(), DrvInit(), DrvShutdown(), DSFillSoundBuffer(), DSParseWaveResource(), DupChannel(), EndMeshes(), EndModels(), EndScene(), EndWorld(), EnumDeviceFunc(), EnumModes(), EnumModes2(), EnumModesCB(), EnumPixelFormats(), EnumSession(), EnumSubDrivers2(), EnumSubDriversCB(), EnumSurfaceFormatsCallback(), EnumTextureFormatsCallback(), FillSoundChannel(), FreeAllChannels(), FreeChannel(), FSDos_FinderGetNextFile(), FSDos_GetS(), GBSP_FreeGBSPFile(), GBSP_LoadGBSPFile(), geEngine_BeginFrame(), geEngine_Puts(), geFont_AddBitmapBuffer(), geFont_AddCharacters(), geFont_DrawText(), geFont_DrawTextToBitmap(), geFont_DrawUsingDIB(), GetCDPosition(), GetCPUInfo(), GetDrvRenderState(), GetGamma(), GetSoundData(), GMain_Shutdown(), GMain_Startup(), InitNetPlay(), IntersectLeafSides2(), IntersectLeafSides_r(), IsKeyDown(), Light_SetupLightmap(), LockDDrawBackBuffer(), Main_CheckDD(), Main_ClearBackBuffer(), Main_EnumSurfaceFormats(), Main_EnumTextureFormats(), Main_ShowBackBuffer(), ModifyChannel(), NetPlayCreatePlayer(), NetPlayCreateSession(), NetPlayDestroyPlayer(), NetPlayEnumSession(), NetPlayJoinSession(), OutputDriverInfo(), ParseData(), PCache_FlushMiscPolys(), PCache_FlushWorldPolys(), PCache_InsertMiscPoly(), PCache_InsertWorldPoly(), PCache_Reset(), ReadChunk(), RefreshDDraw(), Render_DrawDecal(), Render_GouraudPoly(), Render_LinesPoly(), Render_MiscTexturePoly(), Render_WorldPoly(), RenderGouraudPoly(), RenderMiscTexturePoly(), RenderWorldPoly(), RenderWorldPolys(), SAL_serve_message_queue(), SAL_set_main_window(), SAL_set_palette_entry(), SAL_set_palette_range(), SAL_startup(), ScreenShot(), SetDrvRenderState(), SetGamma(), ShutdownAll(), SoftDrv_BeginMeshes(), SoftDrv_BeginModels(), SoftDrv_BeginScene(), SoftDrv_BeginWorld(), SoftDrv_EndRenderMode(), SoftDrv_EndScene(), SoftDrv_EnumModes(), SoftDrv_EnumSubDrivers(), SoftDrv_GetGamma(), SoftDrv_Init(), SoftDrv_SetActive(), SoftDrv_SetGamma(), SoftDrv_Shutdown(), StartSoundChannel(), StopSoundChannel(), Surf_InSurfBoundingBox(), SysInit(), SysShutdown(), Trace_MiscCollision(), Track_FakeTrack(), UnlockDDrawBackBuffer(), UpdateLTypeTables(), WinMain(), WndProc(), World_PolyPrepVerts(), and XFormFromVector().

#define YES   1
 

Definition at line 101 of file SAL.H.


Typedef Documentation

typedef char C8
 

Definition at line 93 of file SAL.H.

typedef signed short S16
 

Definition at line 95 of file SAL.H.

typedef signed long S32
 

Definition at line 96 of file SAL.H.

typedef signed char S8
 

Definition at line 94 of file SAL.H.

typedef unsigned short U16
 

Definition at line 91 of file SAL.H.

typedef unsigned long U32
 

Definition at line 92 of file SAL.H.

typedef unsigned char U8
 

Definition at line 90 of file SAL.H.


Function Documentation

DXDEF void WINAPI SAL_blit_surface void   ) 
 

Definition at line 820 of file W32SAL.CPP.

References DIB_flip_surface(), and DXDEF.

Referenced by EndScene().

00821 {
00822         DIB_flip_surface();
00823 }

DXDEC void WINAPI SAL_constrain_mouse void   ) 
 

Definition at line 1687 of file W32SAL.CPP.

References constrain_request, constrain_state, DIB_active, and DXDEF.

01688 {
01689    constrain_state = 1;
01690 
01691    if (DIB_active)
01692       {
01693       constrain_request = 1;
01694       }
01695 }

DXDEC void __cdecl SAL_debug_printf char *  fmt,
... 
 

Definition at line 1033 of file W32SAL.CPP.

References debug_log_filename, DXDEF, log_to_file, and NULL.

Referenced by DIB_startup(), SAL_error_box(), and SAL_serve_message_queue().

01034 {
01035    static char work_string[4096];
01036    FILE       *log;
01037 
01038    if ((fmt == NULL) || (strlen(fmt) > sizeof(work_string)))
01039       {
01040       strcpy(work_string, "(String missing or too large)");
01041       }
01042    else
01043       {
01044       va_list ap;
01045 
01046       va_start(ap, 
01047                fmt);
01048 
01049       vsprintf(work_string, 
01050                fmt, 
01051                ap);
01052 
01053       va_end  (ap);
01054       }
01055 
01056    if (log_to_file)
01057       {
01058       log = fopen(debug_log_filename,"a+t");
01059       
01060       if (log != NULL)
01061          {
01062          fprintf(log,"%s\n",work_string);
01063          fclose(log);
01064          }
01065       }
01066 
01067    OutputDebugString(work_string);
01068 }

DXDEC void WINAPI SAL_flip_surface void   ) 
 

Definition at line 1548 of file W32SAL.CPP.

References DIB_active, DIB_flip_surface(), and DXDEF.

Referenced by DIB_release_surface(), and DIB_shutdown().

01549 {
01550         if (DIB_active)
01551       {
01552       DIB_flip_surface();
01553       }
01554 }

DXDEC void WINAPI SAL_get_palette_entry S32  index,
SAL_RGB32 entry
 

Definition at line 1462 of file W32SAL.CPP.

References DXDEF, and palette_state.

01464 {
01465    *entry = palette_state[index];
01466 }

DXDEC void WINAPI SAL_get_palette_range S32  index,
S32  num_entries,
SAL_RGB32 entry_list
 

Definition at line 1532 of file W32SAL.CPP.

References DXDEF, and palette_state.

01535 {
01536    for (int i=0; i < num_entries; i++)
01537       {
01538       entry_list[i] = palette_state[index+i];
01539       }
01540 }

DXDEC void WINAPI SAL_get_pixel_format S32 pixel_pitch,
S32 bytes_per_pixel,
S32 R_shift,
U32 R_mask,
S32 R_width,
S32 G_shift,
U32 G_mask,
S32 G_width,
S32 B_shift,
U32 B_mask,
S32 B_width
 

Definition at line 1722 of file W32SAL.CPP.

References current_bpp, DIB_active, DIB_B_bitmask, DIB_G_bitmask, DIB_R_bitmask, DXDEF, NULL, S32, and U32.

Referenced by SysInit().

01734 {
01735    S32 red_shift;
01736    U32 red_mask;
01737    S32 red_width;
01738    S32 grn_shift;
01739    U32 grn_mask;
01740    S32 grn_width;
01741    S32 blu_shift;
01742    U32 blu_mask;
01743    S32 blu_width;
01744    S32 i;
01745 
01746    //
01747    // Handle palettized (8 BPP) modes
01748    //
01749    // Write 8-bit pixel pitch and visible bytes/pixel fields
01750    // If we're in 8BPP mode, exit without altering RGB fields
01751    //
01752 
01753    if (current_bpp == 8)
01754       {
01755       if (pixel_pitch     != NULL) *pixel_pitch     = 1;
01756       if (bytes_per_pixel != NULL) *bytes_per_pixel = 1;
01757 
01758       return;
01759       }
01760 
01761    //
01762    // Handle hi-color (16+ BPP) modes
01763    //
01764    // If using DirectDraw, do a GetPixelFormat() call
01765    // 
01766    // If using CreateDIBSection(), return mask values used to create DIB
01767    // 
01768 
01769    if (DIB_active)
01770       {
01771       if (pixel_pitch     != NULL) *pixel_pitch     = (current_bpp / 8);
01772       if (bytes_per_pixel != NULL) *bytes_per_pixel = (current_bpp / 8);
01773 
01774       red_mask = DIB_R_bitmask;
01775       grn_mask = DIB_G_bitmask;
01776       blu_mask = DIB_B_bitmask;
01777       }
01778 
01779    //
01780    // Derive shift, width values from masks
01781    //
01782 
01783    for (i=31; i >= 0; i--)
01784       {
01785       if (red_mask & (1 << i))
01786          {
01787          red_shift = i;
01788          }
01789 
01790       if (grn_mask & (1 << i))
01791          {
01792          grn_shift = i;
01793          }
01794 
01795       if (blu_mask & (1 << i))
01796          {
01797          blu_shift = i;
01798          }
01799       }
01800 
01801    for (i=0; i <= 31; i++)
01802       {
01803       if (red_mask & (1 << i))
01804          {
01805          red_width = i - red_shift + 1;
01806          }
01807 
01808       if (grn_mask & (1 << i))
01809          {
01810          grn_width = i - grn_shift + 1;
01811          }
01812 
01813       if (blu_mask & (1 << i))
01814          {
01815          blu_width = i - blu_shift + 1;
01816          }
01817       }
01818    //
01819    // Pass all requested values back to the caller
01820    //
01821 
01822    if (R_shift != NULL) *R_shift = red_shift;
01823    if (G_shift != NULL) *G_shift = grn_shift;
01824    if (B_shift != NULL) *B_shift = blu_shift;
01825 
01826    if (R_mask  != NULL) *R_mask  = red_mask;
01827    if (G_mask  != NULL) *G_mask  = grn_mask;
01828    if (B_mask  != NULL) *B_mask  = blu_mask;
01829 
01830    if (R_width != NULL) *R_width = red_width;
01831    if (G_width != NULL) *G_width = grn_width;
01832    if (B_width != NULL) *B_width = blu_width;
01833 }

DXDEC S32 WINAPI SAL_get_preference U32  number  ) 
 

Definition at line 1020 of file W32SAL.CPP.

References DXDEF, S32, and SAL_preference.

01021 {
01022    return SAL_preference[number];
01023 }

DXDEC void WINAPI SAL_hide_system_mouse void   ) 
 

Definition at line 1660 of file W32SAL.CPP.

References cursor_state, DXDEF, and show_count.

01661 {
01662    --show_count;
01663 
01664    if (show_count == 0)
01665       {
01666       //
01667       // Show count has become 0, so hide mouse cursor if it's currently
01668       // visible
01669       //
01670 
01671       if (cursor_state)
01672          {
01673          cursor_state = 0;
01674                         #ifndef DISABLED_BEHAVIOR
01675                                 ShowCursor(0);
01676                         #endif
01677          }
01678       }
01679 }

DXDEC void WINAPI SAL_lock_region S32  surface,
SAL_REGION  region,
U8 **  ptr,
S32 pitch
 

Definition at line 1608 of file W32SAL.CPP.

References DXDEF.

01612 {
01613 
01614 }

DXDEC void WINAPI SAL_lock_surface S32  surface,
U8 **  ptr,
S32 pitch
 

Definition at line 1577 of file W32SAL.CPP.

References DIB_active, DIB_lock_surface(), and DXDEF.

Referenced by BeginScene().

01580 {
01581         if (DIB_active)
01582       {
01583       DIB_lock_surface(surface, ptr, pitch);
01584       }
01585 }

DXDEC void WINAPI SAL_release_region S32  surface,
SAL_REGION  region
 

Definition at line 1622 of file W32SAL.CPP.

References DXDEF.

01624 {
01625 }

DXDEC void WINAPI SAL_release_surface S32  surface,
S32  perform_flip
 

Definition at line 1593 of file W32SAL.CPP.

References DIB_active, DIB_release_surface(), and DXDEF.

Referenced by EndScene().

01595 {
01596         if (DIB_active)
01597       {
01598       DIB_release_surface(surface, perform_flip);
01599       }
01600 }

DXDEC void WINAPI SAL_set_palette_entry S32  index,
SAL_RGB32 entry,
S32  wait_flag
 

Definition at line 1414 of file W32SAL.CPP.

References current_bpp, DIB_active, DXDEF, hPalette, NULL, palette_change_request, palette_state, pbmi, pLogPal, and TRUE.

01417 {
01418    //
01419    // If we're not in 8BPP mode, bail out
01420    // 
01421 
01422    if (current_bpp != 8)
01423       {
01424       return;
01425       }
01426 
01427    //
01428    // Update global palette state
01429    //
01430 
01431    palette_state[index] = *entry;
01432 
01433    pLogPal->palPalEntry[index].peRed   = pbmi->bmiColors[index].rgbRed   = (unsigned char) entry->r;
01434    pLogPal->palPalEntry[index].peGreen = pbmi->bmiColors[index].rgbGreen = (unsigned char) entry->g;
01435    pLogPal->palPalEntry[index].peBlue  = pbmi->bmiColors[index].rgbBlue  = (unsigned char) entry->b;
01436    pLogPal->palPalEntry[index].peFlags = NULL;
01437 
01438    //
01439    // Update DirectDraw palette, if appropriate
01440    //
01441 
01442 
01443    if (DIB_active)
01444       {
01445       if (hPalette != NULL)
01446          {
01447          DeleteObject(hPalette);
01448          }
01449 
01450       hPalette = CreatePalette(pLogPal);
01451 
01452       palette_change_request = TRUE;
01453       }
01454 }

DXDEC void WINAPI SAL_set_palette_range S32  index,
S32  num_entries,
SAL_RGB32 entry_list,
S32  wait_flag
 

Definition at line 1474 of file W32SAL.CPP.

References SAL_RGB32::b, current_bpp, DIB_active, DXDEF, SAL_RGB32::g, hPalette, NULL, palette_change_request, palette_state, pbmi, pLogPal, SAL_RGB32::r, S32, and TRUE.

01478 {
01479    S32 i;
01480    S32 j;
01481 
01482    //
01483    // If we're not in 8BPP mode, bail out
01484    // 
01485 
01486    if (current_bpp != 8)
01487       {
01488       return;
01489       }
01490 
01491    //
01492    // Update global palette state
01493    //
01494 
01495    for (i=0; i < num_entries; i++)
01496       {
01497       palette_state[index+i] = entry_list[i];
01498       }
01499 
01500    for (i=0, j=index; i < num_entries; i++, j++)
01501       {
01502       pLogPal->palPalEntry[j].peRed   = pbmi->bmiColors[j].rgbRed   = (unsigned char) entry_list[i].r;
01503       pLogPal->palPalEntry[j].peGreen = pbmi->bmiColors[j].rgbGreen = (unsigned char) entry_list[i].g;
01504       pLogPal->palPalEntry[j].peBlue  = pbmi->bmiColors[j].rgbBlue  = (unsigned char) entry_list[i].b;
01505       pLogPal->palPalEntry[j].peFlags = NULL;
01506       }
01507 
01508    //
01509    // Update DirectDraw palette, if appropriate
01510    //
01511 
01512 
01513    if (DIB_active)
01514       {
01515       if (hPalette != NULL)
01516          {
01517          DeleteObject(hPalette);
01518          }
01519 
01520       hPalette = CreatePalette(pLogPal);
01521 
01522       palette_change_request = TRUE;
01523       }
01524 }

DXDEC S32 WINAPI SAL_set_preference U32  number,
S32  value
 

Definition at line 1003 of file W32SAL.CPP.

References DXDEF, S32, and SAL_preference.

01004 {
01005    S32 old;
01006 
01007    old = SAL_preference[number];
01008 
01009    SAL_preference[number] = value;
01010 
01011    return old;
01012 }

DXDEC void WINAPI SAL_show_system_mouse void   ) 
 

Definition at line 1633 of file W32SAL.CPP.

References cursor_state, DXDEF, and show_count.

01634 {
01635    ++show_count;
01636 
01637    if (show_count == 1)
01638       {
01639       //
01640       // Show count has become 1, so show mouse cursor if it's currently 
01641       // hidden
01642       //
01643 
01644       if (!cursor_state)
01645          {
01646          cursor_state = 1;
01647                         #ifndef DISABLED_BEHAVIOR
01648                                 ShowCursor(1);
01649                         #endif
01650          }
01651       }
01652 }

DXDEC void WINAPI SAL_unconstrain_mouse void   ) 
 

Definition at line 1703 of file W32SAL.CPP.

References constrain_request, constrain_state, DIB_active, DXDEF, and unconstrained_rect.

01704 {
01705    constrain_state = 0;
01706 
01707    if (DIB_active)
01708       {
01709       #ifndef DISABLED_BEHAVIOR
01710                 ClipCursor(&unconstrained_rect);
01711           #endif
01712       constrain_request = 0;
01713       }
01714 }

DXDEC void WINAPI SAL_wipe_surface S32  surface,
U32  color
 

Definition at line 1562 of file W32SAL.CPP.

References DIB_active, DIB_wipe_surface(), and DXDEF.

Referenced by BeginScene(), and DIB_shutdown().

01564 {
01565         if (DIB_active)
01566       {
01567       DIB_wipe_surface(surface, color);
01568       }
01569 }

typedef void SALEXPORT *  SALFOCUSCB  ) 
 


Generated on Tue Sep 30 12:38:03 2003 for GTestAndEngine by doxygen 1.3.2