English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 13 August 2020, 15:01   #1
Honitos
Registered User

Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 80
ObtainBestPenA() / ObtainPen()

I am working on AmiBlitz3-IDE to make it work with Kickstart 2.0 instead of at least Kickstart 3.0...


Is there any alternative to the mentioned functions?
In the configuration you can specify colors; at startup the IDE tries first to get the best matching available colors using ObtainBestPenA() which war introduced with V39 of the system...
Honitos is offline  
Old 13 August 2020, 18:43   #2
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,816
I think that's very difficult to emulate ObtainPen() or ObtainBestPenA() under OS 2.x, because there are not even the required structures available for the screens viewport and colormap. The colormap structure has been expanded a lot in v39 and v36 has nothing like the PaletteExtra structure which is essential for these functions. It looks as if there was no pen management for OS 2.x yet.
Attached Files
File Type: txt VIEW.I_v37.txt (2.5 KB, 24 views)
File Type: txt VIEW.I_v39.txt (4.9 KB, 22 views)
PeterK is offline  
Old 13 August 2020, 19:48   #3
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 46
Posts: 1,587
Send a message via Yahoo to Samurai_Crow
I'd recommend using only the pen colors defined in the color preferences profile. The extensions to the pen colors in OS 3 were basically a nod to RTG before it came. The chipset can use copper split-screens to avoid palette collisions already.
Samurai_Crow is offline  
Old 13 August 2020, 20:56   #4
thomas
Registered User
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,121
FindColor() exists in 2.x already. It does not allocate a pen or change the pen's color, it just finds the best matching pen.
thomas is offline  
Old 13 August 2020, 21:46   #5
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,816
Hmm? The autodocs and LVOs say that FindColor() was introduced in v39 of graphics.library. Is there a similar function for OS 2.x somewhere else, maybe a private or outdated function in OS 3.x?
PeterK is offline  
Old 13 August 2020, 23:59   #6
Honitos
Registered User

Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 80
ObtainBestPenA() / ObtainPen()

FindColor() would fit my needs... I am going to check that routine tomorrow...

Thanks Thomas
Honitos is offline  
Old 14 August 2020, 16:44   #7
Honitos
Registered User

Honitos's Avatar
 
Join Date: Nov 2019
Location: Celle / Germany
Posts: 80
Quote:
Originally Posted by thomas View Post
FindColor() exists in 2.x already. It does not allocate a pen or change the pen's color, it just finds the best matching pen.

PeterK is right: The Autodocs say, FindColor() was introduced with V39 ... and it is correct, just tested it, not availabel with Kick2.04...

Last edited by Honitos; 14 August 2020 at 20:49.
Honitos is offline  
 


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

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 19:12.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.11051 seconds with 15 queries