(*******************************************************************************
EXTEND UNIT DXDRAWS FROM DELPHIX PACK
* Copyright (c) 2004-2008 Jaro Benes
* All Rights Reserved
* Version 1.08.x
* D2D Hardware module
* web site: www.micrel.cz/Dx
* e-mail: delphix_d2d@micrel.cz
* DISCLAIMER:
This software is provided "as is" and is without warranty of any kind.
The author of this software does not warrant, guarantee or make any
representations regarding the use or results of use of this software
in terms of reliability, accuracy or fitness for purpose. You assume
the entire risk of direct or indirect, consequential or inconsequential
results from the correct or incorrect usage of this software even if the
author has been informed of the possibilities of such damage. Neither
the author nor anybody connected to this software in any way can assume
any responsibility.
First work started at 13.9.2004.
All units in this pack contain last changes and was added very interesting
units (for study or inspiration)
Tested in Delphi 4, 5, 6, 7 and Delphi 2005/2006/Turbo/2007
* FEATURES:
a) Implement Hardware acceleration for critical function like DrawAlpha {Blend},
DrawSub and DrawAdd for both way DXIMAGELIST and DIRECTDRAWSURFACE with rotation too.
b) Automatic adjustement for texture size different 2^n.
c) Minimum current source code change, all accelerated code added into:
DXDraw.BeginScene;
//code here
DXDraw.EndScene;
d) DelphiX facade continues using still.
* HOW TO USE
a) Design code like as DelphiX and drawing routine put into
DXDraw.BeginScene;
//code here
DXDraw.EndScene;
b) setup options in code or property for turn-on acceleration like:
DXDraw.Finalize; {done DXDraw}
If HardwareSwitch Then
{hardware}
Begin
if NOT (doDirectX7Mode in DXDraw.Options) then
DXDraw.Options := DXDraw.Options + [doDirectX7Mode];
if NOT (doHardware in DXDraw.Options) then
DXDraw.Options := DXDraw.Options + [doHardware];
if NOT (do3D in DXDraw.Options) then
DXDraw.Options := DXDraw.Options + [do3D];
if doSystemMemory in DXDraw.Options then
DXDraw.Options := DXDraw.Options - [doSystemMemory];
End
Else
{software}
Begin
if doDirectX7Mode in DXDraw.Options then
DXDraw.Options := DXDraw.Options - [doDirectX7Mode];
if do3D in DXDraw.Options then
DXDraw.Options := DXDraw.Options - [do3D];
if doHardware in DXDraw.Options then
DXDraw.Options := DXDraw.Options - [doHardware];
if NOT (doSystemMemory in DXDraw.Options) then
DXDraw.Options := DXDraw.Options + [doSystemMemory];
End;
{to fullscreen}
if doFullScreen in DXDraw.Options then
begin
RestoreWindow;
DXDraw.Cursor := crDefault;
BorderStyle := bsSingle;
DXDraw.Options := DXDraw.Options - [doFullScreen];
DXDraw.Options := DXDraw.Options + [doFlip];
end else
begin
StoreWindow;
DXDraw.Cursor := crNone;
BorderStyle := bsNone;
DXDraw.Options := DXDraw.Options + [doFullScreen];
DXDraw.Options := DXDraw.Options - [doFlip];
end;
DXDraw1.Initialize; {up DXDraw now}
* NOTE Main form has to declare like:
TForm1 = class(TDXForm)
* KNOWN BUGS OR RESTRICTION:
1/ Cannot be use DirectDrawSurface other from DXDraw.Surface in HW mode.
2/ New functions was not tested for two and more DXDraws on form. Sorry.
* HISTORY
**** please see into history.rtf document ****
******************************************************************************
* PACK NOTE for (un)DelphiX pack recompilation with hardware acceleration
For simple application start can be use the prototype application in this pack
* PACK HISTORY
28.02.2009
* Pack recompiled under Delphi 3,4,5,6,7,2005,2006,2007,2009 for conditionals change and Delphi 2009 bug fix.
07.04.2008 JB.
+ Main enhacement relelased, overwritten in the history document
09.06.2005 JB.
+ Better compatibility with Delphi 4.
+ Some .dpk files revised, installation for all the same.
+ added the DXMisc.pas file contain some useful functions.
+ DXSprite.pas file revised for support under Delphi 3;
Under Delphi 3 cannot be use colli3DX.pas, isn't adapt still, sorry.
12.06.2005 JB.
+ Improvement of hardware acceleration and fix-bug.
19.06.2005 JB.
+ Fix-bug in Draw() function.
23.10.2005 JB.
+ DXSpriteEngine improvement
Isn't necessary derive classes sprite, it is possible use DrawAdd, DrawAlpha and DrawSub also for BackgroundSprite.
New proposal sprite from editor, sorting into the collection (likewise as with DXImageList or DXWaveList), generation Events.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Tank 游戏(源码) 及delphix D6 (634个子文件)
DelphiX.bdsproj 8KB
t3.bmp 642KB
T1.bmp 625KB
t2.bmp 285KB
TBRICK.BMP 257KB
rt.bmp 192KB
GRASS3A.BMP 129KB
icons.bmp 116KB
Sample_Fonts.bmp 80KB
Font.bmp 75KB
seafloor.bmp 65KB
HEIGHT.BMP 65KB
GROUND.BMP 65KB
rt-alpha.bmp 65KB
WALL_1.BMP 65KB
W_STONE.BMP 65KB
S_AVE148.BMP 65KB
S_RK53.BMP 65KB
image.bmp 59KB
font.0000.bmp 39KB
back.bmp 32KB
back.bmp 17KB
lake.bmp 17KB
lake.bmp 17KB
dolphin.bmp 12KB
pine.bmp 6KB
icons.bmp 5KB
text.bmp 4KB
font.bmp 4KB
rightp.bmp 3KB
lefttwst.bmp 3KB
leftp.bmp 3KB
isoblank.bmp 3KB
righttwst.bmp 3KB
rightdor.bmp 2KB
leftdoor.bmp 2KB
Bubbles.bmp 2KB
plant.bmp 2KB
rights.bmp 2KB
lefts.bmp 2KB
middles.bmp 2KB
cursor.bmp 2KB
gray.bmp 2KB
water.bmp 2KB
water1.bmp 2KB
grass.bmp 2KB
brown.bmp 2KB
dirtpath.bmp 2KB
redBall.bmp 1KB
whiteball.bmp 1KB
hauto.bmp 1KB
guma.bmp 376B
DelphiX60.bpl 961KB
Project1.cfg 534B
ProjectMain.cfg 534B
start.cmd 154B
DelphiX.cnt 3KB
DelphiX60.dcp 1.01MB
DelphiX.dcr 7KB
Colli3DX.dcr 492B
DirectX.dcu 353KB
DXDraws.dcu 333KB
DirectX.dcu 294KB
DXDraws.dcu 265KB
DIB.dcu 172KB
DIB.dcu 132KB
DXRender.dcu 109KB
DXRender.dcu 84KB
DXSounds.dcu 79KB
DXSounds.dcu 64KB
DXSprite.dcu 61KB
DXInput.dcu 54KB
UntMain.dcu 48KB
DXSprite.dcu 47KB
DXGlueItEdit.dcu 45KB
DXInput.dcu 44KB
DXClass.dcu 41KB
DXClass.dcu 33KB
DXReg.dcu 33KB
DXPlay.dcu 32KB
Main.dcu 31KB
DxPathEdit.dcu 29KB
DXPlay.dcu 27KB
DXETable.dcu 24KB
DXETable.dcu 23KB
DXMapEdit.dcu 18KB
DXWave.dcu 18KB
DXFFBEdit.dcu 16KB
DXSpriteEdit.dcu 15KB
DXPlayFm.dcu 15KB
DXDIBEffectEdit.dcu 15KB
DXWave.dcu 15KB
D3DUtils.dcu 15KB
DXPlayFm.dcu 13KB
DXMapEditProperties.dcu 13KB
DXPictEdit.dcu 13KB
D3DUtils.dcu 11KB
DXInptEdit.dcu 11KB
DXWaveEdit.dcu 10KB
turbopixels.dcu 10KB
共 634 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
ad13663145243
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功