Статьи по Assembler


         

a compilable project. It is


;-----------------------------------------------------------------------------
; File: ServiceDX.asm
;
; Desc: Service of DirectX
;
; Note: 1.It is not a compilable project. It is only a sample!
; 2.It is not the English. It is Russian English!
;
; Copyright (c) 2001 Serge Vetroff (http://www.assembler.ru)
;-----------------------------------------------------------------------------
;##############################################################################
include @struct.inc
include windows.inc
include directx.inc
include settings.inc
include globals.inc
;*****************************************************************************
; Name: List_DX_Modes
; Desc: Listing of DirectX screen modes
; If DirectX is not available - returns FALSE
;-----------------------------------------------------------------------------
.data?
modes_buffer dd ?
modes_number dd ?
.code
List_DX_Modes PROC
@<;Clear variables>,,
@<;Create list modes buffer>,,,,
@<;Create a DirectDraw object>,,,
@<;Enum modes>,,,,,,,,
@<;Incorrect Exit>,,,,
@<;OK, truncate modes buffer>,,,,,,,
@<;Release interface>,,,,,,,<@@:>,
ret
List_DX_Modes ENDP
;.............................................................................
; Name: enum_modes_callback
; Desc: Enumeration of display modes for DirectDraw 1.0
;. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
enum_modes_callback PROC USES esi edi ebx ecx lpDDSurfaceDesc,lpContext
@<;Check if buffer of modes is overloaded>,,,
@<;Test of flags of DDSURFACEDESC>,,,,,,
@<;Test of flags of DDSURFACEDESC.ddpfPixelFormat>,,,
;Copy current mode to modes buffer
@,
@,
@,
@,
@<;Inc the buffer ptr and counter>,,
@<;Exit from procedure>,,,,
enum_modes_callback ENDP
;.............................................................................
; Name: sort_the_modes
; Desc: Sort modes in the modes_buffer
;. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Содержание  Назад  Вперед