20 June 2018, 19:02 | #141 | |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,213
|
Quote:
Code:
; By Daniel Lakey, 2018 ; Distributed under attribution (CC-BY) licence. ; 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} |
|
23 June 2018, 10:20 | #142 |
Registered User
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 524
|
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 |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 999
|
Is there a way to check disk activity?
|
28 June 2018, 22:41 | #144 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
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 |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 999
|
Thanks.. I feared its like that...
|
03 August 2018, 23:07 | #146 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,213
|
Probably everyone already knows about this and I'm late to the party as usual, but the source code for blitz2, and various examples and BUMs not on the ubb dvd can be found here:
https://github.com/nitrologic/blitz2 Very interesting! |
04 August 2018, 12:35 | #147 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
Not found on the UBB CD? Anything in particular?
|
04 August 2018, 12:42 | #148 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,213
|
Just lots of examples. I've not done an exhaustive comparison
|
07 August 2018, 11:11 | #149 |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 999
|
How can I generate error returncode?
|
07 August 2018, 12:27 | #150 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
|
07 August 2018, 14:48 | #151 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
I think someone managed to hack that on the old Blitz mailing list. But you will have to search through many megabytes of Amigaguide files.
|
07 August 2018, 19:40 | #152 |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 999
|
Ah.. ok. Thanks guys.
And as I recall amiblitz needs fpu. Do all the executables compailed with it also require fpu? |
08 August 2018, 00:18 | #153 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
Sometimes, even when using the integer optimisation mode. Certain commands will require an FPU (e.g. Val() ), but there isn't a comprehensive list that I know of, so there's always a risk. If the program is simple enough, you can probably try it on an FPU-less machine or WinUAE setup to confirm it works. It will most likely require a 68020 anyway, even if it works without an FPU. I've written a few programs like that and used work-arounds for commands I found that crashed the test system, e.g. using Vallong() instead of Val().
|
13 September 2018, 14:34 | #154 |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 999
|
Did it happen to anyone that debugger stops working seemingly all of a sudden? It just pops back to editor without any notice.
|
19 December 2018, 13:25 | #155 |
Registered User
Join Date: Aug 2012
Location: RAM:
Posts: 83
|
Is this kind of simple nesting really not possible?
Code:
While some_condition If foo then Print "Error" EndIf Wend Edit: EndIf, still the same thing Last edited by attle; 19 December 2018 at 14:13. |
19 December 2018, 14:12 | #156 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
Code:
While some_condition If foo Print "Error" EndIf Wend |
19 December 2018, 14:14 | #157 |
Registered User
Join Date: Aug 2012
Location: RAM:
Posts: 83
|
Aha, so Then was the issue
|
19 December 2018, 20:47 | #158 |
J.M.D - Bedroom Musician
Join Date: Apr 2014
Location: los angeles,ca
Posts: 3,516
|
|
19 December 2018, 23:10 | #159 | |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 999
|
Quote:
mmm except the fact that some libraries break the .xtra data so if I use them on every load I have to manually correct numbers... |
|
08 February 2019, 13:06 | #160 |
Registered User
Join Date: Jun 2016
Location: MiggyLand
Age: 43
Posts: 13
|
Hi, I have a question:
Can Mildred do 2x1 or 2x2 pixel ratio c2p internally? I mean other than 1x1 ofc. Great thread btw |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Blitz basic 2 Help | Havie | Coders. Blitz Basic | 30 | 08 September 2013 09:15 |
blitz basic | petza | request.Apps | 11 | 08 April 2007 01:49 |
Blitz Basic 2 anyone? | jobro | request.Apps | 12 | 28 November 2005 18:15 |
Blitz Basic StopCD32 | Tony Landais | Coders. General | 2 | 08 May 2003 22:51 |
Blitz Basic 2 | LaundroMat | Retrogaming General Discussion | 5 | 24 July 2001 08:10 |
|
|