>In the resource, just store your word list as a 
>list of NULL terminated strings

Hmmm...so, if I attach a ascii list of words (5-bit
encoded) and NULL terminated using PalmREZ, how would
I access the list from the program?  Can I simply get
a pointer to the resource (by ID) and use that to
access the list??

Thanks,

-Robert

>>At 11:06 2003-1-7 -0800, you wrote:
>>Yeah, that would probably work...and wouldn't be too
>>slow I guess. As I mentioned in my last message, the
>>reason that I've been trying to stay away from
>>databases and records, etc. is because I want my
game
>>to be contained within one PRC file. I don't want
the
>>word list to be a separate file from the main game.
>>There is no way (that I know of) to embed a database
>>into a PRC file and still be able to access it.

>You can add whatever kinds of resources you want to
>your app.
>
>Based on a numbering scheme where "aa" is (0 * 26) +
>0 and zz is (25 * 26) 
>+ 25, you can then have a whole series of resources
>with the same type, and 
>the prefix keyed on ID. In the resource, just store
>your word list as a 
>list of NULL terminated strings, with the prefix
>missing. You can use the 
>5-bit encoding I mentioned to make the list more
>compact. To pick a word, 
>pick a random number, use a frequency table to decide
>which bucket its in, 
>and then do a sequential search through your sublist
>to find the word.
>
>-- 
>Ben Combee <[EMAIL PROTECTED]>
>CodeWarrior for Palm OS technical lead
>Palm OS programming help @ www.palmoswerks.com 

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to