English Amiga Board


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

 
 
Thread Tools
Old 25 August 2021, 23:54   #1
shezzor
Registered User
 
Join Date: Aug 2021
Location: Cheshire / UK
Posts: 2
Blitting a shape as a different color

Looking to get back into developing for the Amiga again but its been a few years so thought I'd pick up Blitz again to ease me back into it. So please excuse any noob questions

I have a mono colour font which I've cut up into a series of shapes. I render these as per normal as a sequence of characters from a string. However, I'm wondering if its possible to "blit" the font or rather the character shapes as a different colour, overriding the colour stored in the image. For example its currently stored as white (colour index 1) but I'd like to render them as red (colour index 8).

Is this possible and if so, I assume this would come with a perf hit?

Thanks

Last edited by shezzor; 25 August 2021 at 23:59.
shezzor is offline  
Old 26 August 2021, 00:59   #2
davideo
Amiga Tomcat
 
davideo's Avatar
 
Join Date: Sep 2007
Location: Boston Lincs
Posts: 1,500
Could you define colour 1 to be the same as colour 8?
davideo is offline  
Old 26 August 2021, 01:16   #3
Cobe
Registered User
 
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 999
Try blit shape#, x, y, 3
Cobe is offline  
Old 26 August 2021, 01:38   #4
shezzor
Registered User
 
Join Date: Aug 2021
Location: Cheshire / UK
Posts: 2
That actually works incredibly well Cobe and is exactly what I need. Thank you.

I just need to understand why that works now I'm assuming it has to do with turning the bitplanes on/off.
shezzor is offline  
Old 26 August 2021, 01:52   #5
Cobe
Registered User
 
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 999
Mm kinda.
When you have a shape with less bitplanes you can choose with that last parameter the bitplane on which you want it to be blitted.
Cobe 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
WinUAE gives "HALT3" when blitting a shape to screen E-Penguin Coders. Blitz Basic 8 30 April 2018 23:30
Blitting part of a shape? earok Coders. Blitz Basic 3 01 December 2017 03:45
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

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 20:34.

Top

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