PDA

View Full Version : A couple of DelphiX questions...



HopeDagger
09-06-2003, 03:33 PM
For games development, I've been using DelphiX primarily. It's easy and powerful, what more could you ask for? :)

Anyway, I've been having a few problems with DelphiX as of lately, so I'm here to seek some clarification.

1) When I attempt to alpha-blend using DrawAlpha (or DrawAlphaRotate), the image becomes transparent...but green! Why is this happening, and how can I make it become normally transparent?

2) How do DrawSub and DrawAdd differ from DrawAlpha? They all seem to just make the drawn sprite transparent. I've heard that lighting/shadows can be done with DrawSub/DrawAdd, too. How do these two work?

Thanks for reading this. I appreciate any help that you can offer.

Ultra
09-06-2003, 03:42 PM
1) When I attempt to alpha-blend using DrawAlpha (or DrawAlphaRotate), the image becomes transparent...but green! Why is this happening, and how can I make it become normally transparent?

I believe it is a bug in DelphiX and/or Delphi 6. In my Delphi 3 it works. There might be a way to solve this but I dont know how though. :cry:

HopeDagger
11-06-2003, 03:18 AM
Anyone know of any ways to fix this, or where I can get a patch (if released) to get this working? Alpha-blending is needed for my game, so I'm desperate for somesort of solution. :)

John87
25-06-2003, 02:43 PM
1) When I attempt to alpha-blend using DrawAlpha (or DrawAlphaRotate), the image becomes transparent...but green! Why is this happening, and how can I make it become normally transparent?

2) How do DrawSub and DrawAdd differ from DrawAlpha? They all seem to just make the drawn sprite transparent. I've heard that lighting/shadows can be done with DrawSub/DrawAdd, too. How do these two work?



1) I have experienced the same with any color image i used and any alpha value i used. I had a project in delphi 4, using alphablending, then when i compiled in 6 it became green.

2) Drawsub will not look at the current pixels, drawadd will use also the current pixels and the newones to mix them with a result.


I also got a question: Does any one know how to use 8 bit graphics with Delphix on a Windows XP platform?

DraculaLin
21-07-2003, 06:01 PM
1) When I attempt to alpha-blend using DrawAlpha (or DrawAlphaRotate), the image becomes transparent...but green! Why is this happening, and how can I make it become normally transparent?

Step 1:
Proceed to File...Open?¢_¬¶ DelphiX_for5.dpk (or 4)and Delphi 6 will convert the package for you
Resave the package as DelphiX_for6.dpk.

Step 2:
Open DXRender.pas
The first type of error you will need to correct is an Operand Size Mismatch error. There are 40 to 50 errors of this type.

The fix is simple...

mov eax,Dest; add eax,TDXRMachine_Color.R+1 // bad statement

?¢_¬¶change to?¢_¬¶

mov eax,Dest; add eax,BYTE(TDXRMachine_Color.R+1) // good statement

This simply asks for the lower 8 bits of TDXRMachine_Color.R ?¢_" you will need to do this for every ASM reference to TDXRMachine_Color. It can be accomplished with a Search and Replace.

step 3:
The second type of error you will need to correct is an Inline Assember Syntax error. There are 10 to 20 errors of this type, and they always occur around _AddTable and _SubTable in the source. The fix is just as simple...

movzx edx,byte [offset _AddTable+edx+ebx]

?¢_¬¶change to?¢_¬¶

movzx edx,byte [offset (_AddTable+edx+ebx)]

After all these errors have been addressed compiling the package will show only one warning .
Step 4:

save DXRender.pas and reinstalling DelphiX

John87
21-07-2003, 10:24 PM
great, u spent a hour debugging that and u get a last error unexplained

[fatal error] DXReg.pas(6): File not found: 'DsgnIntf.dcu'

cairnswm
23-07-2003, 08:01 AM
The DsgnInt problem is sorted out in the following tutorial:

http://turbo.gamedev.net/delphixd6.asp

I've just installed on my notebook without a problem.