Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - TransBmp() query
Page 1 of 1

PostPosted: Tue Jan 06, 2004 8:34 pm
by Mikael
Can anyone tell me why the this works:

@cid "Tran";
@ver "1.0";
@dbname "Trans";
@name "Trans";
@cmd "par a Trans.prc Background.prc";
library "PToolboxLib"
main(){
SetDepth(8);
graph_on();
ClearBuf();
FastBmp(55,55,3000);//a 16 x 16 smiley
FastBmp(75,75,3001);//a 16 x 16 black square
wait();
}

but not this:

@cid "Tran";
@ver "1.0";
@dbname "Trans";
@name "Trans";
@cmd "par a Trans.prc Background.prc";
library "PToolboxLib"
main(){
SetDepth(8);
graph_on();
ClearBuf();
TransBmp(75,75,3001,3000);
wait();
}

After reading the TransBmp info dozens of times, I'm under the impression that I should be defining a black hole (3000) and laying my .bmp(3001) on top of it - or, if the index is -1, the .bmp gets put on top of the existing image or background. I've also tried that without sucess. All I get is a blank screen.
This is related to the PToolbox 'graphics.c' sample program where I noticed that both the overlay and mask are set to 5 when TransBmp is called:

//draw
TransBmp(x_pos[0],y_pos[0],5,5);
TransBmp(x_pos[1],y_pos[1],5,5);
TransBmp(x_pos[2],y_pos[2],5,5);

This confuses me. I can't imagine that the image is being drawn on top of itself, so does it then mean that 2 different images are sharing the same index?

Thanks in advance,

Mikael

PostPosted: Tue Jan 06, 2004 10:59 pm
by cable_guy_67
All Quotes are from PtoolBoxLib Docs.

from FastBmp():
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">If no bitmap database is opened, then the application .prc is file itself is searched for bitmaps. In this case the mode is "load-on-demand".<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

from TransBmp():
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Note: TransBmp only works in "lock&load" bitmap mode (see OpenBmpDb for more details on this mode).<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

I have not used it like this but what if you were to call:

@cid "Tran";
@ver "1.0";
@dbname "Trans";
@name "Trans";
@cmd "par a Trans.prc Background.prc";
library "PToolboxLib"
main(){
SetDepth(8);
graph_on();
ClearBuf();

OpenBmpDb("Trans");

TransBmp(75,75,3001,3000);//So I gather from below use (75,75,1,0)?
wait();
}

Might that turn the trick?

PostPosted: Wed Jan 07, 2004 12:20 am
by jstadolnik
TransBmp() doesn't understand resource IDs. You need to use the index of the bitmap instead, which in turn requires your bitmap database (which may be your app itself) to opened in lock&load mode with OpenBmpDb().

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm

PostPosted: Wed Jan 07, 2004 2:12 am
by Mikael
Thanks guys,
That did the trick. I see where I was going wrong now.

Mikael