Commit Graph

18924 Commits

Author SHA1 Message Date
Steve Checkoway be00b88919 Partial revert of byte swapping macros, just copy them out of the header. Simplify and fix CHECK macro. 2005-12-30 14:54:43 +00:00
Steve Checkoway e9d4fb0cdf machine/endian.h is getting picked up on OS X with gcc 4.0 but no endian.h exists. 2005-12-30 14:30:39 +00:00
Steve Checkoway e6ff11e0b0 Remove file. 2005-12-30 13:29:31 +00:00
Steve Checkoway 3c8f18483b Make ASSERT_M and FAIL_M into safe function-like macros. 2005-12-30 13:26:22 +00:00
Steve Checkoway ada5f4f00f Use ASSERT like a function. 2005-12-30 13:19:40 +00:00
Glenn Maynard 7cc18a89cd provide a default localizer 2005-12-30 08:35:33 +00:00
Glenn Maynard 6db0cf831a no longer needed 2005-12-30 08:30:29 +00:00
Glenn Maynard 0062b24e2f RageException is a very low-level helper (usable by any code). Eliminate
StepMania.cpp dependency.
2005-12-30 08:23:56 +00:00
Glenn Maynard 79c00ae191 Don't evaluate MESSAGE twice in FAIL_M. Reduces the code
cost of assertions.
2005-12-30 08:01:47 +00:00
Glenn Maynard 000a896258 use implicit initialization of POD types to simplify SubscriptionManager,
so it's not essentially a templated singleton type (old version will be
phased out)
2005-12-30 07:59:59 +00:00
Glenn Maynard 6e6fcb746a "XToThemedString" uses theme metrics. We don't want DateTime
(used by XmlFile) to depend on THEME, so use localized strings.

We may *always* want LocalizedString.  One reason we may not
is if we start using the DynamicThemeMetric paradigm more.
That evaluates expressions when they're used, which allows
metrics to change dynamically.  However, we may really not
want to do that for localized strings, since it would complicate
translation, so we may want to restrict localized strings to
pre-evaluation anyway.
2005-12-30 07:24:30 +00:00
Glenn Maynard b9f3b4a790 if localizer already registered on construction, refresh 2005-12-30 07:14:21 +00:00
Glenn Maynard 622a6e6698 return ref, to allow returning it from functions that also return ref 2005-12-30 07:12:52 +00:00
Glenn Maynard 9225fa0196 SMPackage includes lua now. Merge DateTimeLua back into DateTime. 2005-12-30 06:20:41 +00:00
Glenn Maynard b6cda2fc47 simplify 2005-12-30 06:12:31 +00:00
Glenn Maynard 65336b7e5c partial test fix 2005-12-30 06:08:57 +00:00
Glenn Maynard 9de5ac05a1 compile fix 2005-12-30 05:48:45 +00:00
Glenn Maynard f939b76f49 i dumb 2005-12-30 05:38:20 +00:00
Glenn Maynard d67288d8a3 simplify 2005-12-30 05:38:02 +00:00
Glenn Maynard 6b26684c8a Don't SaveMappingsToDisk on game change. We save explicitly
when we change mappings.
2005-12-30 04:42:24 +00:00
Glenn Maynard 395b06b5c0 fix comment 2005-12-30 04:36:53 +00:00
Glenn Maynard 8bab05a98a fix weird dependency 2005-12-30 04:25:41 +00:00
Glenn Maynard 61c5ab9cb1 unued 2005-12-30 04:22:04 +00:00
Glenn Maynard 2570959691 cleanup 2005-12-30 04:20:12 +00:00
Glenn Maynard aa2ca76c17 prefs out of PrefsMan 2005-12-30 04:19:55 +00:00
Glenn Maynard 166b57b497 the game loop boosts priority; it's now its job to unboost it, too 2005-12-30 04:10:43 +00:00
Glenn Maynard b078d742ba unneeded include 2005-12-30 04:07:06 +00:00
Glenn Maynard 21da00170d unneeded includes 2005-12-30 04:06:45 +00:00
Glenn Maynard 0330792ab6 unneeded include, fix compile 2005-12-30 04:06:00 +00:00
Glenn Maynard b61ab59e03 use HOOKS->AppHasFocus() 2005-12-30 04:00:05 +00:00
Glenn Maynard c0a86d6c44 use HOOKS->SetHasFocus 2005-12-30 03:59:10 +00:00
Glenn Maynard fcdb6602ab Move focus handling from StepMania.cpp to ArchHooks. Arch-specific
code calls HOOKS->SetHasFocus when focus is lost or regained; user
code calls HOOKS->AppHasFocus as needed.  This moves the very
simple task of remembering focus to ArchHooks, and removes a
few annoying dependencies on StepMania.cpp.  (That's the highest-
level code there is, so very few things should depend on it.)

The original design of HOOKS is to be a place where portable
code calls to do platform-specific things, not to be a place
for nonportable code to call to do generic things.  These
state calls (SetHasFocus, SetToggleWindowed, SetUserQuit) don't
quite fit that.  But there's currently no better place to put
these, and they're just as low-level, so it's not really a
layering violation.  Hmm.

(This also eliminates GameLoop's dependency on StepMania.cpp.  Keeping
GL.cpp independent of SM.cpp is helpful.  It's not as useful to
split apart two files, if the two files are cross-dependent anyway;
you still have to know how both files work in order to understand
either of them.)
2005-12-30 03:57:01 +00:00
Glenn Maynard f06fd4b416 No input driver should ever send a button pressed event without later
sending a corresponding release event.  This results in "stuck
keys" in InputFilter's image of the devices.  We've worked around
this by forcibly releasing all keys when focus is lost, but it's
still a bug in the input driver.  Fix this, by releasing devices
when we discard events.
2005-12-30 02:30:23 +00:00
Glenn Maynard fd072a7da5 FAIL for "impossible" cases where we want a trace; not Throw 2005-12-30 01:15:37 +00:00
Glenn Maynard 4a66ba6267 cleanup 2005-12-29 19:38:58 +00:00
Glenn Maynard e8b9863052 static 2005-12-29 19:34:28 +00:00
Glenn Maynard 3bbd5cd612 cleanup includes 2005-12-29 19:21:27 +00:00
Glenn Maynard 1f1f4a9b69 move out of Screens into Data Structures (which has inadvertently
become "everything else", but better than Screens)
2005-12-29 19:20:49 +00:00
Glenn Maynard 05fc1ac307 includes 2005-12-29 19:16:25 +00:00
Glenn Maynard cea50ab97c header cleanup 2005-12-29 18:33:57 +00:00
Glenn Maynard cdd516fd74 Eliminate SCREEN_WIDTH/HEIGHT from RDisplay. It's up to the
user code to pass the desired camera space dimensions to
LoadMenuPerspective (normally done by Screen).  SDimensions.h
is high-level.
2005-12-29 18:33:03 +00:00
Steve Checkoway 118297bdd5 Add Debug build configuration. 2005-12-29 11:59:46 +00:00
Steve Checkoway 8d70bcdbf4 Lookup the bundle identifier and the version number at runtime. Simplify logic (slightly). 2005-12-29 11:54:54 +00:00
Steve Checkoway 0e366eef75 Fix compile and warnings. 2005-12-29 11:36:20 +00:00
Steve Checkoway bc22d83f6f Cleanup. 2005-12-29 11:35:52 +00:00
Steve Checkoway 9d4719c112 Fix crash if Data/splash.png is not found. 2005-12-29 11:35:10 +00:00
Steve Checkoway 7dd0014caa Section 3.6.2 clause 2 of the c++ standard basically says we cannot rely on the order of initialization. 2005-12-29 11:15:28 +00:00
Steve Checkoway 811e488bb5 Try _very_ hard to ensure that y is a compile time constant by forcing gcc to inline. For some reason if I have __attribute__((always_inline)) without the inline keyword, it does not inline correctly. 2005-12-29 10:00:43 +00:00
Glenn Maynard c580fc15ef remove old comment; EnterPerspectiveMode is gone 2005-12-29 09:20:40 +00:00
Glenn Maynard 9c5863a751 unneeded 2005-12-29 09:16:33 +00:00