On Sun, Aug 31, 2008 at 2:49 AM, James Paige <[EMAIL PROTECTED]> wrote:
> On Sun, Aug 31, 2008 at 02:10:58AM +1200, Ralph Versteegen wrote:
>> On Sat, Aug 23, 2008 at 3:50 AM, James Paige <[EMAIL PROTECTED]> wrote:
>> > As you may have already noticed, I have started on a major battle code
>> > refactoring quest. I plan to:
>> >
>> > * subify every single gosub in bmod.bas
>> > * make bmod and bmodsubs both compile with OPTION EXPLICIT
>> >
>> > In this process I am also gathering various stray data into TYPEs. I am
>> > doing this in many small commits, which I am making a big effort to test
>> > completely.
>> >
>> > If I am clobbering anybody's uncommited battle patches, I apologize,
>> > and I offer my assistance in fixing any patches that conflict. If
>> > anybody has a conflicting working version of bmod.bas or bmodsubs.bas,
>> > just send me a diff against the last non-conflicting revision (which
>> > I am guessing will probably be 2134)
>> >
>> > ---
>> > James Paige
>>
>> Wow, great! The textbox cleanup is going to be very nice too.
>>
>> It looks like my changes to the textbox editor don't conflict at all,
>> because they are specially to text editing (word wrapping).
>
> Cool.
> How do you plan on making word wrapping work?

I'm still treating a textbox as 8 lines of at most 38 characters. When
in word wrapping mode (which can be turned off but I think should be
on by default) several effects will occur:
-hitting enter splits a line (if there's room - the lines below are
moved down 1 to make room, or a blank line is overwritten)
-typing off the end of a line creates a new one (if there's room...)
-backspace/delete at the beginning/end of a line concatenates and then
resplits the lines (this can actually cause 3 lines to be needed
though!)
Plus changes to controls for moving about.
I also added an auto-indent mode.

This is pretty good, but this doesn't behave as you expect in a few
cases such as adding to the middle of a paragraph, because stuff that
falls off the line isn't automatically prepended to the next one. Now
I'm wondering whether I should instead store lines internally to any
length as long as they fit in the box. But this will help only in the
cases where the user is editting something they just typed (unintended
hard newlines won't appear), not when editing old text.
But it's not so serious a problem because you can manually delete
unwanted newlines.

Since we wanted to add font/colour/display effect tags anyway and
those will require more space, and all your cleanup is very enabling,
what about changing the text format to a string with user-placed
newlines?

>
>> How many of the couple dozen remaining unrenamed/moved variables
>> should still be moved into types? Are you STILL planning to subify
>> every GOSUB? 19 to go :)
>
> Yes, I will be going back to battle mode soon and cleaning up the rest
> of the gosubs, I just got sidetracked to the textbox stuff when I
> noticed that tte TextBox UDT already existed.
>
> ---
> James
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce@lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
_______________________________________________
Ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to