Glenn Maynard
f9496f96d9
remove another specialized "parse and evaluate string"
2006-10-29 20:52:25 +00:00
Glenn Maynard
ff2b6f697c
PrepareExpression only used in one place and simple; merge down
2006-10-29 20:48:02 +00:00
Glenn Maynard
6b240f51ab
revert. Self-consistency over blind emulation; no rationale was given
...
for this change. (I'm sort of inclined to remove this entirely and do
something new, though ...)
2006-10-29 03:58:41 +00:00
Glenn Maynard
da024345f3
cleanup
2006-10-27 05:53:23 +00:00
Glenn Maynard
a5edb172bf
use --
2006-10-23 21:24:25 +00:00
Glenn Maynard
42583a63d5
remove bFirstParamIsString
2006-10-23 21:13:51 +00:00
Glenn Maynard
6636b13eb7
remove queuecommandm hack
2006-10-23 21:04:07 +00:00
Glenn Maynard
99a26fe6bc
remove queuemessage hack
2006-10-23 21:02:17 +00:00
Glenn Maynard
7a912fc728
remove effectclock hack
2006-10-23 20:59:10 +00:00
Glenn Maynard
7d0ca2a0ce
quote effectclock arg yourself
2006-10-23 20:58:40 +00:00
Glenn Maynard
891c7ddf47
Theme metrics are Lua expressions. If you want a comment inside
...
them, use "--". Allowing "#" breaks "#FF0000", and "//" breaks URLs.
2006-10-23 20:56:48 +00:00
Glenn Maynard
6327074f99
remove comment hacks
2006-10-23 20:54:53 +00:00
Glenn Maynard
e246824ce3
remove ugly RunAtExpressionS
2006-10-23 20:40:32 +00:00
Glenn Maynard
42a729012e
remove unused
2006-10-23 20:34:03 +00:00
Glenn Maynard
915f587d21
don't eval here. This dates back to when commands were
...
actually parsed with Commands; if you really want to eval
a GameCommand, eval the whole string: Choice1="screen,"..f()
2006-10-23 20:33:32 +00:00
Glenn Maynard
e5c216c8f0
remove unused (way too many little custom ways of loading Lua scripts)
2006-10-23 20:25:20 +00:00
Glenn Maynard
0ebc4a9900
header cleanup
2006-10-23 20:18:28 +00:00
Glenn Maynard
3e959745e1
remove unused
2006-10-23 20:13:45 +00:00
Glenn Maynard
e76a9c8965
remove parent parameter. Use self:GetParent().
2006-10-23 09:14:27 +00:00
Glenn Maynard
c65a15f2f1
simplify
2006-10-23 08:45:33 +00:00
Glenn Maynard
c955bde20c
iterator for lists
2006-10-23 08:43:19 +00:00
Glenn Maynard
3f1d7684bb
use ConvertValue
...
if(n == 1), not if(1 == n)
2006-10-20 09:49:58 +00:00
Glenn Maynard
352ad4843d
fix up goofy error checking
2006-10-20 09:47:24 +00:00
Glenn Maynard
04b1490b51
faster, more reliable error checking
2006-10-20 09:43:56 +00:00
Glenn Maynard
43a9f7b451
simplify
2006-10-20 09:35:38 +00:00
Glenn Maynard
f2e89da415
cleanups
2006-10-20 00:22:16 +00:00
Glenn Maynard
cd3f228338
covariant Copy()
2006-10-20 00:17:51 +00:00
Glenn Maynard
7a95f5da5b
covariant Copy()
2006-10-20 00:01:18 +00:00
Glenn Maynard
9bc489ab05
remove VC6 project
2006-10-19 23:30:33 +00:00
Glenn Maynard
8e8f0e192c
EHa is "catch catches Windows exceptions". Use standard exception handling.
2006-10-18 20:24:25 +00:00
Glenn Maynard
9279081723
remove old backwards compatibility
2006-10-18 20:19:51 +00:00
Glenn Maynard
626c415c4d
move assert
2006-10-18 20:11:11 +00:00
Glenn Maynard
508aaa2857
remove unused
2006-10-18 20:02:26 +00:00
Glenn Maynard
001a57c2e1
exchange one nonportable API for another, since newer Linux kernels changed their mind
2006-10-18 19:48:20 +00:00
Glenn Maynard
f7f21e2b8c
Replace PRNG with a standard MT.
...
RandomGen r; r(); now generates [0,2^31-1] on 32-bit platforms,
not [0,2^31-2]. No longer uses MAX_INT, so the default behavior
doesn't depend on the size of an int.
RandomInt no longer generates a float and truncates it. That
limited the values that could be returned to those that fit in
a 32-bit float.
Remove NR code. It's not free.
This code is not threadsafe. Locking access would kill performance.
The old code wasn't, either. I think most symptoms would be
innocuous enough to not worry about.
2006-10-18 02:28:06 +00:00
Glenn Maynard
08ca0d7721
hide RandomFloat(seed) interface
...
hide randseed
2006-10-18 01:46:15 +00:00
Glenn Maynard
697baec3c8
don't use RandomFloat(int*) interface; do this directly, since it
...
really does expect something like an LCG
2006-10-18 01:04:34 +00:00
Glenn Maynard
15d6f3b18f
fix popping; note position can depend on the column
2006-10-18 01:03:00 +00:00
Glenn Maynard
82be487b07
iiiii
2006-10-17 22:24:16 +00:00
Glenn Maynard
dfaaa18a03
s[s.size()] is probably always going to work, but probably isn't actually valid
2006-10-17 21:41:55 +00:00
Glenn Maynard
d8a75ce90e
only one of sPath and sFullTitle may be set
2006-10-17 09:02:13 +00:00
Glenn Maynard
b30163e157
private
2006-10-17 08:58:58 +00:00
Glenn Maynard
0ade73be87
note PCRE license
2006-10-17 08:58:26 +00:00
Glenn Maynard
c7dff72292
PCRE 4.5 relicensed to standard BSD, like later versions
...
(with permission from Philip Hazel)
2006-10-17 08:34:03 +00:00
Glenn Maynard
99678eb50f
PlayerNumber
2006-10-17 07:54:04 +00:00
Glenn Maynard
ab4e4a39a4
fix PCH
...
fix folder nesting
2006-10-16 03:28:40 +00:00
Glenn Maynard
260ce8a472
allow coroutine.corunning to return the main thread
...
http://lua-users.org/lists/lua-l/2006-09/msg00751.html
2006-10-15 21:01:34 +00:00
Glenn Maynard
84dc84627b
fix clean shutdown on abort (dtor order problem)
2006-10-15 20:50:27 +00:00
Glenn Maynard
d491ae1af8
stash colors manually for now; havn't decided on a generic way to pass
...
parameters to actor loading
2006-10-15 09:30:31 +00:00
Glenn Maynard
1d5e21c778
old comment
2006-10-15 08:29:26 +00:00
Glenn Maynard
cea3b4ef5e
remove <Command> children. This was only used to generate
...
command names on the fly. If you need that, use Lua, eg.:
Actor.Quad {
[s .. "Command"] = cmd(x,10)
}
2006-10-15 08:28:11 +00:00
Glenn Maynard
3d7f268dae
"Optional" attrib unused
2006-10-15 08:25:11 +00:00
Glenn Maynard
abc973eec7
simplify
2006-10-15 08:18:50 +00:00
Glenn Maynard
2cede5a421
for cases where we take a number as a boolean, accept a boolean
...
false as false (to transition away from numbers)
2006-10-15 08:17:35 +00:00
Glenn Maynard
3c2d96054d
convert to Lua; this one creates several actors cleanly, and uses upvalues
2006-10-15 08:03:18 +00:00
Glenn Maynard
e3f3adc963
cleanup
2006-10-15 07:37:50 +00:00
Glenn Maynard
2ae28fb758
fix every top-level directory is scanned for courses
2006-10-15 07:30:58 +00:00
Glenn Maynard
84edde11b8
simplify
2006-10-15 07:16:57 +00:00
Glenn Maynard
df90e4f4c2
simplify
2006-10-15 07:15:40 +00:00
Glenn Maynard
a6b000a81b
don't think this was meant to be merged out
2006-10-15 07:13:41 +00:00
Glenn Maynard
cb26942e45
no backslashes in XML/Lua
2006-10-15 06:46:15 +00:00
Glenn Maynard
27524421e1
don't use backslashes in redirs
2006-10-15 06:44:39 +00:00
Glenn Maynard
329e2ea4a1
Type -> Class
2006-10-15 06:01:44 +00:00
Glenn Maynard
16ee8fec3a
IsRegisteredClass
2006-10-15 05:58:54 +00:00
Glenn Maynard
70cebc91e1
IsRegisteredType -> IsRegisteredClass
2006-10-15 05:58:27 +00:00
Glenn Maynard
68064ec6aa
Always use a real type with Def; don't say "Def.Layer". If you don't
...
know the type you're using, you should be using LoadActor.
2006-10-15 05:56:30 +00:00
Glenn Maynard
61e58cd51f
bind IsRegisteredType
2006-10-15 05:54:50 +00:00
Glenn Maynard
d38897a6fd
This code creates actors, then loads nodes with their parameters
...
later. Make this less of a special case: load the node normally,
and check that the resulting actor is the wanted type.
2006-10-15 05:53:26 +00:00
Glenn Maynard
116db99a92
The "Def.Type { }" syntax is for defining actors by type,
...
like ActorUtil::Create. Most of the time, use LoadActor,
which is for loading files by filename, like ActorUtil::MakeActor.
(If you're creating "a Model with these parameters", use Def.Model.
If you're just loading "this other filename, whatever it is",
use LoadActor.)
2006-10-15 05:51:23 +00:00
Glenn Maynard
852de9484b
ComboGraph -> GraphDisplay
2006-10-15 05:37:35 +00:00
Glenn Maynard
8e34463f78
assert
2006-10-15 05:31:44 +00:00
Glenn Maynard
5a3a5a926f
save before commit
2006-10-15 05:08:29 +00:00
Glenn Maynard
6a8fb25435
convert to Lua
...
This doesn't actually need to be two files anymore. Previously, XML
forced us to split actors apart at a finer level than was natural. This could
be merged into a single file easily now, but I've left it as two for now for
demonstration and testing purposes.
2006-10-15 05:06:31 +00:00
Glenn Maynard
b0e5b201e3
move actor definition stuff into ActorDef.lua
...
handle loading other definitions
2006-10-15 05:02:58 +00:00
Glenn Maynard
68db5dff42
proper error messages, and return nil on error
2006-10-15 04:59:48 +00:00
Glenn Maynard
54698735cd
don't bother asserting here; states commonly still active when aborting from a dialog
2006-10-15 04:49:18 +00:00
Glenn Maynard
01d6504058
on GetAttrPath where the file doesn't exist and we ignore the error, return false as if the attribute didn't exist
2006-10-15 04:01:12 +00:00
Glenn Maynard
f0227238a5
instead of assuming png, and returning a bad filename, return false
2006-10-15 03:59:24 +00:00
Glenn Maynard
7962c4c739
maybe not, but it doesn't matter
2006-10-15 03:56:46 +00:00
Glenn Maynard
f3ad2fc57c
remove unused
2006-10-15 03:54:53 +00:00
Glenn Maynard
9e89f2acdb
ActorUtil::GetAttrPath does this
2006-10-15 03:44:11 +00:00
Glenn Maynard
285b1db112
debug.traceback in a more natural format for me
2006-10-15 02:55:21 +00:00
Glenn Maynard
32e6fe6198
license
2006-10-15 02:53:11 +00:00
Glenn Maynard
95cf160912
usable loadfile/dofile
2006-10-15 02:52:04 +00:00
Glenn Maynard
2af845a248
ActorUtil::ResolvePath
2006-10-15 02:42:33 +00:00
Glenn Maynard
4be14b7f50
bind "lua.ReadFile"
2006-10-15 02:35:33 +00:00
Glenn Maynard
c8a8572a21
Allow yielding the Lua engine. This fixes a long-standing limitation
...
with Lua bindings: they couldn't read from disk, or render, or do anything
else potentially time-consuming, because that would hold the Lua lock,
preventing other threads from using it.
2006-10-15 01:58:36 +00:00
Glenn Maynard
c186d03028
remove unused
2006-10-15 01:50:13 +00:00
Glenn Maynard
0833c198e3
SetCurrentSong(nil) is valid
2006-10-15 01:47:22 +00:00
Glenn Maynard
2478ec0873
scattered ActorUtil::ResolvePath calls unneeded
2006-10-15 01:46:23 +00:00
Glenn Maynard
4ebd0192db
ActorUtil::ResolvePath in ActorUtil::GetAttrPath
2006-10-15 01:45:33 +00:00
Glenn Maynard
9f207942b6
use LuaHelpers::DeepCopy
2006-10-15 01:43:13 +00:00
Glenn Maynard
10b96b08b8
LuaHelpers::DeepCopy
2006-10-15 01:40:11 +00:00
Glenn Maynard
f7bb9fe3a4
change DeepCopy(table) to DeepCopy(from,to)
2006-10-15 01:36:50 +00:00
Glenn Maynard
6a0d5b1f73
wasn't ready for that transition yet ...
2006-10-15 01:31:15 +00:00
Glenn Maynard
ac22c5015f
XToString -> XToString2
2006-10-15 01:26:52 +00:00
Glenn Maynard
6f93fca60b
no params
2006-10-15 01:23:00 +00:00
Glenn Maynard
72b59c1405
pass pParentActor
2006-10-15 01:21:54 +00:00
Glenn Maynard
f4dc9ddf25
sName is a file now, not a dir
2006-10-15 01:20:33 +00:00
Glenn Maynard
fe2b5f8e17
fix error case
2006-10-15 01:17:30 +00:00