
Desktop FX
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
As is commented in the code, it uses the SuperSprite3D lib by CPL.Bator, but i have modified the functions a little bit.GeoTrail wrote:Psychophanta, do you think you could comment the code a bit so us n00bs can understand and learn from your code?
I will now post the code (in the first post) a bit more cutted down.
Anyway there is something wrong in my code, because the plane doesn't seem to have a real perspective, and the problem is in the camera, well i will correct if i have a time.
-
- Addict
- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
Wow! Can't you do a "Beryl" clone for Windows? 
http://wiki.beryl-project.org/wiki/Main_Page
http://www.youtube.com/watch?v=QNb7gPA1JFk

http://wiki.beryl-project.org/wiki/Main_Page
http://www.youtube.com/watch?v=QNb7gPA1JFk

(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
That's pretty cool.techjunkie wrote:Wow! Can't you do a "Beryl" clone for Windows?
http://wiki.beryl-project.org/wiki/Main_Page
http://www.youtube.com/watch?v=QNb7gPA1JFk

-
- Addict
- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
Yeah!Derek wrote:That's pretty cool.techjunkie wrote:Wow! Can't you do a "Beryl" clone for Windows?
http://wiki.beryl-project.org/wiki/Main_Page
http://www.youtube.com/watch?v=QNb7gPA1JFk





(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
I liked the original code better, because once the screen tilted back to the
bottom, it didn't "disappear" for half a second like it does now.
Also, you've got some incorrect error-checking in your new code:
The last line will cause an error if ExamineDesktops() fails at the top,
since you can't use DesktopWidth() and DesktopHeight() if it fails.
bottom, it didn't "disappear" for half a second like it does now.

Also, you've got some incorrect error-checking in your new code:
Code: Select all
If ExamineDesktops():Global SCREENWIDTH=DesktopWidth(0),SCREENHEIGHT=DesktopHeight(0)
Else:Global SCREENWIDTH=GetSystemMetrics_(#SM_CXSCREEN),SCREENHEIGHT=GetSystemMetrics_(#SM_CYSCREEN)
EndIf
If InitSprite()=0 Or InitSprite3D()=0 Or InitKeyboard()=0
MessageRequester("Error","Can't access DirectX",0):End
EndIf
;SnapShot:
desktop.l = CreateImage(0,DesktopWidth(0),DesktopHeight(0))
since you can't use DesktopWidth() and DesktopHeight() if it fails.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Thats odd, just the opposite for me because on the orginal version for me when the screen tilted back it did "disappear" for a second, where the latest version doesn't do that to me.PB wrote:I liked the original code better, because once the screen tilted back to the
bottom, it didn't "disappear" for half a second like it does now.
Also, you've got some incorrect error-checking in your new code:
The last line will cause an error if ExamineDesktops() fails at the top,Code: Select all
If ExamineDesktops():Global SCREENWIDTH=DesktopWidth(0),SCREENHEIGHT=DesktopHeight(0) Else:Global SCREENWIDTH=GetSystemMetrics_(#SM_CXSCREEN),SCREENHEIGHT=GetSystemMetrics_(#SM_CYSCREEN) EndIf If InitSprite()=0 Or InitSprite3D()=0 Or InitKeyboard()=0 MessageRequester("Error","Can't access DirectX",0):End EndIf ;SnapShot: desktop.l = CreateImage(0,DesktopWidth(0),DesktopHeight(0))
since you can't use DesktopWidth() and DesktopHeight() if it fails.
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
Aaargh! you are right PB,
now is corrected.
About the screen dissappear, etc, you can play with the values in the line: 
now is corrected.
About the screen dissappear, etc, you can play with the values in the line:
Code: Select all
Data.f 0.005,0.005,0.0045

> About the screen dissappear, etc, you can play with the values in the line
I tried that but can't see how to fix it... the screen still lays too flat and is gone
for about half a second before rising up again. Any better tip to fix this?
I tried that but can't see how to fix it... the screen still lays too flat and is gone
for about half a second before rising up again. Any better tip to fix this?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.