diff --git a/Docs/Changelog_SSCformat.txt b/Docs/Changelog_SSCformat.txt index 60301667a0..8f7253432e 100644 --- a/Docs/Changelog_SSCformat.txt +++ b/Docs/Changelog_SSCformat.txt @@ -9,6 +9,10 @@ change to JSON, but it is unsure if this will be done. Implement .ssc at your own risk. ________________________________________________________________________________ +[v0.53] - Wolfman2000 +* Added Fakes to the RadarCategories. Start parsing between versions. +* Always write out the latest version to cache and hard drive. + [v0.52] - AJ * Add CHARTSTYLE tag to NoteData section. @@ -17,4 +21,4 @@ ________________________________________________________________________________ * Limit VERSION tag to two decimal places. [v0.5] - Wolfman2000 -* Initial MSD-based version. \ No newline at end of file +* Initial MSD-based version. diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 261a0a1edb..7b4cefe479 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -13,6 +13,32 @@ _____________________________________________________________________________ sm-ssc v1.2.3 | 2011022? -------------------------------------------------------------------------------- +20110228 +-------- +* Add Fakes to the RadarCategories. [Wolfman2000] +* [ScreenEdit] Display the number of Lifts and Fakes in a stepchart in the + editor. These use metrics, so the lines can be made empty in themes that + require them. [Wolfman2000] +* [ArrowEffects] Allow for dizzy hold heads. Again, enable at your own risk. + [Wolfman2000] +* [StepsDisplay] Allow for displaying the chart artist in a separate field. + This defaults to false for the moment. [Wolfman2000] +* [PlayerOptions, NoteDataUtil] Add transform mods for removing lifts and + fakes from the Notedata. This mods can disqualify of course. [Wolfman2000] + +20110227 +-------- +* [PlayerState] The old GetPlayerOptions() binding is now GetPlayerOptionsString(). + There is a new GetPlayerOptions() binding that gets the PlayerOptions object, + which has a GetNoteSkin() binding (and hopefully more in the future). [AJ] + +20110226 +-------- +* [ScreenOptionsToggleSongs] The structure of this screen has now changed. + Before, it contained the entire list of songs. Now, the main page + (ScreenOptionsToggleSongs) holds the groups, and a sub-page + (ScreenOptionsToggleSongsSubPage) holds the songs in each group. [AJ] + 20110225 -------- * Add lifts and fakes to all Pump noteskins. [Daisuke Master, Wolfman2000] diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index d68bff46a5..5f99159de5 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -412,6 +412,7 @@ ScoreDisplay=ScoreDisplay Scoreboard=Enables scoreboard ScoringType=Defines which scoring method to use. Scroll=Scroll +Select Group=Toggle Songs in this Group. Select Profile=Choose a profile Server=Start Local Server Servers=Servers @@ -442,6 +443,7 @@ Test Lights=Test the responsiveness of connected lights. TextureColorDepth=Choose the color depth of textures. 32 bit textures use more memory, but look nicer. Theme=Choose from this list of installed theme packs. TimingWindowScale=Increase this value to cause your steps to be judged more strictly (i.e. shrink the timing window). +Toggle Song=Toggle Song Turn=Turn Transfer Edits to USB=Transfer Edits to USB Transfer Edits from USB=Transfer Edits from USB @@ -474,7 +476,8 @@ Play=Play the course. Save=Save the course. Edit Course=Edit Course contents. Shuffle=Shuffle the songs around. - +# +GamePrefDefaultFail=Immediate fail causes a player to die when their life bar reaches 0. ImmediateContinue allows you to continue playing afterwards. [OptionNames] 0=0 0.25x=0.25x @@ -656,6 +659,8 @@ NoRolls=No Rolls NoQuads=No Quads NoRecover=No Recover NoStretch=No Stretch +NoLifts=No Lifts +NoFakes=No Fakes None=None Normal=Normal Num Songs=Num Songs @@ -1034,7 +1039,8 @@ Max Minutes=Max Minutes Play=Play Edit Course=Edit Course Shuffle=Shuffle - +# +GamePrefDefaultFail=Default Fail Type [PaneDisplay] Steps=Steps Holds=Holds @@ -1242,6 +1248,8 @@ Hands=Hands Holds=Holds Mines=Mines Rolls=Rolls +Lifts=Lifts +Fakes=Fakes Beat 0 offset=Beat 0 offset Preview Start=Preview Start Preview Length=Preview Length diff --git a/Themes/_fallback/Scripts/02 Utilities.lua b/Themes/_fallback/Scripts/02 Utilities.lua index 31f5384db0..616b14ea21 100644 --- a/Themes/_fallback/Scripts/02 Utilities.lua +++ b/Themes/_fallback/Scripts/02 Utilities.lua @@ -123,6 +123,22 @@ function table.deviation( t ) end return offset end +-- See if this exists +function table.search( t, sFind ) + for i=1,#t do + if t[i] == sFind then + return true + end + end +end +-- Retreive the entry that has this +function table.find( t, sFind ) + for i=1,#t do + if t[i] == sFind then + return i + end + end +end function round(val, decimal) if (decimal) then diff --git a/Themes/_fallback/Scripts/03 CustomSpeedMods.lua b/Themes/_fallback/Scripts/03 CustomSpeedMods.lua index 3b0a905e6f..87275c6ec2 100644 --- a/Themes/_fallback/Scripts/03 CustomSpeedMods.lua +++ b/Themes/_fallback/Scripts/03 CustomSpeedMods.lua @@ -263,7 +263,7 @@ function SpeedMods() Choices = GetSpeedMods(), LoadSelections = function(self, list, pn) - local pMods = GAMESTATE:GetPlayerState(pn):GetPlayerOptions("ModsLevel_Preferred") + local pMods = GAMESTATE:GetPlayerState(pn):GetPlayerOptionsString("ModsLevel_Preferred") for i = 1,table.getn(self.Choices) do if string.find(pMods, self.Choices[i]) then list[i] = true diff --git a/Themes/_fallback/Scripts/03 ThemeAndGamePrefs.lua b/Themes/_fallback/Scripts/03 ThemeAndGamePrefs.lua index 7d20bef84f..6c5cddd245 100644 --- a/Themes/_fallback/Scripts/03 ThemeAndGamePrefs.lua +++ b/Themes/_fallback/Scripts/03 ThemeAndGamePrefs.lua @@ -1,6 +1,11 @@ -- sm-ssc Default Theme Preferences Handler function InitGamePrefs() - local Prefs = + local Prefs = + { + { "DefaultFail", "Immediate" }, + }; + + local BPrefs = { { "AutoSetStyle", false }, { "NotePosition", true }, @@ -9,6 +14,12 @@ function InitGamePrefs() }; for idx,pref in ipairs(Prefs) do + if GetGamePref( pref[1] ) == nil then + SetGamePref( pref[1], pref[2] ); + end; + end; + + for idx,pref in ipairs(BPrefs) do if GetGamePrefB( pref[1] ) == nil then SetGamePref( pref[1], pref[2] ); end; @@ -456,3 +467,43 @@ function GamePrefNotePosition() setmetatable( t, t ); return t; end + +function GamePrefDefaultFail() + local t = { + Name = "GamePrefDefaultFail"; + LayoutType = "ShowAllInRow"; + SelectType = "SelectOne"; + OneChoiceForAllPlayers = true; + ExportOnChange = false; + Choices = { "Immediate","ImmediateContinue", "AtEnd", "Off" }; + LoadSelections = function(self, list, pn) + if ReadGamePrefFromFile("DefaultFail") ~= nil then + if GetGamePref("DefaultFail") then + list[table.find( list, GetGamePref("DefaultFail") )] = true; + else + list[1] = true; + end; + else + WriteGamePrefToFile("DefaultFail","Immediate"); + list[1] = true; + end; + end; + SaveSelections = function(self, list, pn) + -- This is so stupid. + local tChoices = { "Immediate","ImmediateContinue", "AtEnd", "Off" }; + local val; + for i=1,#list do + if list[i] then + val = i; + else + val = 1; + end + end + WriteGamePrefToFile("DefaultFail",tChoices[val]); + MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" } ); + THEME:ReloadMetrics(); + end; + }; + setmetatable( t, t ); + return t; +end diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index bfc0d6b4b6..572fe4f868 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -173,6 +173,7 @@ BeatOffsetHeight=15 BeatPIHeight=2 MiniPercentBase=0.5 MiniPercentGate=1 +DizzyHoldHeads=false QuantizeArrowYPosition=false [Background] @@ -1259,6 +1260,13 @@ DescriptionOnCommand= DescriptionOffCommand= DescriptionSetCommand= # +ShowCredit=false +CreditX=0 +CreditY=0 +CreditOnCommand= +CreditOffCommand= +CreditSetCommand= +# ShowAutogen=false AutogenSetCommand= # @@ -2047,6 +2055,11 @@ DescriptionX=-10 DescriptionY=0 DescriptionOnCommand=shadowlength,0;uppercase,true; DescriptionSetCommand=%function(self,param) if param.CustomDifficulty then self:diffuse(CustomDifficultyToLightColor(param.CustomDifficulty)); self:strokecolor(CustomDifficultyToDarkColor(param.CustomDifficulty)); end end +ShowCredit=false +CreditX=0 +CreditY=0 +CreditOnCommand= +CreditSetCommand= ShowAutogen=true AutogenX=40 AutogenY=0 @@ -2279,14 +2292,16 @@ Insert,5="mod,skippy;name,Skippy" Insert,6="mod,echo;name,Echo" Insert,7="mod,stomp;name,Stomp" -Remove="6;selectmultiple" -RemoveDefault="mod,no little,no nojumps,no nohands,no noquads,no nostretch,no norolls" +Remove="8;selectmultiple" +RemoveDefault="mod,no little,no nojumps,no nohands,no noquads,no nostretch,no norolls,no nolifts,no nofakes" Remove,1="mod,little;name,Little" Remove,2="mod,nojumps;name,NoJumps" Remove,3="mod,nohands;name,NoHands" Remove,4="mod,noquads;name,NoQuads" Remove,5="mod,nostretch;name,NoStretch" Remove,6="mod,norolls;name,NoRolls" +Remove,7="mod,nolifts;name,NoLifts" +Remove,8="mod,nofakes;name,NoFakes" # Insert="8" # InsertDefault="mod,no little,no wide,no big,no quick,no skippy,no echo,no stomp" @@ -2732,7 +2747,8 @@ LineNames="2,3,4,8,11,13,14,15,16,28,29,30" Line2="conf,ScoringType" Line3="conf,TimingWindowScale" Line4="conf,LifeDifficulty" -Line8="conf,DefaultFailType" +Line8="lua,GamePrefDefaultFail()" +# Line8="conf,DefaultFailType" Line11="conf,AllowW1" Line13="conf,HiddenSongs" Line14="conf,EasterEggs" @@ -3363,6 +3379,7 @@ CategoryZoom=0.7 CharsZoomSmall=1.0 CharsZoomLarge=1.5 CharsSpacingY=40 +CharsChoices=" ABCDEFGHIJKLMNOPQRSTUVWXYZ" ScrollingCharsCommand=diffuse,0.6,0.8,0.8,1 SelectedCharsCommand=diffuse,0.8,1,1,1 ReceptorArrowsY=SCREEN_CENTER_Y-140 @@ -3629,6 +3646,8 @@ NumHoldsFormat="%s: %d\n" NumMinesFormat="%s: %d\n" NumHandsFormat="%s: %d\n" NumRollsFormat="%s: %d\n" +NumLiftsFormat="%s: %d\n" +NumFakesFormat="%s: %d\n" Beat0OffsetFormat="%s:\n %.5f secs\n" PreviewStartFormat="%s:\n %.5f secs\n" PreviewLengthFormat="%s:\n %.5f secs\n" diff --git a/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua b/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua index 8bf1f85bb4..a8620aed20 100644 --- a/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua +++ b/Themes/default/BGAnimations/ScreenEvaluation overlay/default.lua @@ -33,7 +33,7 @@ local function CreateStats( pnPlayer ) -- local t = Def.ActorFrame {}; t[#t+1] = Def.ActorFrame { - InitCommand=cmd(y,-16); + InitCommand=cmd(y,-32); LoadActor(THEME:GetPathG("ScreenTitleMenu","PreferenceFrame")) .. { InitCommand=cmd(zoom,0.875;diffuse,PlayerColor( pnPlayer )); }; @@ -43,7 +43,7 @@ local function CreateStats( pnPlayer ) aText .. { Text=string.format("%04i",tValues["ITG_MAX"]); InitCommand=cmd(x,32;y,5;vertalign,bottom;zoom,0.5); }; }; t[#t+1] = Def.ActorFrame { - InitCommand=cmd(y,16); + InitCommand=cmd(y,-16); LoadActor(THEME:GetPathG("ScreenTitleMenu","PreferenceFrame")) .. { InitCommand=cmd(zoom,0.875;diffuse,PlayerColor( pnPlayer )); }; @@ -52,6 +52,14 @@ local function CreateStats( pnPlayer ) aText .. { Text="/"; InitCommand=cmd(x,28;y,5;vertalign,bottom;zoom,0.5;diffusealpha,0.5); }; aText .. { Text=string.format("%04i",tValues["MIGS_MAX"]); InitCommand=cmd(x,32;y,5;vertalign,bottom;zoom,0.5); }; }; + t[#t+1] = Def.ActorFrame { + InitCommand=cmd(y,0); + LoadActor(THEME:GetPathG("ScreenTitleMenu","PreferenceFrame")) .. { + InitCommand=cmd(zoom,0.875;diffuse,PlayerColor( pnPlayer )); + }; + aLabel .. { Text="Signed:"; InitCommand=cmd(x,-64) }; + aText .. { Text=string.format( #(tPlayerData[PLAYER_1].SignedJudgments) ); InitCommand=cmd(x,-8;y,5;vertalign,bottom;zoom,0.675); }; + }; return t end; local t = Def.ActorFrame {}; diff --git a/Themes/default/Graphics/PaneDisplay text.lua b/Themes/default/Graphics/PaneDisplay text.lua index e0277a18df..3738f5bdb1 100644 --- a/Themes/default/Graphics/PaneDisplay text.lua +++ b/Themes/default/Graphics/PaneDisplay text.lua @@ -120,16 +120,16 @@ t[#t+1] = Def.ActorFrame { InitCommand=cmd(x,-128+16+8;y,-14+16*3); }; -- Center - CreatePaneDisplayItem( iPN, "MINES", 'RadarCategory_Mines' ) .. { + CreatePaneDisplayItem( iPN, "HANDS", 'RadarCategory_Hands' ) .. { InitCommand=cmd(x,-128+16+8+74;y,-14); }; - CreatePaneDisplayItem( iPN, "HANDS", 'RadarCategory_Hands' ) .. { + CreatePaneDisplayItem( iPN, "ROLLS", 'RadarCategory_Rolls' ) .. { InitCommand=cmd(x,-128+16+8+74;y,-14+16); }; - CreatePaneDisplayItem( iPN, "ROLLS", 'RadarCategory_Rolls' ) .. { + CreatePaneDisplayItem( iPN, "LIFTS", 'RadarCategory_Lifts' ) .. { InitCommand=cmd(x,-128+16+8+74;y,-14+16*2); }; - CreatePaneDisplayItem( iPN, "LIFTS", 'RadarCategory_Lifts' ) .. { + CreatePaneDisplayItem( iPN, "FAKES", 'RadarCategory_Fakes' ) .. { InitCommand=cmd(x,-128+16+8+74;y,-14+16*3); }; -- Right diff --git a/Themes/default/metrics.ini b/Themes/default/metrics.ini index 29d9ea8bb0..cca7ef73d1 100644 --- a/Themes/default/metrics.ini +++ b/Themes/default/metrics.ini @@ -140,7 +140,7 @@ Warning10Command=diffuseshift;effectperiod,1;effectcolor2,Color("Red");effectcol [MusicWheel] FadeSeconds=1 -SwitchSeconds=0.10 +SwitchSeconds=0.08 RandomPicksLockedSongs=true RouletteSwitchSeconds=0.05 RouletteSlowDownSwitches=5 @@ -162,7 +162,7 @@ ScrollBarOnCommand=visible,false ; self:rotationx( rotationx_radians * 180/math.pi ); --[[ to degrees end]] \ ; end; ItemTransformFunction=function(self,offsetFromCenter,itemIndex,numItems) self:x( (1-math.cos(offsetFromCenter/math.pi))*44 ); self:y( offsetFromCenter*46 ); end -NumWheelItems=13 +NumWheelItems=11 MusicWheelSortOnCommand=fov,90; MusicWheelSortOffCommand=fov,90; MusicWheelItemSortOnCommand=zoomy,0;bounceend,0.15;zoomy,1 diff --git a/Xcode/stepmania.xcodeproj/project.pbxproj b/Xcode/stepmania.xcodeproj/project.pbxproj index 9c106e70aa..a218726db4 100644 --- a/Xcode/stepmania.xcodeproj/project.pbxproj +++ b/Xcode/stepmania.xcodeproj/project.pbxproj @@ -3762,7 +3762,6 @@ AACFBE3908E7D832005087FC /* InputEventPlus.h */, EE906F8012BF3AF800146C96 /* JsonUtil.cpp */, EE906F8112BF3AF800146C96 /* JsonUtil.h */, - AA2FB638091212AF000FD574 /* LifeMeter.cpp */, AADD1CC2095C233E0088C9DF /* LocalizedString.cpp */, AADD1CC3095C233F0088C9DF /* LocalizedString.h */, AACFBE6108E7DBA8005087FC /* LuaExpressionTransform.cpp */, @@ -4000,6 +3999,7 @@ AA6EFF1604770F63005F316C /* HoldJudgment.h */, AA6EFDE104770C79005F316C /* Inventory.cpp */, AA6EFDE204770C79005F316C /* Inventory.h */, + AA2FB638091212AF000FD574 /* LifeMeter.cpp */, AA6EFF1A04770F63005F316C /* LifeMeter.h */, AA6EFF1B04770F63005F316C /* LifeMeterBar.cpp */, AA6EFF1C04770F63005F316C /* LifeMeterBar.h */, diff --git a/src/ActiveAttackList.cpp b/src/ActiveAttackList.cpp index 958be74e3f..50011e030f 100644 --- a/src/ActiveAttackList.cpp +++ b/src/ActiveAttackList.cpp @@ -7,7 +7,6 @@ #include "PlayerOptions.h" #include "PlayerState.h" - ActiveAttackList::ActiveAttackList() { } @@ -40,7 +39,7 @@ void ActiveAttackList::Refresh() const Attack& attack = attacks[i]; if( !attack.bOn ) - continue; /* hasn't started yet */ + continue; // hasn't started yet if( !attack.bShowInAttackList ) continue; diff --git a/src/Actor.h b/src/Actor.h index c393dcd952..ec6117bdc7 100644 --- a/src/Actor.h +++ b/src/Actor.h @@ -64,6 +64,7 @@ LuaDeclareType( VertAlign ); /** @brief The bottom vertical alignment constant. */ #define align_bottom 1.0f +// ssc futures: /* enum EffectAction { @@ -113,13 +114,9 @@ public: * todo: split out into diffuse effects and translation effects, or * create an effect stack instead. -aj */ enum Effect { no_effect, - // diffuse effects diffuse_blink, diffuse_shift, diffuse_ramp, - glow_blink, glow_shift, glow_ramp, - rainbow, - // translation effects - wag, bounce, bob, pulse, - spin, vibrate + glow_blink, glow_shift, glow_ramp, rainbow, + wag, bounce, bob, pulse, spin, vibrate }; /** @brief Various values an Actor's effect can be tied to. */ @@ -136,7 +133,12 @@ public: NUM_CLOCKS }; - ///** @brief What type of Effect this is. */ + /* + * @brief What type of Effect this is. + * + * This is an internal enum for checking if an effect can be run; + * You can't have more than one of most EffectTypes in the Effect list. (You + * might be able to have mutliple EffectType_Translates; not sure yet.) -aj */ /* enum EffectType { EffectType_Diffuse, @@ -151,6 +153,7 @@ public: // todo: use this instead of the Effect enum -aj /* + // This is similar to Attributes in BitmapText as far as implementation. struct Effect { Effect() : m_Action(EffectAction_None), m_Type(EffectType_Invalid), m_fSecsIntoEffect(0), @@ -160,8 +163,9 @@ public: m_effectColor1(RageColor(1,1,1,1)), m_effectColor2(RageColor(1,1,1,1)) { } - EffectAction m_Action; - EffectType m_Type; // diffuse, glow, or translate + RString m_sName; // friendly name + EffectAction m_Action; // replaces the old Effect enum + EffectType m_Type; // determined by EffectAction float m_fSecsIntoEffect; float m_fEffectDelta; RageColor m_EffectColor1; @@ -177,6 +181,9 @@ public: }; */ + /** + * @brief The present state for the Tween. + */ struct TweenState { void Init(); @@ -207,6 +214,7 @@ public: RageColor diffuse[4]; /** @brief The glow color for this TweenState. */ RageColor glow; + /** @brief A magical value that nobody really knows the use for. ;) */ float aux; }; @@ -215,8 +223,13 @@ public: virtual void BeginDraw(); // pushes transform onto world matrix stack virtual void SetGlobalRenderStates(); // Actor should call this at beginning of their DrawPrimitives() virtual void SetTextureRenderStates(); // Actor should call this after setting a texture - virtual void DrawPrimitives() {}; // Derivatives should override - virtual void EndDraw(); // pops transform from world matrix stack + /** + * @brief Draw the primitives of the Actor. + * + * Derivative classes should override this function. */ + virtual void DrawPrimitives() {}; + /** @brief Pop the transform from the world matrix stack. */ + virtual void EndDraw(); // TODO: make Update non virtual and change all classes to override UpdateInternal // instead. @@ -241,10 +254,22 @@ public: * @brief Retrieve the Actor's parent. * @return the Actor's parent. */ Actor *GetParent() { return m_pParent; } + /** + * @brief Retrieve the Actor's lineage. + * @return the Actor's lineage. */ RString GetLineage() const; + /** + * @brief Retrieve the Actor's x position. + * @return the Actor's x position. */ float GetX() const { return m_current.pos.x; }; + /** + * @brief Retrieve the Actor's y position. + * @return the Actor's y position. */ float GetY() const { return m_current.pos.y; }; + /** + * @brief Retrieve the Actor's z position. + * @return the Actor's z position. */ float GetZ() const { return m_current.pos.z; }; float GetDestX() const { return DestTweenState().pos.x; }; float GetDestY() const { return DestTweenState().pos.y; }; @@ -253,8 +278,17 @@ public: void SetY( float y ) { DestTweenState().pos.y = y; }; void SetZ( float z ) { DestTweenState().pos.z = z; }; void SetXY( float x, float y ) { DestTweenState().pos.x = x; DestTweenState().pos.y = y; }; + /** + * @brief Add to the x position of this Actor. + * @param x the amount to add to the Actor's x position. */ void AddX( float x ) { SetX( GetDestX()+x ); } + /** + * @brief Add to the y position of this Actor. + * @param y the amount to add to the Actor's y position. */ void AddY( float y ) { SetY( GetDestY()+y ); } + /** + * @brief Add to the z position of this Actor. + * @param z the amount to add to the Actor's z position. */ void AddZ( float z ) { SetZ( GetDestZ()+z ); } // height and width vary depending on zoom @@ -279,9 +313,23 @@ public: void SetBaseRotation( const RageVector3 &rot ) { m_baseRotation = rot; } virtual void SetBaseAlpha( float fAlpha ) { m_fBaseAlpha = fAlpha; } - float GetZoom() const { return DestTweenState().scale.x; } // not accurate in some cases + /** + * @brief Retrieve the general zoom factor, using the x coordinate of the Actor. + * + * Note that this is not accurate in some cases. + * @return the zoom factor for the x coordinate of the Actor. */ + float GetZoom() const { return DestTweenState().scale.x; } + /** + * @brief Retrieve the zoom factor for the x coordinate of the Actor. + * @return the zoom factor for the x coordinate of the Actor. */ float GetZoomX() const { return DestTweenState().scale.x; } + /** + * @brief Retrieve the zoom factor for the y coordinate of the Actor. + * @return the zoom factor for the y coordinate of the Actor. */ float GetZoomY() const { return DestTweenState().scale.y; } + /** + * @brief Retrieve the zoom factor for the z coordinate of the Actor. + * @return the zoom factor for the z coordinate of the Actor. */ float GetZoomZ() const { return DestTweenState().scale.z; } void SetZoom( float zoom ) { DestTweenState().scale.x = zoom; DestTweenState().scale.y = zoom; DestTweenState().scale.z = zoom; } void SetZoomX( float zoom ) { DestTweenState().scale.x = zoom; } @@ -368,7 +416,12 @@ public: } const TweenState& DestTweenState() const { return const_cast(this)->DestTweenState(); } - enum StretchType { fit_inside, cover }; + /** @brief How do we handle stretching the Actor? */ + enum StretchType + { + fit_inside, /**< Have the Actor fit inside its parent, using the smaller zoom. */ + cover /**, Have the Actor cover its parent, using the larger zoom. */ + }; void ScaleToCover( const RectF &rect ) { ScaleTo( rect, cover ); } void ScaleToFitInside( const RectF &rect ) { ScaleTo( rect, fit_inside); }; @@ -449,6 +502,9 @@ public: // other properties + /** + * @brief Determine if the Actor is visible at this time. + * @return true if it's visible, false otherwise. */ bool GetVisible() const { return m_bVisible; } void SetVisible( bool b ) { m_bVisible = b; } void SetShadowLength( float fLength ) { m_fShadowLengthX = fLength; m_fShadowLengthY = fLength; } @@ -506,9 +562,12 @@ public: HiddenPtr m_pLuaInstance; protected: + /** @brief the name of the Actor. */ RString m_sName; + /** @brief the current parent of this Actor if it exists. */ Actor *m_pParent; + /** @brief Some general information about the Tween. */ struct TweenInfo { // counters for tweening diff --git a/src/ActorFrame.h b/src/ActorFrame.h index cba0ad677d..e5473ea1c8 100644 --- a/src/ActorFrame.h +++ b/src/ActorFrame.h @@ -1,10 +1,9 @@ -/** @brief ActorFrame - A container for other actors. */ - #ifndef ACTORFRAME_H #define ACTORFRAME_H #include "Actor.h" +/** @brief A container for other Actors. */ class ActorFrame : public Actor { public: @@ -17,7 +16,13 @@ public: void LoadFromNode( const XNode* pNode ); virtual ActorFrame *Copy() const; + /** + * @brief Add a new child to the ActorFrame. + * @param pActor the new Actor to add. */ virtual void AddChild( Actor *pActor ); + /** + * @brief Remove the specified child from the ActorFrame. + * @param pActor the Actor to remove. */ virtual void RemoveChild( Actor *pActor ); void TransferChildren( ActorFrame *pTo ); Actor* GetChild( const RString &sName ); @@ -93,6 +98,7 @@ public: protected: void LoadChildrenFromNode( const XNode* pNode ); + /** @brief The children Actors used by the ActorFrame. */ vector m_SubActors; bool m_bPropagateCommands; bool m_bDeleteChildren; @@ -118,7 +124,7 @@ protected: RageColor m_specularColor; RageVector3 m_lightDirection; }; - +/** @brief an ActorFrame that handles deleting children Actors automatically. */ class ActorFrameAutoDeleteChildren : public ActorFrame { public: diff --git a/src/ActorFrameTexture.h b/src/ActorFrameTexture.h index ae9c873c3d..08c068eadd 100644 --- a/src/ActorFrameTexture.h +++ b/src/ActorFrameTexture.h @@ -46,6 +46,7 @@ private: bool m_bAlphaBuffer; bool m_bFloat; bool m_bPreserveTexture; + /** @brief the name of this ActorFrameTexture. */ RString m_sTextureName; }; diff --git a/src/ActorProxy.h b/src/ActorProxy.h index 2416c6e7b5..1da6572d74 100644 --- a/src/ActorProxy.h +++ b/src/ActorProxy.h @@ -4,7 +4,7 @@ #include "Actor.h" struct lua_State; -/** @brief Rendrs another actor. */ +/** @brief Renders another actor. */ class ActorProxy: public Actor { public: diff --git a/src/ActorScroller.h b/src/ActorScroller.h index 030355306f..64c22e2098 100644 --- a/src/ActorScroller.h +++ b/src/ActorScroller.h @@ -1,5 +1,3 @@ -/* ActorScroller - ActorFrame that moves its children. */ - #ifndef ActorScroller_H #define ActorScroller_H @@ -7,7 +5,7 @@ #include "Quad.h" class XNode; #include "LuaExpressionTransform.h" - +/** @brief ActorFrame that moves its children. */ class ActorScroller : public ActorFrame { public: @@ -56,9 +54,21 @@ protected: virtual void ShiftSubActors( int iDist ); int m_iNumItems; - float m_fCurrentItem; // Item at center of list, usually between 0 and m_SubActors.size(), approaches destination + /** + * @brief the current item we are focused on. + * + * An item at the center of the list, usually between 0 and m_SubActors.size(), + * will approach its destination. + * + * The above comment was paraphrased from what was here previously. It could use + * some clearing up. -Wolfman2000 */ + float m_fCurrentItem; float m_fDestinationItem; - float m_fSecondsPerItem; // <= 0 means don't scroll + /** + * @brief How many seconds are there per item? + * + * If this is less than zero, then we are not scrolling. */ + float m_fSecondsPerItem; float m_fSecondsPauseBetweenItems; float m_fNumItemsToDraw; int m_iFirstSubActorIndex; @@ -85,8 +95,10 @@ public: #endif -/* - * (c) 2003-2004 Chris Danford +/** + * @file + * @author Chris Danford (c) 2003-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/ActorSound.h b/src/ActorSound.h index abadb8e041..f2153181e7 100644 --- a/src/ActorSound.h +++ b/src/ActorSound.h @@ -1,11 +1,9 @@ -/* ActorSound - RageSound Actor interface. */ - #ifndef ACTOR_SOUND_H #define ACTOR_SOUND_H #include "Actor.h" #include "RageSound.h" - +/** @brief RageSound Actor interface. */ class ActorSound: public Actor { public: @@ -30,8 +28,10 @@ private: #endif -/* - * (c) 2005 Glenn Maynard +/** + * @file + * @author Glenn Maynard (c) 2005 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/AnnouncerManager.h b/src/AnnouncerManager.h index eaa80b30cf..6236b480fd 100644 --- a/src/AnnouncerManager.h +++ b/src/AnnouncerManager.h @@ -2,17 +2,30 @@ #define ANNOUNCER_MANAGER_H #include "RageTypes.h" - +/** @brief The commentators who say seemlingly random things during gameplay. */ class AnnouncerManager { public: AnnouncerManager(); ~AnnouncerManager(); + /** + * @brief Retrieve the announcer names. + * @param AddTo the list of announcer names. */ void GetAnnouncerNames( vector& AddTo ); + /** + * @brief Determine if the specified announcer exists. + * @param sAnnouncerName the announcer we're checking for. + * @return true if it exists, false otherwise. */ bool DoesAnnouncerExist( RString sAnnouncerName ); + /** + * @brief Switch to a new specified announcer. + * @param sNewAnnouncerName the new announcer the Player will be listening to. */ void SwitchAnnouncer( RString sNewAnnouncerName ); - RString GetCurAnnouncerName() { return m_sCurAnnouncerName; }; + /** + * @brief Retrieve the current announcer's name. + * @return the current announcer's name. */ + RString GetCurAnnouncerName() const { return m_sCurAnnouncerName; }; void NextAnnouncer(); RString GetPathTo( RString sFolderName ); @@ -24,7 +37,7 @@ public: protected: static RString GetAnnouncerDirFromName( RString sAnnouncerName ); RString GetPathTo( RString AnnouncerPath, RString sFolderName ); - + /** @brief the current announcer's name. */ RString m_sCurAnnouncerName; }; @@ -33,8 +46,10 @@ extern AnnouncerManager* ANNOUNCER; // global and accessable from anywhere in ou #endif -/* - * (c) 2001-2004 Chris Danford +/** + * @file + * @author Chris Danford (c) 2001-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/ArrowEffects.cpp b/src/ArrowEffects.cpp index f19cf6f40f..9bd4271627 100644 --- a/src/ArrowEffects.cpp +++ b/src/ArrowEffects.cpp @@ -15,7 +15,15 @@ #include static ThemeMetric ARROW_SPACING( "ArrowEffects", "ArrowSpacing" ); +static ThemeMetric QUANTIZE_ARROW_Y( "ArrowEffects", "QuantizeArrowYPosition"); static ThemeMetric HIDDEN_SUDDEN_PAST_RECEPTOR( "ArrowEffects", "DrawHiddenNotesAfterReceptor"); + +/* For better or for worse, allow the themes to modify the various mod + * effects for the different mods. In general, it is recommended to not + * edit the default values and instead use percentage mods when changes + * are wanted. Still, the option is available for those that want it. + * + * Is this a good idea? We'll find out. -aj & Wolfman2000 */ static ThemeMetric BLINK_MOD_FREQUENCY( "ArrowEffects", "BlinkModFrequency" ); static ThemeMetric BOOST_MOD_MIN_CLAMP( "ArrowEffects", "BoostModMinClamp" ); static ThemeMetric BOOST_MOD_MAX_CLAMP( "ArrowEffects", "BoostModMaxClamp" ); @@ -50,7 +58,7 @@ static ThemeMetric BEAT_OFFSET_HEIGHT( "ArrowEffects", "BeatOffsetHeight" static ThemeMetric BEAT_PI_HEIGHT( "ArrowEffects", "BeatPIHeight" ); static ThemeMetric MINI_PERCENT_BASE( "ArrowEffects", "MiniPercentBase" ); static ThemeMetric MINI_PERCENT_GATE( "ArrowEffects", "MiniPercentGate" ); -static ThemeMetric QUANTIZE_ARROW_Y( "ArrowEffects", "QuantizeArrowYPosition"); +static ThemeMetric DIZZY_HOLD_HEADS( "ArrowEffects", "DizzyHoldHeads" ); static float GetNoteFieldHeight( const PlayerState* pPlayerState ) { @@ -231,6 +239,8 @@ float ArrowEffects::GetYOffset( const PlayerState* pPlayerState, int iCol, float fYOffset += fYOffsetTimeSpacing * pPlayerState->m_PlayerOptions.GetCurrent().m_fTimeSpacing; } + // TODO: If we allow noteskins to have metricable row spacing + // (per issue 24), edit this to reflect that. -aj fYOffset *= ARROW_SPACING; // don't mess with the arrows after they've crossed 0 @@ -287,8 +297,8 @@ float ArrowEffects::GetYOffset( const PlayerState* pPlayerState, int iCol, float seed = ((seed * 1664525u) + 1013904223u) & 0xFFFFFFFF; float fRandom = seed / 4294967296.0f; - /* Random speed always increases speed: a random speed of 10 indicates [1,11]. - * This keeps it consistent with other mods: 0 means no effect. */ + /* Random speed always increases speed: a random speed of 10 indicates + * [1,11]. This keeps it consistent with other mods: 0 means no effect. */ fScrollSpeed *= SCALE( fRandom, 0.0f, 1.0f, @@ -498,8 +508,8 @@ float ArrowEffects::GetRotationZ( const PlayerState* pPlayerState, float fNoteBe if( fEffects[PlayerOptions::EFFECT_CONFUSION] != 0 ) fRotation += ReceptorGetRotationZ( pPlayerState ); - // Doesn't affect hold heads, unlike confusion - if( fEffects[PlayerOptions::EFFECT_DIZZY] != 0 && !bIsHoldHead ) + // As usual, enable dizzy hold heads at your own risk. -Wolfman2000 + if( fEffects[PlayerOptions::EFFECT_DIZZY] != 0 && ( DIZZY_HOLD_HEADS || !bIsHoldHead ) ) { const float fSongBeat = GAMESTATE->m_fSongBeatVisible; float fDizzyRotation = fNoteBeat - fSongBeat; diff --git a/src/ArrowEffects.h b/src/ArrowEffects.h index 9f6c7cc655..857b78681f 100644 --- a/src/ArrowEffects.h +++ b/src/ArrowEffects.h @@ -1,10 +1,8 @@ -/* ArrowEffects - Functions that return properties of arrows based on Style and PlayerOptions. */ - #ifndef ARROWEFFECTS_H #define ARROWEFFECTS_H class PlayerState; - +/** @brief Functions that return properties of arrows based on Style and PlayerOptions. */ class ArrowEffects { public: @@ -21,8 +19,16 @@ public: return GetYOffset( pPlayerState, iCol, fNoteBeat, fThrowAway, bThrowAway, bAbsolute ); } - /* Actual display position, with reverse and post-reverse-effects factored in - * (fYOffset -> YPos). */ + /** + * @brief Retrieve the actual display position. + * + * In this case, reverse and post-reverse-effects are factored in (fYOffset -> YPos). + * @param pPlayerState the Player's state in question, including mods. + * @param iCol the specific arrow column. + * @param fYOffset the original display position. + * @param fYReverseOffsetPixels the amount offset due to reverse. + * @param WithReverse a flag to see if the Reverse mod is on. + * @return the actual display position. */ static float GetYPos( const PlayerState* pPlayerState, int iCol, float fYOffset, float fYReverseOffsetPixels, bool WithReverse = true ); // Inverse of ArrowGetYPos (YPos -> fYOffset). @@ -37,14 +43,21 @@ public: // Due to the handling logic for holds on Twirl, we need to use an offset instead. // It's more intuitive for Roll to be based off offset, so use an offset there too. static float GetRotationX( const PlayerState* pPlayerState, float fYOffset ); - static float GetRotationY( const PlayerState *pPlayerState, float fYOffset ); + static float GetRotationY( const PlayerState* pPlayerState, float fYOffset ); // fXPos is a horizontal position in pixels relative to the center of the field. // This depends on the column of the arrow and possibly the Arrow effect and // fYPos (in the case of EFFECT_DRUNK). static float GetXPos( const PlayerState* pPlayerState, int iCol, float fYOffset ); - // Z position; normally 0. Only visible in perspective modes. + /** + * @brief Retrieve the Z position. + * + * This is normally 0. This is only visible with perspective modes. + * @param pPlayerState the Player's state, including the mods. + * @param iCol the specific arrow column. + * @param fYPos the Y position of the arrow. + * @return the Z position. */ static float GetZPos( const PlayerState* pPlayerState, int iCol, float fYPos ); // Enable this if any ZPos effects are enabled. @@ -58,7 +71,13 @@ public: // AppearanceType. static float GetGlow( const PlayerState* pPlayerState, int iCol, float fYPos, float fPercentFadeToFail, float fYReverseOffsetPixels, float fDrawDistanceBeforeTargetsPixels, float fFadeInPercentOfDrawFar ); - // Depends on fYOffset. + /** + * @brief Retrieve the current brightness. + * + * Note that this depends on fYOffset. + * @param pPlayerState the present PlayerState. + * @param fNoteBeat the current beat. + * @return the current brightness. */ static float GetBrightness( const PlayerState* pPlayerState, float fNoteBeat ); // This is the zoom of the individual tracks, not of the whole Player. @@ -69,8 +88,10 @@ public: #endif -/* - * (c) 2001-2004 Chris Danford +/** + * @file + * @author Chris Danford (c) 2001-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/Attack.h b/src/Attack.h index bbd95fd4ca..8ce4b7942c 100644 --- a/src/Attack.h +++ b/src/Attack.h @@ -5,12 +5,18 @@ #include "PlayerNumber.h" class Song; class PlayerState; - +/** @brief An action made against a Player to make things more difficult. */ struct Attack { AttackLevel level; - float fStartSecond; // -1 = now + /** + * @brief the starting point of this attack. + * + * If this is -1, then the attack starts now. */ + float fStartSecond; + /** @brief How long does this attack last? */ float fSecsRemaining; + /** @brief The modifiers used for this attack. */ RString sModifiers; bool bOn; // set and used by GAMESTATE bool bGlobal; // true for song-wide course mods @@ -47,7 +53,14 @@ struct Attack void GetAttackBeats( const Song *pSong, float &fStartBeat, float &fEndBeat ) const; void GetRealtimeAttackBeats( const Song *pSong, const PlayerState* pPlayerState, float &fStartBeat, float &fEndBeat ) const; + /** + * @brief Determine if this attack has no modifiers, and is thus blank or empty. + * @return true if it is blank/empty, or false otherwise. */ bool IsBlank() const { return sModifiers.empty(); } + /** + * @brief Determine if two Attacks are equal to each other. + * @param rhs the other Attack in question. + * @return true if the two Attacks are equal, or false otherwise. */ bool operator== ( const Attack &rhs ) const; bool ContainsTransformOrTurn() const; static Attack FromGlobalCourseModifier( const RString &sModifiers ); @@ -56,13 +69,18 @@ struct Attack struct AttackArray : public vector { + /** + * @brief Determine if the list of attacks contains a transform or turn mod. + * @return true if it does, or false otherwise. */ bool ContainsTransformOrTurn() const; }; #endif -/* - * (c) 2003-2004 Chris Danford +/** + * @file + * @author Chris Danford (c) 2003-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/AttackDisplay.h b/src/AttackDisplay.h index 663e36195f..e888cff36e 100644 --- a/src/AttackDisplay.h +++ b/src/AttackDisplay.h @@ -1,4 +1,3 @@ -/* AttackDisplay - A graphical display for attacks. */ #ifndef AttackDisplay_H #define AttackDisplay_H @@ -8,7 +7,7 @@ #include "RageTexturePreloader.h" class PlayerState; - +/** @brief A graphical display for attacks. */ class AttackDisplay : public ActorFrame { public: @@ -29,8 +28,10 @@ protected: #endif -/* - * (c) 2003 Chris Danford +/** + * @file + * @author Chris Danford (c) 2003 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/AutoActor.h b/src/AutoActor.h index bee03a1bb0..6f5f4a1491 100644 --- a/src/AutoActor.h +++ b/src/AutoActor.h @@ -1,13 +1,14 @@ -/* AutoActor - Smart pointer for Actor. */ - #ifndef AutoActor_H #define AutoActor_H class Actor; class XNode; -// creates the appropriate Actor derivitive on load and -// automatically deletes Actor on deconstruction. +/** + * @brief A smart pointer for Actor. + * + * This creates the appropriate Actor derivative on load and + * automatically deletes the Actor on deconstruction. */ class AutoActor { public: @@ -20,6 +21,9 @@ public: const Actor *operator->() const { return m_pActor; } Actor *operator->() { return m_pActor; } void Unload(); + /** + * @brief Determine if this actor is presently loaded. + * @return true if it is loaded, or false otherwise. */ bool IsLoaded() const { return m_pActor != NULL; } void Load( Actor *pActor ); // transfer pointer void Load( const RString &sPath ); @@ -28,13 +32,16 @@ public: void LoadAndSetName( const RString &sScreenName, const RString &sActorName ); protected: + /** @brief the Actor for which there is a smart pointer to. */ Actor* m_pActor; }; #endif -/* - * (c) 2003-2004 Chris Danford +/** + * @file + * @author Chris Danford (c) 2003-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/AutoKeysounds.h b/src/AutoKeysounds.h index ed06d136a8..2e980b6cfb 100644 --- a/src/AutoKeysounds.h +++ b/src/AutoKeysounds.h @@ -1,5 +1,3 @@ -/* AutoKeysounds - handle playback of auto keysound notes. */ - #ifndef AUTO_KEYSOUNDS_H #define AUTO_KEYSOUNDS_H @@ -10,11 +8,13 @@ class RageSoundReader; class RageSoundReader_Chain; class Song; +/** @brief Handle playback of auto keysound notes. */ class AutoKeysounds { public: void Load( PlayerNumber pn, const NoteData& ndAutoKeysoundsOnly ); void Update( float fDelta ); + /** @brief Finish loading the main sounds, and setup the auto keysounds if any. */ void FinishLoading(); RageSound *GetSound() { return &m_sSound; } RageSoundReader *GetSharedSound() { return m_pSharedSound; } @@ -34,8 +34,10 @@ protected: #endif -/* - * (c) 2004 Chris Danford, Glenn Maynard +/** + * @file + * @author Chris Danford, Glenn Maynard (c) 2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/BGAnimation.h b/src/BGAnimation.h index caf34dd807..604403f3c3 100644 --- a/src/BGAnimation.h +++ b/src/BGAnimation.h @@ -1,5 +1,3 @@ -/* BGAnimation - An ActorFrame that loads itself. */ - #ifndef BGANIMATION_H #define BGANIMATION_H @@ -7,6 +5,7 @@ class XNode; +/** @brief An ActorFrame that loads itself. */ class BGAnimation : public ActorFrameAutoDeleteChildren { public: @@ -24,8 +23,10 @@ protected: #endif -/* - * (c) 2001-2004 Ben Nordstrom, Chris Danford +/** + * @file + * @author Ben Nordstrom, Chris Danford (c) 2001-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/BGAnimationLayer.h b/src/BGAnimationLayer.h index 37a474aab3..94d46497b3 100644 --- a/src/BGAnimationLayer.h +++ b/src/BGAnimationLayer.h @@ -1,5 +1,3 @@ -/* BGAnimationLayer - layer elements used by BGAnimation */ - #ifndef BGANIMATIONLAYER_H #define BGANIMATIONLAYER_H @@ -9,6 +7,7 @@ class XNode; +/** @brief Layer elements used by BGAnimation. */ class BGAnimationLayer : public ActorFrame { public: @@ -53,8 +52,10 @@ protected: #endif -/* - * (c) 2001-2004 Ben Nordstrom, Chris Danford, Glenn Maynard +/** + * @file + * @author Ben Nordstrom, Chris Danford, Glenn Maynard (c) 2001-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/BPMDisplay.cpp b/src/BPMDisplay.cpp index 5acf484d4e..98ce045520 100644 --- a/src/BPMDisplay.cpp +++ b/src/BPMDisplay.cpp @@ -94,7 +94,6 @@ void BPMDisplay::Update( float fDeltaTime ) } } - void BPMDisplay::SetBPMRange( const DisplayBpms &bpms ) { ASSERT( !bpms.vfBpms.empty() ); diff --git a/src/BPMDisplay.h b/src/BPMDisplay.h index 566993a681..23614985ab 100644 --- a/src/BPMDisplay.h +++ b/src/BPMDisplay.h @@ -1,5 +1,3 @@ -/** @brief BPMDisplay - displays a BPM or a range of BPMs. */ - #ifndef BPM_DISPLAY_H #define BPM_DISPLAY_H @@ -11,7 +9,7 @@ class Song; class Course; struct DisplayBpms; -/** @brief Display the BPM/range of them as requested. */ +/** @brief Displays a BPM or a range of BPMs. */ class BPMDisplay : public BitmapText { public: diff --git a/src/Background.h b/src/Background.h index 214c4b3936..1435d2e7e8 100644 --- a/src/Background.h +++ b/src/Background.h @@ -1,5 +1,3 @@ -/* Background - Background behind notes while playing. */ - #ifndef BACKGROUND_H #define BACKGROUND_H @@ -11,7 +9,7 @@ class DancingCharacters; class Song; class BackgroundImpl; - +/** @brief the Background that is behind the notes while playing. */ class Background : public ActorFrame { public: @@ -25,6 +23,9 @@ public: void FadeToActualBrightness(); void SetBrightness( float fBrightness ); // overrides pref and Cover + /** + * @brief Retrieve whatever dancing characters are in use. + * @return the dancing characters. */ DancingCharacters* GetDancingCharacters(); void GetLoadedBackgroundChanges( vector **pBackgroundChangesOut ); @@ -35,8 +36,10 @@ protected: #endif -/* - * (c) 2001-2004 Chris Danford, Ben Nordstrom +/** + * @file + * @author Chris Danford, Ben Nordstrom (c) 2001-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/BannerCache.h b/src/BannerCache.h index b2fc4a817b..2f7529e442 100644 --- a/src/BannerCache.h +++ b/src/BannerCache.h @@ -1,5 +1,3 @@ -/* BannerCache - Maintains a cache of reduced-quality banners. */ - #ifndef BANNER_CACHE_H #define BANNER_CACHE_H @@ -8,7 +6,7 @@ #include "RageTexture.h" class LoadingWindow; - +/** @brief Maintains a cache of reduced-quality banners. */ class BannerCache { public: @@ -37,8 +35,10 @@ extern BannerCache *BANNERCACHE; // global and accessable from anywhere in our p #endif -/* - * (c) 2003 Glenn Maynard +/** + * @file + * @author Glenn Maynard (c) 2003 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/BeginnerHelper.h b/src/BeginnerHelper.h index 18edd462f0..8f7b20bd0b 100644 --- a/src/BeginnerHelper.h +++ b/src/BeginnerHelper.h @@ -1,4 +1,3 @@ -/* BeginnerHelper - A dancing character that follows the steps of the song. */ #ifndef BEGINNER_HELPER_H #define BEGINNER_HELPER_H @@ -8,7 +7,7 @@ #include "PlayerNumber.h" #include "NoteData.h" class Model; - +/** @brief A dancing character that follows the steps of the Song. */ class BeginnerHelper : public ActorFrame { public: @@ -42,8 +41,10 @@ protected: }; #endif -/* - * (c) 2003 Kevin Slaughter, Thad Ward +/** + * @file + * @author Kevin Slaughter, Thad Ward (c) 2003 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/BitmapText.cpp b/src/BitmapText.cpp index 22085add32..235f8ef094 100644 --- a/src/BitmapText.cpp +++ b/src/BitmapText.cpp @@ -328,6 +328,9 @@ void BitmapText::DrawChars( bool bUseStrokeTexture ) } } + vector vertices; + int iNumVertsToDraw = 0; + for( int start = iStartGlyph; start < iEndGlyph; ) { int end = start; @@ -348,14 +351,16 @@ void BitmapText::DrawChars( bool bUseStrokeTexture ) * the texture wrapping state. If setting the wrapping state is found to be slow, * there should probably be a "don't care" texture wrapping mode set in Actor. -Chris */ Actor::SetTextureRenderStates(); - + RageSpriteVertex &start_vertex = m_aVertices[start*4]; - int iNumVertsToDraw = (end-start)*4; - DISPLAY->DrawQuads( &start_vertex, iNumVertsToDraw ); + vertices.push_back(&start_vertex); + iNumVertsToDraw += (end-start)*4; } start = end; } + if (!vertices.empty()) + DISPLAY->DrawQuads( vertices[0], iNumVertsToDraw ); } /* sText is UTF-8. If not all of the characters in sText are available in the diff --git a/src/BitmapText.h b/src/BitmapText.h index fac0d1dc2a..5ef89562a7 100644 --- a/src/BitmapText.h +++ b/src/BitmapText.h @@ -1,5 +1,3 @@ -/* BitmapText - An actor that holds a Font and draws text to the screen. */ - #ifndef BITMAP_TEXT_H #define BITMAP_TEXT_H @@ -9,7 +7,7 @@ class RageTexture; class Font; struct FontPageTextures; - +/** @brief An actor that holds a Font and draws text to the screen. */ class BitmapText : public Actor { public: @@ -101,8 +99,10 @@ private: #endif -/* - * (c) 2001-2007 Chris Danford, Charles Lohr, Steve Checkoway +/** + * @file + * @author Chris Danford, Charles Lohr, Steve Checkoway (c) 2001-2007 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/Bookkeeper.cpp b/src/Bookkeeper.cpp index 89b6dc18b6..3798a26d17 100644 --- a/src/Bookkeeper.cpp +++ b/src/Bookkeeper.cpp @@ -10,7 +10,6 @@ #include "XmlFileUtil.h" #include - Bookkeeper* BOOKKEEPER = NULL; // global and accessable from anywhere in our program static const RString COINS_DAT = "Save/Coins.xml"; @@ -18,7 +17,6 @@ static const RString COINS_DAT = "Save/Coins.xml"; Bookkeeper::Bookkeeper() { ClearAll(); - ReadFromDisk(); } @@ -172,7 +170,6 @@ int Bookkeeper::GetCoinsTotal() const return GetNumCoinsInRange( m_mapCoinsForHour.begin(), m_mapCoinsForHour.end() ); } - void Bookkeeper::GetCoinsLastDays( int coins[NUM_LAST_DAYS] ) const { time_t lOldTime = time(NULL); diff --git a/src/Bookkeeper.h b/src/Bookkeeper.h index 07272e7928..b1014c04f5 100644 --- a/src/Bookkeeper.h +++ b/src/Bookkeeper.h @@ -61,7 +61,6 @@ private: map m_mapCoinsForHour; }; - extern Bookkeeper* BOOKKEEPER; // global and accessable from anywhere in our program #endif diff --git a/src/Character.h b/src/Character.h index 6620439cbf..15a0a78f24 100644 --- a/src/Character.h +++ b/src/Character.h @@ -1,5 +1,3 @@ -/* Character - An persona that defines attacks for use in battle. */ - #ifndef Character_H #define Character_H @@ -9,14 +7,14 @@ struct lua_State; typedef lua_State Lua; - +/** @brief A persona that defines attacks for use in battle. */ class Character { public: Character(); ~Character() { } - bool Load( RString sCharDir ); // return true if success + bool Load( RString sCharDir ); // return true if successful RString GetTakingABreakPath() const; RString GetCardPath() const { return m_sCardPath; } @@ -55,7 +53,10 @@ private: public: apActorCommands m_cmdInit; - // All the stuff below will be filled in if this character is playable in Rave mode + /** + * @brief Is this character playable in the Rave mode? + * + * All of the variables listed below here will be filled in if true. */ bool m_bUsableInRave; RString m_sAttacks[NUM_ATTACK_LEVELS][NUM_ATTACKS_PER_LEVEL]; diff --git a/src/CombinedLifeMeter.h b/src/CombinedLifeMeter.h index d8a2c778a2..695a7fb800 100644 --- a/src/CombinedLifeMeter.h +++ b/src/CombinedLifeMeter.h @@ -5,7 +5,7 @@ #include "GameConstantsAndTypes.h" #include "ActorFrame.h" - +/** @brief Multiple Players sharing one LifeMeter. */ class CombinedLifeMeter : public ActorFrame { public: @@ -13,11 +13,18 @@ public: virtual ~CombinedLifeMeter() {}; virtual void OnLoadSong() {}; - /* Change life after receiving a tap note grade. This *is* called for - * the head of hold notes. */ + /** + * @brief Change life after receiving a tap note grade. + * + * Note that this *is* called for the head of hold/roll notes. + * @param pn the PlayerNumber that hit the TapNote. + * @param tns the score received from the TapNote. */ virtual void ChangeLife( PlayerNumber pn, TapNoteScore tns ) = 0; - /* Change life after receiving a hold note grade. tscore is the score - * received for the initial tap note. */ + /** + * @brief Change life after receiving a hold note grade. + * @param pn the PlayerNumber that received the hold note score. + * @param hns the hold note score recently received. + * @param tns the score from the initial TapNote. */ virtual void ChangeLife( PlayerNumber pn, HoldNoteScore hns, TapNoteScore tns ) = 0; virtual void HandleTapScoreNone( PlayerNumber pn ) = 0; }; @@ -26,8 +33,10 @@ public: #endif -/* - * (c) 2003 Chris Danford +/** + * @file + * @author Chris Danford (c) 2003 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/CombinedLifeMeterTug.h b/src/CombinedLifeMeterTug.h index 6f89ef6e4c..c0d295c375 100644 --- a/src/CombinedLifeMeterTug.h +++ b/src/CombinedLifeMeterTug.h @@ -1,12 +1,10 @@ -/* CombinedLifeMeterTug - Dance Magic-like tug-o-war life meter. */ - #ifndef CombinedLifeMeterTug_H #define CombinedLifeMeterTug_H #include "CombinedLifeMeter.h" #include "MeterDisplay.h" - +/** @brief Dance Magic-like tug-o-war life meter. */ class CombinedLifeMeterTug : public CombinedLifeMeter { public: @@ -27,8 +25,10 @@ protected: #endif -/* - * (c) 2003-2004 Chris Danford +/** + * @file + * @author Chris Danford (c) 2003-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/CommonMetrics.h b/src/CommonMetrics.h index f0ca41c1cb..91de9df8e0 100644 --- a/src/CommonMetrics.h +++ b/src/CommonMetrics.h @@ -1,5 +1,3 @@ -/** @brief CommonMetrics - Definitions of metrics that are in the "Common" group */ - #ifndef COMMON_METRICS_H #define COMMON_METRICS_H @@ -42,7 +40,10 @@ private: }; -/** @brief The common metrics that are used throughout. */ +/** + * @brief Definitions of metrics that are in the "Common" group. + * + * These metrics are used throughout the metrics file. */ namespace CommonMetrics { /** @brief The first screen in the attract loop. */ diff --git a/src/DateTime.h b/src/DateTime.h index 3fa1735bd0..ced767d92c 100644 --- a/src/DateTime.h +++ b/src/DateTime.h @@ -4,12 +4,30 @@ #include "EnumHelper.h" #include +/** @brief The number of days we check for previously. */ const int NUM_LAST_DAYS = 7; +/** @brief The number of weeks we check for previously. */ const int NUM_LAST_WEEKS = 52; -const int DAYS_IN_YEAR = 366; // maximum (leap years) +/** + * @brief The number of days that are in a year. + * + * This is set up to be a maximum for leap years. */ +const int DAYS_IN_YEAR = 366; +/** + * @brief The number of hours in a day. */ const int HOURS_IN_DAY = 24; +/** + * @brief The number of days that are in a week. */ const int DAYS_IN_WEEK = 7; -enum Month { NUM_Month = 12, Month_Invalid }; +/** @brief Which month are we focusing on? + * + * Is there any reason why the actual months aren't defined + * in here? -Wolfman2000 */ +enum Month +{ + NUM_Month = 12, /**< The number of months in the year. */ + Month_Invalid /**< There should be no month at this point. */ +}; RString DayInYearToString( int iDayInYearIndex ); RString LastDayToString( int iLastDayIndex ); @@ -31,37 +49,110 @@ tm GetNextSunday( tm start ); tm GetDayInYearAndYear( int iDayInYearIndex, int iYear ); - +/** @brief A standard way of determining the date and the time. */ struct DateTime { - int tm_sec; /* seconds after the minute - [0,59] */ - int tm_min; /* minutes after the hour - [0,59] */ - int tm_hour; /* hours since midnight - [0,23] */ - int tm_mday; /* day of the month - [1,31] */ - int tm_mon; /* months since January - [0,11] */ - int tm_year; /* years since 1900 */ + /** + * @brief The number of seconds after the minute. + * + * Valid values are [0, 59]. */ + int tm_sec; + /** + * @brief The number of minutes after the hour. + * + * Valid values are [0, 59]. */ + int tm_min; + /** + * @brief The number of hours since midnight (or 0000 hours). + * + * Valid values are [0, 23]. */ + int tm_hour; + /** + * @brief The specified day of the current month. + * + * Valid values are [1, 31]. + * + * XXX: Is it possible to set an illegal date through here, + * such as day 30 of February? -Wolfman2000 */ + int tm_mday; + /** + * @brief The number of months since January. + * + * Valid values are [0, 11]. */ + int tm_mon; + /** @brief The number of years since the year 1900. */ + int tm_year; + /** @brief Set up a default date and time. */ DateTime(); + /** @brief Initialize the date and time. */ void Init(); + /** + * @brief Determine if this DateTime is less than some other time. + * @param other the other DateTime to check. + * @return true if this is less than the other time, or false otherwise. */ bool operator<( const DateTime& other ) const; + /** + * @brief Determine if this DateTime is greater than some other time. + * @param other the other DateTime to check. + * @return true if this is greater than the other time, or false otherwise. */ bool operator>( const DateTime& other ) const; + /** + * @brief Determine if this DateTime is equal to some other time. + * @param other the other DateTime to check. + * @return true if this is equal to the other time, or false otherwise. */ bool operator==( const DateTime& other ) const; + /** + * @brief Determine if this DateTime is not equal to some other time. + * @param other the other DateTime to check. + * @return true if this is not equal to the other time, or false otherwise. */ bool operator!=( const DateTime& other ) const { return !operator==(other); } + /** + * @brief Determine if this DateTime is less than or equal to some other time. + * @param other the other DateTime to check. + * @return true if this is less than or equal to the other time, or false otherwise. */ + bool operator<=( const DateTime& other ) const { return !operator>(other); } + + /** + * @brief Determine if this DateTime is greater than or equal to some other time. + * @param other the other DateTime to check. + * @return true if this is greater than or equal to the other time, or false otherwise. */ + bool operator>=( const DateTime& other ) const { return !operator<(other); } + /** + * @brief Retrieve the current date and time. + * @return the current date and time. */ static DateTime GetNowDateTime(); - static DateTime GetNowDate(); // GetNowDateTime() with time chopped off + /** + * @brief Retrieve the current date. + * @return the current date. */ + static DateTime GetNowDate(); + /** @brief Remove the time portion from the date. */ void StripTime(); + /** + * @brief Retrieve a string representation of the current date and time. + * + * This returns a common SQL/XML format: "YYYY-MM-DD HH:MM:SS". + * @return the string representation of the date and time. */ RString GetString() const; + /** + * @brief Attempt to turn a string into a DateTime. + * + * As a warning for the squeamish, this code uses the goto keyword. + * @param sDateTime the string to attempt to convert. + * @return true if the conversion worked, or false otherwise. */ bool FromString( const RString sDateTime ); }; #endif -/* - * (c) 2001-2004 Chris Danford +/** + * @file + * @author Chris Danford (c) 2001-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/DisplayResolutions.h b/src/DisplayResolutions.h index 681d296e78..3788942db2 100644 --- a/src/DisplayResolutions.h +++ b/src/DisplayResolutions.h @@ -2,16 +2,24 @@ #define DisplayResolutions_H #include - +/** @brief The dimensions of the program. */ class DisplayResolution { public: + /** @brief The width of the program. */ int iWidth; + /** @brief The height of the program. */ int iHeight; + /** @brief Is this display stretched/used for widescreen? */ bool bStretched; + /** + * @brief Determine if one DisplayResolution is less than the other. + * @param other the other DisplayResolution to check. + * @return true if this DisplayResolution is less than the other, or false otherwise. */ bool operator<( const DisplayResolution &other ) const { +/** @brief A quick way to compare the two DisplayResolutions. */ #define COMPARE(x) if( x != other.x ) return x < other.x; COMPARE( iWidth ); COMPARE( iHeight ); @@ -20,13 +28,15 @@ public: return false; } }; - +/** @brief The collection of DisplayResolutions available within the program. */ typedef set DisplayResolutions; #endif -/* - * (c) 2001-2005 Chris Danford +/** + * @file + * @author Chris Danford (c) 2001-2005 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/DynamicActorScroller.h b/src/DynamicActorScroller.h index e6efe63dd6..1c72d9ad02 100644 --- a/src/DynamicActorScroller.h +++ b/src/DynamicActorScroller.h @@ -1,11 +1,9 @@ -/* DynamicActorScroller - ActorScroller that fills in its children on the fly. */ - #ifndef ACTOR_SCROLLER_H #define ACTOR_SCROLLER_H #include "ActorScroller.h" #include "LuaReference.h" - +/** @brief ActorScroller that fills in its children on the fly. */ class DynamicActorScroller: public ActorScroller { public: @@ -18,7 +16,7 @@ protected: LuaReference m_LoadFunction; }; - +/** @brief an ActorScroller that deletes its children automatically. */ class DynamicActorScrollerAutoDeleteChildren: public DynamicActorScroller { public: @@ -29,8 +27,10 @@ public: #endif -/* - * (c) 2005 Glenn Maynard +/** + * @file + * @author Glenn Maynard (c) 2005 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/FontManager.cpp b/src/FontManager.cpp index 243c06adbc..1500a78e29 100644 --- a/src/FontManager.cpp +++ b/src/FontManager.cpp @@ -40,8 +40,6 @@ void FontManager::ReloadFonts() Font* FontManager::LoadFont( const RString &sFontOrTextureFilePath, RString sChars ) { - PruneFonts(); - Font *pFont; /* Convert the path to lowercase so that we don't load duplicates. Really, * this does not solve the duplicate problem. We could have two copies of diff --git a/src/GameConstantsAndTypes.cpp b/src/GameConstantsAndTypes.cpp index bfc8dc2194..a5bcb68002 100644 --- a/src/GameConstantsAndTypes.cpp +++ b/src/GameConstantsAndTypes.cpp @@ -36,6 +36,7 @@ static const char *RadarCategoryNames[] = { "Hands", "Rolls", "Lifts", + "Fakes", }; XToString( RadarCategory ); XToLocalizedString( RadarCategory ); diff --git a/src/GameConstantsAndTypes.h b/src/GameConstantsAndTypes.h index ddd6bd2e91..38c91cdefc 100644 --- a/src/GameConstantsAndTypes.h +++ b/src/GameConstantsAndTypes.h @@ -39,6 +39,7 @@ enum RadarCategory RadarCategory_Hands, /**< How many hands are in the song? */ RadarCategory_Rolls, /**< How many rolls are in the song? */ RadarCategory_Lifts, /**< How many lifts are in the song? */ + RadarCategory_Fakes, /**< How many fakes are in the song? */ NUM_RadarCategory, /**< The number of radar categories. */ RadarCategory_Invalid }; @@ -583,7 +584,8 @@ enum SampleMusicPreviewMode { SampleMusicPreviewMode_Normal, /**< Music is played as the song is highlighted. */ SampleMusicPreviewMode_StartToPreview, - SampleMusicPreviewMode_ScreenMusic, /**< No music plays. Select it once to preview the music, then once more to select the song. */ + SampleMusicPreviewMode_ScreenMusic, /**< No music plays. Select it once to preview the music, + * then once more to select the song. */ SampleMusicPreviewMode_LastSong, /**< continue playing the last song */ NUM_SampleMusicPreviewMode, SampleMusicPreviewMode_Invalid, @@ -605,7 +607,8 @@ enum Stage Stage_4th, /**< The fourth stage. */ Stage_5th, /**< The fifth stage. */ Stage_6th, /**< The sixth stage. */ - Stage_Next, /**< Somewhere between the sixth and final stage. This won't normally happen because 7 stages is the max in the UI. */ + Stage_Next, /**< Somewhere between the sixth and final stage. + * This won't normally happen because 7 stages is the max in the UI. */ Stage_Final, /**< The last stage. */ Stage_Extra1, /**< The first bonus stage, AKA the extra stage. */ Stage_Extra2, /**< The last bonus stage, AKA the encore extra stage. */ diff --git a/src/GameInput.h b/src/GameInput.h index 0872a04860..fcdb61bf0e 100644 --- a/src/GameInput.h +++ b/src/GameInput.h @@ -1,5 +1,3 @@ -/* GameInput - An input event specific to an InputScheme defined by a logical controller and button. */ - #ifndef GAME_INPUT_H #define GAME_INPUT_H @@ -7,27 +5,29 @@ class InputScheme; +/** @brief the list of controllers in use. */ enum GameController { - GameController_1 = 0, // left controller - GameController_2, // right controller - NUM_GameController, // leave this at the end + GameController_1 = 0, /**< The left controller */ + GameController_2, /**< The right controller */ + NUM_GameController, /**< The number of controllers allowed. */ GameController_Invalid, }; const RString& GameControllerToString( GameController mp ); LuaDeclareType( GameController ); +/** @brief the list of buttons StepMania recognizes. */ enum GameButton { - GAME_BUTTON_MENULEFT, - GAME_BUTTON_MENURIGHT, - GAME_BUTTON_MENUUP, - GAME_BUTTON_MENUDOWN, + GAME_BUTTON_MENULEFT, /**< Navigate the menus to the left. */ + GAME_BUTTON_MENURIGHT, /**< Navigate the menus to the right. */ + GAME_BUTTON_MENUUP, /**< Navigate the menus to the top. */ + GAME_BUTTON_MENUDOWN, /**< Navigate the menus to the bottom. */ GAME_BUTTON_START, GAME_BUTTON_SELECT, GAME_BUTTON_BACK, - GAME_BUTTON_COIN, - GAME_BUTTON_OPERATOR, + GAME_BUTTON_COIN, /**< Insert a coin to play. */ + GAME_BUTTON_OPERATOR, /**< Access the operator menu. */ GAME_BUTTON_EFFECT_UP, GAME_BUTTON_EFFECT_DOWN, GAME_BUTTON_CUSTOM_01, @@ -64,18 +64,29 @@ GameButton StringToGameButton( const InputScheme* pInputs, const RString& s ); #define GAME_BUTTON_NEXT GAME_BUTTON_CUSTOM_01 // dance +/** @brief Set up the left arrow for dance mode. */ #define DANCE_BUTTON_LEFT GAME_BUTTON_CUSTOM_01 +/** @brief Set up the right arrow for dance mode. */ #define DANCE_BUTTON_RIGHT GAME_BUTTON_CUSTOM_02 +/** @brief Set up the up arrow for dance mode. */ #define DANCE_BUTTON_UP GAME_BUTTON_CUSTOM_03 +/** @brief Set up the down arrow for dance mode. */ #define DANCE_BUTTON_DOWN GAME_BUTTON_CUSTOM_04 +/** @brief Set up the upleft arrow for dance mode (solo). */ #define DANCE_BUTTON_UPLEFT GAME_BUTTON_CUSTOM_05 +/** @brief Set up the upright arrow for dance mode (solo). */ #define DANCE_BUTTON_UPRIGHT GAME_BUTTON_CUSTOM_06 #define NUM_DANCE_BUTTONS GAME_BUTTON_CUSTOM_07 // pump +/** @brief Set up the upleft arrow for pump mode. */ #define PUMP_BUTTON_UPLEFT GAME_BUTTON_CUSTOM_01 +/** @brief Set up the upright arrow for pump mode. */ #define PUMP_BUTTON_UPRIGHT GAME_BUTTON_CUSTOM_02 +/** @brief Set up the center arrow for pump mode. */ #define PUMP_BUTTON_CENTER GAME_BUTTON_CUSTOM_03 +/** @brief Set up the downleft arrow for pump mode. */ #define PUMP_BUTTON_DOWNLEFT GAME_BUTTON_CUSTOM_04 +/** @brief Set up the downright arrow for pump mode. */ #define PUMP_BUTTON_DOWNRIGHT GAME_BUTTON_CUSTOM_05 #define NUM_PUMP_BUTTONS GAME_BUTTON_CUSTOM_06 // kb7 @@ -178,7 +189,7 @@ GameButton StringToGameButton( const InputScheme* pInputs, const RString& s ); #define GAME_BUTTON_DOWN GAME_BUTTON_MENUDOWN #define GAME_BUTTON_START GAME_BUTTON_START #define GAME_BUTTON_BACK GAME_BUTTON_BACK - +/** @brief An input event specific to an InputScheme defined by a logical controller and button. */ struct GameInput { GameInput(): controller(GameController_Invalid), button(GameButton_Invalid) { } @@ -207,8 +218,10 @@ struct GameInput #endif -/* - * (c) 2001-2004 Chris Danford +/** + * @file + * @author Chris Danford (c) 2001-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/GameState.cpp b/src/GameState.cpp index ec68e416a0..08ca8205ea 100644 --- a/src/GameState.cpp +++ b/src/GameState.cpp @@ -42,7 +42,6 @@ #include #include - GameState* GAMESTATE = NULL; // global and accessable from anywhere in our program #define NAME_BLACKLIST_FILE "/Data/NamesBlacklist.txt" @@ -161,7 +160,7 @@ GameState::GameState() : m_Environment = new LuaTable; // Don't reset yet; let the first screen do it, so we can use PREFSMAN and THEME. -// Reset(); + //Reset(); // Register with Lua. { @@ -254,7 +253,7 @@ void GameState::Reset() m_MultiPlayerStatus[p] = MultiPlayerStatus_NotJoined; FOREACH_PlayerNumber( pn ) MEMCARDMAN->UnlockCard( pn ); -// m_iCoins = 0; // don't reset coin count! + //m_iCoins = 0; // don't reset coin count! m_bMultiplayer = false; m_iNumMultiplayerNoteFields = 1; *m_Environment = LuaTable(); @@ -399,7 +398,7 @@ void GameState::UnjoinPlayer( PlayerNumber pn ) } } -/* handle multiplayer join? */ +/* xxx: handle multiplayer join? -aj */ namespace { @@ -426,7 +425,7 @@ namespace } }; -// Handle an input that can join a player. Return true if the player joined +// Handle an input that can join a player. Return true if the player joined. bool GameState::JoinInput( PlayerNumber pn ) { // When AutoJoin is enabled, join all players on a single start press. @@ -1461,6 +1460,11 @@ void GameState::LoadNoteSkinMetrics( PlayerNumber pn ) RString m_sNoteSkin = m_pPlayerState[pn]->m_PlayerOptions.GetStage().m_sNoteSkin; RString sStepsType = StringConversion::ToString( this->m_pCurSteps[pn]->m_StepsType ); LOG->Trace("Loading Row/Col/Size values for Noteskin %s | StepsType: %s",m_sNoteSkin.c_str(),sStepsType.c_str()); + + //m_iNoteSkinRowSpacing[pn] = NOTESKIN->GetMetricI( m_sNoteSkin, sStepsType, "RowSpacing" ); + // todo: allow per-column spacing values? -aj + m_iNoteSkinColSpacing[pn] = NOTESKIN->GetMetricI( m_sNoteSkin, sStepsType, "ColSpacing" ); + m_iNoteSkinArrowSize[pn] = NOTESKIN->GetMetricI( m_sNoteSkin, sStepsType, "ArrowSize" ); } */ diff --git a/src/GameState.h b/src/GameState.h index 89de4c05dc..2aef08cc0d 100644 --- a/src/GameState.h +++ b/src/GameState.h @@ -78,9 +78,9 @@ public: * the three credits needed to begin the game. */ BroadcastOnChange m_iCoins; /** @brief The player number used with Styles where one player controls both sides. */ - PlayerNumber m_MasterPlayerNumber; - bool m_bMultiplayer; - int m_iNumMultiplayerNoteFields; + PlayerNumber m_MasterPlayerNumber; + bool m_bMultiplayer; + int m_iNumMultiplayerNoteFields; bool DifficultiesLocked() const; bool ChangePreferredDifficultyAndStepsType( PlayerNumber pn, Difficulty dc, StepsType st ); bool ChangePreferredDifficulty( PlayerNumber pn, int dir ); @@ -90,24 +90,24 @@ public: Difficulty GetClosestShownDifficulty( PlayerNumber pn ) const; Difficulty GetEasiestStepsDifficulty() const; Difficulty GetHardestStepsDifficulty() const; - RageTimer m_timeGameStarted; // from the moment the first player pressed Start - LuaTable *m_Environment; + RageTimer m_timeGameStarted; // from the moment the first player pressed Start + LuaTable *m_Environment; // This is set to a random number per-game/round; it can be used for a random seed. - int m_iGameSeed, m_iStageSeed; - RString m_sStageGUID; + int m_iGameSeed, m_iStageSeed; + RString m_sStageGUID; /** * @brief Determine if a second player can join in at this time. * @return true if a player can still enter the game, false otherwise. */ - bool PlayersCanJoin() const; - int GetCoinsNeededToJoin() const; - bool EnoughCreditsToJoin() const { return m_iCoins >= GetCoinsNeededToJoin(); } + bool PlayersCanJoin() const; + int GetCoinsNeededToJoin() const; + bool EnoughCreditsToJoin() const { return m_iCoins >= GetCoinsNeededToJoin(); } int GetNumSidesJoined() const; const Game* GetCurrentGame(); const Style* GetCurrentStyle() const; - void SetCurrentStyle( const Style *pStyle ); + void SetCurrentStyle( const Style *pStyle ); void GetPlayerInfo( PlayerNumber pn, bool& bIsEnabledOut, bool& bIsHumanOut ); bool IsPlayerEnabled( PlayerNumber pn ) const; @@ -115,6 +115,10 @@ public: bool IsPlayerEnabled( const PlayerState* pPlayerState ) const; int GetNumPlayersEnabled() const; + /** + * @brief Is the specified Player a human Player? + * @param pn the numbered Player to check. + * @return true if it's a human Player, or false otherwise. */ bool IsHumanPlayer( PlayerNumber pn ) const; int GetNumHumanPlayers() const; PlayerNumber GetFirstHumanPlayer() const; @@ -129,17 +133,17 @@ public: BroadcastOnChange m_sPreferredSongGroup; // GROUP_ALL denotes no preferred group BroadcastOnChange m_sPreferredCourseGroup; // GROUP_ALL denotes no preferred group - bool m_bChangedFailTypeOnScreenSongOptions; // true if FailType was changed in the song options screen + bool m_bChangedFailTypeOnScreenSongOptions; // true if FailType was changed in the song options screen BroadcastOnChange m_PreferredStepsType; BroadcastOnChange1D m_PreferredDifficulty; BroadcastOnChange1D m_PreferredCourseDifficulty;// used in nonstop BroadcastOnChange m_SortOrder; // set by MusicWheel - SortOrder m_PreferredSortOrder; // used by MusicWheel - EditMode m_EditMode; - bool IsEditing() const { return m_EditMode != EditMode_Invalid; } - bool m_bDemonstrationOrJukebox; // ScreenGameplay does special stuff when this is true - bool m_bJukeboxUsesModifiers; - int m_iNumStagesOfThisSong; + SortOrder m_PreferredSortOrder; // used by MusicWheel + EditMode m_EditMode; + bool IsEditing() const { return m_EditMode != EditMode_Invalid; } + bool m_bDemonstrationOrJukebox; // ScreenGameplay does special stuff when this is true + bool m_bJukeboxUsesModifiers; + int m_iNumStagesOfThisSong; /** * @brief Increase this every stage while not resetting on a continue. * @@ -159,8 +163,8 @@ public: void CancelStage(); void CommitStageStats(); void FinishStage(); - int GetNumStagesLeft( PlayerNumber pn ) const; - int GetSmallestNumStagesLeftForAnyHumanPlayer() const; + int GetNumStagesLeft( PlayerNumber pn ) const; + int GetSmallestNumStagesLeftForAnyHumanPlayer() const; bool IsFinalStageForAnyHumanPlayer() const; bool IsAnExtraStage() const; bool IsAnExtraStageAndSelectionLocked() const; @@ -173,7 +177,6 @@ public: bool m_bLoadingNextSong; int GetLoadingCourseSongIndex() const; - // State Info used during gameplay // NULL on ScreenSelectMusic if the currently selected wheel item isn't a Song. @@ -220,9 +223,6 @@ public: // not sure I want to let noteskins change row spacing, as that changes how // the speed mods work... -aj //int m_iNoteSkinRowSpacing[NUM_PLAYERS]; - // what are these for, exactly? -aj - //bool m_bNoteSkinOverrideDim[NUM_PLAYERS]; - //bool m_bNoteSkinOverrideBright[NUM_PLAYERS]; float m_fMusicSecondsVisible; float m_fSongBeatVisible; diff --git a/src/GameplayAssist.h b/src/GameplayAssist.h index 5f153c3dc4..8a548e6b1f 100644 --- a/src/GameplayAssist.h +++ b/src/GameplayAssist.h @@ -1,5 +1,3 @@ -/** @brief GameplayAssist - Encapsulate playing of handclap and metronome. */ - #ifndef GameplayAssist_H #define GameplayAssist_H diff --git a/src/GhostArrowRow.h b/src/GhostArrowRow.h index 7fdd604343..7d07b66276 100644 --- a/src/GhostArrowRow.h +++ b/src/GhostArrowRow.h @@ -1,5 +1,3 @@ -/* GhostArrowRow - Row of GhostArrow actors. */ - #ifndef GHOSTARROWROW_H #define GHOSTARROWROW_H @@ -8,7 +6,7 @@ #include "NoteTypes.h" class PlayerState; - +/** @brief Row of GhostArrow Actors. */ class GhostArrowRow : public ActorFrame { public: @@ -34,8 +32,10 @@ protected: #endif -/* - * (c) 2001-2004 Chris Danford +/** + * @file + * @author Chris Danford (c) 2001-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/Grade.h b/src/Grade.h index f913eac8ed..8d53fca304 100644 --- a/src/Grade.h +++ b/src/Grade.h @@ -63,6 +63,7 @@ static inline RString GradeToString( Grade g ) * * This is mainly for backward compatibility purposes, but the announcer * also uses it. Think "AAA", "B", etc. + * This is only referenced in ScreenEvaluation at the moment. * @param g the current Grade. * @return the old styled grade string. */ RString GradeToOldString( Grade g ); diff --git a/src/GrooveRadar.h b/src/GrooveRadar.h index 0cd6ba3d57..170d1e48d7 100644 --- a/src/GrooveRadar.h +++ b/src/GrooveRadar.h @@ -16,9 +16,16 @@ public: virtual GrooveRadar *Copy() const; virtual void LoadFromNode( const XNode* pNode ); + /** + * @brief Give the Player an empty GrooveRadar. + * @param pn the Player to give an empty GrooveRadar. */ void SetEmpty( PlayerNumber pn ); void SetFromRadarValues( PlayerNumber pn, const RadarValues &rv ); - void SetFromSteps( PlayerNumber pn, Steps* pSteps ); // NULL means no Steps + /** + * @brief Give the Player a GrooveRadar based on some Steps. + * @param pn the Player to give a GrooveRadar. + * @param pSteps the Steps to use to make the radar. If NULL, there are no Steps. */ + void SetFromSteps( PlayerNumber pn, Steps* pSteps ); // Lua void PushSelf( lua_State *L ); @@ -58,8 +65,10 @@ protected: #endif -/* - * (c) 2001-2004 Chris Danford +/** + * @file + * @author Chris Danford (c) 2001-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/HighScore.h b/src/HighScore.h index fb99deb4c0..a0e11357f8 100644 --- a/src/HighScore.h +++ b/src/HighScore.h @@ -58,6 +58,9 @@ struct HighScore * @return true if the score would be disqualified, false otherwise. */ bool GetDisqualified() const; + /** + * @brief Set the name of the Player that earned the score. + * @param sName the name of the Player. */ void SetName( const RString &sName ); void SetGrade( Grade g ); void SetScore( int iScore ); diff --git a/src/InputEventPlus.h b/src/InputEventPlus.h index 5110f93fee..fc1bea127f 100644 --- a/src/InputEventPlus.h +++ b/src/InputEventPlus.h @@ -1,12 +1,10 @@ -/* InputEventPlus - Holds a device input plus Game/Menu translations. */ - #ifndef INPUT_EVENT_PLUS_H #define INPUT_EVENT_PLUS_H #include "InputFilter.h" #include "GameInput.h" #include "PlayerNumber.h" - +/** @brief Holds a device input plus Game/Menu translations. */ class InputEventPlus { public: @@ -32,8 +30,10 @@ struct AlternateMapping #endif -/* - * (c) 2001-2004 Chris Danford +/** + * @file + * @author Chris Danford (c) 2001-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/Inventory.h b/src/Inventory.h index f3446da2ac..1571997cbb 100644 --- a/src/Inventory.h +++ b/src/Inventory.h @@ -1,5 +1,3 @@ -/* Inventory - Inventory management for PLAY_MODE_BATTLE. */ - #ifndef Inventory_H #define Inventory_H @@ -13,7 +11,7 @@ AutoScreenMessage( SM_BattleDamageLevel2 ); AutoScreenMessage( SM_BattleDamageLevel3 ); class PlayerState; - +/** @brief Inventory management for PLAY_MODE_BATTLE. */ class Inventory : public Actor { public: @@ -32,6 +30,7 @@ protected: PlayerState* m_pPlayerState; int m_iLastSeenCombo; + /** @brief a sound played when an item has been acquired. */ RageSound m_soundAcquireItem; vector m_vpSoundUseItem; RageSound m_soundItemEnding; @@ -39,8 +38,10 @@ protected: #endif -/* - * (c) 2003 Chris Danford +/** + * @file + * @author Chris Danford (c) 2003 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/LifeMeter.h b/src/LifeMeter.h index 1fcf213a05..555106d025 100644 --- a/src/LifeMeter.h +++ b/src/LifeMeter.h @@ -8,7 +8,7 @@ class PlayerState; class PlayerStageStats; - +/** @brief The player's life. */ class LifeMeter : public ActorFrame { public: @@ -22,11 +22,17 @@ public: } virtual void OnLoadSong() {}; virtual void OnSongEnded() {}; - /* Change life after receiving a tap note grade. This *is* called for - * the head of hold notes. */ + /** + * @brief Change life after receiving a tap note grade. + * + * This *is* called for the head of hold notes. + * @param score the tap note grade in question. */ virtual void ChangeLife( TapNoteScore score ) = 0; - /* Change life after receiving a hold note grade. tscore is the score - * received for the initial tap note. */ + /** + * @brief Change life after receiving a hold note grade. + * + * @param hns the hold note grade in question. + * @param tns the score received for the initial tap note. */ virtual void ChangeLife( HoldNoteScore hns, TapNoteScore tns ) = 0; virtual void HandleTapScoreNone() = 0; virtual bool IsInDanger() const = 0; @@ -50,8 +56,10 @@ protected: #endif -/* - * (c) 2001-2003 Chris Danford +/** + * @file + * @author Chris Danford (c) 2001-2003 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/LifeMeterBar.h b/src/LifeMeterBar.h index f708185b66..087357c8be 100644 --- a/src/LifeMeterBar.h +++ b/src/LifeMeterBar.h @@ -1,5 +1,3 @@ -/* LifeMeterBar - The player's life represented as a bar. */ - #ifndef LIFEMETERBAR_H #define LIFEMETERBAR_H @@ -10,7 +8,7 @@ #include "ThemeMetric.h" class StreamDisplay; - +/** @brief The player's life represented as a bar. */ class LifeMeterBar : public LifeMeter { public: @@ -59,9 +57,10 @@ private: float m_fLifeDifficulty; // essentially same as pref int m_iProgressiveLifebar; // cached from prefs - int m_iMissCombo; // current number of progressive W5/miss - - int m_iComboToRegainLife; // combo needed before lifebar starts filling up after fail + /** @brief The current number of progressive W5/miss rankings. */ + int m_iMissCombo; + /** @brief The combo needed before the life bar starts to fill up after a Player failed. */ + int m_iComboToRegainLife; }; #endif diff --git a/src/LifeMeterBattery.h b/src/LifeMeterBattery.h index 67a40cd99c..964814fe7e 100644 --- a/src/LifeMeterBattery.h +++ b/src/LifeMeterBattery.h @@ -51,7 +51,9 @@ private: PercentageDisplay m_Percent; + /** @brief The sound played when a Player loses a life. */ RageSound m_soundLoseLife; + /** @brief The sound played when a Player gains a life. */ RageSound m_soundGainLife; }; diff --git a/src/LifeMeterTime.h b/src/LifeMeterTime.h index e318d480bf..1206fc2ba5 100644 --- a/src/LifeMeterTime.h +++ b/src/LifeMeterTime.h @@ -1,5 +1,3 @@ -/* LifeMeterTime - Battery life meter used in Survival. */ - #ifndef LifeMeterTime_H #define LifeMeterTime_H @@ -12,7 +10,7 @@ #include "MeterDisplay.h" #include "Quad.h" class StreamDisplay; - +/** @brief Battery life meter used in Survival. */ class LifeMeterTime : public LifeMeter { public: @@ -42,15 +40,17 @@ private: float m_fLifeTotalGainedSeconds; float m_fLifeTotalLostSeconds; - + /** @brief The sound played when time is gained at the start of each Song. */ RageSound m_soundGainLife; }; #endif -/* - * (c) 2001-2004 Chris Danford +/** + * @file + * @author Chris Danford (c) 2001-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/LocalizedString.h b/src/LocalizedString.h index d3309ea494..1e5c7256e8 100644 --- a/src/LocalizedString.h +++ b/src/LocalizedString.h @@ -1,5 +1,3 @@ -/* LocalizedString - */ - #ifndef LocalizedString_H #define LocalizedString_H @@ -10,7 +8,7 @@ public: virtual void Load( const RString& sGroup, const RString& sName ) = 0; virtual const RString &GetLocalized() const = 0; }; - +/** @brief Get a String based on the user's natural language. */ class LocalizedString { public: @@ -31,8 +29,10 @@ private: #endif -/* - * Copyright (c) 2001-2005 Chris Danford, Glenn Maynard +/** + * @file + * @author Chris Danford, Glenn Maynard (c) 2001-2005 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/LuaExpressionTransform.h b/src/LuaExpressionTransform.h index 3ca5234e8f..6a6ce463c1 100644 --- a/src/LuaExpressionTransform.h +++ b/src/LuaExpressionTransform.h @@ -1,4 +1,4 @@ -/* LuaExpressionTransform - Handle transforming a list of items. Cache item transforms based on fPositionOffsetFromCenter and iItemIndex for speed. */ +/* LuaExpressionTransform - */ #ifndef LuaExpressionTransform_H #define LuaExpressionTransform_H @@ -7,6 +7,10 @@ #include "LuaReference.h" #include +/** + * @brief Handle transforming a list of items + * + * Cache item transforms based on fPositionOffsetFromCenter and iItemIndex for speed. */ class LuaExpressionTransform { public: diff --git a/src/LyricsLoader.h b/src/LyricsLoader.h index 5f4d10551a..87b04b5be7 100644 --- a/src/LyricsLoader.h +++ b/src/LyricsLoader.h @@ -1,20 +1,24 @@ -/* LyricsLoader - Loads lyrics from an LRC file. */ - #ifndef LYRICS_LOADER_H #define LYRICS_LOADER_H class Song; - +/** @brief Loads lyrics from an LRC file. */ class LyricsLoader { public: + /** + * @brief Load the lyrics into the Song. + * @param sPath the path to the Lyrics. + * @param out the Song to receive the Lyrics. */ bool LoadFromLRCFile( const RString& sPath, Song &out ); }; #endif -/* - * (c) 2003 Kevin Slaughter, Glenn Maynard +/** + * @file + * @author Kevin Slaughter, Glenn Maynard (c) 2003 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/MessageManager.h b/src/MessageManager.h index e1101ff800..86d787b63c 100644 --- a/src/MessageManager.h +++ b/src/MessageManager.h @@ -1,5 +1,3 @@ -/* MessageManager - Control the world. */ - #ifndef MessageManager_H #define MessageManager_H @@ -8,6 +6,7 @@ struct lua_State; class LuaTable; class LuaReference; +/** @brief The various messages available to watch for. */ enum MessageID { Message_CurrentGameChanged, @@ -173,7 +172,7 @@ private: vector m_vsSubscribedTo; }; - +/** @brief Deliver messages to any part of the program as needed. */ class MessageManager { public: diff --git a/src/ModelManager.h b/src/ModelManager.h index c116f54ebe..c9a6822a61 100644 --- a/src/ModelManager.h +++ b/src/ModelManager.h @@ -1,4 +1,3 @@ -/* ModelManager - Interface for loading and releasing textures. */ #ifndef MODEL_MANAGER_H #define MODEL_MANAGER_H @@ -25,7 +24,10 @@ struct ModelManagerPrefs m_bDelayedUnload != rhs.m_bDelayedUnload; } }; - +/** + * @brief Class for loading and releasing textures. + * + * Funnily enough, the original documentation claimed this was an Interface. */ class ModelManager { public: @@ -36,7 +38,11 @@ public: void UnloadModel( RageModelGeometry *m ); // void ReloadAll(); - bool SetPrefs( const ModelManagerPrefs& prefs ); // returns true if needs display to be reset + /** + * @brief Set up new preferences. + * @param prefs the new preferences to set up. + * @return true if the display needs to be reset, false otherwise. */ + bool SetPrefs( const ModelManagerPrefs& prefs ); const ModelManagerPrefs& GetPrefs() { return m_Prefs; } protected: @@ -50,8 +56,10 @@ extern ModelManager* MODELMAN; // global and accessable from anywhere in our pro #endif -/* - * (c) 2003-2004 Chris Danford +/** + * @file + * @author Chris Danford (c) 2003-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/NoteData.cpp b/src/NoteData.cpp index 95eb80d76f..1ce496b25c 100644 --- a/src/NoteData.cpp +++ b/src/NoteData.cpp @@ -635,6 +635,20 @@ int NoteData::GetNumLifts( int iStartIndex, int iEndIndex ) const return iNumLifts; } +int NoteData::GetNumFakes( int iStartIndex, int iEndIndex ) const +{ + int iNumFakes = 0; + + for( int t=0; t iNewNumTracks ) { // Use a different algorithm for reducing tracks. @@ -561,6 +561,37 @@ void NoteDataUtil::LoadTransformedSlidingWindow( const NoteData &in, NoteData &o } } +void PlaceAutoKeysound( const NoteData &in, NoteData &out, int iNewNumTracks, int row, const TapNote &tnFrom ) +{ + int iEmptyTrack = -1; + int iEmptyRow = row - 1; + bool bFoundEmptyTrack = false; + if( iEmptyRow < 0 ) + { + iEmptyRow = 0; + } + for( int r = iEmptyRow; r <= iEmptyRow + 2; r += 2 ) + { + for( int i = 0; i < iNewNumTracks; ++i ) + { + if ( out.GetTapNote(i, r) == TAP_EMPTY ) + { + iEmptyTrack = i; + iEmptyRow = r; + bFoundEmptyTrack = true; + break; + } + } + if( bFoundEmptyTrack ) + break; + } + + if( iEmptyTrack != -1 ) + { + out.SetTapNote( iEmptyTrack, iEmptyRow, tnFrom ); + } +} + void NoteDataUtil::LoadOverlapped( const NoteData &in, NoteData &out, int iNewNumTracks ) { out.SetNumTracks( iNewNumTracks ); @@ -587,7 +618,7 @@ void NoteDataUtil::LoadOverlapped( const NoteData &in, NoteData &out, int iNewNu for( int iTrackFrom = 0; iTrackFrom < in.GetNumTracks(); ++iTrackFrom ) { const TapNote &tnFrom = in.GetTapNote( iTrackFrom, row ); - if( tnFrom.type == TapNote::empty ) + if( tnFrom.type == TapNote::empty || tnFrom.type == TapNote::autoKeysound ) continue; // If this is a hold note, find the end. @@ -609,7 +640,16 @@ void NoteDataUtil::LoadOverlapped( const NoteData &in, NoteData &out, int iNewNu // If it's still in use, then we just don't have an available track. if( iEndIndex - LastSourceRow[iTrackTo] < ShiftThreshold ) + { + // If it has a keysound, put it in autokeysound track. + if( tnFrom.iKeysoundIndex >= 0 ) + { + TapNote akTap = tnFrom; + akTap.type = TapNote::autoKeysound; + PlaceAutoKeysound( in, out, iNewNumTracks, row, akTap ); + } continue; + } } LastSourceTrack[iTrackTo] = iTrackFrom; @@ -621,6 +661,16 @@ void NoteDataUtil::LoadOverlapped( const NoteData &in, NoteData &out, int iNewNu out.SetTapNote( iTrackTo, iEndIndex, tnTail ); } } + + // find empty track for autokeysounds in 2 next rows, so you can hear most autokeysounds + for( int iTrackFrom = 0; iTrackFrom < in.GetNumTracks(); ++iTrackFrom ) + { + const TapNote &tnFrom = in.GetTapNote( iTrackFrom, row ); + if( tnFrom.type != TapNote::autoKeysound ) + continue; + + PlaceAutoKeysound( in, out, iNewNumTracks, row, tnFrom ); + } } } @@ -749,6 +799,7 @@ void NoteDataUtil::CalculateRadarValues( const NoteData &in, float fSongSeconds, case RadarCategory_Hands: out[rc] = (float) in.GetNumHands(); break; case RadarCategory_Rolls: out[rc] = (float) in.GetNumRolls(); break; case RadarCategory_Lifts: out[rc] = (float) in.GetNumLifts(); break; + case RadarCategory_Fakes: out[rc] = (float) in.GetNumFakes(); break; default: ASSERT(0); } } @@ -928,14 +979,29 @@ void NoteDataUtil::RemoveQuads( NoteData &inout, int iStartIndex, int iEndIndex RemoveSimultaneousNotes( inout, 3, iStartIndex, iEndIndex ); } -void NoteDataUtil::RemoveMines( NoteData &inout, int iStartIndex, int iEndIndex ) +void NoteDataUtil::RemoveSpecificTapNotes( NoteData &inout, TapNote::Type tn, int iStartIndex, int iEndIndex ) { for( int t=0; t saValues; split( sRadarValues, ",", saValues, true ); - if( saValues.size() == NUM_RadarCategory * NUM_PLAYERS ) + int categories = NUM_RadarCategory - 1; // Fakes aren't counted in the radar values. + if( saValues.size() == (unsigned)categories * NUM_PLAYERS ) { RadarValues v[NUM_PLAYERS]; FOREACH_PlayerNumber( pn ) - FOREACH_ENUM( RadarCategory, rc ) - v[pn][rc] = StringToFloat( saValues[pn*NUM_RadarCategory + rc] ); + { + // Can't use the foreach anymore due to flexible radar lines. + for( RadarCategory rc = (RadarCategory)0; rc < categories; + enum_add( rc, 1 ) ) + { + v[pn][rc] = StringToFloat( saValues[pn*categories + rc] ); + } + } out.SetCachedRadarValues( v ); } diff --git a/src/NotesLoaderSSC.cpp b/src/NotesLoaderSSC.cpp index de6b5dffb9..1721e01dfa 100644 --- a/src/NotesLoaderSSC.cpp +++ b/src/NotesLoaderSSC.cpp @@ -658,12 +658,23 @@ bool SSCLoader::LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCach { vector saValues; split( sParams[1], ",", saValues, true ); - if( saValues.size() == NUM_RadarCategory * NUM_PLAYERS ) + + int categories = NUM_RadarCategory; + if( out.m_fVersion < VERSION_RADAR_FAKE ) + categories -= 1; + + if( saValues.size() == (unsigned)categories * NUM_PLAYERS ) { RadarValues v[NUM_PLAYERS]; FOREACH_PlayerNumber( pn ) - FOREACH_ENUM( RadarCategory, rc ) - v[pn][rc] = StringToFloat( saValues[pn*NUM_RadarCategory + rc] ); + { + // Can't use the foreach anymore due to flexible radar lines. + for( RadarCategory rc = (RadarCategory)0; rc < categories; + enum_add( rc, +1 ) ) + { + v[pn][rc] = StringToFloat( saValues[pn*categories + rc] ); + } + } pNewNotes->SetCachedRadarValues( v ); } } @@ -917,6 +928,7 @@ bool SSCLoader::LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCach } } } + out.m_fVersion = STEPFILE_VERSION_NUMBER; return true; } diff --git a/src/NotesLoaderSSC.h b/src/NotesLoaderSSC.h index 675a91a2e8..ae8f00bc9c 100644 --- a/src/NotesLoaderSSC.h +++ b/src/NotesLoaderSSC.h @@ -21,6 +21,8 @@ enum SSCLoadingStates NUM_SSCLoadingStates /**< The number of states used. */ }; +const float VERSION_RADAR_FAKE = 0.53f; + /** * @brief The SSCLoader handles all of the parsing needed for .ssc files. */ diff --git a/src/NotesWriterSM.cpp b/src/NotesWriterSM.cpp index f43643b343..df1ac5e87d 100644 --- a/src/NotesWriterSM.cpp +++ b/src/NotesWriterSM.cpp @@ -273,11 +273,17 @@ static RString GetSMNotesTag( const Song &song, const Steps &in ) lines.push_back( ssprintf( " %d:", in.GetMeter() ) ); vector asRadarValues; + // SM files don't use fakes for radar data. Keep it that way. + int categories = NUM_RadarCategory - 1; FOREACH_PlayerNumber( pn ) { const RadarValues &rv = in.GetRadarValues( pn ); - FOREACH_ENUM( RadarCategory, rc ) + // Can't use the foreach anymore due to flexible radar lines. + for( RadarCategory rc = (RadarCategory)0; rc < categories; + enum_add( rc, 1 ) ) + { asRadarValues.push_back( ssprintf("%.3f", rv[rc]) ); + } } lines.push_back( ssprintf( " %s:", join(",",asRadarValues).c_str() ) ); diff --git a/src/NotesWriterSSC.cpp b/src/NotesWriterSSC.cpp index 0a77bae975..e26d3d6c69 100644 --- a/src/NotesWriterSSC.cpp +++ b/src/NotesWriterSSC.cpp @@ -47,7 +47,7 @@ static RString BackgroundChangeToString( const BackgroundChange &bgc ) * @param out the Song in question. */ static void WriteGlobalTags( RageFile &f, const Song &out ) { - f.PutLine( ssprintf( "#VERSION:%.2f;", out.m_fVersion ) ); + f.PutLine( ssprintf( "#VERSION:%.2f;", STEPFILE_VERSION_NUMBER ) ); f.PutLine( ssprintf( "#TITLE:%s;", SmEscape(out.m_sMainTitle).c_str() ) ); f.PutLine( ssprintf( "#SUBTITLE:%s;", SmEscape(out.m_sSubTitle).c_str() ) ); f.PutLine( ssprintf( "#ARTIST:%s;", SmEscape(out.m_sArtist).c_str() ) ); diff --git a/src/OptionRowHandler.cpp b/src/OptionRowHandler.cpp index e3206c0f0f..2962f963c3 100644 --- a/src/OptionRowHandler.cpp +++ b/src/OptionRowHandler.cpp @@ -1364,7 +1364,7 @@ OptionRowHandler* OptionRowHandlerUtil::MakeSimple( const MenuRowDef &mr ) pHand->m_Def.m_sName = mr.sName; FontCharAliases::ReplaceMarkers( pHand->m_Def.m_sName ); // Allow special characters - + pHand->m_Def.m_vEnabledForPlayers.clear(); if( mr.pfnEnabled? mr.pfnEnabled():mr.bEnabled ) { diff --git a/src/OptionsCursor.h b/src/OptionsCursor.h index a1b4da23f9..85f9a19ea3 100644 --- a/src/OptionsCursor.h +++ b/src/OptionsCursor.h @@ -9,7 +9,11 @@ class OptionsCursor : public ActorFrame { public: + /** @brief Set up a default OptionsCursor. */ OptionsCursor(); + /** + * @brief Set up an OptionsCursor based on an existing copy. + * @param cpy the OptionsCursor we are copying. */ OptionsCursor( const OptionsCursor &cpy ); void Load( const RString &sMetricsGroup, bool bLoadCanGos ); diff --git a/src/OptionsList.h b/src/OptionsList.h index cc0640c4fa..c96a04a5d3 100644 --- a/src/OptionsList.h +++ b/src/OptionsList.h @@ -1,5 +1,3 @@ -/* OptionsList - A popup options list. */ - #ifndef SCREEN_OPTIONS_LIST_H #define SCREEN_OPTIONS_LIST_H @@ -37,7 +35,7 @@ private: ThemeMetric ITEMS_SPACING_Y; }; - +/** @brief A popup options list. */ class OptionsList: public ActorFrame { public: @@ -51,10 +49,10 @@ public: void Link( OptionsList *pLink ) { m_pLinked = pLink; } - // Show the top-level menu. + /** @brief Show the top-level menu. */ void Open(); - // Close all menus (for menu timer). + /** @brief Close all menus (for menu timer). */ void Close(); void Input( const InputEventPlus &input ); @@ -108,8 +106,10 @@ private: #endif -/* - * Copyright (c) 2006 Glenn Maynard +/** + * @file + * @author 2006 Glenn Maynard (c) + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/PaneDisplay.cpp b/src/PaneDisplay.cpp index cdd89c681f..5e5aa7ae5f 100644 --- a/src/PaneDisplay.cpp +++ b/src/PaneDisplay.cpp @@ -26,6 +26,7 @@ static const char *PaneCategoryNames[] = { "Mines", "Hands", "Lifts", + "Fakes", "MachineHighScore", "MachineHighName", "ProfileHighScore", @@ -206,6 +207,7 @@ void PaneDisplay::SetContent( PaneCategory c ) case PaneCategory_Mines: val = rv[RadarCategory_Mines]; break; case PaneCategory_Hands: val = rv[RadarCategory_Hands]; break; case PaneCategory_Lifts: val = rv[RadarCategory_Lifts]; break; + case PaneCategory_Fakes: val = rv[RadarCategory_Fakes]; break; case PaneCategory_ProfileHighScore: case PaneCategory_MachineHighName: // set val for color case PaneCategory_MachineHighScore: diff --git a/src/PaneDisplay.h b/src/PaneDisplay.h index aa5fa102d3..59765a582f 100644 --- a/src/PaneDisplay.h +++ b/src/PaneDisplay.h @@ -22,6 +22,7 @@ enum PaneCategory PaneCategory_Mines, PaneCategory_Hands, PaneCategory_Lifts, + PaneCategory_Fakes, PaneCategory_MachineHighScore, PaneCategory_MachineHighName, PaneCategory_ProfileHighScore, diff --git a/src/Player.cpp b/src/Player.cpp index 0143fdc04e..7baec08672 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -593,9 +593,7 @@ void Player::Load() // parameters are invalid somehow... -aj RageSoundLoadParams SoundParams; - //RageSoundParams p; SoundParams.m_bSupportPan = true; - //p.StopMode = RageSoundParams::M_STOP; float fBalance = GameSoundManager::GetPlayerBalance( pn ); for( unsigned i=0; i &AddTo, bool bForceNoteSkin ) const if( m_bTransforms[TRANSFORM_HOLDROLLS] ) AddTo.push_back( "HoldsToRolls" ); if( m_bTransforms[TRANSFORM_NOJUMPS] ) AddTo.push_back( "NoJumps" ); if( m_bTransforms[TRANSFORM_NOHANDS] ) AddTo.push_back( "NoHands" ); + if( m_bTransforms[TRANSFORM_NOLIFTS] ) AddTo.push_back( "NoLifts" ); + if( m_bTransforms[TRANSFORM_NOFAKES] ) AddTo.push_back( "NoFakes" ); if( m_bTransforms[TRANSFORM_NOQUADS] ) AddTo.push_back( "NoQuads" ); if( m_bTransforms[TRANSFORM_NOSTRETCH] )AddTo.push_back( "NoStretch" ); if( m_bMuteOnError ) AddTo.push_back( "MuteOnError" ); @@ -407,6 +409,8 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut else if( sBit == "norolls" ) m_bTransforms[TRANSFORM_NOROLLS] = on; else if( sBit == "nomines" ) m_bTransforms[TRANSFORM_NOMINES] = on; else if( sBit == "nostretch" ) m_bTransforms[TRANSFORM_NOSTRETCH] = on; + else if( sBit == "nolifts" ) m_bTransforms[TRANSFORM_NOLIFTS] = on; + else if( sBit == "nofakes" ) m_bTransforms[TRANSFORM_NOFAKES] = on; else if( sBit == "dark" ) SET_FLOAT( fDark ) else if( sBit == "blind" ) SET_FLOAT( fBlind ) else if( sBit == "cover" ) SET_FLOAT( fCover ) @@ -693,6 +697,10 @@ bool PlayerOptions::IsEasierForSongAndSteps( Song* pSong, Steps* pSteps, PlayerN return true; if( m_bTransforms[TRANSFORM_NOJUMPS] && rv[RadarCategory_Jumps]>0 ) return true; + if( m_bTransforms[TRANSFORM_NOLIFTS] && rv[RadarCategory_Lifts]>0 ) + return true; + if( m_bTransforms[TRANSFORM_NOFAKES] && rv[RadarCategory_Fakes]>0 ) + return true; if( m_bTransforms[TRANSFORM_NOSTRETCH] ) return true; @@ -787,6 +795,8 @@ RString PlayerOptions::GetSavedPrefsString() const SAVE( m_bTransforms[TRANSFORM_NOHANDS] ); SAVE( m_bTransforms[TRANSFORM_NOQUADS] ); SAVE( m_bTransforms[TRANSFORM_NOSTRETCH] ); + SAVE( m_bTransforms[TRANSFORM_NOLIFTS] ); + SAVE( m_bTransforms[TRANSFORM_NOFAKES] ); SAVE( m_ScoreDisplay ); SAVE( m_bMuteOnError ); SAVE( m_sNoteSkin ); @@ -818,11 +828,31 @@ void PlayerOptions::ResetPrefs( ResetPrefsType type ) CPY( m_bTransforms[TRANSFORM_NOHANDS] ); CPY( m_bTransforms[TRANSFORM_NOQUADS] ); CPY( m_bTransforms[TRANSFORM_NOSTRETCH] ); + CPY( m_bTransforms[TRANSFORM_NOLIFTS] ); + CPY( m_bTransforms[TRANSFORM_NOFAKES] ); // Don't clear this. // CPY( m_sNoteSkin ); #undef CPY } +// lua start +#include "LuaBinding.h" + +/** @brief Allow Lua to have access to PlayerOptions. */ +class LunaPlayerOptions: public Luna +{ +public: + DEFINE_METHOD( GetNoteSkin, m_sNoteSkin ) + + LunaPlayerOptions() + { + ADD_METHOD( GetNoteSkin ); + } +}; + +LUA_REGISTER_CLASS( PlayerOptions ) +// lua end + /* * (c) 2001-2004 Chris Danford, Glenn Maynard * All rights reserved. diff --git a/src/PlayerOptions.h b/src/PlayerOptions.h index 8557ba43cf..e18095b008 100644 --- a/src/PlayerOptions.h +++ b/src/PlayerOptions.h @@ -1,5 +1,3 @@ -/* PlayerOptions - Per-player options that are not saved between sessions. */ - #ifndef PLAYER_OPTIONS_H #define PLAYER_OPTIONS_H @@ -7,10 +5,11 @@ class Course; class Song; class Steps; class Trail; +struct lua_State; #include "GameConstantsAndTypes.h" #include "PlayerNumber.h" - +/** @brief Per-player options that are not saved between sessions. */ class PlayerOptions { public: @@ -34,16 +33,19 @@ public: void ChooseRandomModifiers(); bool ContainsTransformOrTurn() const; + // Lua + void PushSelf( lua_State *L ); + bool operator==( const PlayerOptions &other ) const; bool operator!=( const PlayerOptions &other ) const { return !operator==(other); } - + /** @brief The various acceleration mods. */ enum Accel { - ACCEL_BOOST, - ACCEL_BRAKE, + ACCEL_BOOST, /**< The arrows start slow, then zoom towards the targets. */ + ACCEL_BRAKE, /**< The arrows start fast, then slow down as they approach the targets. */ ACCEL_WAVE, ACCEL_EXPAND, - ACCEL_BOOMERANG, + ACCEL_BOOMERANG, /**< The arrows start from above the targets, go down, then come back up. */ NUM_ACCELS }; enum Effect { @@ -63,24 +65,26 @@ public: EFFECT_ROLL, NUM_EFFECTS }; + /** @brief The various appearance mods. */ enum Appearance { - APPEARANCE_HIDDEN, - APPEARANCE_HIDDEN_OFFSET, - APPEARANCE_SUDDEN, - APPEARANCE_SUDDEN_OFFSET, - APPEARANCE_STEALTH, - APPEARANCE_BLINK, - APPEARANCE_RANDOMVANISH, + APPEARANCE_HIDDEN, /**< The arrows disappear partway up. */ + APPEARANCE_HIDDEN_OFFSET, /**< This determines when the arrows disappear. */ + APPEARANCE_SUDDEN, /**< The arrows appear partway up. */ + APPEARANCE_SUDDEN_OFFSET, /**< This determines when the arrows appear. */ + APPEARANCE_STEALTH, /**< The arrows are not shown at all. */ + APPEARANCE_BLINK, /**< The arrows blink constantly. */ + APPEARANCE_RANDOMVANISH, /**< The arrows disappear, and then reappear in a different column. */ NUM_APPEARANCES }; + /** @brief The various turn mods. */ enum Turn { - TURN_NONE=0, - TURN_MIRROR, - TURN_LEFT, - TURN_RIGHT, - TURN_SHUFFLE, - TURN_SOFT_SHUFFLE, - TURN_SUPER_SHUFFLE, + TURN_NONE=0, /**< No turning of the arrows is performed. */ + TURN_MIRROR, /**< The arrows are mirrored from their normal position. */ + TURN_LEFT, /**< The arrows are turned 90 degrees to the left. */ + TURN_RIGHT, /**< The arrows are turned 90 degress to the right. */ + TURN_SHUFFLE, /**< Some of the arrow columns are changed throughout the whole song. */ + TURN_SOFT_SHUFFLE, /**< Only shuffle arrow columns on an axis of symmetry. */ + TURN_SUPER_SHUFFLE, /**< Every arrow is placed on a random column. */ NUM_TURNS }; enum Transform { @@ -103,6 +107,8 @@ public: TRANSFORM_HOLDROLLS, TRANSFORM_NOJUMPS, TRANSFORM_NOHANDS, + TRANSFORM_NOLIFTS, + TRANSFORM_NOFAKES, TRANSFORM_NOQUADS, TRANSFORM_NOSTRETCH, NUM_TRANSFORMS @@ -154,15 +160,21 @@ public: bool m_bTransforms[NUM_TRANSFORMS]; bool m_bMuteOnError; ScoreDisplay m_ScoreDisplay; + /** @brief How can the Player fail a song? */ enum FailType { - FAIL_IMMEDIATE=0, // fail immediately when life touches 0 - FAIL_IMMEDIATE_CONTINUE, // fail immediately when life touches 0, but allow playing the rest of the song - FAIL_AT_END, // fail if life is at 0 when the song ends - FAIL_OFF // never fail + FAIL_IMMEDIATE=0, /**< fail immediately when life touches 0 */ + FAIL_IMMEDIATE_CONTINUE, /**< Same as above, but allow playing the rest of the song */ + FAIL_AT_END, /**< fail if life is at 0 when the song ends */ + FAIL_OFF /**< never fail */ }; + /** @brief The method for which a player can fail a song. */ FailType m_FailType; - RString m_sNoteSkin; // "" means "no change" + /** + * @brief The Noteskin to use. + * + * If an empty string, it means to not change from the default. */ + RString m_sNoteSkin; void NextAccel(); void NextEffect(); @@ -183,7 +195,6 @@ public: void SetOneScroll( Scroll s ); void ToggleOneTurn( Turn t ); - // return true if any mods being used will make the song(s) easier bool IsEasierForSongAndSteps( Song* pSong, Steps* pSteps, PlayerNumber pn ) const; bool IsEasierForCourseAndTrail( Course* pCourse, Trail* pTrail ) const; diff --git a/src/PlayerStageStats.cpp b/src/PlayerStageStats.cpp index d1b0e08d4a..bf3e5baba9 100644 --- a/src/PlayerStageStats.cpp +++ b/src/PlayerStageStats.cpp @@ -187,7 +187,7 @@ Grade PlayerStageStats::GetGrade() const //LOG->Trace( "GetGrade: Grade: %s, %i", GradeToString(grade).c_str(), GRADE_TIER02_IS_ALL_W2S ); - // todo: move all these conditions to Lua. -aj + // TODO: Change these conditions to use Lua instead. -aj if( GRADE_TIER02_IS_ALL_W2S ) { if( FullComboOfScore(TNS_W1) ) diff --git a/src/PlayerStageStats.h b/src/PlayerStageStats.h index 373911e6b1..33e220ea45 100644 --- a/src/PlayerStageStats.h +++ b/src/PlayerStageStats.h @@ -1,5 +1,3 @@ -/* PlayerStageStats - Contains statistics for one stage of play - either one song, or a whole course. */ - #ifndef PlayerStageStats_H #define PlayerStageStats_H @@ -10,7 +8,7 @@ #include class Steps; struct lua_State; - +/** @brief Contains statistics for one stage of play - either one song, or a whole course. */ class PlayerStageStats { public: @@ -32,10 +30,18 @@ public: bool m_bJoined; vector m_vpPossibleSteps; int m_iStepsPlayed; // how many of m_vpPossibleStepshow many of m_vpPossibleSteps were played - float m_fAliveSeconds; // how far into the music did they last before failing? Updated by Gameplay, scaled by music rate. + /** + * @brief How far into the music did the Player last before failing? + * + * This is updated by Gameplay, and scaled by the music rate. */ + float m_fAliveSeconds; - /* Set if the player actually failed at any point during the song. This is always - * false in FAIL_OFF. If recovery is enabled and two players are playing, + /** + * @brief Have the Players failed at any point during the song? + * + * If FAIL_OFF is in use, this is always false. + * + * If health recovery is possible after failing (requires two players), * this is only set if both players were failing at the same time. */ bool m_bFailed; @@ -54,10 +60,15 @@ public: int m_iMaxScore; RadarValues m_radarPossible; // filled in by ScreenGameplay on start of notes RadarValues m_radarActual; - // The number of songs played and passed, respectively. + /** @brief How many songs were passed by the Player? */ int m_iSongsPassed; + /** @brief How many songs were played by the Player? */ int m_iSongsPlayed; - float m_fLifeRemainingSeconds; // used in survival + /** + * @brief How many seconds were left for the Player? + * + * This is used in the Survival mode. */ + float m_fLifeRemainingSeconds; // workout float m_iNumControllerSteps; @@ -125,8 +136,10 @@ public: #endif -/* - * (c) 2001-2004 Chris Danford, Glenn Maynard +/** + * @file + * @author Chris Danford, Glenn Maynard (c) 2001-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/PlayerState.cpp b/src/PlayerState.cpp index aa512ecbaf..2525c60872 100644 --- a/src/PlayerState.cpp +++ b/src/PlayerState.cpp @@ -210,8 +210,8 @@ public: static int GetPlayerOptions( T* p, lua_State *L ) { ModsLevel m = Enum::Check( L, 1 ); - RString s = p->m_PlayerOptions.Get(m).GetString(); - LuaHelpers::Push( L, s ); + PlayerOptions po = p->m_PlayerOptions.Get(m); + po.PushSelf(L); return 1; } static int GetPlayerOptionsArray( T* p, lua_State *L ) @@ -222,6 +222,13 @@ public: LuaHelpers::CreateTableFromArray( s, L ); return 1; } + static int GetPlayerOptionsString( T* p, lua_State *L ) + { + ModsLevel m = Enum::Check( L, 1 ); + RString s = p->m_PlayerOptions.Get(m).GetString(); + LuaHelpers::Push( L, s ); + return 1; + } DEFINE_METHOD( GetHealthState, m_HealthState ); LunaPlayerState() @@ -231,6 +238,7 @@ public: ADD_METHOD( SetPlayerOptions ); ADD_METHOD( GetPlayerOptions ); ADD_METHOD( GetPlayerOptionsArray ); + ADD_METHOD( GetPlayerOptionsString ); ADD_METHOD( GetHealthState ); } }; diff --git a/src/PlayerState.h b/src/PlayerState.h index e023bb7df0..06bd6acb35 100644 --- a/src/PlayerState.h +++ b/src/PlayerState.h @@ -31,7 +31,11 @@ public: * in PlayerState and callers should not use PlayerNumber to index into * GameState. */ PlayerNumber m_PlayerNumber; - + /** + * @brief The MultiPlayer number assigned to this Player, typically 1-32. + * + * This is only used if GAMESTATE->m_bMultiplayer is true. + */ MultiPlayer m_mp; /** diff --git a/src/Profile.h b/src/Profile.h index b351656bd0..bfea1f35d1 100644 --- a/src/Profile.h +++ b/src/Profile.h @@ -1,5 +1,3 @@ -/** @brief Profile - Player data that persists between sessions. Can be stored on a local disk or on a memory card. */ - #ifndef Profile_H #define Profile_H @@ -62,7 +60,10 @@ class Song; class Steps; class Course; class Game; - +/** + * @brief Player data that persists between sessions. + * + * This can be stored on a local disk or on a memory card. */ class Profile { public: @@ -95,14 +96,20 @@ public: Song *GetMostPopularSong() const; Course *GetMostPopularCourse() const; - void AddStepTotals( int iNumTapsAndHolds, int iNumJumps, int iNumHolds, int iNumRolls, int iNumMines, int iNumHands, int iNumLifts, float fCaloriesBurned ); + void AddStepTotals( int iNumTapsAndHolds, int iNumJumps, int iNumHolds, int iNumRolls, int iNumMines, + int iNumHands, int iNumLifts, float fCaloriesBurned ); bool IsMachine() const; // Editable data RString m_sDisplayName; RString m_sCharacterID; - RString m_sLastUsedHighScoreName; // this doesn't really belong in "editable", but we need it in the smaller editable file so that it can be ready quickly. + /** + * @brief The last used name for high scoring purposes. + * + * This really shouldn't be in "editable", but it's needed in the smaller editable file + * so that it can be ready quickly. */ + RString m_sLastUsedHighScoreName; int m_iWeightPounds; // 0 == not set //RString m_sProfileImageName; // todo: add a default image -aj @@ -136,7 +143,13 @@ public: int m_iTotalHands; int m_iTotalLifts; set m_UnlockedEntryIDs; - mutable RString m_sLastPlayedMachineGuid; // mutable because we overwrite this on save, and I don't want to remove const from the whole save chain. -Chris + /** + * @brief Which machine did we play on last, based on the Guid? + * + * This is mutable because it's overwritten on save, but is usually + * const everywhere else. It was decided to keep const on the whole + * save chain and keep this mutable. -Chris */ + mutable RString m_sLastPlayedMachineGuid; mutable DateTime m_LastPlayedDate; /* These stats count twice in the machine profile if two players are playing; * that's the only approach that makes sense for ByDifficulty and ByMeter. */ @@ -217,7 +230,7 @@ public: /** - * @brief The basics for Calorie Data + * @brief The basics for Calorie Data. * * Why track calories in a map, and not in a static sized array like * Bookkeeping? The machine's clock is not guaranteed to be set correctly. diff --git a/src/Quad.h b/src/Quad.h index e3e03012d3..eb2629a93d 100644 --- a/src/Quad.h +++ b/src/Quad.h @@ -1,11 +1,9 @@ -/** @brief Quad - A rectangle shaped actor with color. */ - #ifndef QUAD_H #define QUAD_H #include "Sprite.h" -/** @brief the Rectangular Actor with color. */ +/** @brief A rectangular shaped Actor with color. */ class Quad : public Sprite { public: diff --git a/src/RadarValues.h b/src/RadarValues.h index 0d217102d3..560739c079 100644 --- a/src/RadarValues.h +++ b/src/RadarValues.h @@ -1,5 +1,3 @@ -/** @brief RadarValues - Cached song statistics. */ - #ifndef RARAR_VALUES_H #define RARAR_VALUES_H @@ -11,7 +9,7 @@ class XNode; struct lua_State; -/** @brief The collection of radar values. */ +/** @brief Cached song statistics. */ struct RadarValues { union Values @@ -30,6 +28,7 @@ struct RadarValues float fNumHands; float fNumRolls; float fNumLifts; + float fNumFakes; } v; float f[NUM_RadarCategory]; } m_Values; diff --git a/src/ReceptorArrowRow.h b/src/ReceptorArrowRow.h index 3cf7e46ed1..957ca2f8ac 100644 --- a/src/ReceptorArrowRow.h +++ b/src/ReceptorArrowRow.h @@ -1,5 +1,3 @@ -/* ReceptorArrowRow - A row of ReceptorArrow objects. */ - #ifndef RECEPTOR_ARROW_ROW_H #define RECEPTOR_ARROW_ROW_H @@ -8,7 +6,7 @@ #include "GameConstantsAndTypes.h" class PlayerState; - +/** @brief A row of ReceptorArrow objects. */ class ReceptorArrowRow : public ActorFrame { public: @@ -35,8 +33,10 @@ protected: #endif -/* - * (c) 2001-2003 Chris Danford +/** + * @file + * @author Chris Danford (c) 2001-2003 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/RollingNumbers.h b/src/RollingNumbers.h index 954ed3cb14..719ef3ccb1 100644 --- a/src/RollingNumbers.h +++ b/src/RollingNumbers.h @@ -1,11 +1,10 @@ -/** @brief RollingNumbers - animates from one number to another by scrolling its digits. */ - #ifndef RollingNumbers_H #define RollingNumbers_H #include "BitmapText.h" #include "ThemeMetric.h" +/** @brief Animates from one number to another by scrolling its digits. */ class RollingNumbers : public BitmapText { public: diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index 2ca5d26235..4f515bcea9 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -1027,6 +1027,8 @@ static LocalizedString HANDS("ScreenEdit", "Hands"); static LocalizedString HOLDS("ScreenEdit", "Holds"); static LocalizedString MINES("ScreenEdit", "Mines"); static LocalizedString ROLLS("ScreenEdit", "Rolls"); +static LocalizedString LIFTS("ScreenEdit", "Lifts"); +static LocalizedString FAKES("ScreenEdit", "Fakes"); static LocalizedString BEAT_0_OFFSET("ScreenEdit", "Beat 0 offset"); static LocalizedString PREVIEW_START("ScreenEdit", "Preview Start"); static LocalizedString PREVIEW_LENGTH("ScreenEdit", "Preview Length"); @@ -1049,6 +1051,8 @@ static ThemeMetric NUM_HOLDS_FORMAT("ScreenEdit", "NumHoldsFormat"); static ThemeMetric NUM_MINES_FORMAT("ScreenEdit", "NumMinesFormat"); static ThemeMetric NUM_HANDS_FORMAT("ScreenEdit", "NumHandsFormat"); static ThemeMetric NUM_ROLLS_FORMAT("ScreenEdit", "NumRollsFormat"); +static ThemeMetric NUM_LIFTS_FORMAT("ScreenEdit", "NumLiftsFormat"); +static ThemeMetric NUM_FAKES_FORMAT("ScreenEdit", "NumFakesFormat"); static ThemeMetric BEAT_0_OFFSET_FORMAT("ScreenEdit", "Beat0OffsetFormat"); static ThemeMetric PREVIEW_START_FORMAT("ScreenEdit", "PreviewStartFormat"); static ThemeMetric PREVIEW_LENGTH_FORMAT("ScreenEdit", "PreviewLengthFormat"); @@ -1117,6 +1121,8 @@ void ScreenEdit::UpdateTextInfo() sText += ssprintf( NUM_HOLDS_FORMAT.GetValue(), HOLDS.GetValue().c_str(), m_NoteDataEdit.GetNumHoldNotes() ); sText += ssprintf( NUM_MINES_FORMAT.GetValue(), MINES.GetValue().c_str(), m_NoteDataEdit.GetNumMines() ); sText += ssprintf( NUM_ROLLS_FORMAT.GetValue(), ROLLS.GetValue().c_str(), m_NoteDataEdit.GetNumRolls() ); + sText += ssprintf( NUM_LIFTS_FORMAT.GetValue(), LIFTS.GetValue().c_str(), m_NoteDataEdit.GetNumLifts() ); + sText += ssprintf( NUM_FAKES_FORMAT.GetValue(), FAKES.GetValue().c_str(), m_NoteDataEdit.GetNumFakes() ); switch( EDIT_MODE.GetValue() ) { DEFAULT_FAIL( EDIT_MODE.GetValue() ); diff --git a/src/ScreenEvaluation.cpp b/src/ScreenEvaluation.cpp index 55333bf14a..3a9da8b1d1 100644 --- a/src/ScreenEvaluation.cpp +++ b/src/ScreenEvaluation.cpp @@ -198,6 +198,7 @@ void ScreenEvaluation::Init() case RadarCategory_Hands: case RadarCategory_Rolls: case RadarCategory_Lifts: + case RadarCategory_Fakes: ss.m_player[p].m_radarPossible[rc] = 1 + (rand() % 200); ss.m_player[p].m_radarActual[rc] = rand() % (int)(ss.m_player[p].m_radarPossible[rc]); break; @@ -541,8 +542,8 @@ void ScreenEvaluation::Init() static const int indeces[NUM_DetailLine] = { - RadarCategory_TapsAndHolds, RadarCategory_Jumps, RadarCategory_Holds, RadarCategory_Mines, RadarCategory_Hands, RadarCategory_Rolls - //, RadarCategory_Lifts + RadarCategory_TapsAndHolds, RadarCategory_Jumps, RadarCategory_Holds, RadarCategory_Mines, + RadarCategory_Hands, RadarCategory_Rolls, RadarCategory_Lifts, RadarCategory_Fakes }; const int ind = indeces[l]; const int iActual = lrintf(m_pStageStats->m_player[p].m_radarActual[ind]); diff --git a/src/ScreenEvaluation.h b/src/ScreenEvaluation.h index 3e6c3f1280..d302e5b1bf 100644 --- a/src/ScreenEvaluation.h +++ b/src/ScreenEvaluation.h @@ -41,6 +41,8 @@ enum DetailLine DetailLine_Mines, /**< The number of mines avoided. */ DetailLine_Hands, /**< The number of hands hit (somehow) */ DetailLine_Rolls, /**< The number of rolls hit repeatedly. */ + DetailLine_Lifts, /**< The number of lifts lifted up. */ + DetailLine_Fakes, /**< The number of fakes to be ignored. */ NUM_DetailLine /**< The nuber of detailed lines. */ }; /** @brief Shows the player their score after gameplay has ended. */ diff --git a/src/ScreenGameplay.h b/src/ScreenGameplay.h index f73c0236ae..13fb9defc0 100644 --- a/src/ScreenGameplay.h +++ b/src/ScreenGameplay.h @@ -62,6 +62,9 @@ public: * @brief Determine if we're in MultiPlayer. * @return true if it is MultiPlayer, false otherwise. */ bool IsMultiPlayer() const { return m_mp != MultiPlayer_Invalid; } + /** + * @brief Retrieve the name of the Player based on the mode. + * @return the name of the Player. */ RString GetName() const { if( m_bIsDummy ) diff --git a/src/ScreenManager.h b/src/ScreenManager.h index d665dc2b6c..9b475a1338 100644 --- a/src/ScreenManager.h +++ b/src/ScreenManager.h @@ -1,5 +1,3 @@ -/* ScreenManager - Manager/container for Screens. */ - #ifndef SCREEN_MANAGER_H #define SCREEN_MANAGER_H @@ -11,7 +9,7 @@ class Screen; struct Menu; struct lua_State; class InputEventPlus; - +/** @brief Manager/container for Screens. */ class ScreenManager { public: @@ -26,7 +24,13 @@ public: // Main screen stack management void SetNewScreen( const RString &sName ); void AddNewScreenToTop( const RString &sName, ScreenMessage SendOnPop=SM_None ); - void PrepareScreen( const RString &sScreenName ); // creates and caches screen so that the next call to SetNewScreen for the prep'd screen will be very quick. + /** + * @brief Create and cache the requested Screen. + * + * This is so that the next call to SetNewScreen for this Screen + * will be very quick. + * @param sScreenName the Screen to prepare. */ + void PrepareScreen( const RString &sScreenName ); void GroupScreen( const RString &sScreenName ); void PersistantScreen( const RString &sScreenName ); void PopTopScreen( ScreenMessage SM ); @@ -48,9 +52,13 @@ public: void ThemeChanged(); void ReloadOverlayScreens(); - /* Return true if the given screen is in the main screen stack, but not the - * bottommost screen. If true, the screen should usually exit by popping - * itself, not by loading another screen. */ + /** + * @brief Is this Screen in the main Screen stack, but not the bottommost Screen? + * + * If this function returns true, the screen should exit by popping + * itself, not by loading another Screen. + * @param pScreen the Screen to check. + * @return true if it's on the stack while not on the bottom, or false otherwise. */ bool IsStackedScreen( const Screen *pScreen ) const; // Lua @@ -87,9 +95,11 @@ public: private: RageSound m_soundStart; + /** @brief The sound played when a coin has been put into the machine. */ RageSound m_soundCoin; RageSound m_soundCancel; RageSound m_soundInvalid; + /** @brief The sound played when a Player wishes to take a picture of their Score. */ RageSound m_soundScreenshot; }; @@ -98,8 +108,10 @@ extern ScreenManager* SCREENMAN; // global and accessable from anywhere in our p #endif -/* - * (c) 2001-2003 Chris Danford, Glenn Maynard +/** + * @file + * @author Chris Danford, Glenn Maynard (c) 2001-2003 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/ScreenMessage.h b/src/ScreenMessage.h index 5124cd52a0..7fbc86924f 100644 --- a/src/ScreenMessage.h +++ b/src/ScreenMessage.h @@ -1,8 +1,6 @@ -/* ScreenMessage - Definition of common ScreenMessages and helpers. */ - #ifndef ScreenMessage_H #define ScreenMessage_H - +/** @brief Definition of common ScreenMessages and helpers. */ typedef RString ScreenMessage; extern const ScreenMessage SM_Invalid; @@ -28,11 +26,12 @@ namespace ScreenMessageHelpers #define AutoScreenMessage( x ) \ const ScreenMessage x = ScreenMessageHelpers::ToScreenMessage( #x ) - #endif -/* - * (c) 2003-2005 Chris Danford, Charles Lohr +/** + * @file + * @author Chris Danford, Charles Lohr (c) 2003-2005 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/ScreenNameEntry.cpp b/src/ScreenNameEntry.cpp index d47969bbae..38015d0ce4 100644 --- a/src/ScreenNameEntry.cpp +++ b/src/ScreenNameEntry.cpp @@ -26,14 +26,13 @@ #include "StatsManager.h" -// // Defines specific to ScreenNameEntry -// #define CATEGORY_Y THEME->GetMetricF(m_sName,"CategoryY") #define CATEGORY_ZOOM THEME->GetMetricF(m_sName,"CategoryZoom") #define CHARS_ZOOM_SMALL THEME->GetMetricF(m_sName,"CharsZoomSmall") #define CHARS_ZOOM_LARGE THEME->GetMetricF(m_sName,"CharsZoomLarge") #define CHARS_SPACING_Y THEME->GetMetricF(m_sName,"CharsSpacingY") +#define CHARS_CHOICES THEME->GetMetric(m_sName,"CharsChoices") #define SCROLLING_CHARS_COMMAND THEME->GetMetricA(m_sName,"ScrollingCharsCommand") #define SELECTED_CHARS_COMMAND THEME->GetMetricA(m_sName,"SelectedCharsCommand") #define GRAY_ARROWS_Y THEME->GetMetricF(m_sName,"ReceptorArrowsY") @@ -43,7 +42,6 @@ #define MAX_RANKING_NAME_LENGTH THEME->GetMetricI(m_sName,"MaxRankingNameLength") #define PLAYER_X( p, styleType ) THEME->GetMetricF(m_sName,ssprintf("PlayerP%d%sX",p+1,StyleTypeToString(styleType).c_str())) - // cache for frequently used metrics static float g_fCharsZoomSmall; static float g_fCharsZoomLarge; @@ -53,8 +51,6 @@ static int g_iNumCharsToDrawBehind; static int g_iNumCharsToDrawTotal; static float g_fFakeBeatsPerSec; -RString ScreenNameEntry::ScrollingText::g_sNameChars = " ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - void ScreenNameEntry::ScrollingText::Init( const RString &sName, const vector &xs ) { SetName( sName ); @@ -67,15 +63,15 @@ void ScreenNameEntry::ScrollingText::Init( const RString &sName, const vectorm_fSongBeat; - const size_t iClosestIndex = lrintf( fFakeBeat ) % g_sNameChars.size(); + const size_t iClosestIndex = lrintf( fFakeBeat ) % CHARS_CHOICES.size(); const float fClosestYOffset = GetClosestCharYOffset( fFakeBeat ); - size_t iCharIndex = ( iClosestIndex - NUM_CHARS_TO_DRAW_BEHIND + g_sNameChars.size() ) % g_sNameChars.size(); + size_t iCharIndex = ( iClosestIndex - NUM_CHARS_TO_DRAW_BEHIND + CHARS_CHOICES.size() ) % CHARS_CHOICES.size(); float fY = GRAY_ARROWS_Y + ( fClosestYOffset - g_iNumCharsToDrawBehind ) * g_fCharsSpacingY; for( int i = 0; i < NUM_CHARS_TO_DRAW_TOTAL; ++i ) { - const RString c = g_sNameChars.substr( iCharIndex, 1 ); + const RString c = CHARS_CHOICES.substr( iCharIndex, 1 ); float fZoom = g_fCharsZoomSmall; float fAlpha = 1.f; @@ -96,14 +92,14 @@ void ScreenNameEntry::ScrollingText::DrawPrimitives() m_Stamp.Draw(); } fY += g_fCharsSpacingY; - iCharIndex = (iCharIndex+1) % g_sNameChars.size(); + iCharIndex = (iCharIndex+1) % CHARS_CHOICES.size(); } } char ScreenNameEntry::ScrollingText::GetClosestChar( float fFakeBeat ) const { ASSERT( fFakeBeat >= 0.f ); - return g_sNameChars[lrintf(fFakeBeat) % g_sNameChars.size()]; + return CHARS_CHOICES[lrintf(fFakeBeat) % CHARS_CHOICES.size()]; } // return value is relative to gray arrows @@ -178,7 +174,7 @@ void ScreenNameEntry::Init() GAMESTATE->m_bSideIsJoined[PLAYER_1] = true; GAMESTATE->m_MasterPlayerNumber = PLAYER_1; #endif - + ScreenWithMenuElements::Init(); // update cache @@ -212,7 +208,7 @@ void ScreenNameEntry::Init() if( !AnyStillEntering() ) { - /* Nobody made a high score. */ + // Nobody got a high score. PostScreenMessage( SM_GoToNextScreen, 0 ); return; } @@ -228,7 +224,6 @@ void ScreenNameEntry::Init() return; } - GAMESTATE->m_bGameplayLeadIn.Set( false ); // enable the gray arrows FOREACH_PlayerNumber( p ) @@ -264,7 +259,6 @@ void ScreenNameEntry::Init() this->AddChild( &m_ReceptorArrowRow[p] ); } - const Style* pStyle = GAMESTATE->GetCurrentStyle(); const int iMaxCols = min( int(ABS_MAX_RANKING_NAME_LENGTH), pStyle->m_iColsPerPlayer ); m_ColToStringIndex[p].insert(m_ColToStringIndex[p].begin(), pStyle->m_iColsPerPlayer, -1); @@ -274,9 +268,9 @@ void ScreenNameEntry::Init() for( int iCol=0; iColGetCurrentStyle()->StyleInputToGameInput( iCol, p ); GameButton mb = INPUTMAPPER->GameButtonToMenuButton( gi.button ); if( mb == GAME_BUTTON_START ) @@ -340,10 +334,10 @@ void ScreenNameEntry::Update( float fDelta ) void ScreenNameEntry::Input( const InputEventPlus &input ) { if( IsTransitioning() ) - return; + return; if( input.type != IET_FIRST_PRESS || !input.GameI.IsValid() ) - return; // ignore + return; // ignore const int iCol = GAMESTATE->GetCurrentStyle()->GameInputToColumn( input.GameI ); if( iCol != Column_Invalid && m_bStillEnteringName[input.pn] ) @@ -384,7 +378,7 @@ void ScreenNameEntry::HandleScreenMessage( const ScreenMessage SM ) void ScreenNameEntry::MenuStart( const InputEventPlus &input ) { PlayerNumber pn = input.pn; - + if( !m_bStillEnteringName[pn] ) return; m_bStillEnteringName[pn] = false; diff --git a/src/ScreenNameEntry.h b/src/ScreenNameEntry.h index e785b4056e..35a2ccc655 100644 --- a/src/ScreenNameEntry.h +++ b/src/ScreenNameEntry.h @@ -5,7 +5,8 @@ #include "BitmapText.h" #include "ReceptorArrowRow.h" #include "RageSound.h" -/** @brief Enter a name for a new high score. */ + +/** @brief Enter a name for a new high score using a gimmicky interface. */ class ScreenNameEntry : public ScreenWithMenuElements { public: @@ -14,9 +15,8 @@ public: virtual void Update( float fDeltaTime ); virtual void Input( const InputEventPlus &input ); virtual void HandleScreenMessage( const ScreenMessage SM ); - - virtual void MenuStart( const InputEventPlus &input ); + virtual void MenuStart( const InputEventPlus &input ); private: class ScrollingText : public Actor { @@ -36,7 +36,7 @@ private: BitmapText m_Stamp; static RString g_sNameChars; }; - + enum { ABS_MAX_RANKING_NAME_LENGTH = 10 }; bool AnyStillEntering() const; diff --git a/src/ScreenOptionsEditProfile.cpp b/src/ScreenOptionsEditProfile.cpp index fc5422457c..72e67ec124 100644 --- a/src/ScreenOptionsEditProfile.cpp +++ b/src/ScreenOptionsEditProfile.cpp @@ -128,7 +128,7 @@ void ScreenOptionsEditProfile::ProcessMenuStart( const InputEventPlus &input ) if( IsTransitioning() ) return; - int iRow = GetCurrentRow();; + int iRow = GetCurrentRow(); //OptionRow &row = *m_pRows[iRow]; switch( iRow ) diff --git a/src/ScreenOptionsExportPackage.cpp b/src/ScreenOptionsExportPackage.cpp index c6858a2571..acf8f6e153 100644 --- a/src/ScreenOptionsExportPackage.cpp +++ b/src/ScreenOptionsExportPackage.cpp @@ -156,7 +156,7 @@ void ScreenOptionsExportPackage::ProcessMenuStart( const InputEventPlus &input ) RString sDirToExport = m_vsPossibleDirsToExport[ iCurRow ]; RString sPackageName = ReplaceInvalidFileNameChars( sDirToExport + ".smzip" ); - + RString sError; if( ExportPackage(sPackageName, sDirToExport, sError) ) ScreenPrompt::Prompt( SM_None, ssprintf("Exported '%s' to the desktop", sDirToExport.c_str()) ); @@ -174,7 +174,6 @@ void ScreenOptionsExportPackage::ExportOptions( int iRow, const vector &vpns ); virtual void ExportOptions( int iRow, const vector &vpns ); - + virtual void ProcessMenuStart( const InputEventPlus &input ); vector m_vsPossibleDirsToExport; diff --git a/src/ScreenOptionsToggleSongs.cpp b/src/ScreenOptionsToggleSongs.cpp index 7a83e9bfc7..af5eaea11c 100644 --- a/src/ScreenOptionsToggleSongs.cpp +++ b/src/ScreenOptionsToggleSongs.cpp @@ -7,16 +7,76 @@ #include "SongManager.h" #include "UnlockManager.h" #include "PrefsManager.h" +#include "MessageManager.h" +// main page (group list) REGISTER_SCREEN_CLASS( ScreenOptionsToggleSongs ); +REGISTER_SCREEN_CLASS( ScreenOptionsToggleSongsSubPage ); void ScreenOptionsToggleSongs::BeginScreen() +{ + m_asGroups.clear(); + + vector vHands; + + vector asAllGroups; + SONGMAN->GetSongGroupNames(asAllGroups); + FOREACH_CONST( RString, asAllGroups , s ) + { + vHands.push_back( OptionRowHandlerUtil::MakeNull() ); + OptionRowDefinition &def = vHands.back()->m_Def; + RString sGroup = *s; + + def.m_sName = sGroup; + def.m_sExplanationName = "Select Group"; + def.m_bAllowThemeTitle = false; // not themable + def.m_bAllowThemeItems = false; // already themed + def.m_bOneChoiceForAllPlayers = true; + def.m_vsChoices.clear(); + def.m_vsChoices.push_back( "" ); + + m_asGroups.push_back( sGroup ); + } + ScreenOptions::InitMenu( vHands ); + + ScreenOptions::BeginScreen(); +} + +void ScreenOptionsToggleSongs::ProcessMenuStart( const InputEventPlus &input ) +{ + if( IsTransitioning() ) + return; + + // switch to the subpage with the specified group + int iRow = GetCurrentRow(); + OptionRow &row = *m_pRows[iRow]; + if( row.GetRowType() == OptionRow::RowType_Exit ) + { + ScreenOptions::ProcessMenuStart( input ); + return; + } + + ToggleSongs::m_sGroup = m_asGroups[iRow]; + SCREENMAN->SetNewScreen("ScreenOptionsToggleSongsSubPage"); +} + +void ScreenOptionsToggleSongs::ImportOptions( int row, const vector &vpns ) +{ + +} +void ScreenOptionsToggleSongs::ExportOptions( int row, const vector &vpns ) +{ + +} + +// subpage (has the songs in a specific group) +void ScreenOptionsToggleSongsSubPage::BeginScreen() { m_apSongs.clear(); vector vHands; - const vector &apAllSongs = SONGMAN->GetAllSongs(); + const vector &apAllSongs = SONGMAN->GetSongs(ToggleSongs::m_sGroup); FOREACH_CONST( Song *, apAllSongs , s ) { Song *pSong = *s; @@ -43,7 +103,7 @@ void ScreenOptionsToggleSongs::BeginScreen() ScreenOptions::BeginScreen(); } -void ScreenOptionsToggleSongs::ImportOptions( int iRow, const vector &vpns ) +void ScreenOptionsToggleSongsSubPage::ImportOptions( int iRow, const vector &vpns ) { if( iRow >= (int)m_apSongs.size() ) // exit row return; @@ -54,7 +114,7 @@ void ScreenOptionsToggleSongs::ImportOptions( int iRow, const vector &vpns ) +void ScreenOptionsToggleSongsSubPage::ExportOptions( int iRow, const vector &vpns ) { if( iRow >= (int)m_apSongs.size() ) // exit row return; diff --git a/src/ScreenOptionsToggleSongs.h b/src/ScreenOptionsToggleSongs.h index ae2cdcba44..a6f8635402 100644 --- a/src/ScreenOptionsToggleSongs.h +++ b/src/ScreenOptionsToggleSongs.h @@ -4,11 +4,30 @@ #include "ScreenOptions.h" #include "Song.h" +// Can this be done any better? -aj +namespace ToggleSongs +{ + RString m_sGroup; +} + class ScreenOptionsToggleSongs: public ScreenOptions { public: virtual void BeginScreen(); +private: + virtual void ImportOptions( int row, const vector &vpns ); + virtual void ExportOptions( int row, const vector &vpns ); + virtual void ProcessMenuStart( const InputEventPlus &input ); + + vector m_asGroups; +}; + +class ScreenOptionsToggleSongsSubPage: public ScreenOptions +{ +public: + virtual void BeginScreen(); + private: virtual void ImportOptions( int row, const vector &vpns ); virtual void ExportOptions( int row, const vector &vpns ); diff --git a/src/ScreenPackagesSSC.h b/src/ScreenPackagesSSC.h index 7ae4f1d821..cf3c6d9509 100644 --- a/src/ScreenPackagesSSC.h +++ b/src/ScreenPackagesSSC.h @@ -1,4 +1,3 @@ -/* ScreenPackagesSSC - parses JSON for downloadable content. */ #ifndef SCREEN_PACKAGES_SSC_H #define SCREEN_PACKAGES_SSC_H @@ -8,7 +7,7 @@ #include "RageFileManager.h" #include "RageFile.h" #include "Sprite.h" - +/** @brief Parses JSON for downloadable content. */ class ScreenPackagesSSC : public ScreenWithMenuElements { public: @@ -28,8 +27,10 @@ private: #endif -/* - * (c) 2004 Chris Danford +/** + * @file + * @author Chris Danford (c) 2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/ScreenTextEntry.h b/src/ScreenTextEntry.h index e5e4745389..5b16fff664 100644 --- a/src/ScreenTextEntry.h +++ b/src/ScreenTextEntry.h @@ -133,6 +133,7 @@ private: RageTimer m_timerToggleCursor; }; +/** @brief Displays a text entry box and keyboard over the top of another screen. */ class ScreenTextEntryVisual: public ScreenTextEntry { public: diff --git a/src/SnapDisplay.cpp b/src/SnapDisplay.cpp index 8976292a25..d531647004 100644 --- a/src/SnapDisplay.cpp +++ b/src/SnapDisplay.cpp @@ -40,7 +40,7 @@ bool SnapDisplay::PrevSnapMode() bool SnapDisplay::NextSnapMode() { - if( m_NoteType == NOTE_TYPE_192ND ) // this is the smallest snap we should allow + if( m_NoteType == NOTE_TYPE_192ND ) // the smallest snap we should allow return false; enum_add( m_NoteType, 1 ); @@ -48,7 +48,6 @@ bool SnapDisplay::NextSnapMode() return true; } - void SnapDisplay::SnapModeChanged() { for( int i=0; i<2; i++ ) diff --git a/src/SnapDisplay.h b/src/SnapDisplay.h index 46294db024..de8907dba4 100644 --- a/src/SnapDisplay.h +++ b/src/SnapDisplay.h @@ -6,10 +6,6 @@ #include "Sprite.h" #include "PlayerNumber.h" -/* sm-ssc todo: - * Convert m_sprIndicators to AutoActors - * ThemeMetric for deciding to load one or two indicators? -aj - */ /** @brief Graphics on ends of receptors on Edit screen that show the current snap type. */ class SnapDisplay : public ActorFrame { @@ -30,6 +26,10 @@ protected: /** @brief the NoteType to snap to. */ NoteType m_NoteType; + /** + * @brief Indicators showing what NoteType is currently snapped to. + * + * TODO: Convert to an AutoActor. -aj */ Sprite m_sprIndicators[2]; // left and right side }; diff --git a/src/Song.cpp b/src/Song.cpp index 7c648aaf8c..67b730ee61 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -36,13 +36,12 @@ #include #include -/** @brief The version of the .ssc file format. */ -const static float VERSION_NUMBER = 0.52f; + /** * @brief The internal version of the cache for StepMania. * * Increment this value to invalidate the current cache. */ -const int FILE_CACHE_VERSION = 164; +const int FILE_CACHE_VERSION = 165; /** @brief How long does a song sample last by default? */ const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f; @@ -66,7 +65,7 @@ Song::Song() m_ForegroundChanges = AutoPtrCopyOnWrite(new VBackgroundChange); m_LoadedFromProfile = ProfileSlot_Invalid; - m_fVersion = VERSION_NUMBER; + m_fVersion = STEPFILE_VERSION_NUMBER; m_fMusicSampleStartSeconds = -1; m_fMusicSampleLengthSeconds = DEFAULT_MUSIC_SAMPLE_LENGTH; m_fMusicLengthSeconds = 0; diff --git a/src/Song.h b/src/Song.h index 7def778ee5..07d05a7742 100644 --- a/src/Song.h +++ b/src/Song.h @@ -16,6 +16,9 @@ class StepsID; struct lua_State; struct BackgroundChange; +/** @brief The version of the .ssc file format. */ +const static float STEPFILE_VERSION_NUMBER = 0.53f; + /** @brief How many edits for this song can each profile have? */ const int MAX_EDITS_PER_SONG_PER_PROFILE = 5; /** @brief How many edits for this song can be available? */ @@ -73,7 +76,7 @@ public: ~Song(); void Reset(); void DetachSteps(); - + /** * @brief Load a song from the chosen directory. * @@ -144,7 +147,11 @@ public: /** @brief The group this Song is in. */ RString m_sGroupName; - ProfileSlot m_LoadedFromProfile; // ProfileSlot_Invalid if not loaded from a profile + /** + * @brief the Profile this came from. + * + * This is ProfileSlot_Invalid if it wasn't loaded from a profile. */ + ProfileSlot m_LoadedFromProfile; /** @brief Is the song file itself a symlink to another file? */ bool m_bIsSymLink; bool m_bEnabled; @@ -155,8 +162,11 @@ public: RString m_sSubTitle; /** @brief The artist of the Song, if it exists. */ RString m_sArtist; + /** @brief The transliterated title of the Song, if it exists. */ RString m_sMainTitleTranslit; + /** @brief The transliterated subtitle of the Song, if it exists. */ RString m_sSubTitleTranslit; + /** @brief The transliterated artist of the Song, if it exists. */ RString m_sArtistTranslit; /* If PREFSMAN->m_bShowNative is off, these are the same as GetTranslit* @@ -166,9 +176,27 @@ public: RString GetDisplayArtist() const; // Returns the transliterated titles, if any; otherwise returns the main titles. - RString GetTranslitMainTitle() const { return m_sMainTitleTranslit.size()? m_sMainTitleTranslit: m_sMainTitle; } - RString GetTranslitSubTitle() const { return m_sSubTitleTranslit.size()? m_sSubTitleTranslit: m_sSubTitle; } - RString GetTranslitArtist() const { return m_sArtistTranslit.size()? m_sArtistTranslit:m_sArtist; } + /** + * @brief Retrieve the transliterated title, or the main title if there is no translit. + * @return the proper title. */ + RString GetTranslitMainTitle() const + { + return m_sMainTitleTranslit.size()? m_sMainTitleTranslit: m_sMainTitle; + } + /** + * @brief Retrieve the transliterated subtitle, or the main subtitle if there is no translit. + * @return the proper subtitle. */ + RString GetTranslitSubTitle() const + { + return m_sSubTitleTranslit.size()? m_sSubTitleTranslit: m_sSubTitle; + } + /** + * @brief Retrieve the transliterated artist, or the main artist if there is no translit. + * @return the proper artist. */ + RString GetTranslitArtist() const + { + return m_sArtistTranslit.size()? m_sArtistTranslit:m_sArtist; + } // "title subtitle" RString GetDisplayFullTitle() const; @@ -249,9 +277,22 @@ public: typedef vector VBackgroundChange; private: - // AutoPtr instead of raw pointer so that the auto gen'd copy constructor works correctly. - AutoPtrCopyOnWrite m_BackgroundChanges[NUM_BackgroundLayer]; // these must be sorted before gameplay - AutoPtrCopyOnWrite m_ForegroundChanges; // this must be sorted before gameplay + /** + * @brief The background changes (sorted by layer) that are for this Song. + * + * This uses an AutoPtr instead of a raw pointer so that the + * auto gen'd copy constructor works correctly. + * + * This must be sorted before gameplay. */ + AutoPtrCopyOnWrite m_BackgroundChanges[NUM_BackgroundLayer]; + /** + * @brief The foreground changes that are for this Song. + * + * This uses an AutoPtr instead of a raw pointer so that the + * auto gen'd copy constructor works correctly. + * + * This must be sorted before gameplay. */ + AutoPtrCopyOnWrite m_ForegroundChanges; public: const vector &GetBackgroundChanges( BackgroundLayer bl ) const; vector &GetBackgroundChanges( BackgroundLayer bl ); @@ -277,7 +318,14 @@ public: float GetBPMAtBeat( float fBeat ) const { return m_Timing.GetBPMAtBeat( fBeat ); } void SetBPMAtBeat( float fBeat, float fBPM ) { m_Timing.SetBPMAtBeat( fBeat, fBPM ); } BPMSegment& GetBPMSegmentAtBeat( float fBeat ) { return m_Timing.GetBPMSegmentAtBeat( fBeat ); } - float GetBeatFromElapsedTime( float fElapsedTime ) const { return m_Timing.GetBeatFromElapsedTime( fElapsedTime ); } + /** + * @brief Retrieve the beat based on the specified time. + * @param fElapsedTime the amount of time since the Song started. + * @return the appropriate beat. */ + float GetBeatFromElapsedTime( float fElapsedTime ) const + { + return m_Timing.GetBeatFromElapsedTime( fElapsedTime ); + } float GetElapsedTimeFromBeat( float fBeat ) const { return m_Timing.GetElapsedTimeFromBeat( fBeat ); } bool HasSignificantBpmChangesOrStops() const; float GetStepsSeconds() const; @@ -327,7 +375,9 @@ public: void PushSelf( lua_State *L ); private: + /** @brief the Steps that belong to this Song. */ vector m_vpSteps; + /** @brief the Steps of a particular StepsType that belong to this Song. */ vector m_vpStepsByType[NUM_StepsType]; }; diff --git a/src/SongManager.h b/src/SongManager.h index c62df7f23f..1bf55d6eeb 100644 --- a/src/SongManager.h +++ b/src/SongManager.h @@ -1,5 +1,3 @@ -/** @brief SongManager - Holder for all Songs and Steps. */ - #ifndef SONGMANAGER_H #define SONGMANAGER_H @@ -57,7 +55,8 @@ public: void FreeCourses(); void AddCourse( Course *pCourse ); // transfers ownership of pCourse void DeleteCourse( Course *pCourse ); // transfers ownership of pCourse - void DeleteAutogenCourses(); // deletes every autogen course + /** @brief Remove all of the auto generated courses. */ + void DeleteAutogenCourses(); void InvalidateCachedTrails(); void InitAll( LoadingWindow *ld ); // songs, courses, groups - everything. @@ -142,7 +141,9 @@ protected: void AddGroup( RString sDir, RString sGroupDirName ); int GetNumEditsLoadedFromProfile( ProfileSlot slot ) const; - vector m_pSongs; // all songs that can be played + /** @brief All of the songs that can be played. */ + vector m_pSongs; + /** @brief The most popular songs ranked by number of plays. */ vector m_pPopularSongs; //vector m_pRecentSongs; // songs recently played on the machine vector m_pShuffledSongs; // used by GetRandomSong diff --git a/src/SpecialFiles.h b/src/SpecialFiles.h index b8ef3faa5b..59971bb2a3 100644 --- a/src/SpecialFiles.h +++ b/src/SpecialFiles.h @@ -1,5 +1,3 @@ -/* SpecialFiles - */ - #ifndef SpecialFiles_H #define SpecialFiles_H @@ -19,8 +17,11 @@ namespace SpecialFiles extern const RString PACKAGES_DIR; extern const RString KEYMAPS_PATH; extern const RString PREFERENCES_INI_PATH; + /** @brief The directory that contains the themes. */ extern const RString THEMES_DIR; + /** @brief The directory that contains the different languages. */ extern const RString LANGUAGES_SUBDIR; + /** @brief The base language for most users of this program. */ extern const RString BASE_LANGUAGE; extern const RString METRICS_FILE; extern const RString CACHE_DIR; @@ -28,8 +29,11 @@ namespace SpecialFiles extern const RString DEFAULTS_INI_PATH; extern const RString STATIC_INI_PATH; extern const RString TYPE_TXT_FILE; + /** @brief The default Songs directory. */ extern const RString SONGS_DIR; + /** @brief The default courses directory. */ extern const RString COURSES_DIR; + /** @brief The default noteskins directory. */ extern const RString NOTESKINS_DIR; } diff --git a/src/Sprite.h b/src/Sprite.h index 756d6fe6b7..ff9d8326bf 100644 --- a/src/Sprite.h +++ b/src/Sprite.h @@ -1,5 +1,3 @@ -/** @brief Sprite - A bitmap Actor that animates and moves around. */ - #ifndef SPRITE_H #define SPRITE_H @@ -7,7 +5,7 @@ #include "RageTextureID.h" class RageTexture; - +/** @brief A bitmap Actor that animates and moves around. */ class Sprite: public Actor { public: diff --git a/src/StageStats.h b/src/StageStats.h index 842c3bba54..67156cb34b 100644 --- a/src/StageStats.h +++ b/src/StageStats.h @@ -17,7 +17,14 @@ public: StageStats(); void Init(); + /** + * @brief Ensure that the Player is valid. + * @param pn the PlayerNumber to check. */ void AssertValid( PlayerNumber pn ) const; + + /** + * @brief Ensure that the Player is valid. + * @param mp the Multiplayer to check. */ void AssertValid( MultiPlayer mp ) const; void AddStats( const StageStats& other ); // accumulate @@ -34,6 +41,7 @@ public: vector m_vpPlayedSongs; vector m_vpPossibleSongs; + /** @brief Was an extra stage earned this goaround? */ EarnedExtraStage m_EarnedExtraStage; /** @brief Was the gameplay exited by the Player giving up? */ bool m_bGaveUp; diff --git a/src/StatsManager.h b/src/StatsManager.h index ca990a4eec..872dae7c31 100644 --- a/src/StatsManager.h +++ b/src/StatsManager.h @@ -1,10 +1,8 @@ -/* StatsManager - Managed non-persisted statistics. */ - #ifndef StatsManager_H #define StatsManager_H #include "StageStats.h" - +/** @brief Managed non-persisted statistics. */ class StatsManager { public: @@ -13,7 +11,11 @@ public: void Reset(); - StageStats m_CurStageStats; // current stage (not necessarily passed if Extra Stage) + /** + * @brief The current Stage stats. + * + * This is not necessarily passed stage stats if this is an Extra Stage. */ + StageStats m_CurStageStats; vector m_vPlayedStageStats; // Only the latest 3 normal songs + passed extra stages. @@ -40,8 +42,10 @@ extern StatsManager* STATSMAN; // global and accessable from anywhere in our pro #endif -/* - * (c) 2001-2004 Chris Danford +/** + * @file + * @author Chris Danford (c) 2001-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/Steps.cpp b/src/Steps.cpp index 838d55704f..fb17405c61 100644 --- a/src/Steps.cpp +++ b/src/Steps.cpp @@ -123,7 +123,7 @@ float Steps::PredictMeter() const const float RadarCoeffs[NUM_RadarCategory] = { 10.1f, 5.27f,-0.905f, -1.10f, 2.86f, - 0,0,0,0,0,0 + 0,0,0,0,0,0,0,0 }; const RadarValues &rv = GetRadarValues( PLAYER_1 ); for( int r = 0; r < NUM_RadarCategory; ++r ) diff --git a/src/Steps.h b/src/Steps.h index e87dfef458..fe1b26a5ea 100644 --- a/src/Steps.h +++ b/src/Steps.h @@ -1,5 +1,3 @@ -/** @brief Steps - Holds note information for a Song. A Song may have one or more Notes. */ - #ifndef STEPS_H #define STEPS_H @@ -21,7 +19,10 @@ struct lua_State; */ const int MAX_EDIT_STEPS_DESCRIPTION_LENGTH = 12; -/** @brief The collective note pattern and information of the Steps that are played. */ +/** + * @brief Holds note information for a Song. + * + * A Song may have one or more Notes. */ class Steps { public: diff --git a/src/StepsDisplay.cpp b/src/StepsDisplay.cpp index 16e4d300ff..46c048c462 100644 --- a/src/StepsDisplay.cpp +++ b/src/StepsDisplay.cpp @@ -55,6 +55,7 @@ void StepsDisplay::Load( const RString &sMetricsGroup, const PlayerState *pPlaye m_bShowTicks.Load(m_sMetricsGroup,"ShowTicks"); m_bShowMeter.Load(m_sMetricsGroup,"ShowMeter"); m_bShowDescription.Load(m_sMetricsGroup,"ShowDescription"); + m_bShowCredit.Load(m_sMetricsGroup,"ShowCredit"); m_bShowAutogen.Load(m_sMetricsGroup,"ShowAutogen"); m_bShowStepsType.Load(m_sMetricsGroup,"ShowStepsType"); m_sZeroMeterString.Load(m_sMetricsGroup,"ZeroMeterString"); @@ -91,6 +92,13 @@ void StepsDisplay::Load( const RString &sMetricsGroup, const PlayerState *pPlaye ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_textDescription, m_sMetricsGroup ); this->AddChild( &m_textDescription ); } + if( m_bShowCredit ) + { + m_textAuthor.SetName( "Step Author" ); + m_textAuthor.LoadFromFont( THEME->GetPathF(m_sMetricsGroup,"Credit") ); + ActorUtil::LoadAllCommandsAndSetXYAndOnCommand( m_textAuthor, m_sMetricsGroup ); + this->AddChild( &m_textAuthor ); + } if( m_bShowAutogen ) { @@ -196,6 +204,10 @@ void StepsDisplay::SetInternal( const SetParams ¶ms ) else sDisplayDescription = CustomDifficultyToLocalizedString( sCustomDifficulty ); msg.SetParam( "DisplayDescription", sDisplayDescription ); + + RString sDisplayCredit; + if( params.pSteps ) + sDisplayCredit = params.pSteps->GetCredit(); if( params.pSteps ) msg.SetParam( "Steps", LuaReference::CreateFromPush(*(Steps*)params.pSteps) ); @@ -241,6 +253,11 @@ void StepsDisplay::SetInternal( const SetParams ¶ms ) m_textDescription.SetText( sDisplayDescription ); m_textDescription.HandleMessage( msg ); } + if( m_bShowCredit ) + { + m_textAuthor.SetText( sDisplayCredit ); + m_textAuthor.HandleMessage( msg ); + } if( m_bShowAutogen ) { diff --git a/src/StepsDisplay.h b/src/StepsDisplay.h index 0bab0fa4aa..3d6b7e9d60 100644 --- a/src/StepsDisplay.h +++ b/src/StepsDisplay.h @@ -1,5 +1,3 @@ -/* StepsDisplay - A graphical representation of a Steps or a Trail - has a difficulty number, meter, text, edit description. */ - #ifndef StepsDisplay_H #define StepsDisplay_H @@ -16,7 +14,10 @@ class Steps; class Trail; class PlayerState; - +/** + * @brief A graphical representation of a Steps or a Trail. + * + * It has a difficulty number, meter, text, and an edit description. */ class StepsDisplay : public ActorFrame { public: @@ -52,7 +53,13 @@ private: AutoActor m_sprFrame; BitmapText m_textTicks; // 111100000 BitmapText m_textMeter; // 3, 9 - BitmapText m_textDescription; // Easy, Medium, SuperCoolEdit + /** + * @brief The description of the chart. + * + * This is meant to be separate from the author of the chart. */ + BitmapText m_textDescription; + /** @brief The author of the chart. */ + BitmapText m_textAuthor; AutoActor m_sprAutogen; // visible if Steps and is autogen'd AutoActor m_sprStepsType; @@ -61,6 +68,7 @@ private: ThemeMetric m_bShowTicks; ThemeMetric m_bShowMeter; ThemeMetric m_bShowDescription; + ThemeMetric m_bShowCredit; ThemeMetric m_bShowAutogen; ThemeMetric m_bShowStepsType; ThemeMetric m_sZeroMeterString; diff --git a/src/TimingData.h b/src/TimingData.h index 9c85d67087..d8c83c1e1b 100644 --- a/src/TimingData.h +++ b/src/TimingData.h @@ -1,5 +1,3 @@ -/** @brief TimingData - Holds data for translating beats<->seconds. */ - #ifndef TIMING_DATA_H #define TIMING_DATA_H @@ -479,7 +477,7 @@ struct TickcountSegment bool operator>=( const TickcountSegment &other ) const { return !operator<(other); } }; /** - * @brief Houses all of the TimingData functions. + * @brief Holds data for translating beats<->seconds. */ class TimingData { diff --git a/src/TitleSubstitution.h b/src/TitleSubstitution.h index 664d524baa..7605c8afca 100644 --- a/src/TitleSubstitution.h +++ b/src/TitleSubstitution.h @@ -1,8 +1,7 @@ -/* TitleSubst - automatic translation for song titles */ - #ifndef TITLE_SUBSTITUTION_H -#define TITLE_SUBSTITUTION_H 1 +#define TITLE_SUBSTITUTION_H +/** @brief The different fields to potentially translate. */ struct TitleFields { void SaveToStrings( @@ -32,7 +31,7 @@ struct TitleFields RString TitleTranslit, SubtitleTranslit, ArtistTranslit; }; struct TitleTrans; - +/** @brief Automatic translation for Song titles. */ class TitleSubst { vector ttab; @@ -49,8 +48,10 @@ public: #endif -/* - * (c) 2003-2004 Glenn Maynard +/** + * @file + * @author Glenn Maynard (c) 2003-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/arch/ArchHooks/ArchHooks.h b/src/arch/ArchHooks/ArchHooks.h index b7e534c668..55667c5de0 100644 --- a/src/arch/ArchHooks/ArchHooks.h +++ b/src/arch/ArchHooks/ArchHooks.h @@ -18,7 +18,10 @@ public: * safely log. */ virtual void DumpDebugInfo() { } - /* Re-exec the game. If this is implemented, it doesn't return. */ + /** + * @brief Re-exec the game. + * + * If this is implemented, it doesn't return. */ virtual void RestartProgram() { } /* @@ -41,15 +44,17 @@ public: virtual void BoostPriority() { } virtual void UnBoostPriority() { } - /* + /** + * @brief Setup the rendering threads for concurrency. + * * The priority of the concurrent rendering thread may need to be boosted * on some schedulers. */ virtual void SetupConcurrentRenderingThread() { } - /* - * Returns true if the user wants to quit (eg. ^C, or clicked a "close window" button). - */ + /** + * @brief Determine if the user wants to quit (eg. ^C, or clicked a "close window" button). + * @return true if the user wants to quit, false otherwise. */ static bool UserQuit() { return g_bQuitting; } static void SetUserQuit() { g_bQuitting = true; } @@ -134,8 +139,10 @@ private: extern ArchHooks *HOOKS; // global and accessable from anywhere in our program -/* - * (c) 2003-2004 Glenn Maynard, Chris Danford +/** + * @file + * @author Glenn Maynard, Chris Danford (c) 2003-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/arch/InputHandler/InputHandler.h b/src/arch/InputHandler/InputHandler.h index 4282ffddd1..5bb41914e3 100644 --- a/src/arch/InputHandler/InputHandler.h +++ b/src/arch/InputHandler/InputHandler.h @@ -18,7 +18,7 @@ * if it becomes needed.) */ #include "RageInputDevice.h" // for InputDevice #include "arch/RageDriver.h" - +/** @brief A class designed to handle special input devices. */ class InputHandler: public RageDriver { public: @@ -75,8 +75,10 @@ private: #endif -/* - * (c) 2003-2004 Glenn Maynard +/** + * @file + * @author Glenn Maynard (c) 2003-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/arch/LoadingWindow/LoadingWindow_MacOSX.h b/src/arch/LoadingWindow/LoadingWindow_MacOSX.h index ddc595508a..53ba8a151e 100644 --- a/src/arch/LoadingWindow/LoadingWindow_MacOSX.h +++ b/src/arch/LoadingWindow/LoadingWindow_MacOSX.h @@ -1,10 +1,8 @@ -/* LoadingWindow_MacOSX - Loading window for OSX */ - #ifndef LOADING_WINDOW_MACOSX_H #define LOADING_WINDOW_MACOSX_H #include "LoadingWindow.h" - +/** @brief Loading window for Mac OS X. */ class LoadingWindow_MacOSX : public LoadingWindow { public: @@ -16,8 +14,10 @@ public: #endif -/* - * (c) 2003-2005, 2008 Steve Checkoway +/** + * @file + * @author Steve Checkoway (c) 2003-2005, 2008 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/arch/LowLevelWindow/LowLevelWindow.h b/src/arch/LowLevelWindow/LowLevelWindow.h index a1815aefe9..631d2b3f6c 100644 --- a/src/arch/LowLevelWindow/LowLevelWindow.h +++ b/src/arch/LowLevelWindow/LowLevelWindow.h @@ -1,8 +1,6 @@ #ifndef LOW_LEVEL_WINDOW_H #define LOW_LEVEL_WINDOW_H -/* This handles low-level operations that OGL 1.x doesn't give us. */ - #include class DisplayResolution; @@ -10,7 +8,7 @@ typedef set DisplayResolutions; class VideoModeParams; class RenderTarget; struct RenderTargetParam; - +/** @brief Handle low-level operations that OGL 1.x doesn't give us. */ class LowLevelWindow { public: @@ -46,8 +44,10 @@ public: #endif -/* - * (c) 2003-2004 Glenn Maynard +/** + * @file + * @author Glenn Maynard (c) 2003-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/arch/LowLevelWindow/LowLevelWindow_MacOSX.h b/src/arch/LowLevelWindow/LowLevelWindow_MacOSX.h index 75cc967b0d..ad4df5e548 100644 --- a/src/arch/LowLevelWindow/LowLevelWindow_MacOSX.h +++ b/src/arch/LowLevelWindow/LowLevelWindow_MacOSX.h @@ -18,7 +18,7 @@ class LowLevelWindow_MacOSX : public LowLevelWindow id m_BGContext; CFDictionaryRef m_CurrentDisplayMode; CGDirectDisplayID m_DisplayID; - + public: LowLevelWindow_MacOSX(); ~LowLevelWindow_MacOSX(); @@ -28,15 +28,15 @@ public: void SwapBuffers(); void Update(); - + const VideoModeParams &GetActualVideoModeParams() const { return m_CurrentParams; } - + bool SupportsRenderToTexture() const { return true; } RenderTarget *CreateRenderTarget(); - + bool SupportsThreadedRendering() { return m_BGContext; } void BeginConcurrentRendering(); - + private: void ShutDownFullScreen(); int ChangeDisplayMode( const VideoModeParams& p ); diff --git a/src/arch/LowLevelWindow/LowLevelWindow_X11.h b/src/arch/LowLevelWindow/LowLevelWindow_X11.h index 7bb7be3b0c..2fd7cb53b2 100644 --- a/src/arch/LowLevelWindow/LowLevelWindow_X11.h +++ b/src/arch/LowLevelWindow/LowLevelWindow_X11.h @@ -19,7 +19,7 @@ public: void SwapBuffers(); const VideoModeParams &GetActualVideoModeParams() const { return CurrentParams; } - + void GetDisplayResolutions( DisplayResolutions &out ) const; bool SupportsRenderToTexture() const; @@ -41,7 +41,6 @@ private: #endif #define ARCH_LOW_LEVEL_WINDOW LowLevelWindow_X11 - #endif /* diff --git a/src/archutils/Darwin/DarwinThreadHelpers.h b/src/archutils/Darwin/DarwinThreadHelpers.h index ac8dfbe2c4..e697cb9536 100644 --- a/src/archutils/Darwin/DarwinThreadHelpers.h +++ b/src/archutils/Darwin/DarwinThreadHelpers.h @@ -1,16 +1,34 @@ #ifndef DARWIN_THREAD_HELPERS_H #define DARWIN_THREAD_HELPERS_H +/** + * @brief Attempt to suspend the specified thread. + * @param threadHandle the thread to suspend. + * @return true if the thread is suspended, false otherwise. */ bool SuspendThread( uint64_t threadHandle ); +/** + * @brief Attempt to resume the specified thread. + * @param threadHandle the thread to resume. + * @return true if the thread is resumed, false otherwise. */ bool ResumeThread( uint64_t threadHandle ); +/** + * @brief Retrieve the current thread ID. + * @return the current thread ID. */ uint64_t GetCurrentThreadId(); -// Valid values are from 0.0f to 1.0f. 0.5f is default. +/** + * @brief Set the precedence for the thread. + * + * Valid values for the thread are from 0.0f to 1.0f. + * 0.5f is the default. + * @param prec the precedence to set. */ RString SetThreadPrecedence( float prec ); #endif -/* - * (c) 2004-2006 Steve Checkoway +/** + * @file + * @author Steve Checkoway (c) 2004-2006 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/archutils/Unix/Backtrace.h b/src/archutils/Unix/Backtrace.h index b82391a841..d23d6f0e98 100644 --- a/src/archutils/Unix/Backtrace.h +++ b/src/archutils/Unix/Backtrace.h @@ -23,9 +23,11 @@ struct BacktraceContext #endif }; -/* Initialize. This is optional. If not called explicitly, it will be - * called as necessary. This may do things that are not safe to do in - * crash conditions. */ +/** + * @brief Initialize the backtrace. + * + * This is optional. If not called explicitly, it will be called as necessary. + * This may do things that are not safe to do in crash conditions. */ void InitializeBacktrace(); /* Retrieve up to size-1 backtrace pointers in buf. The array will be @@ -47,8 +49,10 @@ void GetSignalBacktraceContext( BacktraceContext *ctx, const ucontext_t *uc ); #endif -/* - * (c) 2003-2004 Glenn Maynard +/** + * @file + * @author Glenn Maynard (c) 2003-2004 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/smpackage-net2008.sln b/src/smpackage-net2008.sln new file mode 100644 index 0000000000..9432e0f6dc --- /dev/null +++ b/src/smpackage-net2008.sln @@ -0,0 +1,46 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smpackage", "smpackage-net2008.vcproj", "{67179F21-52DD-42E7-A797-67DBEAF9F4F4}" + ProjectSection(ProjectDependencies) = postProject + {F8FE2773-87CB-402F-8DC8-A80837C3E24C} = {F8FE2773-87CB-402F-8DC8-A80837C3E24C} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZipArchive", "smpackage\ZipArchive\ZipArchive-net2008.vcproj", "{F8FE2773-87CB-402F-8DC8-A80837C3E24C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + Static Debug|Win32 = Static Debug|Win32 + Static Release|Win32 = Static Release|Win32 + Unicode Debug|Win32 = Unicode Debug|Win32 + Unicode Release|Win32 = Unicode Release|Win32 + Unicode Static Release|Win32 = Unicode Static Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {67179F21-52DD-42E7-A797-67DBEAF9F4F4}.Debug|Win32.ActiveCfg = Debug|Win32 + {67179F21-52DD-42E7-A797-67DBEAF9F4F4}.Release|Win32.ActiveCfg = Release|Win32 + {67179F21-52DD-42E7-A797-67DBEAF9F4F4}.Static Debug|Win32.ActiveCfg = Debug|Win32 + {67179F21-52DD-42E7-A797-67DBEAF9F4F4}.Static Release|Win32.ActiveCfg = Release|Win32 + {67179F21-52DD-42E7-A797-67DBEAF9F4F4}.Unicode Debug|Win32.ActiveCfg = Debug|Win32 + {67179F21-52DD-42E7-A797-67DBEAF9F4F4}.Unicode Release|Win32.ActiveCfg = Release|Win32 + {67179F21-52DD-42E7-A797-67DBEAF9F4F4}.Unicode Static Release|Win32.ActiveCfg = Release|Win32 + {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Debug|Win32.ActiveCfg = Debug|Win32 + {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Debug|Win32.Build.0 = Debug|Win32 + {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Release|Win32.ActiveCfg = Release|Win32 + {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Release|Win32.Build.0 = Release|Win32 + {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Static Debug|Win32.ActiveCfg = Static Debug|Win32 + {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Static Debug|Win32.Build.0 = Static Debug|Win32 + {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Static Release|Win32.ActiveCfg = Static Release|Win32 + {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Static Release|Win32.Build.0 = Static Release|Win32 + {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Unicode Debug|Win32.ActiveCfg = Unicode Debug|Win32 + {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Unicode Debug|Win32.Build.0 = Unicode Debug|Win32 + {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Unicode Release|Win32.ActiveCfg = Unicode Release|Win32 + {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Unicode Release|Win32.Build.0 = Unicode Release|Win32 + {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Unicode Static Release|Win32.ActiveCfg = Unicode Static Release|Win32 + {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Unicode Static Release|Win32.Build.0 = Unicode Static Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/smpackage-net2008.vcproj b/src/smpackage-net2008.vcproj new file mode 100644 index 0000000000..4f914af735 --- /dev/null +++ b/src/smpackage-net2008.vcproj @@ -0,0 +1,1072 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/smpackage/ZipArchive/ZipArchive-net2003.vcproj b/src/smpackage/ZipArchive/ZipArchive-net2003.vcproj index dc15524a56..0770070d68 100644 --- a/src/smpackage/ZipArchive/ZipArchive-net2003.vcproj +++ b/src/smpackage/ZipArchive/ZipArchive-net2003.vcproj @@ -1,53 +1,33 @@ + SccProjectName=""$/ZipArchive", LDAAAAAA" + SccLocalPath="." + Keyword="MFCProj"> + Name="Win32"/> - - - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + SuppressStartupBanner="TRUE" + DebugInformationFormat="4"/> - - + Name="VCCustomBuildTool"/> + SuppressStartupBanner="TRUE"/> + Name="VCMIDLTool"/> + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033"/> + + + + - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + SuppressStartupBanner="TRUE"/> - - + Name="VCCustomBuildTool"/> + SuppressStartupBanner="TRUE"/> + Name="VCMIDLTool"/> + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033"/> + + + + - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="1"> + SuppressStartupBanner="TRUE"/> - - + Name="VCCustomBuildTool"/> + SuppressStartupBanner="TRUE"/> + Name="VCMIDLTool"/> + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033"/> + + + + - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + SuppressStartupBanner="TRUE"/> - - + Name="VCCustomBuildTool"/> + SuppressStartupBanner="TRUE"/> + Name="VCMIDLTool"/> + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033"/> + + + + - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="1"> + SuppressStartupBanner="TRUE" + DebugInformationFormat="4"/> - - + Name="VCCustomBuildTool"/> + SuppressStartupBanner="TRUE"/> + Name="VCMIDLTool"/> + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033"/> + + + + - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="2"> + SuppressStartupBanner="TRUE" + DebugInformationFormat="4"/> - - + Name="VCCustomBuildTool"/> + SuppressStartupBanner="TRUE"/> + Name="VCMIDLTool"/> + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033"/> + + + + - - - - - + ATLMinimizesCRunTimeLibraryUsage="FALSE" + CharacterSet="1"> + SuppressStartupBanner="TRUE"/> - - + Name="VCCustomBuildTool"/> + SuppressStartupBanner="TRUE"/> + Name="VCMIDLTool"/> + Name="VCPostBuildEventTool"/> + Name="VCPreBuildEventTool"/> + Name="VCPreLinkEventTool"/> + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033"/> + + + + @@ -542,1142 +378,905 @@ + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> + RelativePath="stdafx.cpp"> + Name="Debug|Win32"> + BrowseInformation="1"/> + Name="Release|Win32"> + UsePrecompiledHeader="1"/> + Name="Unicode Static Release|Win32"> + UsePrecompiledHeader="1"/> + Name="Static Release|Win32"> + UsePrecompiledHeader="1"/> + Name="Unicode Debug|Win32"> + BrowseInformation="1"/> + Name="Static Debug|Win32"> + BrowseInformation="1"/> + Name="Unicode Release|Win32"> + UsePrecompiledHeader="1"/> + RelativePath="ZipArchive.cpp"> + Name="Debug|Win32"> + BrowseInformation="1"/> + Name="Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Static Release|Win32"> + PreprocessorDefinitions="NDEBUG;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + Name="Static Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Debug|Win32"> + BrowseInformation="1"/> + Name="Static Debug|Win32"> + BrowseInformation="1"/> + Name="Unicode Release|Win32"> + PreprocessorDefinitions="NDEBUG;_AFXDLL;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + RelativePath="ZipAutoBuffer.cpp"> + Name="Debug|Win32"> + BrowseInformation="1"/> + Name="Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Static Release|Win32"> + PreprocessorDefinitions="NDEBUG;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + Name="Static Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Debug|Win32"> + BrowseInformation="1"/> + Name="Static Debug|Win32"> + BrowseInformation="1"/> + Name="Unicode Release|Win32"> + PreprocessorDefinitions="NDEBUG;_AFXDLL;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + RelativePath="ZipCentralDir.cpp"> + Name="Debug|Win32"> + BrowseInformation="1"/> + Name="Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Static Release|Win32"> + PreprocessorDefinitions="NDEBUG;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + Name="Static Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Debug|Win32"> + BrowseInformation="1"/> + Name="Static Debug|Win32"> + BrowseInformation="1"/> + Name="Unicode Release|Win32"> + PreprocessorDefinitions="NDEBUG;_AFXDLL;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + RelativePath="ZipCompatibility.cpp"> + Name="Debug|Win32"> + BrowseInformation="1"/> + Name="Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Static Release|Win32"> + PreprocessorDefinitions="NDEBUG;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + Name="Static Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Debug|Win32"> + BrowseInformation="1"/> + Name="Static Debug|Win32"> + BrowseInformation="1"/> + Name="Unicode Release|Win32"> + PreprocessorDefinitions="NDEBUG;_AFXDLL;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + RelativePath="ZipException.cpp"> + Name="Debug|Win32"> + BrowseInformation="1"/> + Name="Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Static Release|Win32"> + PreprocessorDefinitions="NDEBUG;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + Name="Static Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Debug|Win32"> + BrowseInformation="1"/> + Name="Static Debug|Win32"> + BrowseInformation="1"/> + Name="Unicode Release|Win32"> + PreprocessorDefinitions="NDEBUG;_AFXDLL;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + RelativePath="ZipFile.cpp"> + Name="Debug|Win32"> + BrowseInformation="1"/> + Name="Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Static Release|Win32"> + PreprocessorDefinitions="NDEBUG;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + Name="Static Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Debug|Win32"> + BrowseInformation="1"/> + Name="Static Debug|Win32"> + BrowseInformation="1"/> + Name="Unicode Release|Win32"> + PreprocessorDefinitions="NDEBUG;_AFXDLL;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + RelativePath="ZipFileHeader.cpp"> + Name="Debug|Win32"> + BrowseInformation="1"/> + Name="Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Static Release|Win32"> + PreprocessorDefinitions="NDEBUG;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + Name="Static Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Debug|Win32"> + BrowseInformation="1"/> + Name="Static Debug|Win32"> + BrowseInformation="1"/> + Name="Unicode Release|Win32"> + PreprocessorDefinitions="NDEBUG;_AFXDLL;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + RelativePath="ZipMemFile.cpp"> + Name="Debug|Win32"> + BrowseInformation="1"/> + Name="Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Static Release|Win32"> + PreprocessorDefinitions="NDEBUG;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + Name="Static Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Debug|Win32"> + BrowseInformation="1"/> + Name="Static Debug|Win32"> + BrowseInformation="1"/> + Name="Unicode Release|Win32"> + PreprocessorDefinitions="NDEBUG;_AFXDLL;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + RelativePath="ZipPathComponent.cpp"> + Name="Debug|Win32"> + BrowseInformation="1"/> + Name="Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Static Release|Win32"> + PreprocessorDefinitions="NDEBUG;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + Name="Static Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Debug|Win32"> + BrowseInformation="1"/> + Name="Static Debug|Win32"> + BrowseInformation="1"/> + Name="Unicode Release|Win32"> + PreprocessorDefinitions="NDEBUG;_AFXDLL;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + RelativePath="ZipPlatform.cpp"> + Name="Debug|Win32"> + BrowseInformation="1"/> + Name="Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Static Release|Win32"> + PreprocessorDefinitions="NDEBUG;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + Name="Static Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Debug|Win32"> + BrowseInformation="1"/> + Name="Static Debug|Win32"> + BrowseInformation="1"/> + Name="Unicode Release|Win32"> + PreprocessorDefinitions="NDEBUG;_AFXDLL;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + RelativePath="ZipPlatformComm.cpp"> + Name="Debug|Win32"> + BrowseInformation="1"/> + Name="Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Static Release|Win32"> + PreprocessorDefinitions="NDEBUG;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + Name="Static Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Debug|Win32"> + BrowseInformation="1"/> + Name="Static Debug|Win32"> + BrowseInformation="1"/> + Name="Unicode Release|Win32"> + PreprocessorDefinitions="NDEBUG;_AFXDLL;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + RelativePath="ZipStorage.cpp"> + Name="Debug|Win32"> + BrowseInformation="1"/> + Name="Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Static Release|Win32"> + PreprocessorDefinitions="NDEBUG;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + Name="Static Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Debug|Win32"> + BrowseInformation="1"/> + Name="Static Debug|Win32"> + BrowseInformation="1"/> + Name="Unicode Release|Win32"> + PreprocessorDefinitions="NDEBUG;_AFXDLL;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + RelativePath="ZipString.cpp"> + Name="Debug|Win32"> + BrowseInformation="1"/> + Name="Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Static Release|Win32"> + PreprocessorDefinitions="NDEBUG;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + Name="Static Release|Win32"> + PreprocessorDefinitions=""/> + Name="Unicode Debug|Win32"> + BrowseInformation="1"/> + Name="Static Debug|Win32"> + BrowseInformation="1"/> + Name="Unicode Release|Win32"> + PreprocessorDefinitions="NDEBUG;_AFXDLL;_UNICODE;ZLIB_DLL;WIN32;_WINDOWS;ZIP_ARCHIVE_MFC_PROJ;PKZIP_BUG_WORKAROUND;$(NoInherit)"/> + Filter="h;hpp;hxx;hm;inl"> + RelativePath="stdafx.h"> + RelativePath="ZipAbstractFile.h"> + RelativePath="ZipArchive.h"> + RelativePath="ZipAutoBuffer.h"> + RelativePath="ZipBaseException.h"> + RelativePath="ZipCentralDir.h"> + RelativePath="ZipCollections.h"> + RelativePath="ZipCompatibility.h"> + RelativePath="ZipException.h"> + RelativePath="ZipExport.h"> + RelativePath="ZipFile.h"> + RelativePath="ZipFileHeader.h"> + RelativePath="ZipFileMapping.h"> + RelativePath="ZipMemFile.h"> + RelativePath="ZipPathComponent.h"> + RelativePath="ZipPlatform.h"> + RelativePath="ZipStorage.h"> + RelativePath="ZipString.h"> + Filter="txt"> + RelativePath="Appnote.txt"> + RelativePath="ChangeLog.txt"> + RelativePath="faq.txt"> + RelativePath="gpl.txt"> + RelativePath="License.txt"> + RelativePath="Readme.txt"> diff --git a/src/smpackage/ZipArchive/ZipArchive-net2008.vcproj b/src/smpackage/ZipArchive/ZipArchive-net2008.vcproj new file mode 100644 index 0000000000..dc15524a56 --- /dev/null +++ b/src/smpackage/ZipArchive/ZipArchive-net2008.vcproj @@ -0,0 +1,1686 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +