DX9 Subsystem v0.5

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
S.M.
Enthusiast
Enthusiast
Posts: 118
Joined: Sat Apr 24, 2004 1:11 pm
Contact:

DX9 Subsystem v0.5

Post 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
Last edited by S.M. on Sun Jan 27, 2008 4:41 pm, edited 9 times in total.
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Post by Poshu »

*_* Wow! Good luck with your work.
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

Will you insert Direct3D ?
THCM
Enthusiast
Enthusiast
Posts: 276
Joined: Fri Apr 25, 2003 5:06 pm
Location: Gummersbach - Germany
Contact:

Post 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!
The Human Code Machine / Masters' Design Group
S.M.
Enthusiast
Enthusiast
Posts: 118
Joined: Sat Apr 24, 2004 1:11 pm
Contact:

Post by S.M. »

@Progi1984
Yes, I have no other choice, because DirectGraphics 9 contains only Direct3D.(No more DirectDraw :( )
@Poshu
Thanks :D
THCM
Enthusiast
Enthusiast
Posts: 276
Joined: Fri Apr 25, 2003 5:06 pm
Location: Gummersbach - Germany
Contact:

Post 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()
The Human Code Machine / Masters' Design Group
THCM
Enthusiast
Enthusiast
Posts: 276
Joined: Fri Apr 25, 2003 5:06 pm
Location: Gummersbach - Germany
Contact:

Post by THCM »

Next error is a Linker error:

Unresolved external symbol '_PB_IsScreenActive'
The Human Code Machine / Masters' Design Group
mskuma
Enthusiast
Enthusiast
Posts: 573
Joined: Sat Dec 03, 2005 1:31 am
Location: Australia

Post by mskuma »

@S.M., thanks alot! For now I just report that I could compile the 3 samples ok (no errors).
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post 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?
S.M.
Enthusiast
Enthusiast
Posts: 118
Joined: Sat Apr 24, 2004 1:11 pm
Contact:

Post 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.
S.M.
Enthusiast
Enthusiast
Posts: 118
Joined: Sat Apr 24, 2004 1:11 pm
Contact:

Post 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
THCM
Enthusiast
Enthusiast
Posts: 276
Joined: Fri Apr 25, 2003 5:06 pm
Location: Gummersbach - Germany
Contact:

Post by THCM »

Hi Stefan,

the KeyboardInkey() bug is gone, but I can't test any further because of Sound and Mouse libraries!
The Human Code Machine / Masters' Design Group
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Ehehe found one:

Image
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

Does this by chance include any DirectInput or is it all DirectX graphic stuff?
S.M.
Enthusiast
Enthusiast
Posts: 118
Joined: Sat Apr 24, 2004 1:11 pm
Contact:

Post 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.
Post Reply