Results 1 to 9 of 9

Thread: RGB in QBasic?

  1. #1

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935
    Use the QB color constants. I think red is 11 or 4 or 2 or something. Look in the help.

  2. #2
    Addicted Member hypnos's Avatar
    Join Date
    Aug 2000
    Location
    UK
    Posts
    183
    Ah I see, a little disappointing though. There are only 16 colours

  3. #3
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    I believe screen 9 gives you 320x240x8, so you have 256 colours to work with, you just must add in all of the dcolours yourself (make the pallette at the start of the program.)

    Also, with unofficial QB DLLs, you can access any mode that windows can (I had my QB program going at 1024x768x32!!)
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  4. #4
    Addicted Member hypnos's Avatar
    Join Date
    Aug 2000
    Location
    UK
    Posts
    183

    Thumbs up

    Thanks, I'm gonna' have to get me one of those DLLs

  5. #5
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    You can try any numbers - I think
    Baaaaaaaaah

  6. #6
    Addicted Member
    Join Date
    Oct 2001
    Location
    Sweden
    Posts
    174
    I use the 13th screen mode for my games, it is 320x200 and has 256 colors. I use PixelPlus to make the graphics.

  7. #7
    Addicted Member
    Join Date
    Oct 2001
    Location
    Sweden
    Posts
    174
    With PixelPlus you just PUT the images on the screen, but if you still want to PSET images, just use PSET (x,y), color, where color is 0-255, depending on what color you want...

    But PSET is so slow...

  8. #8
    Lively Member FRAIL_KNIGHT's Avatar
    Join Date
    Nov 2001
    Posts
    100
    Try the palette statement, which should get you 256 colors to chose from. Then set the pset's color to the palette color's variable. I think its something like this. I used to make screen fading effects with it.

    Palette 1, Blue, Green, Red

    I remember there being numbers in the statement though, like...

    Palette 1, Blue, Green*256, Red*256^65536
    (Not exact form, but something like this)

    Then you change the Red, Green, and Blue variables from 0 to 255 to get different colors.

    Try the QB Help file by pressing F1, and search for palette. They might have an example.

    IF Something <> "" Then
    There's Something there...
    ------------------------------------------
    GWBASIC, QBASIC, QuickBASIC, VB5/6, A little DJGPP C++, and I hate it.
    ------------------------------------------
    The pic u see is the logo of my favorite Christian Punk Band...Officer Negative!!!

    www.OfficerNegative.com

  9. #9
    If you are changing the palette a lot, you'll want to use OUT to avoid slowdown:

    Code:
    OUT &H3C8, colorAttribute 'the palette number to change
    OUT &H3C9, redIntensity '0 to 63
    OUT &H3C9, greenIntensity '0 to 63
    OUT &H3C9, blueIntensity '0 to 63
    Now the world is gone I'm just one...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width