[Ohrrpgce] SVN: james/5025 Replace hardcoded instances of 4095 (and one 4096) with the new const ma

Seth Hetu seth.hetu at gmail.com
Tue Feb 7 23:35:14 PST 2012


Thanks for the explanation; that makes more sense now. Yeah, 64kb
should suffice until arrays come around.
-->Seth
PS: Yes, by get_global I meant readglobal


On Wed, Feb 8, 2012 at 3:10 PM, Ralph Versteegen <teeemcee at gmail.com> wrote:
> On 8 February 2012 19:57, Seth Hetu <seth.hetu at gmail.com> wrote:
>> Is it completely out of the question to have game developers specify
>> their own globals count (or do it automatically in custom) and then
>> just have "get_global()" return a default value if it's out of bounds?
>>
>> -->Seth
>
> 64KB ought to be enough for anybody
>
> ... because allowing a large number of global variables is just a
> quick fix until we have arrays.
>
> By get_global, I assume you mean readglobal, not a command to allocate
> more globals at runtime... I really don't want to do that. I don't see
> any benefit to making the limit variable, because there won't be a
> benefit to ever raising the limit again, assuming that I actually get
> the new script interpreter done this year as planned!
>
>> On Wed, Feb 8, 2012 at 2:53 PM, Ralph Versteegen <teeemcee at gmail.com> wrote:
>>> On 8 February 2012 15:19,  <subversion at hamsterrepublic.com> wrote:
>>>> james
>>>> 2012-02-07 18:19:44 -0800 (Tue, 07 Feb 2012)
>>>> 402
>>>> Replace hardcoded instances of 4095 (and one 4096) with the new const maxScriptGlobals
>>>> Taking care to only update the ones that are actually relevant to globals ;)
>>>>
>>>> There is one 4095 in customsubs.bas in cond_grabber()
>>>> that I was a little puzzled about, so I left it unchanged with a comment,
>>>> I would appreciate it if you could take a look at it, tmc, since you
>>>> know cond_grabber so much better than I
>>>
>>> The "future proofing" refers to raising the maximum tag number above
>>> (max global) 4095 in the future. Conditions can test global variable
>>> values (not used anywhere yet, of course ... I think).
>>>
>>>> ---
>>>> U   wip/const.bi
>>>> U   wip/customsubs.bas
>>>> U   wip/game.bas
>>>> U   wip/hsinterpreter.bas
>>>> U   wip/hspeak.exw
>>>> U   wip/moresubs.bas
>>>> U   wip/savegame.rbas
>>>> U   wip/yetmore.bas
>>> _______________________________________________
>>> Ohrrpgce mailing list
>>> ohrrpgce at lists.motherhamster.org
>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>> _______________________________________________
>> Ohrrpgce mailing list
>> ohrrpgce at lists.motherhamster.org
>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org



More information about the Ohrrpgce mailing list