D:\H2INC>h2inc ddraw.h
Microsoft (R) C to MASM Include File Translator 6.12a Mar 17 1994 02:11:52
Copyright (c) Microsoft Corp 1994. All rights reserved

ddraw.h(118) : warning HI4820: ignoring function definition : FAR()
ddraw.h(118) : error HI2059: syntax error : '*'

what? :? :? :?
Posted on 2004-09-05 21:17:17 by doitlong
Try removing the "FAR". The lines that contain it actually declare LPxxx as pointers to stuff, so in asm you don't need their declaration - so, you can freely remove these lines (in a backup copy of ddraw.h of course). Or you can just use the attached include file. But the latter requires to use ATC (http://www.asmcommunity.net/board/viewtopic.php?t=17987) - an OOP package.

With that uDirectDraw.inc you code like this:

ZeroMemory &ddsd,sizeof ddsd
mov ddsd.dwSize,sizeof ddsd
mov ddsd.dwFlags,DDSD_CAPS
mov ddsd.ddsCaps.dwCaps,DDSCAPS_PRIMARYSURFACE
pcall lpdd.CreateSurface,addr ddsd,addr lpDDSPrimary,0
.if eax
msgbox "Can't get access to screen"
invoke ExitProcess,0
pcall lpdd.CreateClipper,0,addr lpClipper,0
.if eax
msgbox "Video Hardware cannot draw in window-mode"
invoke ExitProcess,0
pcall lpClipper.SetHWnd,0,iDR.hwnd_MDI
pcall lpDDSPrimary.SetClipper,lpClipper
pcall lpDDSPrimary.Blt,addr WindowRect,lpSurface,addr rect2,DDBLT_WAIT,0
Posted on 2004-09-06 00:54:24 by Ultrano