Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Paint sucks, so I need...
#11
Argh..for some reason I'm getting horrible speed on that download, Nek. I think I'll wait till tomorrow. Sad
[edit] :x Argh, GrafX keeps saving my tiles 16x10 instead of 10x10, which I specified. Sad
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#12
http://www.cmis.brighton.ac.uk/Research/...PSP311.ZIP

different link Big Grin

you can easily find download links for it on google...
I'd knock on wood, but my desk is particle board.
Reply
#13
Quote:63% of PSP311.ZIP Completed
Big Grin
[edit]Winner! Thanks a bunch, Nek! RPG coding in C, here I come.. Big Grin
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#14
Um...saving it as 256-color bitmap...doesn't display right in 320x200 screen mode. Sad
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#15
I never had any problems with it...what's wrong with it?
I'd knock on wood, but my desk is particle board.
Reply
#16
sweet! psp311 is just what i was looking for (nothing to do with programming) now all i need is a free animator
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#17
Right, well...
I pick New Image, and specify 256-color bitmap. I draw my picture with the valid 8-bit colors. Then I save it, and then use it (with Allegro's load_bmp() function) into a 320x200 resolution environment. The colors are messed up. Sad
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#18
I'm not sure, but some programs swaps the Red and Blue
(or some other combinations) on bmp's I think.
Can it be that?
/post]
Reply
#19
Aye. Some programs use BGR rather than RGB. I'm not sure what's the deal here though. I never had a single problem with 256 color BMPs in PSP3 before, but then again, I always rolled my own BMP loading functions Smile perhaps Allegro has an error in it? (no! not Allegro! undisputed king of errored code! Big Grin )
I'd knock on wood, but my desk is particle board.
Reply
#20
Quote:Right, well...
I pick New Image, and specify 256-color bitmap. I draw my picture with the valid 8-bit colors. Then I save it, and then use it (with Allegro's load_bmp() function) into a 320x200 resolution environment. The colors are messed up. Sad

This is not PSP fault. It is your fault Smile I'll explain:

1.- If you are using a 8 bit (paletted) screen mode (like SCREEN 13), you have to specify it before you call to set_gfx_mode:

Code:
set_color_depth(8);

Also you have to activate the palette. If you load the BMP with:

Code:
BITMAP *my_picture;
PALETTE my_palette;

my_picture = load_bmp ("PICTURE.BMP", my_palette);

You need to do this in order to activate the palette:

Quote:void set_palette(const PALETTE p);
Sets the entire palette of 256 colors. You should provide an array of 256 RGB structures. Unlike set_color(), there is no need to call vsync() before this function

Code:
set_palette (my_palette);

Otherwise your colours will be messed up. Load_bmp loads the picture but doesn't set the palette for you.

2.- If you are using a hi colour or truecolour (15, 16, 24 or 32 bits) you have to specify it, like before:

Code:
set_color_depth(16); // or whatever

Then you have to tell allegro that if it loads a paletted image it should convert it to true/hi colour. In true/hi colour modes there is no palette. Each pixel has its own colour info, so no need for palettes. If you call this function:

Code:
set_color_conversion (COLORCONV_TOTAL);

at the beginning of your program, whenever allegro loads a picture from disk it will convert it to the actual pixel format before writing it to your bitmap. Don't forget it and you won't need to care about palettes. Just plug a hi/true colour mode, set the colour conversion and load your pictures. Palettes are history!
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)