Author Topic: Text Wrapper  (Read 6472 times)

0 Members and 1 Guest are viewing this topic.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6266
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Text Wrapper
« on: July 08, 2009, 09:49:29 pm »
well since I haven't really done much except release this on ticalc, I'll release this here, this is one of my past projects, a text wrapper for the graphscreen
I'll post the code later, and maybe add it to the downloads later, but I just wanted some people to test this and let me know how good they think it is
/e

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Text Wrapper
« Reply #1 on: July 08, 2009, 10:01:33 pm »
i dont really get what it does, could u explain in further details what it does?

Offline Iambian

  • Coder Of Tomorrow
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 739
  • Rating: +216/-3
  • Cherry Flavoured Nommer of Fishies
    • View Profile
Re: Text Wrapper
« Reply #2 on: July 08, 2009, 10:22:46 pm »
Looking good. DJ Omnimaga, the purpose of the routine seems to be to allow text wrapping inside of a textbox placed anywhere on the screen. The routine would be used in conjunction with a box drawing routine. That way, you wouldn't have to worry about figuring out how much text would go on a single line. Not only will this ease programming woes, but it would also save space for each line delimit you had.

Do correct me if I'm wrong (horribly).

The next logical step is word-wrapping! The inString() function is *very* useful for that task, though it's been forever since I've done anything like that. The most recent thing I've ever done with it involved writing an installer for RoL3...

Keep up teh good works.

EDIT: Also, if I was right about the whole boxy thing, I think it might've done the screenshot justice to have a box to show with it. I've written... DANG! I actually HAD a word-wrapping routine stuffed somewhere in my backups! The backup that TiLP ate up >.<
« Last Edit: July 08, 2009, 10:26:07 pm by Iambian »
A Cherry-Flavored Iambian draws near... what do you do? ...

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6266
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Text Wrapper
« Reply #3 on: July 08, 2009, 10:56:16 pm »
lol, yes you are right, it is for wrapping text in a box...the only reason I didn't have a box was because I didn't have a way to make the box with the wrapper, and I had made the box a while ago, but hmm, I should do that
how big was your routine? mine is just over 300 bytes
/e

Offline Iambian

  • Coder Of Tomorrow
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 739
  • Rating: +216/-3
  • Cherry Flavoured Nommer of Fishies
    • View Profile
Re: Text Wrapper
« Reply #4 on: July 09, 2009, 07:17:12 pm »
I think the routine was around 800 bytes to perform box drawing, text wrapping, AND have a little moving arrow at the bottom of the screen to indicate that there's more text. The only problem is that it could only handle line lengths of 16 chars wide. Something about the math that went wild.
A Cherry-Flavored Iambian draws near... what do you do? ...

Offline noahbaby94

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 585
  • Rating: +29/-24
    • View Profile
    • My blog
Re: Text Wrapper
« Reply #5 on: July 09, 2009, 07:23:20 pm »
This may interest you it's similar except it separates it word for word.
http://www.unitedti.org/index.php?act=attach&type=post&id=2621
Press down to continue.
That's what she said!!!

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6266
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Text Wrapper
« Reply #6 on: July 09, 2009, 07:23:34 pm »
ah :/
well mine just clears the box, or displays the text, the wrapping only wraps letters, not words, but with a few more lines of code I'm sure I could make it work
I played around with the code so that clearing will make a box around the area instead, since I can use Celtic III for the one I'm using for my game, so it works better.
speaking of which, I need to get to work on it....
also, my text wrapper is currently at 265 bytes (the one I am using for my game)...and this is with the change of code for the clearing, and with a few changes to make it work properly

-

oh yeah I forgot to mention in my first post that this wrapper will correctly wrap lowercase w's and m's (they are once pixel bigger then normal letters) as well as spaces and other smaller symbols

EDIT: nice ninga there noah, I'll take a look thanks :)
/e

Offline Iambian

  • Coder Of Tomorrow
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 739
  • Rating: +216/-3
  • Cherry Flavoured Nommer of Fishies
    • View Profile
Re: Text Wrapper
« Reply #7 on: July 09, 2009, 07:29:24 pm »
If only you were using ASM, I'd throw a bone and give you a full-screen wordwrapping routine that correctly wraps any text you throw at it. It's the same one being used in CaDan.

But, no. I haven't the energy to do something like that in BASIC. Another idea for Celtic III. (edit: currently low on caffeine)
A Cherry-Flavored Iambian draws near... what do you do? ...

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6266
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Text Wrapper
« Reply #8 on: July 09, 2009, 07:32:25 pm »
lol, well thanks, my program does do full screen btw, and I can probably use this prog that noah gave me...in fact I printed off the code, and I'm going to modify it now
/e