Page 1 of 7

DX9 Subsystem v0.5

Posted: Wed Jun 07, 2006 7:37 pm
by S.M.
Hi
As you maybe already noticed, I am developing a DX9 Subsystem for PureBasic.
For now it supports the complete Sprite,Sprite3D,Keyboard,Mouse,Joystick and Sound Library.

Link:http://stefanmoebius.de/DX9S_0_5.zip (To install it, simply extract it into your PureBasic folder.)
Sourcecode:
http://stefanmoebius.de/Files/DX9S_Src_3_07_07.zip
regards
Stefan

Posted: Wed Jun 07, 2006 8:27 pm
by Poshu
*_* Wow! Good luck with your work.

Posted: Thu Jun 08, 2006 8:00 am
by Progi1984
Will you insert Direct3D ?

Posted: Thu Jun 08, 2006 9:09 am
by THCM
Good work! Looks very promising! Thanx for the accelerated DisplayTranslucentSprite()! It would be nice to have a
Display(Transparent)Sprite with a brightness (0-255) parameter, just like DisplayTranslucentSprite() but without merging with the background.

I'll do some tests tonight using my game, it uses lot's of 2D Spritecommands!

Posted: Thu Jun 08, 2006 9:12 am
by S.M.
@Progi1984
Yes, I have no other choice, because DirectGraphics 9 contains only Direct3D.(No more DirectDraw :( )
@Poshu
Thanks :D

Posted: Thu Jun 08, 2006 10:17 am
by THCM
While compilation I'll get this error:

Purebasi Line 1271: Can't mix strings with numerical values

Here's the line:

LevelPassword = LevelPassword.s + KeyboardInkey()

Posted: Thu Jun 08, 2006 10:19 am
by THCM
Next error is a Linker error:

Unresolved external symbol '_PB_IsScreenActive'

Posted: Thu Jun 08, 2006 11:18 am
by mskuma
@S.M., thanks alot! For now I just report that I could compile the 3 samples ok (no errors).

Posted: Thu Jun 08, 2006 4:45 pm
by Shannara
any chance to add in the a spritecolor(color, color, color, color) command, to be able to color the four corners of a sprite?

Posted: Thu Jun 08, 2006 5:46 pm
by S.M.
THCM wrote:Purebasi Line 1271: Can't mix strings with numerical values
For now you must use PeekS(KeyboardInkey())
I will correct this bug later, when I use no DLL anymore.
Unresolved external symbol '_PB_IsScreenActive'
This happens if you use other libraries(Mouse/Joystick/Sound) with the DX9 subsystem, right ?
I will look whether I can correct this, otherwise you must wait until I wrote the Lib on my own.
@Shannara
I probably write a extension library(which will include such a command), but first I have to improve the standard Libraries.

Posted: Thu Jun 08, 2006 7:09 pm
by S.M.
While compilation I'll get this error:

Purebasi Line 1271: Can't mix strings with numerical values
Ok, I removed the bug now. :D
any chance to add in the a spritecolor(color, color, color, color) command, to be able to color the four corners of a sprite?
I added another example which show how this works.
Link:http://www.stefanmoebius.de/DX9S.zip

Posted: Fri Jun 09, 2006 8:05 am
by THCM
Hi Stefan,

the KeyboardInkey() bug is gone, but I can't test any further because of Sound and Mouse libraries!

Posted: Fri Jun 09, 2006 7:14 pm
by Num3
Ehehe found one:

Image

Posted: Mon Jun 12, 2006 7:16 pm
by SFSxOI
Does this by chance include any DirectInput or is it all DirectX graphic stuff?

Posted: Sat Jul 22, 2006 7:28 pm
by S.M.
new version:

Link: DX9S v0.1 (395 KB)
Changes since version 0.08:

- Added: complete Mouse Library
- Corrected: small bug in SpriteDepth()
- Corrected: bug in ClipSprite()
- Corrected: bugs in CopySprite()
- Corrected: Bug in the texture manager if the device needs to be recreated
- Optimized: SpriteOutput()
- Improved: ChangeGamma() works now

Changes since version 0.06:

- Added: support for #PB_Sprite_Alpha
- Added: Command ChangeAlphaIntensity()
- Added: Command DisplayAlphaSprite() (doesn't work correctly)
- Added: Command DisplayShadowSprite()
- Added: Command DisplaySolidSprite()
- Optimized: ScreenOutput()
- Corrected: Bug with Clipping in DisplaySprite(), DisplayTransparentSprite() and DisplayTranslucentSprite()
- Corrected: Bug in SpritePixelCollision()
- Corrected: Bug with transparency in sprites
- Corrected: Bug in UseBuffer()
- Corrected: Bug in LoadSprite() and CatchSprite()
- Corrected: Bug in Start3D()
- Corrected: Bug in Sprite3DBlendingMode()
- Corrected: Bug in ZoomSprite3D()
It would be nice if you could test it a bit, because it still has many bugs.(especially the new Mouse Lib is almost untested.)

@SFSxOI
It uses Direct3D 9 for the Sprite and Sprite3D Lib. For the Mouse and Keyboard Lib it uses DInput 8.