Commit Graph
100 Commits
Author SHA1 Message Date
Glenn Maynard 30fd6d77b4 maybe workaround g++ 3.3 weirdness 2006-10-07 08:56:12 +00:00
Glenn Maynard 82f51bc3d4 more generic type-punning helper 2006-10-07 08:17:15 +00:00
Glenn Maynard 586c1fc497 unused 2006-10-07 08:15:50 +00:00
Glenn Maynard f226138ff8 update 2006-10-07 08:06:57 +00:00
Glenn Maynard e4ca9a11c2 remove BasicType hack. With bound enums, we don't need this,
we get automatic range checking, and preferences don't become
invalid if we change enums internally.
2006-10-07 08:06:21 +00:00
Glenn Maynard 37affa93b6 simplify BoostAppPriority -> g_bNeverBoostAppPriority 2006-10-07 08:04:02 +00:00
Glenn Maynard 92e21b0c2f don't need to validate enums anymore 2006-10-07 08:00:19 +00:00
Glenn Maynard 2c99c407ce update 2006-10-07 07:58:16 +00:00
Glenn Maynard f6fbecda6d ditch RageSoundReader_Resample_Fast 2006-10-07 07:56:42 +00:00
Glenn Maynard 3bff96cec1 ditch RageSoundReader_Resample_Fast. It's not (practically) much
faster than Good, and the sound quality is worthless.
2006-10-07 07:54:53 +00:00
Glenn Maynard 4bb479a445 standard enums for some preference types 2006-10-07 07:43:18 +00:00
Glenn Maynard 44bd9f7582 fix stack imbalance 2006-10-07 07:42:25 +00:00
Glenn Maynard 0acad3b003 remove unused 2006-10-07 06:28:07 +00:00
Glenn Maynard 8d44405523 use ToString and FromString
on invalid value, default to default
2006-10-07 06:26:40 +00:00
Glenn Maynard d882f21348 make ToString and FromString templates 2006-10-07 06:21:39 +00:00
Glenn Maynard 0493bc75a9 standard enums for some preference types 2006-10-07 05:52:45 +00:00
Glenn Maynard 1bd59aef01 Invalid 2006-10-07 04:49:44 +00:00
Glenn Maynard 11c9cfc30a ElementCategory_Invalid 2006-10-07 04:45:08 +00:00
Glenn Maynard 4e83c166b9 simplify 2006-10-07 04:40:14 +00:00
Glenn Maynard de6ca466d2 more enum standardization 2006-10-07 04:39:48 +00:00
Glenn Maynard 2ce839e4eb Invalid 2006-10-07 04:25:28 +00:00
Glenn Maynard 8a4ddd1515 Invalid 2006-10-07 04:13:43 +00:00
Glenn Maynard cb746be4c3 Invalid 2006-10-07 03:43:41 +00:00
Glenn Maynard b67e57864e Invalid 2006-10-07 03:32:16 +00:00
Glenn Maynard 0e1dffeba5 simplify 2006-10-07 02:32:22 +00:00
Glenn Maynard 357f3ee135 update 2006-10-07 01:23:35 +00:00
Glenn Maynard 4b30d3552d A bizarre C++ wart wants us to declare FromStack overloads
before the ThemeMetric templates that use them.  That's broken
and unreasonable, so change this around a bit and make FromStack
(and Push) templates.

Push() takes a bit of a trick.  Some Push overloads push the
actual value: scalars (int, float), RageColor (pushes a table).
Others--most of them--push a reference to a C++ object.  We
want the scalars to have a reference parameter type, so we
don't make extra copies of things like RageColor when we push
them.  We need to pass C++ objects by pointer (we need to
push the actual object's pointer, not a pointer to a copy).
Further, pushing a scalar is a const operation, but pushing
a reference to an object is not.

To do both with the same template, we handle objects with
this slightly odd template:

template<> void LuaHelpers::Push<T*>( lua_State *L, T *const &pObject );

The actual overload (T) is eg. "Actor*"; this fits within the
general prototype, "Push(lua_State *L, const T &object)", giving
us a const reference to a (non-const) pointer to Actor, and we're
conceptually pushing the pointer.

The net effect of this is that 1: what was before compile errors
now becomes link time errors, but 2: these specializations
don't have to be in the headers (except for new ones for
Preference and BroadcastOnChange).
2006-10-07 01:22:28 +00:00
Glenn Maynard 2aa4b1a142 bind StyleType 2006-10-06 23:09:03 +00:00
Glenn Maynard 662f006c0e cleanup 2006-10-06 06:46:17 +00:00
Glenn Maynard 9826c3c298 delete
simplify; this is a map, not a multimap
2006-10-06 06:44:33 +00:00
Glenn Maynard fc2ddf5d3d unneeded 2006-10-06 06:42:30 +00:00
Glenn Maynard 6edd25f013 delete 2006-10-06 06:42:18 +00:00
Glenn Maynard ba82cc8002 m_Value -> base pointer 2006-10-06 06:38:46 +00:00
Glenn Maynard 6808723b85 XNodeValue base class, Copy() 2006-10-06 06:26:53 +00:00
Glenn Maynard 04b34020fb remove unused "type" 2006-10-06 01:18:23 +00:00
Glenn Maynard c72ae3bad7 use luaL_pushtype 2006-10-06 01:15:31 +00:00
Glenn Maynard 76dea048fc __type 2006-10-06 01:07:53 +00:00
Glenn Maynard c2a88f95cc fix enums 2006-10-06 00:46:46 +00:00
Glenn Maynard c80451fe46 fix stack imbalance 2006-10-06 00:46:06 +00:00
Glenn Maynard 72a24d459c set type 2006-10-06 00:40:02 +00:00
Glenn Maynard eeedbade1a don't set TypeIndex. Use type:Reverse(). 2006-10-05 23:15:57 +00:00
Glenn Maynard fca0a40bf8 fix comparing enum values with nil (invalid > all other enum values) 2006-10-05 23:14:38 +00:00
Glenn Maynard 02635f3653 enum helpers 2006-10-05 23:12:59 +00:00
Glenn Maynard ee2d17a64f fix loop 2006-10-05 23:10:00 +00:00
Glenn Maynard 3407b92ede bind the enum table to a methods table 2006-10-05 23:08:42 +00:00
Glenn Maynard d3c32bbc61 fix binding 2006-10-05 22:01:35 +00:00
Glenn Maynard 8d8806f5be update 2006-10-05 21:08:20 +00:00
Glenn Maynard e3a21ae5b7 script fixups 2006-10-05 20:51:13 +00:00
Glenn Maynard 6431aee91c missed: simplify 2006-10-05 20:04:14 +00:00
Glenn Maynard 47a1ab39bd add LuaHelpers::PushValueFunc 2006-10-05 19:57:07 +00:00
Glenn Maynard 2f5b401cbb fix smpackage linker error (bad dep) 2006-10-05 19:49:16 +00:00
Glenn Maynard 6112f7c925 fix smpackage linker error 2006-10-05 19:48:29 +00:00
Glenn Maynard 45c2cd369f add missing 2006-10-05 19:47:28 +00:00
Glenn Maynard 2dee2b1cf7 cleanup 2006-10-05 07:33:47 +00:00
Glenn Maynard c1cdce72aa better error message 2006-10-05 02:45:05 +00:00
Glenn Maynard f5780905df __type metamethod 2006-10-05 02:43:36 +00:00
Glenn Maynard 9affdf4b1a fix theme changing 2006-10-05 01:06:06 +00:00
Glenn Maynard be694a6f26 redundant 2006-10-05 00:50:54 +00:00
Glenn Maynard f8c8a7852e StepMania::ChangeCurrentGame calls ReadGamePrefsFromDisk;
fixes theme not changed on game change
2006-10-05 00:49:47 +00:00
Glenn Maynard 01452ecca0 split SwitchToLastPlayedGame and ReadGamePrefsFromDisk 2006-10-05 00:48:32 +00:00
Glenn Maynard cd55d57989 fix repeat 2006-10-05 00:18:55 +00:00
Glenn Maynard 66bb6ad544 fix copy 2006-10-05 00:10:18 +00:00
Glenn Maynard 430a794b31 fix copy 2006-10-04 23:42:08 +00:00
Glenn Maynard 2f3f9f6fee fix name not copied 2006-10-04 23:41:46 +00:00
Glenn Maynard db335a813f fix double-free 2006-10-04 23:06:46 +00:00
Glenn Maynard 4acc41f47c fix it used stale 2006-10-04 22:38:59 +00:00
Glenn Maynard 38b9f59b83 don't FinishStage in BeginStage 2006-10-04 02:51:32 +00:00
Glenn Maynard db3aa0d73a simplify inheritance 2006-10-04 02:44:52 +00:00
Glenn Maynard e130d73f88 DSERR_BUFFERLOST handling in DSoundBuf::GetPosition 2006-10-04 02:33:20 +00:00
Glenn Maynard 880f20b443 don't add command manually 2006-10-03 04:01:19 +00:00
Glenn Maynard cacef7b54b cause compiler error if trying to use undefined operator= 2006-10-03 02:39:17 +00:00
Glenn Maynard 2ade95f58f unneeded and not valid 2006-10-03 02:37:41 +00:00
Glenn Maynard 7988da5c68 remove DateTime binding; at least for now, keep XNode binding to basic types 2006-10-03 00:15:28 +00:00
Glenn Maynard 1a89ddfccd pointer to attributes 2006-10-03 00:07:01 +00:00
Glenn Maynard fb6bafb208 simplify 2006-10-02 23:12:18 +00:00
Glenn Maynard a9cae2253d fix compile 2006-10-02 23:11:17 +00:00
Glenn Maynard 5d6514a2c1 better debug 2006-10-02 22:54:43 +00:00
Glenn Maynard 9e4da8650f simplify 2006-10-02 22:53:32 +00:00
Glenn Maynard 83defce27b XML update 2006-10-02 22:52:57 +00:00
Glenn Maynard 65d23319f1 api update 2006-10-02 22:47:53 +00:00
Glenn Maynard 30d91df8f4 XML attribute fields and string fields are the same. Use
a type, so we don't duplicate everything for both.
2006-10-02 22:47:16 +00:00
Glenn Maynard 76af4dba2f use GetName 2006-10-02 22:42:40 +00:00
Glenn Maynard 4d2feecc35 fix compile 2006-10-02 22:42:24 +00:00
Glenn Maynard 4b26a19205 cleanup 2006-10-02 21:19:00 +00:00
Glenn Maynard 286824b22d simplify 2006-10-02 06:37:00 +00:00
Glenn Maynard 30d8823a44 allow removing without deleting (detaching) 2006-10-02 06:36:07 +00:00
Glenn Maynard 6db05d676a SetName 2006-10-02 06:34:10 +00:00
Glenn Maynard e3483ba3be use GetName, GetValue, SetValue 2006-10-02 06:26:25 +00:00
Glenn Maynard f0fe542b2f remove bool overload. It's being used instead of the RString one for string constants. 2006-10-02 06:25:28 +00:00
Glenn Maynard d188c2fd12 use GetName, GetValue 2006-10-02 06:12:42 +00:00
Glenn Maynard cad383b2ab redundant 2006-10-02 06:12:06 +00:00
Glenn Maynard 5f0e8a7167 GetName, GetValue 2006-10-02 06:02:54 +00:00
Glenn Maynard 90c5d6fe99 move XML loading and saving into XmlFileUtil
update
2006-10-02 05:56:11 +00:00
Glenn Maynard 7696cef6b0 move XML loading and saving into XmlFileUtil 2006-10-02 05:54:52 +00:00
Glenn Maynard 19e7328d78 move XML loading and saving into XmlFileUtil, reducing XNode
to a data structure
2006-10-02 05:53:56 +00:00
Glenn Maynard f8e3807996 fix AppendChild("string", RString) calls bool overload 2006-10-02 05:44:57 +00:00
Glenn Maynard a31f76e9ad allocate GameCommand as needed 2006-10-01 20:13:27 +00:00
Glenn Maynard cd905f9372 simplify 2006-10-01 07:34:55 +00:00
Glenn Maynard 57ddaa78ef remove unused fDelayRemaining 2006-10-01 07:33:24 +00:00
Glenn Maynard df8630b91b remove unused fDelayRemaining. If we want to delay a broadcast,
delay the actual broadcast and handle the timer in MessageManager,
not process the broadcast in every individual listener.
2006-10-01 07:32:53 +00:00