English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 17 March 2019, 20:47   #1
MickGyver
Registered User
 
MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 643
Color cycling?

Hi! How do I set up color cycling (I'm using DisplayLibrary)? The CyclePalette command just make the game crash. I have set up some colors to cycle using the SetCycle command. Simply:

Code:
;Palette#,Cycle#,ColStart,ColEnd,Speed
SetCycle 0,0,26,28,0.2

; This makes the game crash (in Blitz mode)
CyclePalette 0

Last edited by MickGyver; 17 March 2019 at 20:56.
MickGyver is offline  
Old 18 March 2019, 08:27   #2
MickGyver
Registered User
 
MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 643
I solved this. The reason for the crash was that the IFF I loaded was saved in Cosmigo Pro Motion and it saves a 256 color palette. When I converted the IFF to 32 colors in PPaint and loaded the palette from that converted IFF, it all works.

I noticed that DisplayPalette needs to be called after the CyclePalette command for color cycling to work.

Last edited by MickGyver; 18 March 2019 at 08:36.
MickGyver is offline  
Old 11 March 2020, 04:52   #3
Cobe
Registered User
 
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 999
Can anyone cycle colors above 32 on AGA with displaylibrary?
I'm getting "colors out of range"
Cobe is offline  
Old 07 February 2022, 22:44   #4
colinvella
Registered User
 
colinvella's Avatar
 
Join Date: Dec 2019
Location: Marsa
Posts: 23
You can, but only if you disable runtime debug checks in the compiler options.
colinvella is offline  
Old 07 February 2022, 23:08   #5
Cobe
Registered User
 
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 999
Quote:
Originally Posted by colinvella View Post
You can, but only if you disable runtime debug checks in the compiler options.
Aahh. If I knew that back than it would spare me lots of manual loops..
Cobe is offline  
Old 20 April 2022, 11:49   #6
AlfaRomeo
A1200 040 SAM440EP 667
 
AlfaRomeo's Avatar
 
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
Hi there!! Sorry for hijack this thread but as it´s the same subject..

Someone knows how to handle with CyclePalette command??
I didn´t find any code examples with CyclePalette!!

I already tried some code variants but the resulting image is freezed, no color modifying.

Here is my last code:

Code:
WBStartup

BitMap 0,320,256,5
LoadBitMap 0,"Ram:CGX32.iff"

;InitPalette Palette#, NumCols
InitPalette 0,32

LoadPalette 0,"Ram:CGX32.col"

;Palette#,Cycle#,ColStart,ColEnd,Speed
SetCycle 0,0,1,28,0.2

;CopList#,yPos,Height,type,sprites,cols,numCustom
InitCopList 0,$13005

BLITZ

  CyclePalette 0


;CopList#, Palette#
CreateDisplay 0

;CopList#, Palette#
DisplayPalette 0,0

VWait

While Joyb(0)<>1

  ;DisplayBitMap CopList#, bmap
  DisplayBitMap 0,0

Wend

End
Shouldn't the colors be changing?
What I´m doing wrong?

Last edited by AlfaRomeo; 20 April 2022 at 18:12.
AlfaRomeo is offline  
Old 20 April 2022, 20:02   #7
nichta
The Last Ninja
 
nichta's Avatar
 
Join Date: Feb 2021
Location: France
Posts: 1
You need to put the 2 commands in your main loop.
The VWait too.
Code:
While Joyb(0)<>1

 VWait

  ;DisplayBitMap CopList#, bmap
  DisplayBitMap 0,0

 ;Palette#
  CyclePalette 0

 ;CopList#, Palette#
  DisplayPalette 0,0

Wend
nichta is offline  
Old 20 April 2022, 23:19   #8
AlfaRomeo
A1200 040 SAM440EP 667
 
AlfaRomeo's Avatar
 
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
@nichta

it works!!

Many thanks for your help
AlfaRomeo is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Color Saturation and Color Tint/Hue Retro-Nerd support.WinUAE 22 02 August 2018 10:38
Color cycling in deluxe paint aszu support.Apps 2 15 May 2016 19:12
Printing in color with WinUAE on color laser source support.Apps 7 14 April 2013 00:32
ISO true color to 256 color algorithm Lord Riton Coders. General 19 15 April 2011 17:49
[1.6.1] cycling screens problem lours support.WinUAE 17 17 July 2009 12:56

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:36.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.11255 seconds with 13 queries