Commit Graph
100 Commits
Author SHA1 Message Date
Glenn Maynard 8d6a2c54dd fix loading JOY_BUTTON mappings from disk 2006-01-07 06:28:56 +00:00
Glenn Maynard 16b998705f That won't work. Preferences register themselves on creation, so
PrefsMan can iterate over them (to load and save), so preferences
must be created on startup, not first use.
2006-01-04 23:04:07 +00:00
Glenn Maynard b734b602d2 force TypeName arrays for XToString to be an array of const char*, not CString 2006-01-04 22:30:51 +00:00
Glenn Maynard 8ed46bd67f update 2006-01-04 22:27:18 +00:00
Glenn Maynard abdb2b160d fix broken autoconf test 2006-01-04 18:59:45 +00:00
Glenn Maynard b2cec2d787 build fix 2006-01-04 18:09:39 +00:00
Glenn Maynard 4b92224743 lame fix for Linux build for now 2006-01-04 18:03:42 +00:00
Glenn Maynard 6a5b7540cc this should not be static 2006-01-04 18:02:25 +00:00
Glenn Maynard b5414c435c fix linux build 2006-01-04 18:01:34 +00:00
Glenn Maynard e24076f744 build fix 2006-01-04 17:51:43 +00:00
Glenn Maynard 37af3d7b37 build fix 2006-01-04 17:46:29 +00:00
Glenn Maynard c0e6e08918 fix warnings 2006-01-04 05:17:36 +00:00
Glenn Maynard 831c4860f5 revert this for now. We do FAIL_M(s()), where s() returns a CString; doing this
causes the return value to go out of scope, and the char* to be invalid.
2006-01-01 05:48:06 +00:00
Glenn Maynard f10898b806 Oops. We started setting the theme's expected coordinate space
in Screen, by calling SetFOV to make ActorFrame do LoadMenuPerspective.
That broke screen backgrounds, which are rendered outside of any
screen, so they always used 640x480 (the default).
2006-01-01 03:47:02 +00:00
Glenn Maynard 0c841acbd3 remove VC7 library 2006-01-01 02:53:14 +00:00
Glenn Maynard b774714e7f Remove debugging DLLs. I can't think of why they'd be needed. We
compile all libraries as "Release Multithreaded" (no CRT debug
libraries), even in debug builds, to avoid the linking mess it causes.
2006-01-01 02:35:16 +00:00
Glenn Maynard 8174e0b629 merge RageUtilLua 2005-12-31 06:52:04 +00:00
Glenn Maynard 47978e8275 merge 2005-12-31 06:46:31 +00:00
Glenn Maynard 8689b087f8 Static globals are still globals, and the global qualifier seems more useful than a static one. (don't want to start with the multiple-qualifiers business, eg 'sg_'; that gets ugly fast, and doesn't really help anything) 2005-12-31 06:19:54 +00:00
Glenn Maynard a692d9f58d cleanup 2005-12-31 06:16:22 +00:00
Glenn Maynard 8652d9e3b9 LastSeenMemory -> StepMania 2005-12-31 05:07:05 +00:00
Glenn Maynard d8eac51039 move IgnoredMessageWindows to Dialog, rename to IgnoredDialogs 2005-12-31 05:03:26 +00:00
Glenn Maynard f435983996 IPreference stores preferences, but knows nothing about loading or
saving them; that's up to PrefsManager.

Treat IPreference as a simple data holder, with simple facilities for
looking them up by name, converting to/from strings, and storing to/from
an XNode, but with no application-specific code to save to disk.  This
can be used alone as a way for code to configure things internally, even
for uses that have no notion of storing user preferences (eg. unit tests),
and other programs can use it to store preferences in entirely different
ways (SMPackage could use it to store to the registry).  PrefsManager is
layered on top, to implement StepMania's particular use of Preference
(saving and loading INIs), but isn't needed for Preference to be useful.

This also makes Preference only use XNode, not the more specialized IniFile.

(One piece is missing: several low-level places, eg. Dialog, want to set
a preference and write it to disk immediately.  The only way to do that
is to have access to PREFSMAN.  FIXME.)
2005-12-31 04:59:56 +00:00
Glenn Maynard 7c2220b403 CrashHandler::ForceCrash 2005-12-31 04:42:24 +00:00
Glenn Maynard 515134e584 unused 2005-12-31 04:19:53 +00:00
Glenn Maynard c9ec1d251f cleanup 2005-12-31 04:11:10 +00:00
Glenn Maynard 2120a39d2a Fix dependency: Crash.cpp should not depend on GraphicsWindow. 2005-12-31 04:09:56 +00:00
Glenn Maynard 0e599ca582 make debug_crash private 2005-12-31 04:02:51 +00:00
Glenn Maynard 4d97933c43 move into namespace 2005-12-31 04:00:41 +00:00
Glenn Maynard 644801396c move globals into namespace 2005-12-31 03:56:25 +00:00
Glenn Maynard a4716e3ecf cleanups 2005-12-31 03:32:14 +00:00
Glenn Maynard 502bd70521 static 2005-12-31 03:29:11 +00:00
Glenn Maynard d454d09298 This code isn't worth it. It's only used for one driver. It's
mostly useful for pointing casual users to drivers, but any URLs
we give them will just go out of date, and 404s don't help people.
It's also too heavyweight to be done in ArchHooks; aim to not use
anything in it that we don't want to always include.

(I'm sort of undecided about this. This definitely needs to be out
of HOOKS; it could be moved to GraphicsWindow.  It's potentially
useful, in theory, but it'd be a major hassle to maintain and always
be incomplete.  Since it's only used for one ancient card and has
never been used for anything else, I'm just removing it for now.)
2005-12-31 03:26:18 +00:00
Glenn Maynard 6f7a4418d7 cleanup 2005-12-31 03:05:15 +00:00
Glenn Maynard 418bce60a8 SoundDrivers into RageSoundManager 2005-12-31 02:35:49 +00:00
Glenn Maynard 037b3c8ac0 doesn't exist 2005-12-31 02:20:33 +00:00
Glenn Maynard 757fdf0795 move InputDrivers into RageInput 2005-12-31 02:20:03 +00:00
Glenn Maynard 45d3c944af move movie driver pref into arch.cpp 2005-12-31 02:13:39 +00:00
Glenn Maynard 0066776403 move lights driver pref into LightsMan 2005-12-31 02:06:57 +00:00
Glenn Maynard e2bd376410 remove PrefsManager::GetPreferenceByName 2005-12-31 02:00:37 +00:00
Glenn Maynard 2255a72086 use IPreference::GetPreferenceByName 2005-12-31 01:59:52 +00:00
Glenn Maynard f4570700fa build fix 2005-12-31 01:40:24 +00:00
Glenn Maynard d7daf00e8a fix -r argument 2005-12-31 01:36:29 +00:00
Glenn Maynard 2f03572ef8 cleanup 2005-12-31 01:29:59 +00:00
Glenn Maynard 76e55c2f14 PrefsMan and Preference depend on each other. PrefsMan is big, and
depends on some higher level code.  Make Preference stand-alone, so
code that only has its own preferences can be used without PrefsMan.
2005-12-31 01:26:29 +00:00
Glenn Maynard aac313fdd3 cleanup 2005-12-31 00:48:59 +00:00
Glenn Maynard 5316ffdecc move some preferences to where they're used 2005-12-30 19:46:10 +00:00
Glenn Maynard f4278bf86a prototypes 2005-12-30 19:36:25 +00:00
Glenn Maynard 2128cc180a unneeded 2005-12-30 19:29:40 +00:00
Glenn Maynard 75d2dfadd9 cleanup 2005-12-30 19:12:10 +00:00
Glenn Maynard 2084896f7d RageSoundUtil::Attenuate 2005-12-30 19:04:18 +00:00
Glenn Maynard 08dd174e5c RageSoundManager::AttenuateBuf -> RageSoundUtil::Attenuate
comment
2005-12-30 19:03:09 +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
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
Glenn Maynard 02cdc08486 Nothing else uses these, and we don't even bother exporting them
to Lua.  Remove them to eliminate an SDimensions.h dependency.
2005-12-29 08:49:54 +00:00
Glenn Maynard bbaf375a33 forgot this was stored here. Not sure if it's better for the AR to be stored here, or if ScreenDimensions::GetScreenAspectRatio should be moved to a RDisplay. After all, the dimensions of the screen (the AR preference) are RageDisplay's domain, not the theme's (just as GetThemeAspectRatio belongs to the high-level theme code and not RDisplay). 2005-12-29 08:44:51 +00:00
Glenn Maynard 6855fa9b2c yuck, need GetScreenAspectRatio for ASPECT_AUTO. better approach coming ... 2005-12-29 08:41:18 +00:00
Glenn Maynard 933669684b reduce use of ScreenDimensions in RDisplay 2005-12-29 08:35:04 +00:00
Glenn Maynard c7a3cbc5fb missed a piece 2005-12-29 08:14:52 +00:00
Glenn Maynard 580ff0716a Centering is a user preference, to adjust the screen, not a theme
setting.  It's usually tied to the screen resolution (will usually
need readjustment anyway if the resolution changes).  Treat the
values as pixels, as if we were using glViewport to do this.
(Reduces dependencies on ScreenDimensions.h, and we don't need
to worry about calling ChangeCentering when the theme changes.)
2005-12-29 08:12:51 +00:00
Glenn Maynard 336e3be92b call base (even though it happens to be a no-op right now) 2005-12-29 07:45:06 +00:00
Glenn Maynard eb50b6fc7e unneeded 2005-12-29 07:44:38 +00:00
Glenn Maynard 1f58f31a51 clarify 2005-12-29 07:35:23 +00:00
Glenn Maynard b704036996 refactor so StringToDeviceButton doesn't iterate over every button 2005-12-29 05:10:11 +00:00