Mike Caron | 21 Apr 2005 19:35
Picon
Gravatar

Re: Ohrrpgce-motherhamster.org Digest, Vol 3, Issue 13

Yes, you can. That's why I suggested the ${S#} meta-string for
textboxes. In the function that shows the text box, another function
is called which expands the meta-strings into their actual values. I
forget what the function is called, and I don't have the source open
right now, but I'm sure you can find it.

On 4/21/05, Draknight2 <at> wmconnect.com <Draknight2 <at> wmconnect.com> wrote:
> ok, how do textboxes handle hero names or numbers.  because I am positive
> you can use same principle for string output. 
> am I right? 
> _______________________________________________
> Ohrrpgce-motherhamster.org mailing list
> ohrrpgce <at> lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
> 
> 
> 

--

-- 
Mike Caron
Final Fantasy Q
http://finalfantasyq.com

TeeEmCee | 21 Apr 2005 19:43
Picon

3 new plotscript commands proposal,

I'm annoyed. Who is stalking me? I implemented experimental strings
the DAY BEFORE YESTERDAY, for a game for the "terrible game contest" :
OHR IRC chat.

define function, begin
...
300,printstring,6,0,0,0,0,15,0 # printstring (global, len, x, y, colour, bold)
301,deletestring,1,0        # delete string (id)
302,movestring,3,0,0,0      # move string (id, x, y)
303,comparestring,3,0,0,0   # compare string (globala, globalb, len)
304,copystring,3,0,0,0      # copy string (globala, globalb, len)
305,changestring,3,0,0,0    # change string (id, global, len)
306,searchstring,4,0,0,0,1  # search string (global, len, global, len)
end

I did it slightly differently. Strings stored in globals, with a
"string" displayed with the print string function, which would display
the string at the given x,y location and return the strings id in an
array which kept track of string information; most of the rest of the
functions act on the globals.

On the other hand, these sound better, except for the fact that if
strings could only be embedded in textboxs, I wouldn't be able to
print strings to the whole screen at once. So maybe I'm going to have
to stick with my implementation, because the game is due in a week,
with little chace of change. (it will be a one game engine)

On 4/22/05, Mike Caron <caron.mike <at> gmail.com> wrote:
> I was thinking, to make strings easier, is that the compiler could
> fake strings like this:
(Continue reading)

Draknight2@wmconnect.com | 21 Apr 2005 19:58
Favicon

Re: Ohrrpgce-motherhamster.org Digest, Vol 3, Issue 13

alright fellow programmers, I have done it, now you will be able to use 
strings inside a textbox, now only one question, how much string arrays you want, I 
am thinking from 0 to 255, and its going to use about 10 k of memory.  
textbox can display string up to 20 characters in size, and showstring will be able 
to use size up to 40.

showstring and clear string will be modified to use 1 arguments each, and 
build string will have 3 arguments, the additional argument will be the string 
number.

I  am going to create a patch with subversion in the next few days. and 
submit it to bugzilla.
I want to know what you think about it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.dreamhost.com/pipermail/ohrrpgce-motherhamster.org/attachments/20050421/f8cbd6d9/attachment.htm

Mike Caron | 21 Apr 2005 20:03
Picon
Gravatar

3 new plotscript commands proposal,

>:(  It worked up until I decided to spread the news. Pray tell, where
do *you* compile the OHR, TMC?

Anyway, the only problem with the wrapper is that it has no way to
tell where to stick the string. Perhaps we should combine our ideas,
and have the compiler generate something like this:

my function ("ABC")

compiles to

my function(make string buffer(65,66,67))

make string buffer would find an unused buffer and put the string in
it, then return the buffer number. Hmm, I just realised that that
could cause problems. A command can't take an arbitrary number of
arguments... It would need to be defined as "make string buffer,
32565,0,0,0,0,0,0,0,..." in order to hande many strings...

It may be processor consuming, but my method is probably best.

And, to solve the speed problem, I will propose a new block type:

group, begin
   clear string (reg)
   add ascii (reg, str[0])
   add ascii (reg, str[1])
   add ascii (reg, str[2])
   ... until the end of the string
   add ascii (reg, 0)
(Continue reading)

Mike Caron | 21 Apr 2005 20:58
Picon
Gravatar

3 new plotscript commands proposal,

Forget the group thing, I was having a brain fart. Anyway, I don't
understand what you mean by "each character in the string would
translate to dozens in the buffer"

   clear string (reg)
   add ascii (reg, str[0]) # global "reg" is set to the first character
   add ascii (reg, str[1]) # global "reg + 1" is set to the second character
   add ascii (reg, str[2]) # global "reg + 2" is set to the third character
   ... until the end of the string
   add ascii (reg, 0) # global "reg + x" is set to null, to mark the
end of the string

The only wastage I can see is that each global is two bytes, and we're
only using one. Perhaps it could be optimized to load one character
into the high byte and the next into the low byte.

Anyway, I'm wiping my OHR source directory clean and re-checking out
the code, and I am going to keep at it until I get it to compile. Even
if it means I need to dual boot dos. Nah, not that far, but you get
the idea.

On 4/21/05, TeeEmCee <teeemcee <at> gmail.com> wrote:
> I compile with QB7.1
> 
> what I meant was,
> my function ("ABC")
> compiles to my function (65,66,67)
> and
> my function (id,"ABC")
> compiles to my function (id,65,66,67)
(Continue reading)

Mike Caron | 21 Apr 2005 21:22
Picon
Gravatar

QB71

Ok, you said that you could compile with QB 7.1, correct? Do you have
a file called "bcl71enp.lib" somewhere? For unknown reasons, I have to
link this in with the rest of the files. Here's the error message I'm
getting:

FATAL DOS error in bcl71enp.LIB:
  Problem:  DOS could not find a file needed by Freelink.
  Solution: This is an error returned by the operating system (DOS).
            This file could not be found.  Check that you have
            typed the name and path of the file correctly.

If you don't have this, and don't get this error, could you send me
your copy of qbx.exe, as this is the only thing stopping me from
compiling!
--

-- 
Mike Caron
Final Fantasy Q
http://finalfantasyq.com

[Bug 53] new plotscript commands for saving and loading

http://HamsterRepublic.com/bugzilla/show_bug.cgi?id=53

------- Additional Comments From teeemcee <at> gmail.com  2005-04-22 04:56 -------
Created an attachment (id=20)
 --> (http://HamsterRepublic.com/bugzilla/attachment.cgi?id=20&action=view)
More saveslot manipulation commands + documentation

-----------------
171,saveslotused,1,1	    # returns true if a saved game exists in the
specified slot
172,importglobals,3,1,0,1024 # (slot, first, last) reads a range of globals
from a save slot
173,exportglobals,3,1,0,1024 # (slot, first, last) writes a range of globals to
a save slot
174,loadfromslot,1,1	    # loads saved game from slot
175,deletesave,1,1	    # delete (hide from load/save screen - data not
*actaully* deleted) specified slot
-----------------

I see that the patch for plotdictionary.html still looks weird, but at least it
didn't include the whole file (which was microsoft office's fault - rather
mine, for going near that thing)

--

-- 
Configure bugmail: http://HamsterRepublic.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

TeeEmCee | 22 Apr 2005 07:00
Picon

Re: QB71

Strange. I don't have a os2.exe on my computer. 

Excellent, but, what patch are you creating again?

TMC

On 4/22/05, Mike Caron <caron.mike <at> gmail.com> wrote:
> Oh? Funny, because I noticed a process named "os2.exe" flashing in and
> out of taskmanager while compiling... However, the only thing I
> changed from the original files is env-set.bat.
> 
> *5 minutes later*
> 
> Ok, I added /Lr to the command line of callbc.bat. This seems to work.
> Perhaps bc.exe is detecting my windows, and choosing protected mode?
> Who knows. I'm going to submit this patch.
> 
> On 4/22/05, TeeEmCee <teeemcee <at> gmail.com> wrote:
> > That's most strange. I need bcl71enr.lib to compile, which is the
> > reason I got James to include it in subversion. Are you sure you are
> > compiling with all the same options as callbc.bat has? The switch
> > specifies which library is needed. I don't have that one.
> >
> > QBX comes with some utilities to generate these files. Actually, just
> > looking at the help of builrtm I can see what the problem is: the p on
> > the end of bcl71enp means that you are trying to create a OS/2
> > protected mode program. Fix that up.
> >
> > TMC
> >
(Continue reading)

Bob the Hamster | 22 Apr 2005 09:52
Favicon

3 new plotscript commands proposal,

On Thu, Apr 21, 2005 at 07:50:13PM -0400, Mike Caron wrote:
> I was thinking, to make strings easier, is that the compiler could
> fake strings like this:
> 
> Let's say we have "set string(reg, str)". The compiler would turn this
> command into these commands:
> 
> clear string (reg)
> add ascii (reg, str[0])
> add ascii (reg, str[1])
> add ascii (reg, str[2])
> ... until the end of the string
> add ascii (reg, 0)
> 
> The 0 at the end to to mark the end of the string, so it'll be more
> efficient than saving the size somewhere.

No, the string registers would be ordinary quickbasic strings, so they 
would naturally store their size. No need to store it manually or add a 
terminator.

Anyway, yes. Some sort of HSPEAK-implemented shortcut syntax for 
building strings would be cool, as long as it can be done in a way that 
doesn't break compatability with existing scripts (not too badly, 
anyway ;)

Perhaps a syntax like:

  $N$line of text

(Continue reading)

Bob the Hamster | 22 Apr 2005 10:27
Favicon

Re: how textboxes handle hero names or numbers

On Thu, Apr 21, 2005 at 08:27:17PM -0400, Draknight2 <at> wmconnect.com wrote:
>    ok, how do textboxes handle hero names or numbers.  because I am positive
>    you can use same principle for string output.
>    am I right?

The code that does this is in the function embedtext in yetmore.bas

(by the way, when you reply to the list digest, don't forget to edit 
the subject-line to something other than "Re: 
Ohrrpgce-motherhamster.org Digest, Vol 3, Issue 13")

---
Bob the Hamster


Gmane