Results 1 to 7 of 7

Thread: A couple of DelphiX questions...

  1. #1

    A couple of DelphiX questions...

    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.
    Game-Dev Journal: http://skirmish.dreamhosters.com/devlog/

  2. #2

    A couple of DelphiX questions...

    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:
    Signature:
    <br />This is a block of text that can be added to posts you make. There is a 255 character limit

  3. #3

    A couple of DelphiX questions...

    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. :)
    Game-Dev Journal: http://skirmish.dreamhosters.com/devlog/

  4. #4

    Re: A couple of DelphiX questions...

    Quote Originally Posted by Malver

    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?

  5. #5

    A couple of DelphiX questions...

    Quote Originally Posted by Ultra
    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

  6. #6

    A couple of DelphiX questions...

    great, u spent a hour debugging that and u get a last error unexplained

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

  7. #7
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    A couple of DelphiX questions...

    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.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •