[Ohrrpgce] SVN: james/5776 Add a pair of functions to return the current resolution

Ralph Versteegen teeemcee at gmail.com
Thu Apr 11 08:51:05 PDT 2013


On 12 April 2013 03:31, James Paige <Bob at hamsterrepublic.com> wrote:
> On Fri, Apr 12, 2013 at 03:18:15AM +1200, Ralph Versteegen wrote:
>> On 12 April 2013 03:01,  <subversion at hamsterrepublic.com> wrote:
>> > james
>> > 2013-04-11 08:01:07 -0700 (Thu, 11 Apr 2013)
>> > 57
>> > Add a pair of functions to return the current resolution
>> > ---
>> > U   wip/common.bi
>> > U   wip/common.rbas
>>
>> This may escalate quickly!
>
> I don't doubt it for a moment :)
>
>> BTW, my intention was that the resolution would be conveyed whereever
>> possible by the dimensions of the root slice. (This pair of functions
>> is still useful, of course)
>
> Yes. I made those functions for something I am working on in custom. I
> was not planning on exposing plotscripting commands for them.

Whatever you're doing in Custom, I wonder whether it can be done using
slices instead ;)
(But of course game and editor resolution should be independent)

Actually, to be honest I am a little concerned about using slice
collections too pervasively in Custom for GUI elements which change a
lot depending on editor state, as won't slice manipulation code be
lengthy and less clear compared to drawing stuff directly where
variability is typical which simple, eg. "IF x THEN textcolor y,0". On
the other hand I suppose there are also things which will be
simplified.

I wouldn't know how to organise the map editor. A single slice
collection with separate children for each editing mode, or separate
collections? Assuming the earlier, should stuff like the position of
the tool buttons be copied into each mode-specific child, or separate
with some code to specialise visibility and position as necessary?

>> Hmm... UpdateScreenSlice updates the slice of ScreenSlice, which is a
>> special slice that I completely forgot that we had (it's not in the
>> slice tree), but it's only used in the slice editor. It ought to
>> update the root slice too, and be called from more places including
>> when playing a game. Might as well call it every tick from Game's main
>> loop, to support the !+R debug key.
>
> Ooh, interesting. Yes, that does seem important.
>
> ---
> James
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org



More information about the Ohrrpgce mailing list