![]() |
|
DX7 and Class Demo *ver 1.4* - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Programming (https://mirage-engine.uk/forums/forumdisplay.php?fid=24) +----- Forum: Visual Basic 6 (https://mirage-engine.uk/forums/forumdisplay.php?fid=32) +----- Thread: DX7 and Class Demo *ver 1.4* (/showthread.php?tid=2775) |
DX7 and Class Demo *ver 1.4* - GIAKEN - 30-04-2009 Here's a demonstration of some simple DirectX7 DirectDraw and using a class to do it "Follow the Mouse"!Version 1.1: Nearly completely rewritten my class...it does nearly everything for you now. Version 1.2: Added more options for the class so you can set how it loads surfaces and so on. I think there's more...I forget. Version 1.3: Changed how you set the current surface used and surface RECT. Made the .Draw function only need an X and Y Fixed a problem with the Display so it used the picture box you set at initialization...and added 3 more drawing so there's a box around your mouse to show off how I fixed the surfaces so they don't go out of the area. Changed a lot of the comments...this project should be like a book now ![]() Version 1.4: Added in sound and music support! It's complete support, too. Music stopping, volume control, sound buffering (up to 50 sounds at once), and so on Also set up all the init calling to work off each other. IE you can InitSound first, then if you want to initdrawing or music you don't need to provide a form, it will use the form from InitSound...also you don't have to init drawing or music or sound if you don't want to, you can use any of the 3 you want or you can use them all![ATTACHMENT NOT FOUND] Re: DX7 and Class Demo *Version 2* - GIAKEN - 01-05-2009 And here's version 2 This one is A LOT different.Surfaces are now initialized a lot differently Class uses its own gettickcount Class calculates the FPS for you Drawing is the GDI now instead of DD Class is now destroyed properly Surfaces are handled a lot differently And so much more ![]() I changed it A LOT. You should be able to add this class to your project and go now You shouldn't have to edit the class at all...I added options for you so you can set your form and picture box you're using and the fonts and such...it's neat.
Re: DX7 and Class Demo *Version 2* - TehWiz - 01-05-2009 Sehr, sehr nett! Re: DX7 and Class Demo *Version 2* - Tony - 01-05-2009 Yeah, you can easily learn how to use classes by looking at the source. Re: DX7 and Class Demo *Version 2* - Nean - 01-05-2009 This project made me feel very uncomfortable. I don't recommend using it. Re: DX7 and Class Demo *ver 1.2* - GIAKEN - 01-05-2009 Fuck you Nean ![]() Just did a new version! Re: DX7 and Class Demo *ver 1.3* - GIAKEN - 01-05-2009 And another version! Re: DX7 and Class Demo *ver 1.3* - Tony - 01-05-2009 DX7 should be easier to use now for people who don't understand it as well. Very nice work. Keep it up. Re: DX7 and Class Demo *ver 1.4* - GIAKEN - 21-05-2009 Awwwwwwww yeahhhhhhhhhhhhhhhhh 1.4 released Sound and music is now supported! Enjoy ![]() The only thing I have left to do is add in BltToDC so you can draw onto picture boxes...and then that should be full DirectX 7 support. Then I might do optionals like alpha blending ![]() Anyways, how is it?
Re: DX7 and Class Demo *ver 1.4* - Nean - 05-06-2009 I'm pretty sure that this class module is causing a pretty gnarly memory leak. So far me and GIAKEN haven't been able to find it (Granted, neither of us have put an extroardinary amount of time into searching) Re: DX7 and Class Demo *ver 1.4* - GIAKEN - 05-06-2009 The memory leak I found, though, was with sound buffering (also going to be a memory leak with MS4). When a sound is finished playing, it doesn't clear out. So you could potentially load up 50 (or however much your buffer count is set to) sounds...I have a fix for that, that me and Nean tried and worked, but there's still a memory leak Nean says. Re: DX7 and Class Demo *ver 1.4* - Nean - 05-06-2009 GIAKEN Wrote:The memory leak I found, though, was with sound buffering (also going to be a memory leak with MS4). When a sound is finished playing, it doesn't clear out. So you could potentially load up 50 (or however much your buffer count is set to) sounds...I have a fix for that, that me and Nean tried and worked, but there's still a memory leak Nean says. I think it might have to do with the FPS, with the sleep function. Re: DX7 and Class Demo *ver 1.4* - GIAKEN - 06-06-2009 Umm definitely not...unless it was changed from Sleep 1 to something else. |