delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/03/21:47:36

From: "Pavlos" <trash24379 AT usa DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: beginner allegro question
Date: Wed, 4 Aug 1999 03:03:16 +0300
Organization: An OTEnet S.A. customer
Lines: 45
Message-ID: <7o8012$bh5$1@newssrv.otenet.gr>
References: <7o7un5$q8v$1 AT trex DOT antw DOT online DOT be>
NNTP-Posting-Host: dram-a02.otenet.gr
X-Trace: newssrv.otenet.gr 933725026 11813 195.167.113.225 (4 Aug 1999 00:03:46 GMT)
X-Complaints-To: abuse AT otenet DOT gr
NNTP-Posting-Date: 4 Aug 1999 00:03:46 GMT
X-Newsreader: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Delbeke P. wrote in message <7o7un5$q8v$1 AT trex DOT antw DOT online DOT be>...
>1 ) Can anyone tell me more on how to display
>my_nice_povray_rendered_targa_file(tm) in *true color* ?
>
>I already have this :
>
>...
>  BITMAP *thing;
>...
>  if (set_gfx_mode(GFX_VESA2L, 640, 480, 0, 0) != 0) {
>      printf ("uh-oh");
>      exit(1);
>   }
>
>  thing = load_tga("thing.tga",pal);
>  set_palette(pal);
>  draw_sprite(screen, board, 0, 0);
>
>  readkey();
>...
>...
>
>but that looks rather 8bbp-ish.
>
Use set_color_septh()  before set_gfx_mode. Also, the palette
pal is useless for high-true color bitmaps and modes.
You should remove set_palette(pal).
Remember that some graphics cards support only 32 bit, while
others only 24 bit.

>And yet another silly question  :  If I put this tga-fila in a data-file, I
>do :
>  thing = (RLE_SPRITE *)data[THING_TGA].dat;
>... but I don't know how to get the palette right.
>
>
What palette are you trying to get? Isn't your bitmap true color?
In case you have a 8bit bitmap in a datafile and want to
load it's palette, you have to put the palette in the datafile also.

Pavlos



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019