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 - resource bitmaps
Page 1 of 1

PostPosted: Wed Feb 01, 2006 8:53 am
by misterx
if i have a resource db created with par and pilrc, and copied this db to internal memory or cars, i can use db.getres() or file.getres() to get the bitmaps. but how can i draw them?

PostPosted: Wed Feb 01, 2006 9:24 am
by exit_head
dont think you can use resource bitmaps with PCA. i ran into this problem myself recently. think i might have a solution...mabey.

you might be able to do it if you declair bitmap "blah" at compile and then using rsrcedit(or BIRD) delete it. and THEN load it internally (as you said) with the same resource ID. dont know, havent tried this...

but like i said, im working on another way. using my own "image format" if it works(in a resonably fast way, that seems to be the problem) ill share it here.

Nate

PostPosted: Wed Feb 01, 2006 9:43 am
by nmc
Why doing things so complicated?
Just add a bitmap to your OrbForms project, then fill in the "resource" attribute and thats it :-)
Or, if you want to "load" the bitmaps at runtime (rather than at compile time): open the resource-db in onstart(); in your forms, place dummy bitmaps where you want to display images; in onopen(), do a "formBitmap.id = <id you used in the resource db>"

Life can be so easy ;-)

PostPosted: Wed Feb 01, 2006 10:33 am
by exit_head
not always, and the hard way is sooooo much more interesting :)
im making a game and its going to need more then 10,000 images. so i dont have a choice. also its something i grew to apriciate when using pocketC. the problem is that its taking .89 of a second to draw the bitmap(using pixel) i really need it to be faster...hmmm

PostPosted: Wed Feb 01, 2006 2:58 pm
by misterx
i'm programming a game too... but it has already 3,5M and 90% of it are bitmaps, so i want to put them on the memory card and use them with file.getres()...

PostPosted: Wed Feb 01, 2006 8:04 pm
by nmc
> i'm programming a game too... but it has
> already 3,5M and 90% of it are bitmaps,
> so i want to put them on the memory
> card and use them with file.getres()...
AFAIK PalmOS doesnt support rsc-usage outside of internal memory.
Did you see that pilRC supports compressing the bitmaps?

What type of game is it? RPG? :-)

PostPosted: Tue Feb 07, 2006 5:47 pm
by misterx
no... a strategy game... can i import the resource into the internal memory when i need it, and then delete it from the internal memory if i don't need it anymore?

PostPosted: Tue Feb 07, 2006 8:51 pm
by nmc
> no... a strategy game...
Sounds interesting, too :-)

> can i import the resource into the internal
> memory when i need it, and then delete it
> from the internal memory if i don't need it
> anymore?
Of course you can, the import() function works just fine for that;
Use import() and db.open() in onstart and db.deldb() in onstop().

I would suggest that you split the rsc into several smaller parts for faster loading into internal memory.