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

resource bitmaps

Discuss OrbForms Designer and PocketC Architect

Postby misterx on Wed Feb 01, 2006 8:53 am

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?
misterx
 
Posts: 32
Joined: Mon Aug 02, 2004 5:12 pm
Location: Germany

Postby exit_head on Wed Feb 01, 2006 9:24 am

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
exit_head
 
Posts: 64
Joined: Tue May 04, 2004 3:50 am
Location: USA

Postby nmc on Wed Feb 01, 2006 9:43 am

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 ;-)
nmc
 
Posts: 197
Joined: Tue May 27, 2003 8:42 pm
Location: Germany

Postby exit_head on Wed Feb 01, 2006 10:33 am

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
exit_head
 
Posts: 64
Joined: Tue May 04, 2004 3:50 am
Location: USA

Postby misterx on Wed Feb 01, 2006 2:58 pm

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()...
misterx
 
Posts: 32
Joined: Mon Aug 02, 2004 5:12 pm
Location: Germany

Postby nmc on Wed Feb 01, 2006 8:04 pm

> 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? :-)
nmc
 
Posts: 197
Joined: Tue May 27, 2003 8:42 pm
Location: Germany

Postby misterx on Tue Feb 07, 2006 5:47 pm

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?
misterx
 
Posts: 32
Joined: Mon Aug 02, 2004 5:12 pm
Location: Germany

Postby nmc on Tue Feb 07, 2006 8:51 pm

> 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.
nmc
 
Posts: 197
Joined: Tue May 27, 2003 8:42 pm
Location: Germany


Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 0 guests

cron