LarryG on 18/2/2009 at 23:37
No problem waiting. My C++ skills have 15 to 20 years of dust accumulated on them. The dust can stay there for a while longer and I won't mind. Besides, then I was more of an assembler and Fortran programmer than C/C++, so I would have to find and dust off a few reference volumes as well.
I was looking at the public scripts, I did not see very much internal commenting, so I was not looking forward to the decoding of someone else's logic structures. I figured that the first few weeks would be tough going until I learned the libraries. So, again, postponing that sounds like a good idea too.
LarryG on 18/2/2009 at 23:43
Quote Posted by Nameless Voice
Like I said, GCC with MingW running in CygWin.
You can use whatever you like, but that's what Telliamed and I use. If you use something else, you'll have to work out how to convert the project.
You did say that. I wasn't paying attention.
Nameless Voice on 19/2/2009 at 00:02
Quote Posted by LarryG
I was looking at the public scripts, I did not see very much internal commenting, so I was not looking forward to the decoding of someone else's logic structures.
Comments are for the weak! ;)
LarryG on 19/2/2009 at 00:12
Quote Posted by Nameless Voice
Comments are for the weak! ;)
And the forgetful. The older I get, the more I appreciate comments. I was looking at a program I wrote some 30 years ago to determine the inside from the outside of a closed boundary (I wanted to show my daughter something to do with the code, I forget exactly what), and was extremely grateful a)that it has never broken in the last 30 years of use and b) that I had commented it clearly and thoroughly, as I could no longer follow my own logic without the help that the comments provided.
Cygwin 1.5.25-15 OK or do I need to get a different version?
MinGW 5.1.4 OK?
LarryG on 19/2/2009 at 00:21
Quote Posted by Telliamed
...
Please use PublicScripts as a reference for new script modules. The source is portable and provided as GPL. Source to tnhScript is just there for morbid curiosity.
I was also wanting to read the source for convict and gen. There are a couple three routines in there that sound like they could be generalized to good effect. Are those not available?
Nameless Voice on 19/2/2009 at 01:17
No, we don't have the source code for the original scripts.
The current version of CygWin should be fine, and the installer should include the option for the relevant version of GCC and other required tools.
Telliamed on 19/2/2009 at 06:52
gen & convict scripts(
http://www.thiefmissions.com/telliamed/scripts.html)
The API that you should start with is the lg library. Mainly lg/types.h lg/scrmsgs.h and lg/scrservices.h also see IScriptManager in lg/scrmanagers.h. And there
are comments there.
All you really need to do is toss away the Public, Common, T1, T2, and SS2 sources and implement your own subclasses. Read ScriptDef.cpp for a description of the build magic that puts it all together. And change the identifying info in script.rc. You shouldn't need to mess with the rest of the skeleton.
It also helps to be comfortable with COM, even though Thief doesn't really use it, the API bears a similarity. There are plenty of books about that.
Oh, and you don't need to use GCC if you already have Visual C++ at least version 6. Or Borland/Inprise C++Builder. Portable code is portable.
LarryG on 19/2/2009 at 13:00
Quote Posted by Telliamed
Portable code is portable.
Except when it's not. :laff: In my 30+ years experience, I have seen several applications written to be "portable" which required extensive revisions when actually porting them. Somehow compiler specific language extentions crept in unintended.
LarryG on 20/2/2009 at 02:13
Quote Posted by qolelis
A crude way of doing it is to increase a QVar on TweqComplete. If you use Stop Tweq on Halt, the tweq sends TweqComplete when it's done. You would then also have to restart the clock on TweqComplete. This would only make possible "on the hour" triggers if you have hour and minute hands. If you added a hand for seconds (possibly invisible), you could get "on the minute" instead.
I suppose I only really need to stop and restart the second hand ... assuming that the lime lag between stop and restart is in hundredths of a second, there should be no need to mess with the other hands ... I would have to initialize the Qvar at the start of the game update it every minute of the game until the player figures out that the solution is to set the clock to a specific time.
How I would like this to work is the first frob of the clock starts a fast forward. A second frob stops fast forward and unlocks the door (and makes an unlocking sound itself) if the Qvar is equal to the right value (maybe +/- 5 minutes to allow for all sorts of imprecision). I supose I could try it ... A script would be easier if one existed to read joint positions ...
R Soul on 6/3/2009 at 14:48
If a script changes significantly from one .osm version to anther, it may be necessary for authors to make changes to whichever objects use that script. The problem is that they might not be able to remember which objects use it, or they didn't keep a list. Would it be possible to write a script which either tells us which objects use a specified script, or gives us a list of all objects and which scripts they use?