Powerbasic Museum 2020-B

IT-Consultant: Patrice Terrier => GDImage => Carousel => Topic started by: Patrice Terrier on September 30, 2007, 08:21:57 PM

Title: Carousel2
Post by: Patrice Terrier on September 30, 2007, 08:21:57 PM
CAROUSEL II

This is the first demo project written with GDImage version 4.00 to run specifically on VISTA.


(http://www.zapsolution.com/pictures/sdk/carousel2.jpg)


GDImage 4.00 is 100% compatible with DWM and it is able to draw directly on the glass section at full speed.

The project is provided with its complete carousel.bas source code + the latest zskin.inc file.

Members of this forum are the first to see it!

Note : The ZIP file has been updated to fix the problem reported by Petr in the next message.


Title: Re: Carousel2 [GDImage 4.00 for VISTA]
Post by: Petr Schreiber on September 30, 2007, 08:55:38 PM
Hi Patrice,

this really rocks again !
Thanks for sharing !

It works perfectly, except one way to do GPF:

But this is just special case, when I first click "Play carousel animation" button, then checking the above options works like a charm.
It really looks cool!


Thanks,
Petr

P.S. Hope this time it is not evident only in my version of localised XPs :-\ Today I found bug in almost every software launched ( "Paradise" adventure game - seems I have to play it from beggining, "ProgeCAD" free version of CAD falls into darkness of GPF when I try to open associated file, ... ). Is it a curse ? Why ? Can I be saved ? :D
Title: Re: Carousel2 [GDImage 4.00 for VISTA]
Post by: Patrice Terrier on September 30, 2007, 09:20:18 PM
Until I post a new zip, here is how to fix it:


         CASE %ID_SELFROTATION
              UseRotate& = zGetCheckButtonStatus(zGetMainItem(%ID_SELFROTATION))
              'UseRotate& = SendMessage(GetDlgItem(hWnd, %ID_SELFROTATION), %BM_GETCHECK, 0, 0)
              IF LBOUND(gSpriteData) > 1 THEN
                 FOR K& = 1 TO %ID_MAX_SPRITE
                     IF UseRotate& = 0 THEN
                        gSpriteData(K&).hBitmap = ZI_CreateMirrorBitmapFromFile(gSpriteData(K&).ImageName, bmW&, bmH&)
                     ELSE
                        gSpriteData(K&).hBitmap = ZI_CreateBitmapFromFile(gSpriteData(K&).ImageName, bmW&, bmH&)
                     END IF
                     CALL ZD_DrawBitmapToCtrl(zGetMainItem(%ID_CTRL), gSpriteData(K&).xPos, gSpriteData(K&).yPos, _
                                              gSpriteData(K&).hBitmap, &HFFFFFFFF, gSpriteData(K&).ID, %ZS_VISIBLE)
                 NEXT
              END IF


Add IF LBOUND(gSpriteData) > 1 THEN to make sure the sprite have been loaded first...

Thank you for the feedback.

Patrice Terrier
www.zapsolution.com
Title: Re: Carousel2 [GDImage 4.00 for VISTA]
Post by: Kent Sarikaya on September 30, 2007, 10:54:45 PM
Sorry am confused, do we need VISTA to run the program or will it run on XP?
The screenshot looks so yummy, really cool stuff you are doing Patrice that is for sure!!
Title: Re: Carousel2 [GDImage 4.00 for VISTA]
Post by: Patrice Terrier on September 30, 2007, 11:02:50 PM
It "should" work on XP in "standard mode", but I didn't test it myself, because the main purpose was to make it run on VISTA  ;)
Title: Re: Carousel2 [GDImage 4.00 for VISTA]
Post by: Petr Schreiber on October 01, 2007, 09:19:11 AM
Hi Kent,

it works on XP Home.
There is some difference comparing to image Patrice posted - I have "blended" not the image canvas, but the rest of dialog, see on attachement.


Petr
Title: Re: Carousel2 [GDImage 4.00 for VISTA]
Post by: Patrice Terrier on October 01, 2007, 02:28:39 PM
Carousel2.zip has been updated to work on both VISTA and XP.

However on XP for the purpose of the fast animation, BLUR and CRYSTAL compositing are disabled.

by the way I have also fix a little behavior that was added when fixing the Petr's submission.

The good code for CASE %ID_SELFROTATION is there:

         CASE %ID_SELFROTATION
              UseRotate& = zGetCheckButtonStatus(zGetMainItem(%ID_SELFROTATION))
              FOR K& = LBOUND(gSpriteData) TO UBOUND(gSpriteData)
                  IF UseRotate& = 0 THEN
                     gSpriteData(K&).hBitmap = ZI_CreateMirrorBitmapFromFile(gSpriteData(K&).ImageName, bmW&, bmH&)
                  ELSE
                     gSpriteData(K&).hBitmap = ZI_CreateBitmapFromFile(gSpriteData(K&).ImageName, bmW&, bmH&)
                  END IF
                  CALL ZD_DrawBitmapToCtrl(zGetMainItem(%ID_CTRL), gSpriteData(K&).xPos, gSpriteData(K&).yPos, _
                                           gSpriteData(K&).hBitmap, &HFFFFFFFF, gSpriteData(K&).ID, %ZS_VISIBLE)
              NEXT


When XP's compositing is turned off then the animation's speed is the same than on VISTA, but a little less spectacular  ;)

Patrice Terrier
www.zapsolution.com
Title: Re: Carousel2 [GDImage 4.00 for VISTA]
Post by: Petr Schreiber on October 01, 2007, 05:48:17 PM
Thanks Patrice,

on my PC the blurring did not hurt the performance so much, but this version is indeed faster.


Thanks,
Petr
Title: Re: Carousel2 [GDImage 4.00 for VISTA]
Post by: Kent Sarikaya on October 02, 2007, 01:36:56 AM
Thanks Petr for the screenshot and to know it works on XP.

Thank Patrice for the XP fix and this incredible demo. Looks and runs fantastic on my computer. Awesome SDK Magic Show for sure!!!
Title: Re: Carousel2 [GDImage 4.00 for VISTA]
Post by: Theo Gottwald on October 02, 2007, 08:45:17 AM
>Members of this forum are the first to see it!

I am really impressed too see the Aero XP version and the carusel-demo,
actually I just think, what else could you do ...
you'll face a hard time to surprise me more. :-) from now.
Title: Re: Carousel2 [GDImage 4.00 for VISTA]
Post by: Patrice Terrier on October 02, 2007, 11:25:56 AM
Now that I have mastered the beast (Vista) I have some nice things onto my back burner.

Just wait and see  :o
Title: Re: Carousel2
Post by: Patrice Terrier on August 07, 2011, 03:03:14 PM
The first post of this thread has been updated, to fix the ZIP file corruption caused by the "Server Collapse".

...