Qbasicnews.com
July 05, 2020, 04:45:53 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Behold, the world’s *first ever* FB palette library!!  (Read 6785 times)
Adigun A. Polack
Ancient Guru
****
Posts: 691



WWW
« on: March 12, 2005, 03:03:57 AM »

Dearest, DEAREST all of the splendidly excellent QB45/QB71/FB community ( Cheesy ),

A rather magnificent day to all of you.

I am so generously proud to let you all try my newest and VERY FIRST official FreeBASIC palette library that will surely rock your 256-color world in this fairly new BASIC programming platform.

I give you: “The New FreeBASIC 8-Bit Palette Machine”!!  :king:

This lib has it all: fading in/out, negative palette transformations, greyscales, palette crossfades, knockdown drag-out support for both your 768-byte palettes and PP256 palettes, and TONS more!!!  I am sure that you are gonna enjoy this one very richly for your games and demos or what have you in FB, I can certainly guarantee it.  Cheesy=b

To download it, please click here, and after download, please check out the demo to guide you even further in how to use.  I will sometime next week introduce it on my projects site, but I am inviting you all to give this baby a drive today!!  Wink

See you later, and do enjoy the new Palette Machine, everybody!!!  Cheesy



GIVING YOU A FIRST TASTE TODAY,


Adigun Azikiwe Polack
One of the Founders of “Aura Flow” ::: Continuing Developer of “Frantic Journey
Current Developer of “Star Angelic Slugger” ::: Webmaster of the “AAP Official Projects Squad
Original Creator of the “The New FreeBASIC 8-Bit Palette Machine
Logged

url=http://dhost.hopto.org/aapproj/][/url]
Your *official* home of the FreeBasic GFX Demo Central, now holding over 150 FB graphics demos so far!!!  Cheesy !
ShadowWolf
Wandering Guru
***
Posts: 389



« Reply #1 on: March 12, 2005, 03:49:43 AM »

pretty cool but you couldn't pay me enough to ever return to 8bit mode .  

!) far to limmiting Sad
2) way to much work. far to troublesome to use
3) 8bit gfx's mode is slower on new comps then 32bit color depth.
4) and last but not least 32bit has Alpha blending

but there most likely some 8bit hardcore people here that will love this Smiley
Logged
rdc
Senior Member
**
Posts: 176



WWW
« Reply #2 on: March 12, 2005, 10:13:09 AM »

Impressive! I'll certainly have use for this. Thanks for the work.
Logged

Adigun A. Polack
Ancient Guru
****
Posts: 691



WWW
« Reply #3 on: March 12, 2005, 02:06:21 PM »

To ShadowWolf:

Quote from: "Starting off with you, as part of your reply, you honestly"
there most likely some 8bit hardcore people here that will love this Smiley


I’ll bet, and hey, I couldn’t even agree more.  :king:  You know, ShadowWolf, there are indeed apparently some to even a lot of us (even many QB fans from back in the heyday, also!) that will *definitely* enjoy using this library really, as this one is the very first of its own kind ever, most given that it is — in the first place — an actual palette library for FB already.  You are pretty much correct though, man.  Cheesy  My lib is simply designed for 8-bit (or 256-color) palettes only.  It was never intended exactly for 16- to 32-bits or alpha blending and all that kind of thing, BUT, it will hopefully be just as useful truly for both old-schoolers and hardcore QB programmers just as seriously as ever.  No kidding!

Again, you are correct, ShadowWolf.  Thank you for your honest opinion.  Wink



And to you, rdc:

Thanks so much, very richly!!  :cool:=b  Hey, I made sure and checked every single last routine in the whole entire lib to make *completely* sure that they all work the way they should on all versions of FreeBASIC from v0.11b on.  For instance, when I first tried INP(969) on the conversions/fades/rotations of the default GFXlib 2 palette, it worked fully fine on FB v0.11b, but then when I tried the same exact thing on the newly released FB v0.12, the colors from that palette were all screwed up like “HUH!?  :Huh: ”, you know?  :lol: !  As a result of that, I then had to extract all of the R, G, and B channels from all of the 256 default colors of the GFXlib 2 palette.  And you know where I got them from?  Good ‘ol QuickBASIC 4.5, where else?  Cheesy

Believe me, it took me a good two (2) days to just extract the life out of all 256 default colors so that I can next get them to go into my lib for a more truer and faithful color-perfect emulation of the GFXlib 2 palette to make the conversions/fades/rotations/greyscales of that palette fully work on FB v0.11b, v0.12, and on all future versions of FreeBASIC, too!  And baby, when I tried them out again after that, THEY AMAZINGLY WORKED 100%, checks and everything (even on FB v0.12, also!)!!!  d=^-^=b !

As you can see, a lot of effort and hard *painstaking* work has been used in the entirety of making The New FreeBASIC 8-Bit Palette Machine, my very first FB lib ever created in existence!  Praise God that only He has first empowered me to do them all (as well as all of the above from this post, too!), because that entirety indeed has all been purposed to be an unforgettable blessing to all of you superb QB45/QB71/FB community.  I MEAN IT!!!  Cheesy



ShadowWolf and rdc, it is *truly* no doubt a pleasure to speak with both of you.  See you again later.  Wink




- Adigun Azikiwe Polack
One of the Founders of “Aura Flow” ::: Continuing Developer of “Frantic Journey
Current Developer of “Star Angelic Slugger” ::: Webmaster of the “AAP Official Projects Squad
Original Creator of the “The New FreeBASIC 8-Bit Palette Machine
Logged

url=http://dhost.hopto.org/aapproj/][/url]
Your *official* home of the FreeBasic GFX Demo Central, now holding over 150 FB graphics demos so far!!!  Cheesy !
v3cz0r
I hold this place together
*****
Posts: 924



WWW
« Reply #4 on: March 12, 2005, 07:54:19 PM »

I was checking the code, it's pretty big, congrats ;)

If there's anything wrong with INP() in 0.12, please report it so Angelo can check if anything is broken -- hacks break soon or later so making a version of your lib that has work-around's with 0.12, you will probably need another one if 0.13 fixes something wrong in 0.12.. a mess :P
Logged

relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #5 on: March 12, 2005, 11:31:30 PM »

Cool!
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
Adigun A. Polack
Ancient Guru
****
Posts: 691



WWW
« Reply #6 on: March 13, 2005, 01:45:04 AM »

To v3cz0r (and lillo, you might want to listen in on this, too!):

Alright now, let’s get right down to the bottom of this apparent little INP(969) bug in both GFXlib 2 and FB v0.12, shall we?

During my development of this lib, v3cz0r, from the moment FB v0.12 recently came out, I done numerous tests on that newer version of FB, and guess what I discovered?

______________________________________________________________
• INP(969) GFXlib 2 palette emulation •

Pretty pathetic, eh? ( :barf: ! )  Thank God I *sure* didn’t release this lib like that, believe me!  Wink
______________________________________________________________

As a result, I got up right then and started extracting up the exact R, G, and B values of all 256 of the very colors from the original default GFXlib 2 palette (like I may have already said from my previous post in here), and I typed up this original code of mine from recent days ago in ‘ye olde QB:

[syntax="QBasic"]'___________________________________________________________________________
'This is a code snippet used from "The New FreeBASIC 8-Bit Palette Machine"
'for creating a faithful emulation of the default GFXlib 2 palette.  ;*) !
'___________________________________________________________________________
'(c)2005 Adigun Azikiwe Polack.  All Rights Reserved.
'___________________________________________________________________________


Declare Function GetDefaultPal.Red (TargetCol)
Declare Function GetDefaultPal.Green (TargetCol)
Declare Function GetDefaultPal.Blue (TargetCol)


Function GetDefaultPal.Blue (TargetCol)
Select Case TargetCol
  Case 0: GetDefaultPal.Blue = 0
  Case 1: GetDefaultPal.Blue = 42
  Case 2: GetDefaultPal.Blue = 0
  Case 3: GetDefaultPal.Blue = 42
  Case 4: GetDefaultPal.Blue = 0
  Case 5: GetDefaultPal.Blue = 42
  Case 6: GetDefaultPal.Blue = 0
  Case 7: GetDefaultPal.Blue = 42
  Case 8: GetDefaultPal.Blue = 21
  Case 9: GetDefaultPal.Blue = 63
  Case 10: GetDefaultPal.Blue = 21
  Case 11: GetDefaultPal.Blue = 63
  Case 12: GetDefaultPal.Blue = 21
  Case 13: GetDefaultPal.Blue = 63
  Case 14: GetDefaultPal.Blue = 21
  Case 15: GetDefaultPal.Blue = 63
  Case 16: GetDefaultPal.Blue = 0
  Case 17: GetDefaultPal.Blue = 5
  Case 18: GetDefaultPal.Blue = 8
  Case 19: GetDefaultPal.Blue = 11
  Case 20: GetDefaultPal.Blue = 14
  Case 21: GetDefaultPal.Blue = 17
  Case 22: GetDefaultPal.Blue = 20
  Case 23: GetDefaultPal.Blue = 24
  Case 24: GetDefaultPal.Blue = 28
  Case 25: GetDefaultPal.Blue = 32
  Case 26: GetDefaultPal.Blue = 36
  Case 27: GetDefaultPal.Blue = 40
  Case 28: GetDefaultPal.Blue = 45
  Case 29: GetDefaultPal.Blue = 50
  Case 30: GetDefaultPal.Blue = 56
  Case 31 TO 36: GetDefaultPal.Blue = 63
  Case 37: GetDefaultPal.Blue = 47
  Case 38: GetDefaultPal.Blue = 31
  Case 39: GetDefaultPal.Blue = 16
  Case 40 TO 48: GetDefaultPal.Blue = 0
  Case 49: GetDefaultPal.Blue = 16
  Case 50: GetDefaultPal.Blue = 31
  Case 51: GetDefaultPal.Blue = 47
  Case 52 TO 60: GetDefaultPal.Blue = 63
  Case 61: GetDefaultPal.Blue = 55
  Case 62: GetDefaultPal.Blue = 47
  Case 63: GetDefaultPal.Blue = 39
  Case 64 TO 72: GetDefaultPal.Blue = 31
  Case 73: GetDefaultPal.Blue = 39
  Case 74: GetDefaultPal.Blue = 47
  Case 75: GetDefaultPal.Blue = 55
  Case 76 TO 84: GetDefaultPal.Blue = 63
  Case 85: GetDefaultPal.Blue = 58
  Case 86: GetDefaultPal.Blue = 54
  Case 87: GetDefaultPal.Blue = 49
  Case 88 TO 96: GetDefaultPal.Blue = 45
  Case 97: GetDefaultPal.Blue = 49
  Case 98: GetDefaultPal.Blue = 54
  Case 99: GetDefaultPal.Blue = 58
  Case 100 TO 103: GetDefaultPal.Blue = 63
  Case 104 TO 108: GetDefaultPal.Blue = 28
  Case 109: GetDefaultPal.Blue = 21
  Case 110: GetDefaultPal.Blue = 14
  Case 111: GetDefaultPal.Blue = 7
  Case 112 TO 120: GetDefaultPal.Blue = 0
  Case 121: GetDefaultPal.Blue = 7
  Case 122: GetDefaultPal.Blue = 14
  Case 123: GetDefaultPal.Blue = 21
  Case 124 TO 132: GetDefaultPal.Blue = 28
  Case 133: GetDefaultPal.Blue = 24
  Case 134: GetDefaultPal.Blue = 21
  Case 135: GetDefaultPal.Blue = 17
  Case 136 TO 144: GetDefaultPal.Blue = 14
  Case 145: GetDefaultPal.Blue = 17
  Case 146: GetDefaultPal.Blue = 21
  Case 147: GetDefaultPal.Blue = 24
  Case 148 TO 156: GetDefaultPal.Blue = 28
  Case 157: GetDefaultPal.Blue = 26
  Case 158: GetDefaultPal.Blue = 24
  Case 159: GetDefaultPal.Blue = 22
  Case 160 TO 168: GetDefaultPal.Blue = 20
  Case 169: GetDefaultPal.Blue = 22
  Case 170: GetDefaultPal.Blue = 24
  Case 171: GetDefaultPal.Blue = 26
  Case 172 TO 175: GetDefaultPal.Blue = 28
  Case 176 TO 180: GetDefaultPal.Blue = 16
  Case 181: GetDefaultPal.Blue = 12
  Case 182: GetDefaultPal.Blue = 8
  Case 183: GetDefaultPal.Blue = 4
  Case 184 TO 192: GetDefaultPal.Blue = 0
  Case 193: GetDefaultPal.Blue = 4
  Case 194: GetDefaultPal.Blue = 8
  Case 195: GetDefaultPal.Blue = 12
  Case 196 TO 204: GetDefaultPal.Blue = 16
  Case 205: GetDefaultPal.Blue = 14
  Case 206: GetDefaultPal.Blue = 12
  Case 207: GetDefaultPal.Blue = 10
  Case 208 TO 216: GetDefaultPal.Blue = 8
  Case 217: GetDefaultPal.Blue = 10
  Case 218: GetDefaultPal.Blue = 12
  Case 219: GetDefaultPal.Blue = 14
  Case 220 TO 228: GetDefaultPal.Blue = 16
  Case 229: GetDefaultPal.Blue = 15
  Case 230: GetDefaultPal.Blue = 13
  Case 231: GetDefaultPal.Blue = 12
  Case 232 TO 240: GetDefaultPal.Blue = 11
  Case 241: GetDefaultPal.Blue = 12
  Case 242: GetDefaultPal.Blue = 13
  Case 243: GetDefaultPal.Blue = 15
  Case 244 TO 247: GetDefaultPal.Blue = 16
  Case 248 TO 255: GetDefaultPal.Blue = 0
End Select

END FUNCTION



Function GetDefaultPal.Green (TargetCol)
Select Case TargetCol
  Case 0 TO 1: GetDefaultPal.Green = 0
  Case 2 TO 3: GetDefaultPal.Green = 42
  Case 4 TO 5: GetDefaultPal.Green = 0
  Case 6: GetDefaultPal.Green = 21
  Case 7: GetDefaultPal.Green = 42
  Case 8 TO 9: GetDefaultPal.Green = 21
  Case 10 TO 11: GetDefaultPal.Green = 63
  Case 12 TO 13: GetDefaultPal.Green = 21
  Case 14 TO 15: GetDefaultPal.Green = 63
  Case 16: GetDefaultPal.Green = 0
  Case 17: GetDefaultPal.Green = 5
  Case 18: GetDefaultPal.Green = 8
  Case 19: GetDefaultPal.Green = 11
  Case 20: GetDefaultPal.Green = 14
  Case 21: GetDefaultPal.Green = 17
  Case 22: GetDefaultPal.Green = 20
  Case 23: GetDefaultPal.Green = 24
  Case 24: GetDefaultPal.Green = 28
  Case 25: GetDefaultPal.Green = 32
  Case 26: GetDefaultPal.Green = 36
  Case 27: GetDefaultPal.Green = 40
  Case 28: GetDefaultPal.Green = 45
  Case 29: GetDefaultPal.Green = 50
  Case 30: GetDefaultPal.Green = 56
  Case 31: GetDefaultPal.Green = 63
  Case 32 TO 40: GetDefaultPal.Green = 0
  Case 41: GetDefaultPal.Green = 16
  Case 42: GetDefaultPal.Green = 31
  Case 43: GetDefaultPal.Green = 47
  Case 44 TO 52: GetDefaultPal.Green = 63
  Case 53: GetDefaultPal.Green = 47
  Case 54: GetDefaultPal.Green = 31
  Case 55: GetDefaultPal.Green = 16
  Case 56 TO 64: GetDefaultPal.Green = 31
  Case 65: GetDefaultPal.Green = 39
  Case 66: GetDefaultPal.Green = 47
  Case 67: GetDefaultPal.Green = 55
  Case 68 TO 76: GetDefaultPal.Green = 63
  Case 77: GetDefaultPal.Green = 55
  Case 78: GetDefaultPal.Green = 47
  Case 79: GetDefaultPal.Green = 39
  Case 80 TO 88: GetDefaultPal.Green = 45
  Case 89: GetDefaultPal.Green = 49
  Case 90: GetDefaultPal.Green = 54
  Case 91: GetDefaultPal.Green = 58
  Case 92 TO 100: GetDefaultPal.Green = 63
  Case 101: GetDefaultPal.Green = 58
  Case 102: GetDefaultPal.Green = 54
  Case 103: GetDefaultPal.Green = 49
  Case 104 TO 112: GetDefaultPal.Green = 0
  Case 113: GetDefaultPal.Green = 7
  Case 114: GetDefaultPal.Green = 14
  Case 115: GetDefaultPal.Green = 21
  Case 116 TO 124: GetDefaultPal.Green = 28
  Case 125: GetDefaultPal.Green = 21
  Case 126: GetDefaultPal.Green = 14
  Case 127: GetDefaultPal.Green = 7
  Case 128 TO 136: GetDefaultPal.Green = 14
  Case 137: GetDefaultPal.Green = 17
  Case 138: GetDefaultPal.Green = 21
  Case 139: GetDefaultPal.Green = 24
  Case 140 TO 148: GetDefaultPal.Green = 28
  Case 149: GetDefaultPal.Green = 24
  Case 150: GetDefaultPal.Green = 21
  Case 151: GetDefaultPal.Green = 17
  Case 152 TO 160: GetDefaultPal.Green = 20
  Case 161: GetDefaultPal.Green = 22
  Case 162: GetDefaultPal.Green = 24
  Case 163: GetDefaultPal.Green = 26
  Case 164 TO 172: GetDefaultPal.Green = 28
  Case 173: GetDefaultPal.Green = 26
  Case 174: GetDefaultPal.Green = 24
  Case 175: GetDefaultPal.Green = 22
  Case 176 TO 184: GetDefaultPal.Green = 0
  Case 185: GetDefaultPal.Green = 4
  Case 186: GetDefaultPal.Green = 8
  Case 187: GetDefaultPal.Green = 12
  Case 188 TO 196: GetDefaultPal.Green = 16
  Case 197: GetDefaultPal.Green = 12
  Case 198: GetDefaultPal.Green = 8
  Case 199: GetDefaultPal.Green = 4
  Case 200 TO 208: GetDefaultPal.Green = 8
  Case 209: GetDefaultPal.Green = 10
  Case 210: GetDefaultPal.Green = 12
  Case 211: GetDefaultPal.Green = 14
  Case 212 TO 220: GetDefaultPal.Green = 16
  Case 221: GetDefaultPal.Green = 14
  Case 222: GetDefaultPal.Green = 12
  Case 223: GetDefaultPal.Green = 10
  Case 224 TO 232: GetDefaultPal.Green = 11
  Case 233: GetDefaultPal.Green = 12
  Case 234: GetDefaultPal.Green = 13
  Case 235: GetDefaultPal.Green = 15
  Case 236 TO 244: GetDefaultPal.Green = 16
  Case 245: GetDefaultPal.Green = 15
  Case 246: GetDefaultPal.Green = 13
  Case 247: GetDefaultPal.Green = 12
  Case 248 TO 255: GetDefaultPal.Green = 0
End Select

END FUNCTION



Function GetDefaultPal.Red (TargetCol)
Select Case TargetCol
  Case 0 TO 3: GetDefaultPal.Red = 0
  Case 4 TO 7: GetDefaultPal.Red = 42
  Case 8 TO 11: GetDefaultPal.Red = 21
  Case 12 TO 15: GetDefaultPal.Red = 63
  Case 16: GetDefaultPal.Red = 0
  Case 17: GetDefaultPal.Red = 5
  Case 18: GetDefaultPal.Red = 8
  Case 19: GetDefaultPal.Red = 11
  Case 20: GetDefaultPal.Red = 14
  Case 21: GetDefaultPal.Red = 17
  Case 22: GetDefaultPal.Red = 20
  Case 23: GetDefaultPal.Red = 24
  Case 24: GetDefaultPal.Red = 28
  Case 25: GetDefaultPal.Red = 32
  Case 26: GetDefaultPal.Red = 36
  Case 27: GetDefaultPal.Red = 40
  Case 28: GetDefaultPal.Red = 45
  Case 29: GetDefaultPal.Red = 50
  Case 30: GetDefaultPal.Red = 56
  Case 31: GetDefaultPal.Red = 63
  Case 32: GetDefaultPal.Red = 0
  Case 33: GetDefaultPal.Red = 16
  Case 34: GetDefaultPal.Red = 31
  Case 35: GetDefaultPal.Red = 47
  Case 36 TO 44: GetDefaultPal.Red = 63
  Case 45: GetDefaultPal.Red = 47
  Case 46: GetDefaultPal.Red = 31
  Case 47: GetDefaultPal.Red = 16
  Case 48 TO 55: GetDefaultPal.Red = 0
  Case 56: GetDefaultPal.Red = 31
  Case 57: GetDefaultPal.Red = 39
  Case 58: GetDefaultPal.Red = 47
  Case 59: GetDefaultPal.Red = 55
  Case 60 TO 68: GetDefaultPal.Red = 63
  Case 69: GetDefaultPal.Red = 55
  Case 70: GetDefaultPal.Red = 47
  Case 71: GetDefaultPal.Red = 39
  Case 72 TO 79: GetDefaultPal.Red = 31
  Case 80: GetDefaultPal.Red = 45
  Case 81: GetDefaultPal.Red = 49
  Case 82: GetDefaultPal.Red = 54
  Case 83: GetDefaultPal.Red = 58
  Case 84 TO 92: GetDefaultPal.Red = 63
  Case 93: GetDefaultPal.Red = 58
  Case 94: GetDefaultPal.Red = 54
  Case 95: GetDefaultPal.Red = 49
  Case 96 TO 103: GetDefaultPal.Red = 45
  Case 104: GetDefaultPal.Red = 0
  Case 105: GetDefaultPal.Red = 7
  Case 106: GetDefaultPal.Red = 14
  Case 107: GetDefaultPal.Red = 21
  Case 108 TO 116: GetDefaultPal.Red = 28
  Case 117: GetDefaultPal.Red = 21
  Case 118: GetDefaultPal.Red = 14
  Case 119: GetDefaultPal.Red = 7
  Case 120 TO 127: GetDefaultPal.Red = 0
  Case 128: GetDefaultPal.Red = 14
  Case 129: GetDefaultPal.Red = 17
  Case 130: GetDefaultPal.Red = 21
  Case 131: GetDefaultPal.Red = 24
  Case 132 TO 140: GetDefaultPal.Red = 28
  Case 141: GetDefaultPal.Red = 24
  Case 142: GetDefaultPal.Red = 21
  Case 143: GetDefaultPal.Red = 17
  Case 144 TO 151: GetDefaultPal.Red = 14
  Case 152: GetDefaultPal.Red = 20
  Case 153: GetDefaultPal.Red = 22
  Case 154: GetDefaultPal.Red = 24
  Case 155: GetDefaultPal.Red = 26
  Case 156 TO 164: GetDefaultPal.Red = 28
  Case 165: GetDefaultPal.Red = 26
  Case 166: GetDefaultPal.Red = 24
  Case 167: GetDefaultPal.Red = 22
  Case 168 TO 175: GetDefaultPal.Red = 20
  Case 176: GetDefaultPal.Red = 0
  Case 177: GetDefaultPal.Red = 4
  Case 178: GetDefaultPal.Red = 8
  Case 179: GetDefaultPal.Red = 12
  Case 180 TO 188: GetDefaultPal.Red = 16
  Case 189: GetDefaultPal.Red = 12
  Case 190: GetDefaultPal.Red = 8
  Case 191: GetDefaultPal.Red = 4
  Case 192 TO 199: GetDefaultPal.Red = 0
  Case 200: GetDefaultPal.Red = 8
  Case 201: GetDefaultPal.Red = 10
  Case 202: GetDefaultPal.Red = 12
  Case 203: GetDefaultPal.Red = 14
  Case 204 TO 212: GetDefaultPal.Red = 16
  Case 213: GetDefaultPal.Red = 14
  Case 214: GetDefaultPal.Red = 12
  Case 215: GetDefaultPal.Red = 10
  Case 216 TO 223: GetDefaultPal.Red = 8
  Case 224: GetDefaultPal.Red = 11
  Case 225: GetDefaultPal.Red = 12
  Case 226: GetDefaultPal.Red = 13
  Case 227: GetDefaultPal.Red = 15
  Case 228 TO 236: GetDefaultPal.Red = 16
  Case 237: GetDefaultPal.Red = 15
  Case 238: GetDefaultPal.Red = 13
  Case 239: GetDefaultPal.Red = 12
  Case 240 TO 247: GetDefaultPal.Red = 11
  Case 248 TO 255: GetDefaultPal.Red = 0
End Select

END FUNCTION[/syntax]

And, lillo — aka the wonderful Angelo Mottola himself — can just go right ahead and feel absolutely free to copy the entire code (but not edit it in any way, please!  Smiley ) for use in a future GFXlib 2 to bring it a proper color-perfect emulation of the whole default palette for INP(969).  That’ll help you both blow that INP(969) bug clear away!  Remember, my man v3cz0r, I hold the entire copyright to the code that you just saw in this post.  Cheesy

Getting back, v3cz0r, after I got all done with my own custom emulation code for the default GFXlib 2 palette, and after I tested this sucker out on my FB palette lib as well, here is the clear-cut result:

______________________________________________________________
• After my custom “GFXlib 2 default palette” emulation code...... •

NOW THAT IS MUCH, MUCH BETTER!!!  d=Cheesy=b !
______________________________________________________________

You are right, man.  MOST right.  Hacks like INP(969) do tend to break apart indeed sooner or later ( Sad ), you know what I am saying?  And don’t worry now, there is really nothing wrong with my lib one single little bit, *ever*, especially now that the RGB values of all the 256 colors of the entire default palette for GFXlib 2 has successfully been custom-coded and custom-emulated to work for my lib on potentially ALL future versions of FreeBASIC (in addition to the fact that all my routines for the custom 768-byte and PP256 palettes are 100% in tip-top working order, too!  :cool:=b ! ).  If you can read my “Final Words” segment right near the end of my 175-page .PDF documentation for this FB palette lib of mine, then you should clearly understand what I am talking about.  Cheesy

Hey, pleasure talking to you, and I thank you for our finely good chit-chat!!  :king:



And finally, to Richard Eric M. Lope (Relsoft):

Thanks so very much as well, man!  ;*)  I appreciate it!!  I am sure that you will enjoy using this lib as well for your future FB demomaking and other stuff, no doubt.

Once again, I thank you!!  :king:



Well, be seeing you both again, and God richly bless you all as this new week opens up!  



BRINGING YOU ALL SUCH EXCELLENCE RIGHT HERE,


Adigun Azikiwe Polack
One of the Founders of “Aura Flow” ::: Continuing Developer of “Frantic Journey
Current Developer of “Star Angelic Slugger” ::: Webmaster of the “AAP Official Projects Squad
Original Creator of the “The New FreeBASIC 8-Bit Palette Machine
Logged

url=http://dhost.hopto.org/aapproj/][/url]
Your *official* home of the FreeBasic GFX Demo Central, now holding over 150 FB graphics demos so far!!!  Cheesy !
DrV
Na_th_an
*****
Posts: 1553



WWW
« Reply #7 on: March 13, 2005, 01:51:34 AM »

Uhm... why exactly is that huge chunk of code necessary?  And besides, the gfxlib is written in C, not fB.
Logged
barok
Na_th_an
*****
Posts: 1727


How about a tasty lead sandwich?


« Reply #8 on: March 13, 2005, 02:13:39 AM »

I myself found some bugs with the out commands for palette.  They didn't work too well when i tried to port over my palette routines.  just wait... i'll quickhost the source and the exe.

http://qh2.qbtk.com/311-d
Logged

Jumping Jahoolipers!
lillo
Guru
**
Posts: 269


WWW
« Reply #9 on: March 13, 2005, 10:38:21 AM »

First of all, congrats for your work Adigun, that 200K source file really shows off your great effort!

Now, thanks for the bug report about INP/OUT; as DrV already pointed out, gfxlib2 is written in C, so no need for FB code and such a big SELECT CASE. The problem is a bit more subtle, and deals with bit shifting... Anyway I've just applied a fix for this in CVS, now everything works correctly.
Logged

ngelo Mottola - EC++
VonGodric
Ancient Guru
****
Posts: 674



WWW
« Reply #10 on: March 13, 2005, 11:35:32 AM »

Adigun, it's a nice work. But small siggestion: Use "SELECT CASE as const TargetCol" It is mutch faster.
Logged

url]http://fbide.sourceforge.net/[/url]
Adigun A. Polack
Ancient Guru
****
Posts: 691



WWW
« Reply #11 on: March 13, 2005, 05:15:28 PM »

To everyone (especially to lillo and VonGodric, too!  :cool: ! ):

Thank you all for your very supportive comments and praises about my palette library!!  :king: !!  I mean, listen, ever since it has been about two (2) years ago that I got my first original palette lib created for QuickBASIC 4.5 and 7.1 (I believe it was originally called “The 8-Bit Palette Machine for Future.Library”), I have taken quite my careful and thorough time to create such faithful, uncompromised palette routines that do what they are *designed* to do in the exact first place, know what I mean?  Cheesy=b  Praise God for first inspiring me to do it all, too!  Hey, quality is at the top of my game here, you know now?  Wink

And lillo and DrV, you both are absolutely correct that GFXlib 2 was first originally written in C, not in FreeBASIC.  I know that now.  :wtnod:  And so, I thank you two a lot on that, truly!

VonGodric, regarding my lib today, as for your suggestion which is:

Quote
Use "SELECT CASE as const TargetCol" It is mutch faster.


......I *just* might wanna try it, particularly for my next coming version of this (for after v1.0 of my lib).  In my around 20+ years of BASIC programming, man, I’ve been _so_ familiar with QB that when I have used “Select Case” in such a normal routine way so many countless times, I have even carried that VERY way directly into FB myself.  BUT, like I said, I just might wanna try it indeed (I have just yesterday learned a bit about pointers from your really good tutorial about them, VonGodric!  ;*) ! )!

And finally, in case any of you are wondering just how many total lines of code that the original FB source of The New FreeBASIC 8-Bit Palette Machine has, it is (get this!!)....



Yep,  5,071 lines long indeed.  And that is just for v1.0 of this alone!!  (Wow, I *never* even thought that I have written that many myself!!  Shocked !  AMAZING.)

That is just how much effort indeed was placed in this whole entire FB lib here since it first got started late last month (February 2005).  And now you know, ladies and genlemen.  Cheesy



And finally, over to you Barok:

I am *so* sorry that your own palette routines in FB did not work too well.  Sad  You are right, man, your thing had quite a lot a bugs that need to be ironed out in order to make your routines work right the way they successfully did in QB.  Hey, I wanna wish you well on the bugfixes, Barok.  You count on it now!!  Wink=b



To all of you, I thank you once again for such excellent time well spent today.  :king:  Be checking you later!!!



ENJOYING THE MAGNIFICENT TIME WITH YOU ALL HERE,


Adigun Azikiwe Polack
One of the Founders of “Aura Flow” ::: Continuing Developer of “Frantic Journey
Current Developer of “Star Angelic Slugger” ::: Webmaster of the “AAP Official Projects Squad
Original Creator of the “The New FreeBASIC 8-Bit Palette Machine



P.S.  To one of the Admins of QBasicNews.com, I thank you *especially* for moving this topic of mine right over to the “FB Projects” section, right where it needs to be.  I truly appreciate that move now!!  Cheesy !

UPDATE (from Sunday, March 13, 2005 at 10:40pm EST):  Following VonGodric’s own advice on the “SELECT CASE as const” thing that I mentioned from earlier within this post, I have just tried it on my lib’s source code and applied it in there.  When I then gave it a compile on FB v0.12 to build a custom library out of it, IT WORKED FINE!  Wink  And as well, people, when I later compiled and ran my lib’s demo using that newly created version of the library file, I noticed that the palette operation speed for many of the routines supporting the default GFXlib 2 palette was much faster now, noticably!  Thank you, VonGodric!!  d=Cheesy=b !
Logged

url=http://dhost.hopto.org/aapproj/][/url]
Your *official* home of the FreeBasic GFX Demo Central, now holding over 150 FB graphics demos so far!!!  Cheesy !
VonGodric
Ancient Guru
****
Posts: 674



WWW
« Reply #12 on: March 14, 2005, 03:34:02 AM »

According to changelog of FreeBasic:
[added] SELECT CASE AS CONST statement, only integer constants are allowed and a jump table is generated making the it much faster than an ordinary SELECT when more than 4 CASE's have to be checked (v1c)

so it is new to FB and was not part of qb.
Logged

url]http://fbide.sourceforge.net/[/url]
Adigun A. Polack
Ancient Guru
****
Posts: 691



WWW
« Reply #13 on: March 14, 2005, 04:53:55 PM »

To VonGodric once again here:

VERY interesting.  So that may explain why the palette operation on my routines that do support the default GFXlib 2 palette was noticably faster indeed than it was before, all from the instant I applied that “SELECT CASE as const” thing into my source and recompiled it!  You’re brilliant, you know that, man?  Cheesy  The thing is, not only is this form of “SELECT CASE” indeed all-new to FB, but it *also* just debuted in FB v0.12, too (as I found out for myself from yesterday now)!  Also, you are correct too that that new form there was never even part of the old QB, originally.  Wink

Also of vital note, this week (if not even SOONER!  :king: ! ), I am gonna devote at least an entire webpage to my current new palette lib you are looking at right here, all on my *very* next update of the AAP Official Projects Squad!!  I will keep you and the others posted in this thread, VonGodric.  Hang on now!  :cool:

I thank you once again for your very insightful information.  See you once again as I get ready to plan the next update of my site today.  ^_-=b !




- Adigun Azikiwe Polack
One of the Founders of “Aura Flow” ::: Continuing Developer of “Frantic Journey
Current Developer of “Star Angelic Slugger” ::: Webmaster of the “AAP Official Projects Squad
Original Creator of the “The New FreeBASIC 8-Bit Palette Machine
Logged

url=http://dhost.hopto.org/aapproj/][/url]
Your *official* home of the FreeBasic GFX Demo Central, now holding over 150 FB graphics demos so far!!!  Cheesy !
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!