Commit Graph
100 Commits
Author SHA1 Message Date
Steve Checkoway 2b8a7f4a14 Silence warning with g++ 4. (Somehow it can't tell that this must exit before the end of the function. I suspect it's the goto.) 2006-10-03 06:29:32 +00:00
Steve Checkoway 24a147c74b Fix warning. 2006-10-03 03:37:31 +00:00
Steve Checkoway aeee3d9758 Declare HoldNoteScore. 2006-10-02 01:32:06 +00:00
Steve Checkoway d2b9ea130d Separate declaration from definition. This way, if LuaXType( Foo ) is used without a preceding LuaDeclareType( Foo ) the compiler will complain. 2006-10-02 01:31:24 +00:00
Steve Checkoway 78d3e04936 For some reason, explicitly instantiating struct EnumTraits<X> isn't enough. When defining the static members, it needs template<> as well. 2006-10-02 00:49:11 +00:00
Steve Checkoway 2ead045397 Something is already pulling this in in ScreenEdit.h. 2006-10-02 00:40:22 +00:00
Steve Checkoway a1c30f9211 Type punned pointers break strict-aliasing rules. I'm not sure this ENUM_CLAMP works very well since generally you want to clamp between 0 and Num_Foo but it requires casting both rvalues. Hmm... 2006-10-02 00:28:31 +00:00
Steve Checkoway ca0f34d5a8 End with a new line. 2006-10-01 14:58:19 +00:00
Steve Checkoway 40212d0a01 Simplify. Done. 2006-10-01 14:53:03 +00:00
Steve Checkoway 01fb4540f3 Simplify. 2006-10-01 14:51:50 +00:00
Steve Checkoway 65007cf941 ctor that takes the name. 2006-10-01 14:46:28 +00:00
Steve Checkoway b22b7972aa Simplify. 2006-10-01 14:24:19 +00:00
Steve Checkoway b885a19f89 Simplify. 2006-10-01 14:22:15 +00:00
Steve Checkoway b7ce93ffad Simplify. 2006-10-01 14:02:24 +00:00
Steve Checkoway f73100705b Simplify. 2006-10-01 13:55:01 +00:00
Steve Checkoway 01cd66bd0f DISP_OPT -> XMLDisplayOptions. 2006-10-01 13:07:20 +00:00
Steve Checkoway 6651be1203 Always true. 2006-10-01 13:00:20 +00:00
Steve Checkoway 08155c351a Simplify. 2006-10-01 12:52:00 +00:00
Steve Checkoway d778966fc6 The existence of an error is signaled by error_string being nonempty. 2006-10-01 12:39:50 +00:00
Steve Checkoway c89900e2c1 Always true. 2006-10-01 12:29:14 +00:00
Steve Checkoway 9f9f61579c Unused. 2006-10-01 12:22:28 +00:00
Steve Checkoway 45a5b01c87 Unused. 2006-10-01 12:16:03 +00:00
Steve Checkoway fbe0626a68 Cleanup. 2006-10-01 12:09:19 +00:00
Steve Checkoway 49ebe752f2 Add namespace and schema. 2006-10-01 11:46:41 +00:00
Steve Checkoway 49645f302c Cleanup xsl. Use templates and proper indentation so that this is actually human readable now. 2006-10-01 08:56:25 +00:00
Steve Checkoway 9a936c8aaf More hacked to get xsl to display the enums. 2006-10-01 07:36:35 +00:00
Steve Checkoway 2f2b286b45 Use quotes around string constants and enum values since they are strings in lua. 2006-10-01 07:35:59 +00:00
Steve Checkoway fcbe0609c3 Move miss combo calculations into the ScoreKeeper. 2006-10-01 04:02:28 +00:00
Steve Checkoway 9df54e925c DEFAULT_FAIL. 2006-10-01 04:01:37 +00:00
Steve Checkoway 2af7999542 Fix crash. 2006-10-01 03:48:07 +00:00
Steve Checkoway 3323cfb9dd Simplify. 2006-10-01 02:33:52 +00:00
Steve Checkoway 4d931a6577 Cleanup. 2006-10-01 02:32:23 +00:00
Steve Checkoway c99a463f62 Cleanup. 2006-10-01 01:59:35 +00:00
Steve Checkoway da9fa5af22 Old comment. 2006-10-01 01:52:29 +00:00
Steve Checkoway 15dd5a69e5 Clean up, move code out of the header. 2006-10-01 01:48:41 +00:00
Steve Checkoway c404b1ccb3 Initialize. 2006-09-30 09:27:34 +00:00
Steve Checkoway 77ad6633ee Removed. 2006-09-30 08:57:25 +00:00
Steve Checkoway 8cbb19e890 Add files. 2006-09-30 04:05:09 +00:00
Steve Checkoway 0acebabd01 We're instantiating the class, not the class members. 2006-09-30 04:03:42 +00:00
Steve Checkoway 307b94e934 Fix compile. 2006-09-30 04:01:34 +00:00
Steve Checkoway 406a8dbc0d Cannot pass non-POD through ... 2006-09-30 01:18:41 +00:00
Steve Checkoway d4d5daea7c We have virtual methods, we need virtual dtors. 2006-09-30 01:12:13 +00:00
Steve Checkoway e5441dfec7 Lua header. 2006-09-28 06:28:46 +00:00
Steve Checkoway 5bda054b50 Fix enum. 2006-09-28 06:28:14 +00:00
Steve Checkoway 082290e746 Unused. 2006-09-28 06:27:57 +00:00
Steve Checkoway 19b88841a3 Bah. This is really two commits. I thought I already did the first and I'm too tired to try to separate them (I wrote a long commit message explaining the first one already.)
1. When iterating over the tables using lua_next(), using lua_tolstring() can modify the key which confuses lua_next(). Instead push the value onto the top of the stack and Pop() the string from there.

2. Handle integer, string, and float constants. Handle the enum values by looking for FooIndex and then reading the global table Foo.

Stylesheet updating coming later this week.
2006-09-26 10:33:32 +00:00
Steve Checkoway c89f3f9335 Don't bother getting the max. Just go until we find a nil element, that's all the # operator is going to do. 2006-09-26 09:35:15 +00:00
Steve Checkoway 488d166ba4 Deprecated. Note that lua_objlen() doesn't actually return the number of elements in the table. It simply evaluates the new # operator which will return the first integer n such that t[n] is not nil and t[n+1] is nil. Note that this means that this is only useful for tables which have no "holes" and integer indexes (starting at 1).
If you really want the table size, you have to walk the whole table (using next() or pairs() in Lua or lua_next() in C).
2006-09-26 09:32:14 +00:00
Steve Checkoway 003454ccfd Deprecated. Note that lua_objlen() doesn't actually return the number of elements in the table. It simply evaluates the new # operator which will return the first integer n such that t[n] is not nil and t[n+1] is nil. Note that this means that this is only useful for tables which have no "holes" and integer indexes (starting at 1).
If you really want the table size, you have to walk the whole table (using next() or pairs() in Lua or lua_next() in C).
2006-09-26 09:13:11 +00:00
Steve Checkoway 9914f50ade Safe macros. (Probably only needed if the type of argument is not known at compile time and accessed with something other than a constant.) 2006-09-26 05:50:40 +00:00
Steve Checkoway c56d379860 Stop uglifying the ternary operator. 2006-09-26 05:44:44 +00:00
Steve Checkoway 6fe6baa241 Unused. The purpose of this connivence function as stated in the comments (which isn't quite what it did) is exactly what RunExpression does. 2006-09-26 05:35:24 +00:00
Steve Checkoway 4a545228a9 Simplify. 2006-09-26 05:34:18 +00:00
Steve Checkoway b722c135c6 Add file. 2006-09-26 04:31:54 +00:00
Steve Checkoway d1d56a999c Missing header. 2006-09-26 04:07:22 +00:00
Steve Checkoway 68dd073282 Pasting "PlayMode_" and "Index" does not make a valid preprocessing token. 2006-09-26 04:06:03 +00:00
Steve Checkoway 880a97aa3b Remove old lua library build. 2006-09-25 10:56:16 +00:00
Steve Checkoway c8cd4cfc6e Add lua target. 2006-09-25 10:55:54 +00:00
Steve Checkoway 4d41a8de08 Add files. 2006-09-25 02:14:52 +00:00
Steve Checkoway 9facfc2731 Dialogs can be thrown before INPUTFILTER is constructed. 2006-09-25 02:14:41 +00:00
Steve Checkoway 56186f2bee Missing strings. 2006-09-25 01:59:10 +00:00
Steve Checkoway 1345a2cd5f LogType -> string. Done. 2006-09-24 03:57:40 +00:00
Steve Checkoway c8a2b7601c LogType -> string. 2006-09-24 03:57:26 +00:00
Steve Checkoway b1a6f94d69 This was breaking encapsulation. The api is more or less the same. The only purpose for breaking the error message apart like that is it allows a consistent look to the messages. (Other files coming soon.) 2006-09-24 03:56:04 +00:00
Steve Checkoway 883b45a8df Maybe these should stay as strings. For now just make them work. 2006-09-23 19:19:41 +00:00
Steve Checkoway a4aa69b148 Remove ThemeMetricEnum. Since all metrics are evaluated as lua, use lua integer constants. 2006-09-23 07:21:26 +00:00
Steve Checkoway 930af9db5c Add file. 2006-09-22 06:58:14 +00:00
Steve Checkoway 1598deda7f Fix crash if lua_tostring() returns NULL. 2006-09-21 09:42:08 +00:00
Steve Checkoway 3943ba773c Fix crash if lua_tostring() returns NULL. (Maybe not accepting NULL in RString wasn't a good idea.) 2006-09-21 07:33:51 +00:00
Steve Checkoway 6ad2454400 Cleanup. 2006-09-21 07:25:38 +00:00
Steve Checkoway 175ae8cac4 I ended up not using this. 2006-09-21 07:19:13 +00:00
Steve Checkoway 93a5184cfd Simplify. Now FromStack() is unused except for Pop(). 2006-09-21 07:12:49 +00:00
Steve Checkoway d7e64dc979 Simplify. PushStack was only calling Push and possibly generating a function for each enumerated type which in the end only called Push. Rename PopStack -> Pop to be symmetric with Push. 2006-09-21 07:06:18 +00:00
Steve Checkoway 064f147f84 Unneeded. 2006-09-21 06:52:39 +00:00
Steve Checkoway a70080c094 Static. 2006-09-21 06:52:13 +00:00
Steve Checkoway 01c4e531d9 Remove files. 2006-09-21 03:54:03 +00:00
Steve Checkoway 2e927c3636 Simplify. 2006-09-21 01:51:27 +00:00
Steve Checkoway c9e0e7e51d Don't return NULL. 2006-09-20 00:04:19 +00:00
Steve Checkoway 6016440012 Don't return NULL. 2006-09-19 23:52:34 +00:00
Steve Checkoway ea1e408b24 Simplify. 2006-09-19 04:47:09 +00:00
Steve Checkoway 32c209a322 Cleanup. 2006-09-19 04:44:59 +00:00
Steve Checkoway 4a81774221 Remove empty duplicate. 2006-09-18 10:30:24 +00:00
Steve Checkoway 7f6ccd1688 Cleanup. Don't return NULL when RString is expected. 2006-09-18 10:04:05 +00:00
Steve Checkoway b1ccf2e5ff The correct syntax for theme metrics is "class::name". 2006-09-17 05:37:42 +00:00
Steve Checkoway 941dac27b3 Fix memory leak and possible buffer overflow. CFStringGetMaximumSizeForEncoding() doesn't mention anything about NULL terminators so add one to protect against that. 2006-09-17 05:14:20 +00:00
Steve Checkoway a5ecf51f8a Fix linux compile (not tested). 2006-09-17 03:56:28 +00:00
Steve Checkoway 6cd7373a95 Change other languges. We should probably use correct quotes for others languages. 2006-09-17 03:32:46 +00:00
Steve Checkoway af711bb8d5 update string 2006-09-17 03:26:58 +00:00
Steve Checkoway 6ea2a41b00 Cleanup RageException::Throw(). Do not use ssprintf() inside of Throw() and do not pass it bare error messages. Use RageException::Throw( "%s", sError.c_str() ); instead. Be consistent with quoting file names "%s" and theme metrics as "%s : %s". Try to make them complete English sentences when possible. 2006-09-17 01:19:19 +00:00
Steve Checkoway c9fa49b7ba Use UserLog. Also clean up RageException::Throw() calls. 2006-09-17 01:14:39 +00:00
Steve Checkoway 79446f6ef5 Theme element and theme metric. 2006-09-17 01:13:40 +00:00
Steve Checkoway e2a56902c9 Check the format. 2006-09-16 23:20:13 +00:00
Steve Checkoway 420846a012 oops, missed one. 2006-09-16 19:56:00 +00:00
Steve Checkoway ba8b31a1cf Simplify at the top then cleanup the breaks. 2006-09-16 19:28:44 +00:00
Steve Checkoway 4e7afa70fb Use the course song index, not the stage index (which is always STAGE_1 rather than STAGE_ONI for some reason). 2006-09-16 19:15:36 +00:00
Steve Checkoway 6051deb2a8 Comment. 2006-09-16 03:59:02 +00:00
Steve Checkoway 951741153b Only flush the directory into which we're writing. 2006-09-16 03:44:47 +00:00
Steve Checkoway e7e034949b Only flush the modified dir. Why do we need to flush this at all? 2006-09-16 03:39:11 +00:00
Steve Checkoway 1b35499f4e Only flush the directories of the NoteSkins in question. 2006-09-16 03:34:44 +00:00
Steve Checkoway 335f6a4790 Only flush songs/courses/edits directories. 2006-09-16 03:31:27 +00:00