From b99239efda16d6953c5bdb71ad89bba0e6035c7b Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 1 Sep 2008 19:54:24 +0000 Subject: [PATCH] 2008-09-01 21:52 UTC+0200 Viktor Szakats (harbour.01 syenar hu) - contrib/hbw32ddr * contrib/Makefile * contrib/make_b32_all.bat * contrib/make_gcc_all.sh * contrib/make_vc_all.bat - Removed contrib hbw32ddr. For those wanting to peek into this code, or pick up development, the exact source can be found in Harbour 1.0.0 release. --- harbour/ChangeLog | 11 + harbour/contrib/Makefile | 1 - harbour/contrib/hbw32ddr/Makefile | 25 - harbour/contrib/hbw32ddr/common.mak | 13 - harbour/contrib/hbw32ddr/make_b32.bat | 54 -- harbour/contrib/hbw32ddr/make_gcc.sh | 7 - harbour/contrib/hbw32ddr/make_vc.bat | 65 -- harbour/contrib/hbw32ddr/readme.txt | 126 --- harbour/contrib/hbw32ddr/tests/anima2.bmp | Bin 21988 -> 0 bytes harbour/contrib/hbw32ddr/tests/black.bmp | Bin 38462 -> 0 bytes harbour/contrib/hbw32ddr/tests/bld_b32.bat | 14 - harbour/contrib/hbw32ddr/tests/bld_vc.bat | 14 - harbour/contrib/hbw32ddr/tests/brick1.bmp | Bin 867 -> 0 bytes harbour/contrib/hbw32ddr/tests/brick2.bmp | Bin 1190 -> 0 bytes harbour/contrib/hbw32ddr/tests/brick3.bmp | Bin 1013 -> 0 bytes harbour/contrib/hbw32ddr/tests/shot.bmp | Bin 65 -> 0 bytes harbour/contrib/hbw32ddr/tests/testdx.prg | 178 ----- harbour/contrib/hbw32ddr/w32_ddrw.cpp | 881 --------------------- harbour/contrib/make_b32_all.bat | 2 +- harbour/contrib/make_gcc_all.sh | 2 +- harbour/contrib/make_vc_all.bat | 2 +- 21 files changed, 14 insertions(+), 1381 deletions(-) delete mode 100644 harbour/contrib/hbw32ddr/Makefile delete mode 100644 harbour/contrib/hbw32ddr/common.mak delete mode 100644 harbour/contrib/hbw32ddr/make_b32.bat delete mode 100755 harbour/contrib/hbw32ddr/make_gcc.sh delete mode 100644 harbour/contrib/hbw32ddr/make_vc.bat delete mode 100644 harbour/contrib/hbw32ddr/readme.txt delete mode 100644 harbour/contrib/hbw32ddr/tests/anima2.bmp delete mode 100644 harbour/contrib/hbw32ddr/tests/black.bmp delete mode 100644 harbour/contrib/hbw32ddr/tests/bld_b32.bat delete mode 100644 harbour/contrib/hbw32ddr/tests/bld_vc.bat delete mode 100644 harbour/contrib/hbw32ddr/tests/brick1.bmp delete mode 100644 harbour/contrib/hbw32ddr/tests/brick2.bmp delete mode 100644 harbour/contrib/hbw32ddr/tests/brick3.bmp delete mode 100644 harbour/contrib/hbw32ddr/tests/shot.bmp delete mode 100644 harbour/contrib/hbw32ddr/tests/testdx.prg delete mode 100644 harbour/contrib/hbw32ddr/w32_ddrw.cpp diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b059120bb7..d0d67af29a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,17 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-09-01 21:52 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + - contrib/hbw32ddr + * contrib/Makefile + * contrib/make_b32_all.bat + * contrib/make_gcc_all.sh + * contrib/make_vc_all.bat + - Removed contrib hbw32ddr. + For those wanting to peek into this code, or + pick up development, the exact source can be + found in Harbour 1.0.0 release. + 2008-09-01 21:33 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * contrib/hbziparch/hbziparc.c * contrib/hbziparch/hbzipnew.cpp diff --git a/harbour/contrib/Makefile b/harbour/contrib/Makefile index b3eb0738b0..40cc28e537 100644 --- a/harbour/contrib/Makefile +++ b/harbour/contrib/Makefile @@ -29,7 +29,6 @@ DIRS=\ xhb \ # hbsqlit2 \ -# hbw32ddr \ # hbwhat32 \ # hbziparch \ diff --git a/harbour/contrib/hbw32ddr/Makefile b/harbour/contrib/hbw32ddr/Makefile deleted file mode 100644 index 9d1a002257..0000000000 --- a/harbour/contrib/hbw32ddr/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# -# $Id$ -# - -# Needs Windows official ddraw.h to be copied to this directory, -# in order to compile under MingW. [vszakats] - -ROOT = ../../ - -LIBNAME=hbw32ddr - -ifeq ($(HB_ARCHITECTURE),w32) - -CPP_SOURCES=\ - w32_ddrw.cpp \ - -PRG_SOURCES=\ - -include $(TOP)$(ROOT)config/lib.cf - -C_USR += -I. - -else -include $(TOP)$(ROOT)config/none.cf -endif diff --git a/harbour/contrib/hbw32ddr/common.mak b/harbour/contrib/hbw32ddr/common.mak deleted file mode 100644 index 93e3e95938..0000000000 --- a/harbour/contrib/hbw32ddr/common.mak +++ /dev/null @@ -1,13 +0,0 @@ -# -# $Id$ -# - -LIBNAME = $(LIBPREF)hbw32ddr - -LIB_PATH = $(LIB_DIR)$(LIBNAME)$(LIBEXT) - -LIB_OBJS = \ - $(OBJ_DIR)w32_ddrw$(OBJEXT) \ - -all: \ - $(LIB_PATH) \ diff --git a/harbour/contrib/hbw32ddr/make_b32.bat b/harbour/contrib/hbw32ddr/make_b32.bat deleted file mode 100644 index 1c1f36ef56..0000000000 --- a/harbour/contrib/hbw32ddr/make_b32.bat +++ /dev/null @@ -1,54 +0,0 @@ -@echo off -rem -rem $Id$ -rem - -rem --------------------------------------------------------------- -rem IMPORTANT: You'll need MS SDK installed and this envvar to be -rem set, to build this library: -rem set INCLUDE="C:\Program Files\Microsoft SDKs\Windows\v6.0\include" -rem --------------------------------------------------------------- - -set HB_DLL_NAME=ddraw -set HB_DLL_DIR=%SystemRoot%\system32 - -rem --------------------------------------------------------------- - -call ..\mtpl_b32.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 - -rem --------------------------------------------------------------- - -set _HB_INSTALL_PREFIX=%HB_INSTALL_PREFIX% -if "%_HB_INSTALL_PREFIX%" == "" set _HB_INSTALL_PREFIX=..\.. -set _HB_LIB_INSTALL=%HB_LIB_INSTALL% -if "%_HB_LIB_INSTALL%" == "" set _HB_LIB_INSTALL=%_HB_INSTALL_PREFIX%\lib - -if "%1" == "clean" goto POST_CLEAN -if "%1" == "Clean" goto POST_CLEAN -if "%1" == "CLEAN" goto POST_CLEAN -if "%1" == "install" goto POST_INSTALL -if "%1" == "Install" goto POST_INSTALL -if "%1" == "INSTALL" goto POST_INSTALL - -:POST_BUILD - - implib ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.lib "%HB_DLL_DIR%\%HB_DLL_NAME%.dll" >> %_HB_MAKELOG% - goto POST_EXIT - -:POST_CLEAN - - if exist ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.lib del ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.lib > nul - if exist ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.exp del ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.exp > nul - if exist %_HB_LIB_INSTALL%\%HB_DLL_NAME%.lib del %_HB_LIB_INSTALL%\%HB_DLL_NAME%.lib > nul - goto POST_EXIT - -:POST_INSTALL - - if exist %_HB_LIB_INSTALL%\%HB_DLL_NAME%.lib del %_HB_LIB_INSTALL%\%HB_DLL_NAME%.lib - if exist ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.lib copy ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.lib %_HB_LIB_INSTALL% - goto POST_EXIT - -:POST_EXIT - -set HB_DLL_NAME= -set HB_DLL_DIR= diff --git a/harbour/contrib/hbw32ddr/make_gcc.sh b/harbour/contrib/hbw32ddr/make_gcc.sh deleted file mode 100755 index 0593942308..0000000000 --- a/harbour/contrib/hbw32ddr/make_gcc.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# -# $Id$ -# - -../mtpl_gcc.sh $1 $2 $3 $4 $5 $6 $7 $8 $9 diff --git a/harbour/contrib/hbw32ddr/make_vc.bat b/harbour/contrib/hbw32ddr/make_vc.bat deleted file mode 100644 index 162c7a58f5..0000000000 --- a/harbour/contrib/hbw32ddr/make_vc.bat +++ /dev/null @@ -1,65 +0,0 @@ -@echo off -rem -rem $Id$ -rem - -set HB_DLL_NAME=ddraw -set HB_DLL_DIR=%SystemRoot%\system32 - -rem --------------------------------------------------------------- - -call ..\mtpl_vc.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 - -rem --------------------------------------------------------------- - -set _HB_INSTALL_PREFIX=%HB_INSTALL_PREFIX% -if "%_HB_INSTALL_PREFIX%" == "" set _HB_INSTALL_PREFIX=..\.. -set _HB_LIB_INSTALL=%HB_LIB_INSTALL% -if "%_HB_LIB_INSTALL%" == "" set _HB_LIB_INSTALL=%_HB_INSTALL_PREFIX%\lib - -if "%1" == "clean" goto POST_CLEAN -if "%1" == "Clean" goto POST_CLEAN -if "%1" == "CLEAN" goto POST_CLEAN -if "%1" == "install" goto POST_INSTALL -if "%1" == "Install" goto POST_INSTALL -if "%1" == "INSTALL" goto POST_INSTALL - -:POST_BUILD - - rem --------------------------------------------------------------- - rem This .dll to .lib conversion needs GNU sed.exe in the path - rem --------------------------------------------------------------- - echo./[ \t]*ordinal hint/,/^^[ \t]*Summary/{> _temp.sed - echo. /^^[ \t]\+[0-9]\+/{>> _temp.sed - echo. s/^^[ \t]\+[0-9]\+[ \t]\+[0-9A-Fa-f]\+[ \t]\+[0-9A-Fa-f]\+[ \t]\+\(.*\)/\1/p>> _temp.sed - echo. }>> _temp.sed - echo.}>> _temp.sed - DUMPBIN /EXPORTS "%HB_DLL_DIR%\%HB_DLL_NAME%.dll" > _dump.tmp - echo.LIBRARY "%HB_DLL_DIR%\%HB_DLL_NAME%.dll" > _temp.def - echo.EXPORTS >> _temp.def - sed -nf _temp.sed < _dump.tmp >> _temp.def - LIB /MACHINE:X86 /DEF:_temp.def /OUT:..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.lib >> %_HB_MAKELOG% - del _dump.tmp - del _temp.def - del _temp.sed - rem --------------------------------------------------------------- - - goto POST_EXIT - -:POST_CLEAN - - if exist ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.lib del ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.lib > nul - if exist ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.exp del ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.exp > nul - if exist %_HB_LIB_INSTALL%\%HB_DLL_NAME%.lib del %_HB_LIB_INSTALL%\%HB_DLL_NAME%.lib > nul - goto POST_EXIT - -:POST_INSTALL - - if exist %_HB_LIB_INSTALL%\%HB_DLL_NAME%.lib del %_HB_LIB_INSTALL%\%HB_DLL_NAME%.lib - if exist ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.lib copy ..\..\lib\%_HB_CC_NAME%\%HB_DLL_NAME%.lib %_HB_LIB_INSTALL% - goto POST_EXIT - -:POST_EXIT - -set HB_DLL_NAME= -set HB_DLL_DIR= diff --git a/harbour/contrib/hbw32ddr/readme.txt b/harbour/contrib/hbw32ddr/readme.txt deleted file mode 100644 index 968fd407bc..0000000000 --- a/harbour/contrib/hbw32ddr/readme.txt +++ /dev/null @@ -1,126 +0,0 @@ -/* - * $Id$ - */ - -/* - * Copyright(C) 1999 by Jesus Salas - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR - * - * You can contact me at: jsalas@gruposp.com jsalas@sp-editores.es - * - */ - - - Harbour - GAL Lib - DirectX 6.1 ( DDraw implementation for Windows ) -------------------------------------------------------------------------------------------- - - Well, this is the first implementation of Graphics Animation Library - for Windows/DirectX 6.1 and Harbour - - INDEX - ----------------------------------------------------------------------------------- - 0)._ What are supported, what coming soon - 1)._ What do you need for make/run the samples. - 2)._ Files in this distribution. ( hdx01.zip ) - 3)._ Building the sample - 4)._ Reminder - ----------------------------------------------------------------------------------- - 0)._ What are supported, what coming soon - - Supported / translated to harbour: - - - DirectDraw Startup - - Masked Sprites Drawing - - Solid Sprites Controls - - Basic Animation Sequencer - - Up to 90 active animations in 133-MMX ( 166 clocked-down ;) ) - - Basic Collision Detect / Hit Collision - - Event handlers for sprites ( OnFirstFrame, OnOutOfBound, OnRenderSprite... ) - - Load animations - - KeyDown/KeyUp Detection - - (W) Waiting for implementation / (NT) not translated to Harbour: - - (NT) - OpenGL Wrapper ( For those that no want DirectX ) - (W) - GDI Wrapper ( For those that no want DirectX / OpenGL ) - (NT) - Advanced Sequencer ( Automations ) - (NT) - Blocking Animations - (NT) - Timers / Intervals Support - (NT) - 2D Shadows & Light control - (NT) - FX Particles support ( Plasma Explosions ) - (NT) - FX Star Fields Support ( 2D, 3D ) - (NT) - FX Fire Support - (NT) - Font Support - (NT) - Basic drawing functions support ( Circles, lines, putpixel, getpixel, bar ) - (W) - Support for 8 / 16 / 24 / 32 ( palettized, 5-6-5 RGB ,8-8-8 RGB, 8-8-8-8 RGBA bpps ) - (W) - Support for 800x600 video modes - (W) - Wav player/Mixer ( DirectSound, MMSystem , 3D Sound ) - (W) - Midi Player/Mixer ( DirecMusic, MMSystem ) - (NT) - Direct 3D Inmediate Mode ( Startup ) - (W) - Suppor for JPG / GIF - - 1)._ What do you need for make/run the samples. - - - A Windows 95/98 ( Nt don't support DirectX 6 ) - - MSVC 6.0 ( BC coming soon ) - - DirectX 6.1 Run-Time ( you can download it from - http://www.microsoft.com/directx ) - - - Set your resolution to 640x480 before running the sample. - - 2)._ Files in this distribution. - - - /hbw32ddr/hb_ddraw.h -> header file - - /hbw32ddr/hb_ddraw.cpp -> Source file for DDraw - - /hbw32ddr/directx.lib -> Lib for Harbour - - /hbw32ddr/lib/ddraw.lib -> Lib from MS for VC ( DirectX SDK ) - - /hbw32ddr/buvcdx.bat -> Bat file for Build the sample for MSVC 6.0 - - /hbw32ddr/samples/testdx.prg -> a BreakOut like sample Game - - /hbw32ddr/media -> Media files for the sample ( .bmp files ) - - 3)._ Building the sample - - copy testdx.prg to /harbour/tests/working/ - copy buvcdx.bat ro /harbour/tests/working/ - - 1) harbour testdx - 2) buvcdx testdx - 3) copy .exe to a directory with media files - - Run the .exe! - - Keys for the sample: - - Space -> Shot. - Cursor Left -> Bunny go to left. - Cursor Right -> Bunny go to right. - Shift hold down -> Bunny Turbo mode on. - - 4)._ Reminder. - - You need to have the media files into the same directory of final .exe file - - - Please if you test/use it... send to me feedback for continue supporting it! - - Enjoy it! - - Regards - Jesús Salas - Spain - jsalas@gruposp.com - - - - - diff --git a/harbour/contrib/hbw32ddr/tests/anima2.bmp b/harbour/contrib/hbw32ddr/tests/anima2.bmp deleted file mode 100644 index 1e801fe23e7b08add64cdf343b11ba64c2042347..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21988 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 diff --git a/harbour/contrib/hbw32ddr/tests/brick2.bmp b/harbour/contrib/hbw32ddr/tests/brick2.bmp deleted file mode 100644 index c3f7b55418c77a052bb7ee1a6c1f106f4b5c6e45..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1190 zcmdUr;V)ZJ7{;I0THWnUo7vK3vH5^y-G{}{79DBTtu}4%)es?s2q8ik5e*?ih!8@A z5aQ1e%VZ*3wk)ess+20F`iJaXl3SBIzHV>woV+=|=Y7tbV__fBxGs+b(2{PANKGVx z;`*LHQj|Axlb)Bs@C$nV59oB?h`u5>cMCZ=8_3T7M6`~)JTLM5B%betZ4!MU{4>(h zKBAz&3!~AC!oqD76>Y<0^1*EO!D8`&VRm4(?!ac-h26djhr(wFjuH3!=V0h=ztB8XFJM)O3jE<|DMU9HF%}gtoR2 z+S^0u=r~4a=P|mvPSD+bf}Wl*dV9n0c*5xGJ4Jv0DFy~27#xgXXeff=;WLbkoMCkI z9AjhW7$1*fVj_yk$tb3#E-*cPfti_0%+6k7ZZ3xT`4|=!Vpv?f!qU(N1 z=rf;5DS_X5S57NZvrKjuS=#*mrJ7H>MTH4j($frsmALF;RIrK8{zhcNm~gW$%8rt0o1Gii!#{1SzC# zpU0QXeZO!?bR5^rZIqi@x!U!K^6nPyyDU6#_wsPS$|H}BSHoUjhCI9$eiQc5I2oZ~ zB24qt2u-3}V^LbBN9kFJVOgBPx-^Szc@F!^Jbl7}uj}}?)(CyuASn8#y_*}hPAaTM zu3I{|Vr-_&&_ro_1GoB3RP-7s>uBUm>1A%q{*J@UU1tyXWUfk2A5~sEPX--4_Vx2@ z$jMXD&;2f{18!;rFMS8KQnPK%MCKV#u%>SsX zpFI^{2J`l%zT9Bs0I_}v_irR5i^6-8ZAn3sB3lW0sNYxf*Hk(XJbSM*sI^3#uJ uYa}e;?j&nfhfZe{W$E?m;w0`)ThhC`+`@Aw52zBO>~eE8*{Np>F8%~Sr1qx( diff --git a/harbour/contrib/hbw32ddr/tests/shot.bmp b/harbour/contrib/hbw32ddr/tests/shot.bmp deleted file mode 100644 index 3796ca47d71004246e59118cd4131463588f66cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65 vcmZ?rO=D*O12Z700mO1ZECR%g3=%++fx!SMe}oT$!2&?yKLZaCfp`l6qUr`X diff --git a/harbour/contrib/hbw32ddr/tests/testdx.prg b/harbour/contrib/hbw32ddr/tests/testdx.prg deleted file mode 100644 index 3b028303e2..0000000000 --- a/harbour/contrib/hbw32ddr/tests/testdx.prg +++ /dev/null @@ -1,178 +0,0 @@ -/* - * $Id$ - */ - -Static spBunny -Static spShots -Static nShotsActive -Static spaBreaks -Static spTorretShot -Static spTorretShot2 -Static spTorretShot3 -Static spTorretShot4 -Static spTorretShot5 -Static spTorretSequencer -Static spBunnyLife -Static spOuch -Static sppq -Static spzan - -Function Main() - - m_hWnd := dd_CreateWindow() - - // Background........... - - sfBack := dd_CreateOffScreenBitmap(NIL,NIL) - dd_LoadBmpIntoSurface( sfBack, "black.bmp", 0 , 0, 640, 480 ) - spBack := dd_CreateSprite( sfBack, "background", 640, 480, 1, 101, .t., 240 ) - dd_SPSetXY( spBack, 0,0) - - - // Bricks...... - - sfBreak1 := dd_CreateOffScreenBitmap(NIL,NIL) - dd_LoadBmpIntoSurface( sfBreak1, "brick1.bmp", 0 , 0, 640, 480 ) - - sfBreak2 := dd_CreateOffScreenBitmap(NIL,NIL) - dd_LoadBmpIntoSurface( sfBreak2, "brick2.bmp", 0 , 0, 640, 480 ) - - sfBreak3 := dd_CreateOffScreenBitmap(NIL,NIL) - dd_LoadBmpIntoSurface( sfBreak3, "brick3.bmp", 0 , 0, 640, 480 ) - - spaBreaks := Array(80) - nCont := 1 - for t := 1 to 80 - if nCont == 3 - spaBreaks[t] := dd_CreateSprite( sfBreak3, "Break", 30, 15, 6, 100, .f., 240 ) - nCont := 1 - else - if nCont == 2 - spaBreaks[t] := dd_CreateSprite( sfBreak2, "Break", 30, 15, 6, 100, .f., 240 ) - nCont := 3 - else - if nCont == 1 - spaBreaks[t] := dd_CreateSprite( sfBreak1, "Break", 30, 15, 6, 100, .f., 240 ) - nCont := 2 - endif - endif - endif - - dd_SPSetSolid( spaBreaks[t], .t. ) - dd_SPSetVisible( spaBreaks[t], .t. ) - dd_SPOnCollision( spaBreaks[t], "BRICK_ONCOLLISION" ) - next - - for t := 1 to 20 - dd_SPSetXY( spaBreaks[t], t*30 + 5,10 ) - next - for t := 21 to 40 - dd_SPSetXY( spaBreaks[t], ( t - 20 ) * 30 + 12,25 ) - next - for t := 41 to 60 - dd_SPSetXY( spaBreaks[t], ( t - 40 ) * 30+ 5 ,40 ) - next - for t := 61 to 80 - dd_SPSetXY( spaBreaks[t], ( t - 60 ) * 30 + 12,55 ) - next - - // Shots...... - - sfShot := dd_CreateOffScreenBitmap(NIL,NIL) - dd_LoadBmpIntoSurface( sfShot, "shot.bmp", 0 , 0, 640, 480 ) - spShots := Array( 10 ) - nShotsActive := 1 - - for t := 1 to 10 - spShots[t] := dd_CreateSprite( sfShot, "Shot", 10, 20, 3, 100, .f., 240 ) - dd_SPSetSolid( spShots[ t ], .t. ) - dd_SPSetMasked( spShots[ t ], .t. ) - dd_SPOnOutScreen( spShots[ t ], "SHOT_OUTOFBOUND" ) - next - - - // Bunny.......... - - sfBunny := dd_CreateOffScreenBitmap(NIL,NIL) - dd_LoadBmpIntoSurface( sfBunny, "anima2.bmp", 0 , 0, 640, 480 ) - spBunny := dd_CreateSprite( sfBunny, "bunny",70,52 , 6, 101, .t., 240 ) - - dd_SPSetMasked( spBunny, .t. ) - dd_SPSetXY( spBunny, 0, 420 ) - dd_SPOnFirstFrame( spBunny, "BUNNY_ONFIRSTFRAME" ) - dd_SPSetVisible( spBunny , .t. ) - - spBunnyLife := 4 - - dd_StartWindow( m_hWnd ) - - -return - - -//-------------------------------------------------------------// - -function Brick_OnCollision( nMe, nCollided ) - lOk := .f. - for t := 1 to 10 - if nCollided == spShots[t] - lOk := .t. - endif - next - if lOk - dd_SPSetVisible( nCollided, .f. ) - dd_SPSetVisible( nMe, .f. ) - endif -return - -//-------------------------------------------------------------// - -function Shot_OutOfBound( nShot ) - dd_SPSetVisible( nShot, .f. ) -return - -//-------------------------------------------------------------// - -function Bunny_OnFirstFrame( ) - - if dd_isKeyPressed( 16 ) - plusVelo := 2 - else - plusVelo := 1 - endif - - dd_SPClearDirection( spBunny ) - - if dd_isKeyPressed( 39 ) - dd_SPSetDirection( spBunny, 6, 8 * plusVelo , 0 ) - endif - - if dd_isKeyPressed( 37 ) - dd_SPSetDirection( spBunny, 4, -8 * plusVelo , 0 ) - endif - -return - -//-------------------------------------------------------------// - -function ddOnRender() - - if dd_isKeyPressed( 32 ) - if spBunnyLife > 0 - dd_SPClearDirection( spShots[ nShotsActive ] ) - dd_SPSetDirection( spShots[nShotsActive] , 6 , 0 , (-15) ) - - x := dd_SPGetX( spBunny ) - y := dd_SPGetY( spBunny ) - - dd_SPSetXY( spShots[nShotsActive], x, y - 20 ) - dd_SPSetVisible( spShots[nShotsActive], .t. ) - nShotsActive += 1 - if nShotsActive > 10 - nShotsActive := 1 - endif - endif - endif -return - -//-------------------------------------------------------------// diff --git a/harbour/contrib/hbw32ddr/w32_ddrw.cpp b/harbour/contrib/hbw32ddr/w32_ddrw.cpp deleted file mode 100644 index ed3d8a9d62..0000000000 --- a/harbour/contrib/hbw32ddr/w32_ddrw.cpp +++ /dev/null @@ -1,881 +0,0 @@ -/* - * $Id$ - */ - -/* - * Copyright(C) 1999 by Jesus Salas - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published - * by the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to: - * - * The Free Software Foundation, Inc., - * 675 Mass Ave, Cambridge, MA 02139, USA. - * - * You can contact me at: jsalas@gruposp.com jsalas@sp-editores.es - * - */ - -#define INITGUID - -#define HB_OS_WIN_32_USED - -#include "hbapi.h" -#include "hbvm.h" - -/* DDraw initialize */ - -#include "ddraw.h" - -#define HB_DD_TIMER_ID 1 -#define HB_DD_TIMER_RATE 100 - -// DDRAW MANAGEMENT -// Global Data - -BOOL hb_dd_g_handling_events = FALSE; // painting? -LPDIRECTDRAW4 hb_dd_g_pDD = NULL; // DirectDraw object -HWND hb_dd_g_DDHwnd; // Our hWnd -long hb_dd_g_xWindow = 0; -long hb_dd_g_yWindow = 0; - -//------------------------------------------------------------------------------// -// Management Structs for surfaces... - -#define MAX_DDSURFACES 255 - -LPDIRECTDRAWSURFACE4 hb_dd_g_DDSFaces[ MAX_DDSURFACES + 1 ]; - -long hb_dd_g_DDSFaceCount = 0; - -//------------------------------------------------------------------------------// -// Sprites Management - -#define MAX_SPRITES 256 - -struct st_Sprites -{ - short int Type; // Type of Data - long Surface; // Surface index for loaded Image(s) - char * cName; // Sprite friendly Name - // 2D Engine data - long Width; // width of one frame - long Height; // height of one frame - long Images; // Number of frames in Surface - BOOL Visible; // Render it and do Hit detect? - long Frame; // Actual Frame to Render - long zOrder; // For painting - long x; // x in Virtual Screen - long y; // y in Virtual Screen - long VisibleX; // "real" y in Visible Screen - long VisibleY; // "real" x in Visible Screen - long FrameSpeed; // Render frame time ratio - long DrawInverted; // Draw Inverted - long Direction; // Clock wise code 1-2-3-4-5-6-7-8-9 - long xIncrement; // x Increment Increment; - long yIncrement; // y Increment - long Solid; // is Solid object ( collision on ) - long Masked; // is Masked? - short int lCollision; // Collision Detect On/Off - - // Sprite Event Handlers... - - char * OnRender; // Render event Handler - char * OnCollision; // Collision Event Handler - char * OnFirstFrame; // First Frame handler - char * OnOutScreen; // Out of Bounds... - -} hb_dd_Sprites[ MAX_SPRITES ]; - -long hb_dd_g_SpritesCount = 0; - -//------------------------------------------------------------------// -// Multi-Key control array. - -short int hb_dd_g_KeyDown[ 256 ]; - -//------------------------------------------------------------------// - -long hb_dd_checkError( HRESULT hr ) -{ - long p = 0; - - switch( hr ) - { - case DDERR_EXCEPTION : p++;break; - case DDERR_GENERIC : p++;break; - case DDERR_INVALIDOBJECT : p++;break; - case DDERR_INVALIDPARAMS : p++;break; - case DDERR_INVALIDRECT : p++;break; - case DDERR_NOBLTHW : p++;break; - case DDERR_SURFACEBUSY : p++;break; - case DDERR_SURFACELOST : p++;break; - case DDERR_UNSUPPORTED : p++;break; - case DDERR_WASSTILLDRAWING : p++;break; - case DDERR_NOOVERLAYHW : p++;break; - case DDERR_NOTAOVERLAYSURFACE : p++;break; - case DDERR_INVALIDSURFACETYPE : p++;break; - } - - return p; -} - -void hb_dd_g_Error( char *, long , char *) -{ -} - -void hb_dd_WinError( void ) -{ - LPVOID lpMsgBuf;FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, - GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language - (LPTSTR) &lpMsgBuf, 0, NULL );// Process any inserts in lpMsgBuf. - // ...// Display the string. - MessageBox( NULL, (LPCTSTR)lpMsgBuf, "Error", MB_OK | MB_ICONINFORMATION ); - // Free the buffer. - LocalFree( lpMsgBuf ); -} - -//------------------------------------------------------------------// - -void hb_dd_ReleaseAllObjects(void) -{ - long t; - if( hb_dd_g_pDD != NULL ) - { - if( hb_dd_g_DDSFaces[ 0 ] != NULL ) - { - hb_dd_g_DDSFaces[ 0 ]->Release(); - hb_dd_g_DDSFaces[ 0 ] = NULL; - } - - for( t = 2; t < MAX_DDSURFACES; t++ ) - { - if( hb_dd_g_DDSFaces[ t ] != NULL ) - { - hb_dd_g_DDSFaces[ t ]->Release(); - hb_dd_g_DDSFaces[ t ] = NULL; - } - } - hb_dd_g_pDD->Release(); - hb_dd_g_pDD = NULL; - } -} - -//------------------------------------------------------------------// - -DWORD hb_dd_DDColorMatch(IDirectDrawSurface4 * pdds, COLORREF rgb) -{ - COLORREF rgbT; - HDC hdc; - DWORD dw = CLR_INVALID; - DDSURFACEDESC2 ddsd; - HRESULT hres; - - // - // Use GDI SetPixel to color match for us - // - if( rgb != CLR_INVALID && pdds->GetDC( &hdc ) == DD_OK ) - { - rgbT = GetPixel( hdc, 0, 0 ); // Save current pixel value - SetPixel( hdc, 0, 0, rgb ); // Set our value - pdds->ReleaseDC( hdc ); - } - // - // Now lock the surface so we can read back the converted color - // - ddsd.dwSize = sizeof( ddsd ); - - while( ( hres = pdds->Lock( NULL, &ddsd, 0, NULL ) ) == DDERR_WASSTILLDRAWING ); - - if( hres == DD_OK ) - { - dw = *( DWORD * ) ddsd.lpSurface; // Get DWORD - if( ddsd.ddpfPixelFormat.dwRGBBitCount < 32 ) - dw &= ( 1 << ddsd.ddpfPixelFormat.dwRGBBitCount ) - 1; // Mask it to bpp - pdds->Unlock(NULL); - } - // - // Now put the color that was there back. - // - if( rgb != CLR_INVALID && pdds->GetDC( &hdc ) == DD_OK ) - { - SetPixel( hdc, 0, 0, rgbT ); - pdds->ReleaseDC( hdc ); - } - - return dw; -} - -//------------------------------------------------------------------// - -void hb_dd_RenderSprites( long control ) -{ - HRESULT hRet; - long cont,cont2; - RECT rcRect; - LPDIRECTDRAWSURFACE4 pdds; - PHB_DYNS pDynSym; - - pDynSym = hb_dynsymFindName( "DDONRENDER" ); - - if( pDynSym ) - { - hb_vmPushSymbol( hb_dynsymSymbol( pDynSym ) ); - hb_vmPushNil(); - hb_vmDo( 0 ); - } - - for( cont=0; cont hb_dd_Sprites[ cont ].Images ) - { - if( hb_dd_Sprites[ cont ].OnFirstFrame != NULL ) - { - pDynSym = hb_dynsymFindName( hb_dd_Sprites[ cont ].OnFirstFrame ); - - if( pDynSym ) - { - hb_vmPushSymbol( hb_dynsymSymbol( pDynSym ) ); - hb_vmPushNil(); - hb_vmDo(0); - } - } - hb_dd_Sprites[ cont ].Frame = 1; - } - - rcRect.left = ( hb_dd_Sprites[ cont ].Frame - 1 ) * hb_dd_Sprites[ cont ].Width; - rcRect.top = 0; - rcRect.right = ( hb_dd_Sprites[ cont ].Frame - 1 ) * hb_dd_Sprites[ cont ].Width + hb_dd_Sprites[ cont ].Width; - rcRect.bottom = hb_dd_Sprites[ cont ].Height; - - if( control == 1 ) - hb_dd_Sprites[ cont ].Frame++; - - pdds = hb_dd_g_DDSFaces[ hb_dd_Sprites[ cont ].Surface ]; - - while( TRUE ) - { - if( ! hb_dd_Sprites[ cont ].Masked ) - hRet = hb_dd_g_DDSFaces[1]->BltFast(hb_dd_Sprites[ cont ].x, hb_dd_Sprites[ cont ].y, pdds, &rcRect, FALSE ); - else - { - DDCOLORKEY ddck; - - ddck.dwColorSpaceLowValue = hb_dd_DDColorMatch( pdds, CLR_INVALID ); - ddck.dwColorSpaceHighValue = ddck.dwColorSpaceLowValue; - - pdds->SetColorKey( DDCKEY_SRCBLT ,&ddck ); - - hb_dd_g_DDSFaces[1]->SetColorKey( DDCKEY_DESTBLT ,&ddck ); - - hRet = hb_dd_g_DDSFaces[1]->BltFast(hb_dd_Sprites[ cont ].x, hb_dd_Sprites[ cont ].y, pdds, &rcRect, DDBLTFAST_SRCCOLORKEY ); - } - hb_dd_checkError( hRet ); - if( hRet == DD_OK ) - break; - if( hRet == DDERR_SURFACELOST ) - { - hRet = hb_dd_g_DDSFaces[1]->Restore(); - if (hRet != DD_OK) - break; - } - if( hRet != DDERR_WASSTILLDRAWING ) - break; - } - - if( hb_dd_Sprites[ cont ].OnOutScreen != NULL ) - { - if( hb_dd_Sprites[ cont ].x < 0 || hb_dd_Sprites[ cont ].y < 0 || hb_dd_Sprites[ cont ].x > 640 || hb_dd_Sprites[ cont ].y > 480 ) - { - if( hb_dd_Sprites[ cont ].OnOutScreen != NULL ) - { - pDynSym = hb_dynsymFindName( hb_dd_Sprites[ cont ].OnOutScreen ); - - if( pDynSym ) - { - hb_vmPushSymbol( hb_dynsymSymbol( pDynSym ) ); - hb_vmPushNil(); - hb_vmPushLong( cont ); - hb_vmDo( 1 ); - } - } - - //SetParam( ( void * ) &cont , TSI_DWORD ); - //VMCall( hb_dd_Sprites[ cont ].OnOutScreen ); - } - } - } - } -} - -//------------------------------------------------------------------// - -LRESULT _stdcall hb_dd_DDWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) -{ - HRESULT hRet; - int nVirtKey; - - switch( uMsg ) - { - case WM_DESTROY: - { - hb_dd_ReleaseAllObjects(); - break; - } - case WM_KEYUP: - { - nVirtKey = (int) wParam; // virtual-key code - hb_dd_g_KeyDown[ nVirtKey ] = 0; - break; - } - case WM_KEYDOWN: - { - nVirtKey = (int) wParam; // virtual-key code - hb_dd_g_KeyDown[ nVirtKey ] = 1; - - if( ( int ) wParam == 27 ) - { - PostMessage( hWnd, WM_CLOSE,0,0); - PostMessage( hWnd, WM_DESTROY,0,0); - } - break; - } - case WM_TIMER: - { - if( HB_DD_TIMER_ID == wParam ) - { - if( ! hb_dd_g_handling_events ) - { - hb_dd_g_handling_events = TRUE; - hb_dd_RenderSprites( 1 ); - while( TRUE ) - { - hRet = hb_dd_g_DDSFaces[0]->Flip(NULL, 0); - if( hRet == DD_OK ) - break; - if( hRet == DDERR_SURFACELOST ) - { - hRet = hb_dd_g_DDSFaces[0]->Restore(); - if( hRet != DD_OK ) - break; - } - if( hRet != DDERR_WASSTILLDRAWING ) - break; - } - hb_dd_g_handling_events = FALSE; - } - } - break; - } - } - - return DefWindowProc( hWnd, uMsg, wParam , lParam ); -} - -//------------------------------------------------------------------// - -int hb_dd_InitFail( HWND hWnd, HRESULT hRet, LPCTSTR szError, ... ) -{ - char szBuff[ 128 ]; - va_list vl; - va_start( vl, szError ); - vsprintf( szBuff, szError, vl ); - MessageBox( hWnd, szBuff, "4dNow extend sys.", MB_OK ); - DestroyWindow( hWnd ); - va_end( vl ); - exit( 1 ); - return hRet; -} - -//------------------------------------------------------------------// - -//------------------------------------------------------------------// - -void hb_RestoreAll(void) -{ - HRESULT hRet; - long t; - - hRet = hb_dd_g_DDSFaces[0]->Restore(); - if( hRet == DD_OK ) - { - for( t = 2; t < MAX_DDSURFACES; t++ ) - { - if( hb_dd_g_DDSFaces[ t ] != NULL ) - hb_dd_g_DDSFaces[ t ]->Restore(); - } - } -} - - -//------------------------------------------------------------------// - -void hb_dd_DDrawStartup( HWND hWnd ) -{ - DDSURFACEDESC2 ddsd; - DDSCAPS2 ddscaps; - HRESULT hRet; - LPDIRECTDRAW pDD; - long t; - - hb_dd_g_DDHwnd = hWnd; - - hRet = DirectDrawCreate(NULL, &pDD, NULL); - if( hRet != DD_OK ) - hb_dd_InitFail( hWnd, hRet, "DirectDrawCreate FAILED" ); - - hRet = pDD->QueryInterface(IID_IDirectDraw4, (LPVOID *) &hb_dd_g_pDD ); - - if( hRet != DD_OK ) - hb_dd_InitFail( hWnd, hRet, "QueryInterface FAILED" ); - - hRet = pDD->SetCooperativeLevel(hWnd, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_ALLOWREBOOT | DDSCL_ALLOWMODEX ); - - if( hRet != DD_OK ) - hb_dd_InitFail( hWnd, hRet, "SetCooperativeLevel FAILED" ); - - hRet = hb_dd_g_pDD->SetDisplayMode(hb_dd_g_xWindow , hb_dd_g_yWindow , 16, 0, 0); - if( hRet != DD_OK ) - hb_dd_InitFail( hWnd, hRet, "SetDisplayMode FAILED" ); - - for( t=0;t<= MAX_DDSURFACES;t++ ) - hb_dd_g_DDSFaces[t] = NULL; - for( t=0;t< MAX_SPRITES;t++) - hb_dd_Sprites[t].Surface = -1; - for( t=0;t<256;t++) - hb_dd_g_KeyDown[t] = 0; - ZeroMemory(&ddsd, sizeof(ddsd)); - - ddsd.dwSize = sizeof(ddsd); - ddsd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT | DDSD_CKSRCBLT; - ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | - DDSCAPS_FLIP | - DDSCAPS_COMPLEX ; - ddsd.dwBackBufferCount = 1; - hRet = hb_dd_g_pDD->CreateSurface(&ddsd, &hb_dd_g_DDSFaces[0] , NULL); - if( hRet != DD_OK ) - hb_dd_InitFail( hWnd, hRet, "CreateSurface FAILED" ); - - ddscaps.dwCaps = DDSCAPS_BACKBUFFER; - - hRet = hb_dd_g_DDSFaces[0]->GetAttachedSurface(&ddscaps,&hb_dd_g_DDSFaces[1] ); - - if( hRet != DD_OK ) - hb_dd_InitFail( hWnd, hRet, "GetAttachedSurface FAILED" ); - - if( HB_DD_TIMER_ID != SetTimer( hWnd, HB_DD_TIMER_ID, HB_DD_TIMER_RATE, NULL ) ) - hb_dd_InitFail( hWnd, hRet, "SetTimer FAILED" ); - - hb_dd_g_DDSFaceCount = 2; -} - -//------------------------------------------------------------------// -HRESULT hb_dd_DDCopyBitmap(IDirectDrawSurface4 * pdds, HBITMAP hbm, int x, int y, - int dx, int dy) -{ - HDC hdcImage; - HDC hdc; - BITMAP bm; - DDSURFACEDESC2 ddsd; - HRESULT hr; - - if( hbm == NULL || pdds == NULL ) - return E_FAIL; - - pdds->Restore(); - - hdcImage = CreateCompatibleDC(NULL); - if( !hdcImage ) - OutputDebugString("createcompatible dc failed\n"); - SelectObject(hdcImage, hbm); - - GetObject(hbm, sizeof(bm), &bm); - dx = dx == 0 ? bm.bmWidth : dx; // Use the passed size, unless zero - dy = dy == 0 ? bm.bmHeight : dy; - - ddsd.dwSize = sizeof(ddsd); - ddsd.dwFlags = DDSD_HEIGHT | DDSD_WIDTH; - - pdds->GetSurfaceDesc(&ddsd); - - if( ( hr = pdds->GetDC( &hdc ) ) == DD_OK ) - { - StretchBlt(hdc, 0, 0, ddsd.dwWidth, ddsd.dwHeight, hdcImage, x, y, - dx, dy, SRCCOPY); - pdds->ReleaseDC(hdc); - } - DeleteDC(hdcImage); - return hr; -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_ISKEYPRESSED ) -{ - if( hb_dd_g_KeyDown[ hb_parnl( 1 ) ] ) - hb_retl( 1 ); - else - hb_retl( 0 ); -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_SPGETXY ) -{ - // This function is Broken ( hb_stornl fail ); - - long n = hb_parnl( 1 ); - - hb_reta( 2 ); - - hb_stornl( hb_dd_Sprites[ n ].x, -1, 0 ); - hb_stornl( hb_dd_Sprites[ n ].y, -1, 1 ); -} - -HB_FUNC( DD_SPGETX ) -{ - hb_retnl( hb_dd_Sprites[ hb_parnl( 1 ) ].x ); -} - -HB_FUNC( DD_SPGETY ) -{ - hb_retnl( hb_dd_Sprites[ hb_parnl( 1 ) ].y ); -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_SPGETVISIBLE ) -{ - hb_retl( hb_dd_Sprites[ hb_parnl( 1 ) ].Visible ); -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_SPSETVISIBLE ) -{ - hb_dd_Sprites[ hb_parnl( 1 ) ].Visible = ( int ) hb_parl( 2 ); -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_SPONRENDER ) -{ - hb_dd_Sprites[ hb_parnl( 1 ) ].OnRender = hb_strdup( hb_parc(1) ); -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_SPCLEARDIRECTION ) -{ - long n = hb_parnl( 1 ); - hb_dd_Sprites[ n ].xIncrement = 0; - hb_dd_Sprites[ n ].yIncrement = 0; - hb_dd_Sprites[ n ].Direction = -1; -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_SPSETSOLID ) -{ - hb_dd_Sprites[hb_parnl( 1 ) ].Solid = hb_parl( 2 ); -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_SPSETMASKED ) -{ - hb_dd_Sprites[hb_parnl( 1 ) ].Masked = hb_parl( 2 ); -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_SPSETDIRECTION ) -{ - long n = hb_parnl( 1 ); - - hb_dd_Sprites[ n ].Direction = hb_parnl( 2 ); - hb_dd_Sprites[ n ].xIncrement += hb_parnl( 3 ); - hb_dd_Sprites[ n ].yIncrement += hb_parnl( 4 ); -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_SPONFIRSTFRAME ) -{ - long n = hb_parnl( 1 ); - hb_dd_Sprites[ n ].OnFirstFrame = hb_strdup( hb_parc(2) ); -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_SPONOUTSCREEN ) -{ - long n = hb_parnl( 1 ); - hb_dd_Sprites[ n ].OnOutScreen = hb_strdup( hb_parc(2) ); -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_SPONCOLLISION ) -{ - long n = hb_parnl( 1 ); - hb_dd_Sprites[ n ].OnCollision = hb_strdup( hb_parc(2) ); - hb_dd_Sprites[ n ].lCollision = 1; -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_CREATESPRITE ) -{ - long n = hb_dd_g_SpritesCount; - - ZeroMemory( &hb_dd_Sprites[ n ], sizeof( struct st_Sprites ) ); - - hb_dd_Sprites[ n ].Surface = hb_parnl( 1 ); - hb_dd_Sprites[ n ].cName = hb_strdup( hb_parc( 2 ) ); - hb_dd_Sprites[ n ].Width = hb_parnl( 3 ); - hb_dd_Sprites[ n ].Height = hb_parnl( 4 ); - hb_dd_Sprites[ n ].Images = hb_parnl( 5 ); - hb_dd_Sprites[ n ].zOrder = hb_parnl( 6 ); - hb_dd_Sprites[ n ].Visible = hb_parl( 7 ); - hb_dd_Sprites[ n ].FrameSpeed = hb_parnl( 8 ); - - hb_dd_g_SpritesCount++; - - hb_retnl( n ); -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_SPSETXY ) -{ - long n = hb_parnl( 1 ); - long x = hb_parnl( 2 ); - long y = hb_parnl( 3 ); - hb_dd_Sprites[ n ].x = x; - hb_dd_Sprites[ n ].y = y; -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_SPSETINVERTED ) -{ - LPDIRECTDRAWSURFACE4 pdds; - long n = hb_parnl( 1 ); - RECT rt; - DDBLTFX todo; - - long dir = hb_parnl( 2 ); - if( dir != hb_dd_Sprites[ n ].DrawInverted ) - { - rt.top = 0; - rt.left = 0; - rt.bottom= hb_dd_Sprites[ n ].Height; - rt.right = hb_dd_Sprites[ n ].Width * hb_dd_Sprites[ n ].Images; - ZeroMemory( &todo, sizeof( DDBLTFX ) ); - - hb_dd_Sprites[ n ].DrawInverted = dir; - todo.dwSize = sizeof( DDBLTFX ); - todo.dwDDFX = DDBLTFX_MIRRORLEFTRIGHT; - pdds = hb_dd_g_DDSFaces[ hb_dd_Sprites[ n ].Surface ]; - pdds->Blt(&rt, pdds, &rt, DDBLT_DDFX ,&todo ); - } -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_MSGBOX ) -{ - char *m1; - char *m2; - char deftitle [100] = ""; - char defmsg [2] = ""; - - if( hb_pcount() > 0 ) - m1 = hb_parc( 1 ); - else - m1 = defmsg; - - if( hb_pcount() > 1 ) - m2 = hb_parc( 2 ); - else - m2 = deftitle; - - MessageBox( hb_dd_g_DDHwnd, m1, m2, 0 ); -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_CREATEWINDOW ) -{ - HWND m_hWnd; - HINSTANCE m_hInstance = GetModuleHandle(NULL); - long x,y; - - x= hb_pcount() > 10 ?hb_parnl( 1 ) : GetSystemMetrics(SM_CXSCREEN); - y= hb_pcount() > 11 ?hb_parnl( 2 ) : GetSystemMetrics(SM_CYSCREEN); - - hb_dd_g_xWindow = x; - hb_dd_g_yWindow = y; - - WNDCLASS wndClass = { CS_HREDRAW | CS_VREDRAW, hb_dd_DDWndProc, 0, 0, m_hInstance, - NULL, - LoadCursor(NULL, IDC_ARROW), - (HBRUSH)GetStockObject(BLACK_BRUSH), - NULL, - TEXT("4dNow") }; - - RegisterClass( &wndClass ); - - m_hWnd = CreateWindow( TEXT("4dNow"), TEXT("4dNow"), - WS_POPUP, 0, - 0, x,y, NULL, NULL, m_hInstance, 0L ); - - if( !m_hWnd ) - hb_dd_WinError(); - - ShowWindow( m_hWnd,SW_SHOWMAXIMIZED ); - - hb_dd_DDrawStartup( m_hWnd ); - hb_retnl( ( long ) m_hWnd ); -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_LOADBMPINTOSURFACE ) -{ - long nSurface = hb_parnl( 1 ); - char * cBitmap = hb_parc ( 2 ); - long x = hb_parnl( 3 ); - long y = hb_parnl( 4 ); - long dx = hb_parnl( 5 ); - long dy = hb_parnl( 6 ); - - HBITMAP hbm; - - // Load our bitmap resource. - - hbm = (HBITMAP) LoadImage(GetModuleHandle(NULL), cBitmap, IMAGE_BITMAP, 0, - 0, LR_CREATEDIBSECTION | LR_LOADFROMFILE); - - if( hbm == NULL ) - hb_dd_g_Error( "Can't load Bitmap.",100,cBitmap ); - - if( hb_dd_g_DDSFaces[ nSurface ] == NULL ) - hb_dd_g_Error( "Invalid Surface",nSurface,"LoadBmpIntoSurface"); - - if( DD_OK != hb_dd_DDCopyBitmap( hb_dd_g_DDSFaces[ nSurface ], hbm, x,y, dx, dy ) ) - hb_dd_g_Error( "DDCopyBitmap",nSurface,"LoadBmpIntoSurface"); - - DeleteObject( hbm ); -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_CREATEOFFSCREENBITMAP ) -{ - DDSURFACEDESC2 ddsd; - HRESULT hRet; - - if( ! hb_dd_g_pDD ) - hb_dd_g_Error("No DDraw Initialized",1000,""); - - if( hb_dd_g_DDSFaceCount >= MAX_DDSURFACES ) - hb_dd_g_Error( "No more DDSurfaces -> Limit reached -> CreateDDSurface()",1000,"DDraw extend sys"); - else - { - ZeroMemory(&ddsd, sizeof(ddsd)); - ddsd.dwSize = sizeof(ddsd); - ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH ; - ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; - ddsd.dwHeight = hb_dd_g_yWindow; - ddsd.dwWidth = hb_dd_g_xWindow; - hRet = hb_dd_g_pDD->CreateSurface(&ddsd, &hb_dd_g_DDSFaces[ hb_dd_g_DDSFaceCount ], NULL); - if( hRet != DD_OK ) - hb_dd_InitFail( hb_dd_g_DDHwnd, hRet, "CreateSurface FAILED" ); - } - - hb_retnl( hb_dd_g_DDSFaceCount ); - hb_dd_g_DDSFaceCount++; -} - -//------------------------------------------------------------------// - -HB_FUNC( DD_STARTWINDOW ) -{ - MSG msg; - BOOL loop = TRUE; - - while( loop ) - { - if( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) ) - { - TranslateMessage( &msg ); - DispatchMessage( &msg ); - } - if( WM_CLOSE == msg.message ) - loop = FALSE; - } -} diff --git a/harbour/contrib/make_b32_all.bat b/harbour/contrib/make_b32_all.bat index af3df03240..3348ae9638 100644 --- a/harbour/contrib/make_b32_all.bat +++ b/harbour/contrib/make_b32_all.bat @@ -39,7 +39,7 @@ rem ******************************************************* rem Compiling contrib dirs ... rem ******************************************************* -rem hbsqlit2 hbw32ddr hbwhat32 hbziparch +rem hbsqlit2 hbwhat32 hbziparch set _HB_DIRS=gtwvg hbbmcdx hbbtree hbclipsm hbct hbgt hbmisc for %%n in ( %_HB_DIRS% ) do %COMSPEC% /c %_HB_BATWORKER% %%n %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/harbour/contrib/make_gcc_all.sh b/harbour/contrib/make_gcc_all.sh index bc5f2a5543..ec6ff62bd8 100755 --- a/harbour/contrib/make_gcc_all.sh +++ b/harbour/contrib/make_gcc_all.sh @@ -44,7 +44,7 @@ _HB_DIRS="hbbmcdx hbbtree hbclipsm hbct hbgt hbmisc hbmsql hbmzip hbnf hbtip hbs case "$HB_ARCHITECTURE" in w32|cyg|os2) - # hbw32ddr hbwhat32 hbziparch + # hbwhat32 hbziparch _HB_DIRS_ADD="gtwvg hbole hbodbc hbw32 rddado" ;; *) diff --git a/harbour/contrib/make_vc_all.bat b/harbour/contrib/make_vc_all.bat index 09ff94fbc7..870581e5c6 100644 --- a/harbour/contrib/make_vc_all.bat +++ b/harbour/contrib/make_vc_all.bat @@ -39,7 +39,7 @@ rem ******************************************************* rem Compiling contrib dirs ... rem ******************************************************* -rem hbsqlit2 hbw32ddr hbwhat32 hbziparch +rem hbsqlit2 hbwhat32 hbziparch set _HB_DIRS=gtwvg hbbmcdx hbbtree hbclipsm hbct hbgt hbmisc for %%n in ( %_HB_DIRS% ) do %COMSPEC% /c %_HB_BATWORKER% %%n %1 %2 %3 %4 %5 %6 %7 %8 %9