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

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

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

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

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

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112
[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 - Tapwave Zodiac Resolution
Page 1 of 1

PostPosted: Sun Jan 09, 2005 3:31 am
by zboot
Hi,

I'm new to PocketC and I'm working on developing an 8-way scroller using animated sprites. I don't have the cash for Codewarrior so I'm looking at PocketC as a very cheap alternative. I'm currently getting up to speed on drawing and displaying bitmaps before I start to move on to the real sprite work, and I can't get the thing to draw in the native mode or use setscale to switch into a 320x320 mode. I created an image using Paint then pilrc and par to embed it into a resource.

Here is my code:
Code: Select all
//mytest.c

library "PToolboxLib"

main()
{
   int num, nWidth, nHeight, nDepth, nTrans, nComp, id;

   num = OpenBmpDb("my_bmp"); // attempt to open bitmap

   if (!num)
     {
       alert("BITMAP not found");
       return;
     }
 
   if (SetDepth(16)== 0) // attempt to set depth to 16bit
   {
      alert("Depth not supported by device");
      return;
   }
   
   drawnative(1); // draw using devices true pixels, not scaled to 160x160
   graph_on(); // switch to graphics form      

   FastBmp(0,0,1000); // draw my_bmp starting at coords 0,0

   waitp(); // wait for pen event before exiting
}
 


My bitmap was created in Paint as a 320x320 pixel image, saved as 16bit. What displays on my screen is 160x160 of my original image. In other words, only 1/4 of the image. Its not that the scaling is wrong. . it just only displays a fourth of what I expect.

PostPosted: Sun Jan 09, 2005 5:13 am
by jstadolnik
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">
I don't have the cash for Codewarrior so I'm looking at PocketC as a very cheap alternative.
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

Use PODS (the PalmOS Developer Suite from http://www.palmsource.com). It's like Codewarrior but free. PocketC is too slow for managing multiple or complex sprite behavior.

Joe

BTW: Likely your bitmap is way over the 65Kbyte size limit for palmOS resources. You'll have to split it up into pieces. Also make sure you are using the DENSITY keyword in PilRC correctly.

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

PostPosted: Sun Jan 09, 2005 6:04 am
by zboot
this is my rcp file:
BITMAPCOLOR16K ID 1000 "my_img.bmp" COMPRESS DENSITY 144
am i missing somthing?

PostPosted: Sun Jan 09, 2005 1:15 pm
by jstadolnik
If you are running PilRC through PDE, you may be missing errors generated by PilRC. If you are using PDE, try running PilRC by itself in a dos or bash shell. This will show any error or warnings that PilRC generates.

Also, it looks like the DENSITY keyword only works when using the bitmap family format (example from PilRC manual):

BITMAP ID 1003
COMPRESS
BEGIN
BITMAP "bmp-1.bmp" BPP 1
BITMAP "bmp-4.bmp" BPP 2 DENSITY 72
BITMAP "bmp-4.bmp" BPP 4 DENSITY 72
BITMAP "bmp-8.bmp" BPP 8 DENSITY 72
BITMAP "bmp-16.bmp" BPP 16 DENSITY 72
BITMAP "bmp-8x.bmp" BPP 8 NOCOMPRESS DENSITY 108
BITMAP "bmp-8d.bmp" BPP 8 NOCOMPRESS DENSITY 144
END

Finally, make sure that the bitmap generated is not over 65k in size, otherwise it won't hotsync (note: compression will allow larger bitmaps to fit under this 65k size limit).

Joe

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

PostPosted: Sun Jan 09, 2005 2:35 pm
by zboot
Hi,

Thanks Joe for the help. I redid the rcp file using BITMAP instead of BITMAPCOLOR16K and set the BPP myself. This time, my image appears exactly as I wanted.

I suppose this is the section to talk about this. I've downloaded PODS. I guess I'll give that a try. For some reason, I feel more confident programming in lightweight languages. The only problem is, they are all inherently very slow. I'll probably do a lot of initial playing around on PocketC and then start moving over to PODS once I start throwing my zodiac down the stairs because it can run stuntcar extreme and yet cannot render more than 1 fps with my prog 8)