English Amiga Board Blitz Basic Questions
 Register Amiga FAQ Rules & Help Members List  /  Moderators List Today's Posts Mark Forums Read

20 June 2018, 19:02   #141
E-Penguin
Banana

Join Date: Jul 2016
Posts: 587
Quote:
 Originally Posted by E-Penguin Code: ```PaletteRange Palette#,StartCol,EndCol,r0,g0,b0,r1,g1,b1 PaletteRange creates a spread of colors within a palette. Similar to DPaint's spread function PaletteRange takes a start and end colour and creates the color tweens between them.``` Does this work for anyone? I just get black in all the colour registers. I've gone as far as writing my own RGB interpolation function (which, sadly, I just lost because I didn't press save) but surely there must be a way of getting this to work.
As promised, here's my fixed version, for interpolating through the RGB colourspace. I'm still working on an HSV version. Example interpolation attached.
Code:
```; By Daniel Lakey, 2018
; Use as you will, a credit would be nice :)
;
Function.w round{v.q}
If Frac(v) >= 0.5
Function Return (Int(v) + 1)
Else
Function Return int(v)
EndIf
End Function

NewType .ntRGB
r.b
g.b
b.b
End NewType

Statement PaletteRangeFixed_RGB{palette_num.w, color_start_num.b, color_end_num.b, *start_rgb.ntRGB, *end_rgb.ntRGB}
steps.b = (color_end_num - color_start_num)
t.f = 1/steps

For i=0 to steps
r_step.b = round{*start_rgb\r + (*end_rgb\r - *start_rgb\r)*(t*i)}
g_step.b = round{*start_rgb\g + (*end_rgb\g - *start_rgb\g)*(t*i)}
b_step.b = round{*start_rgb\b + (*end_rgb\b - *start_rgb\b)*(t*i)}

PalRGB palette_num, color_start_num + i, r_step, g_step, b_step
Next i
End Statement

; .....

; Use Palette Range to set the rest of the colours
a.ntRGB\r=\$F,0,0
b.ntRGB\r=0,\$F,0
PaletteRangeFixed_RGB{#P_1, 2, 6, a, b}

a.ntRGB\r=0,\$F,0
b.ntRGB\r=0,0,\$F
PaletteRangeFixed_RGB{#P_1, 6, 10, a, b}

a.ntRGB\r=0,0,\$F
b.ntRGB\r=\$F,0,0
PaletteRangeFixed_RGB{#P_1, 10, 15, a, b}```
Attached Thumbnails

 23 June 2018, 10:20 #142 Master484 Registered User   Join Date: Nov 2015 Location: Vaasa, Finland Posts: 328 I tested the PaletteRange command and it seems to work on classic Blitz 2.1 at least, but the color values given have to be between 0-255, even if it's an OCS screen with OCS palette. Also you have to give the "Use Palette" or "DisplayPalette" command after PaletteRange, or else the changes won't take effect. So it works in the same way as PalRGB and other palette commands; the changes can't be seen until an Use Palette/DisplayPalette is executed.
 28 June 2018, 12:39 #143 Cobe Registered User   Join Date: Jan 2014 Location: Belgrade / Serbia Age: 35 Posts: 564 Is there a way to check disk activity?
 28 June 2018, 22:41 #144 Daedalus Registered User   Join Date: Jun 2009 Location: Dublin, then Glasgow Posts: 2,923 Not really, no. It might be possible to do it for floppies by checking the motor bit on the CIAs, but no equivalent exists for hard drives, and anyway, there's no guarantee that some other task doesn't start disk access between you checking and doing something else...
 28 June 2018, 23:43 #145 Cobe Registered User   Join Date: Jan 2014 Location: Belgrade / Serbia Age: 35 Posts: 564 Thanks.. I feared its like that...

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

 Similar Threads Thread Thread Starter Forum Replies Last Post Havie Coders. Blitz Basic 30 08 September 2013 09:15 petza request.Apps 11 08 April 2007 01:49 jobro request.Apps 12 28 November 2005 18:15 Tony Landais Coders. General 2 08 May 2003 22:51 LaundroMat Retrogaming General Discussion 5 24 July 2001 08:10

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home News Main     Amiga scene     Retrogaming General Discussion     Nostalgia & memories Support     New to Emulation or Amiga scene         Member Introductions     support.WinUAE     support.WinFellow     support.OtherUAE     support.FS-UAE         project.AmigaLive     support.Hardware         Hardware mods         Hardware pics     support.Games     support.Demos     support.Apps     support.Amiga Forever     support.Amix     support.Other Requests     request.UAE Wishlist     request.Old Rare Games     request.Demos     request.Apps     request.Modules     request.Music     request.Other     Looking for a game name ?     Games images which need to be WHDified abime.net - Hall Of Light     HOL news     HOL suggestions and feedback     HOL data problems     HOL contributions abime.net - Amiga Magazine Rack     AMR news     AMR suggestions and feedback     AMR data problems     AMR contributions abime.net - Home Projects     project.Amiga Lore     project.EAB     project.IRC     project.Mods Jukebox     project.Wiki abime.net - Hosted Projects     project.aGTW     project.APoV     project.ClassicWB     project.Jambo!     project.Green Amiga Alien GUIDES     project.Maptapper     project.Sprites     project.WinUAE - Kaillera Other Projects     project.Amiga Demo DVD     project.Amiga Game Factory     project.CARE     project.EAB File Server     project.CD32 Conversion     project.Game Cover Art         GCA.Feedback and Suggestions         GCA.Work in Progress         GCA.Cover Requests         GCA.Usefull Programs         GCA.Helpdesk     project.KGLoad     project.MAGE     project.Missing Full Shareware Games     project.SPS (was CAPS)     project.TOSEC (amiga only)     project.WHDLoad         project.Killergorilla's WHD packs Misc     Amiga websites reviews     MarketPlace         Swapshop     Collections     EAB's competition Coders     Coders. General         Coders. Releases         Coders. Tutorials     Coders. Asm / Hardware     Coders. System         Coders. Scripting         Coders. Nextgen     Coders. Language         Coders. C/C++         Coders. AMOS         Coders. Blitz Basic     Coders. Contest         Coders. Entries Off Topic     OT - General     OT - Technical     OT - Entertainment     OT - Sports     OT - Gaming

All times are GMT +2. The time now is 20:53.

 -- EAB3 skin ---- EAB2 skin ---- Mobile skin Archive - Top