From c9c61c4bb9268dbebe2d2c40e3ec510682334dd6 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 13:41:44 -0600 Subject: [PATCH 001/143] working on mouse stuff, one part at a time. --- src/RageInputDevice.cpp | 4 +--- src/RageInputDevice.h | 8 +++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/RageInputDevice.cpp b/src/RageInputDevice.cpp index 457840428a..7109c2c8c3 100644 --- a/src/RageInputDevice.cpp +++ b/src/RageInputDevice.cpp @@ -127,7 +127,6 @@ static void InitNames() g_mapNamesToString[JOY_AUX_3] = "Aux3"; g_mapNamesToString[JOY_AUX_4] = "Aux4"; - /* g_mapNamesToString[MOUSE_LEFT] = "left mouse button"; g_mapNamesToString[MOUSE_RIGHT] = "right mouse button"; g_mapNamesToString[MOUSE_MIDDLE] = "middle mouse button"; @@ -135,7 +134,6 @@ static void InitNames() g_mapNamesToString[MOUSE_BACK] = "back mouse button"; g_mapNamesToString[MOUSE_WHEELUP] = "mousewheel up"; g_mapNamesToString[MOUSE_WHEELDOWN] = "mousewheel down"; - */ FOREACHM( DeviceButton, RString, g_mapNamesToString, m ) g_mapStringToNames[m->second] = m->first; @@ -229,7 +227,7 @@ static const char *InputDeviceNames[] = { "Pump1", "Pump2", "Midi", - //"Mouse", + "Mouse", }; XToString( InputDevice ); StringToX( InputDevice ); diff --git a/src/RageInputDevice.h b/src/RageInputDevice.h index 58e89c2b01..3ced992701 100644 --- a/src/RageInputDevice.h +++ b/src/RageInputDevice.h @@ -46,7 +46,7 @@ enum InputDevice DEVICE_PUMP1, DEVICE_PUMP2, DEVICE_MIDI, - //DEVICE_MOUSE, + DEVICE_MOUSE, NUM_InputDevice, // leave this at the end InputDevice_Invalid // means this is NULL }; @@ -55,7 +55,7 @@ const RString& InputDeviceToString( InputDevice i ); InputDevice StringToInputDevice( const RString& s ); inline bool IsJoystick( InputDevice id ) { return DEVICE_JOY1 <= id && id < DEVICE_JOY1+NUM_JOYSTICKS; } inline bool IsPump( InputDevice id ) { return DEVICE_PUMP1 <= id && id < DEVICE_PUMP1+NUM_PUMPS; } -//inline bool IsMouse( InputDevice id ) { return id == DEVICE_MOUSE; } +inline bool IsMouse( InputDevice id ) { return id == DEVICE_MOUSE; } struct InputDeviceInfo { @@ -290,7 +290,6 @@ enum DeviceButton MIDI_LAST = 699, // Mouse: - /* MOUSE_LEFT = 700, MOUSE_RIGHT, MOUSE_MIDDLE, @@ -298,7 +297,6 @@ enum DeviceButton MOUSE_WHEELUP, MOUSE_WHEELDOWN, // for mice with forward and backwards buttons MOUSE_FORWARD, MOUSE_BACK, - */ NUM_DeviceButton, DeviceButton_Invalid @@ -354,7 +352,7 @@ public: void MakeInvalid() { device = InputDevice_Invalid; }; bool IsJoystick() const { return ::IsJoystick(device); } - //bool IsMouse() const { return ::IsMouse(device); } + bool IsMouse() const { return ::IsMouse(device); } }; typedef vector DeviceInputList; From 0fda8885da4e5f704ef922a5168e6ea9147c77e4 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 14:04:33 -0600 Subject: [PATCH 002/143] alright, it still works... --- src/arch/InputHandler/InputHandler_DirectInput.cpp | 4 +--- src/arch/InputHandler/InputHandler_DirectInputHelper.cpp | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index 180191f123..4da20f4e54 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -29,7 +29,7 @@ static BOOL CALLBACK EnumDevicesCallback( const DIDEVICEINSTANCE *pdidInstance, { case DIDEVTYPE_KEYBOARD: device.type = device.KEYBOARD; break; case DIDEVTYPE_JOYSTICK: device.type = device.JOYSTICK; break; - //case DIDEVTYPE_MOUSE: device.type = device.MOUSE; break; + case DIDEVTYPE_MOUSE: device.type = device.MOUSE; break; default: return DIENUM_CONTINUE; } @@ -49,11 +49,9 @@ static BOOL CALLBACK EnumDevicesCallback( const DIDEVICEINSTANCE *pdidInstance, device.dev = DEVICE_KEYBOARD; break; - /* case device.MOUSE: device.dev = DEVICE_MOUSE; break; - */ } Devices.push_back(device); diff --git a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp index 939ad6cc24..3be1b98398 100644 --- a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp @@ -92,11 +92,9 @@ bool DIDevice::Open() case JOYSTICK: hr = Device->SetDataFormat( &c_dfDIJoystick ); break; - /* case MOUSE: hr = Device->SetDataFormat( &c_dfDIMouse ); break; - */ } if ( hr != DI_OK ) { @@ -122,11 +120,9 @@ bool DIDevice::Open() Inputs.push_back(in); } break; - /* case MOUSE: Device->EnumObjects( DIMouse_EnumDevObjectsProc, this, DIDFT_BUTTON | DIDFT_PSHBUTTON ); break; - */ } { From a7dbd0ca91b948f4d6ca4909e8f12e100abd3f2c Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 14:10:04 -0600 Subject: [PATCH 003/143] input still works... trying to be as careful as I can here --- .../InputHandler/InputHandler_DirectInput.cpp | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index 4da20f4e54..5824b1cd6a 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -378,8 +378,8 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm ) } } break; - /* case device.MOUSE: + /* DIMOUSESTATE state; HRESULT hr = GetDeviceState(device.Device, sizeof(state), &state); @@ -400,9 +400,8 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm ) break; } } - + */ break; - */ } } @@ -565,18 +564,18 @@ const float POLL_FOR_JOYSTICK_CHANGES_EVERY_SECONDS = 0.25f; bool InputHandler_DInput::DevicesChanged() { - // GetNumJoysticksSlow() blocks DirectInput for a while even if called from a - // different thread, so we can't poll with it. - // GetNumHidDevices() is fast, but sometimes the DirectInput joysticks haven't updated by - // the time the HID registry value changes. - // So, poll using GetNumHidDevices(). When that changes, poll using GetNumJoysticksSlow() - // for a little while to give DirectInput time to catch up. On this XP machine, it takes - // 2-10 DirectInput polls (0.5-2.5 seconds) to catch a newly installed device after the - // registry value changes, and catches non-new plugged/unplugged devices on the first - // DirectInputPoll. - // Note that this "poll for N seconds" method will not work if the Add New Hardware wizard - // halts device installation to wait for a driver. Most of the joysticks people would - // want to use don't prompt for a driver though and the wizard adds them pretty quickly. + /* GetNumJoysticksSlow() blocks DirectInput for a while even if called from a + * different thread, so we can't poll with it. GetNumHidDevices() is fast, + * but sometimes the DirectInput joysticks haven't updated by the time the + * HID registry value changes. So, poll using GetNumHidDevices(). When that + * changes, poll using GetNumJoysticksSlow() for a little while to give + * DirectInput time to catch up. On this XP machine (which? -aj), it takes + * 2-10 DirectInput polls (0.5-2.5 seconds) to catch a newly installed device + * after the registry value changes, and catches non-new plugged/unplugged + * devices on the first DirectInputPoll. Note that this "poll for N seconds" + * method will not work if the Add New Hardware wizard halts device + * installation to wait for a driver. Most of the joysticks people would want + * to use don't prompt for a driver though, and the wizard adds them pretty quickly. */ int iOldNumHidDevices = m_iLastSeenNumHidDevices; m_iLastSeenNumHidDevices = GetNumHidDevices(); From c4510a46c8749e2142ca2e293e9864fc6d3e5343 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 14:12:58 -0600 Subject: [PATCH 004/143] still doesn't break --- src/arch/InputHandler/InputHandler_DirectInput.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index 5824b1cd6a..99dcd3d5b8 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -119,12 +119,10 @@ InputHandler_DInput::InputHandler_DInput() RageException::Throw( hr_ssprintf(hr, "InputHandler_DInput: IDirectInput::EnumDevices") ); // mouse - /* LOG->Trace( "InputHandler_DInput: IDirectInput::EnumDevices(DIDEVTYPE_MOUSE)" ); hr = g_dinput->EnumDevices( DIDEVTYPE_MOUSE, EnumDevicesCallback, NULL, DIEDFL_ATTACHEDONLY ); if( hr != DI_OK ) RageException::Throw( hr_ssprintf(hr, "InputHandler_DInput: IDirectInput::EnumDevices") ); - */ for( unsigned i = 0; i < Devices.size(); ++i ) { From 6d44f22dbe46e4c8e6e0fa370b08cfcabbe223d0 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 14:16:24 -0600 Subject: [PATCH 005/143] still works, nothing serious yet --- src/arch/InputHandler/InputHandler_DirectInputHelper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp index 3be1b98398..72565bb357 100644 --- a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp @@ -348,12 +348,12 @@ static BOOL CALLBACK DIMouse_EnumDevObjectsProc(LPCDIDEVICEOBJECTINSTANCE dev, L input_t in; // todo: check mask for accuracy -aj - const int SupportedMask = DIDFT_BUTTON | DIDFT_PSHBUTTON; + const int SupportedMask = DIDFT_BUTTON; if(!(dev->dwType & SupportedMask)) return DIENUM_CONTINUE; // unsupported // xxx: does this check for scrollwheels? -aj - if(dev->dwType & (DIDFT_BUTTON | DIDFT_PSHBUTTON) ) { + if(dev->dwType & DIDFT_BUTTON ) { in.type = in.BUTTON; in.num = device->buttons; device->buttons++; From 13adc237f8380dbf4c2ff95a00b6633789651447 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 14:18:08 -0600 Subject: [PATCH 006/143] another mouse code sync (expect more of these) --- src/arch/InputHandler/InputHandler_DirectInput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index 99dcd3d5b8..9693f1da3d 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -377,13 +377,13 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm ) } break; case device.MOUSE: - /* DIMOUSESTATE state; HRESULT hr = GetDeviceState(device.Device, sizeof(state), &state); if( hr == DIERR_INPUTLOST || hr == DIERR_NOTACQUIRED ) return; + /* // do button checks here for( unsigned i = 0; i < device.Inputs.size(); ++i ) { From ef2de84c1eb603498021834731c8dc696cac4734 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 14:21:56 -0600 Subject: [PATCH 007/143] paranoid mouse code sync --- src/arch/InputHandler/InputHandler_DirectInput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index 9693f1da3d..653409f6e2 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -456,7 +456,7 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm case DIMOFS_BUTTON0: mouseInput = MOUSE_LEFT; break; case DIMOFS_BUTTON1: mouseInput = MOUSE_RIGHT; break; case DIMOFS_BUTTON2: mouseInput = MOUSE_MIDDLE; break; - case DIMOFS_BUTTON3: break; + //case DIMOFS_BUTTON3: break; // todo: handle directions case DIMOFS_X: break; case DIMOFS_Y: break; From c14ad4955a8f43b3dd4dd03388b3f0d63d16286c Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 14:23:56 -0600 Subject: [PATCH 008/143] mouse code: memset still works. --- src/arch/InputHandler/InputHandler_DirectInputHelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp index 72565bb357..0763a43412 100644 --- a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp @@ -24,7 +24,7 @@ DIDevice::DIDevice() dev = InputDevice_Invalid; buffered = true; memset(&JoystickInst, 0, sizeof(JoystickInst)); - //memset(&MouseInst, 0, sizeof(MouseInst)); + memset(&MouseInst, 0, sizeof(MouseInst)); Device = NULL; } From 99657b33b5a195294bd0721e7e5ef198620840e3 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 14:26:45 -0600 Subject: [PATCH 009/143] mouse code: input still works, very paranoid --- src/arch/InputHandler/InputHandler_DirectInputHelper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp index 0763a43412..e29f7facdf 100644 --- a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp @@ -352,6 +352,8 @@ static BOOL CALLBACK DIMouse_EnumDevObjectsProc(LPCDIDEVICEOBJECTINSTANCE dev, L if(!(dev->dwType & SupportedMask)) return DIENUM_CONTINUE; // unsupported + in.ofs = dev->dwOfs; + // xxx: does this check for scrollwheels? -aj if(dev->dwType & DIDFT_BUTTON ) { in.type = in.BUTTON; From 09eae1f65fea86a49653068d4cf3c4d7574e098d Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 14:47:47 -0600 Subject: [PATCH 010/143] mouse code: input still works... again --- .../InputHandler_DirectInputHelper.cpp | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp index e29f7facdf..a47572aba2 100644 --- a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp @@ -52,27 +52,6 @@ bool DIDevice::Open() return false; } - // load mouse - /* - hr = g_dinput->CreateDevice( MouseInst.guidInstance, &tmpdevice, NULL ); - if ( hr != DI_OK ) - { - LOG->Info( hr_ssprintf(hr, "OpenDevice: IDirectInput_CreateDevice") ); - return false; - } - */ - // is this ok? -aj - //hr = tmpdevice->QueryInterface( IID_IDirectInputDevice2, (LPVOID *) &Device ); - /* - tmpdevice->Release(); - if ( hr != DI_OK ) - { - LOG->Info( hr_ssprintf(hr, "OpenDevice(%s): IDirectInputDevice::QueryInterface", m_sName.c_str()) ); - return false; - } - */ - - // should mouse be foreground? -aj int coop = DISCL_NONEXCLUSIVE | DISCL_BACKGROUND; if( type == KEYBOARD ) coop = DISCL_NONEXCLUSIVE | DISCL_FOREGROUND; From 9496af029f4ca4144335e8377fa3616add1f97ff Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 14:49:44 -0600 Subject: [PATCH 011/143] Found 2 DirectInput devices: 0: 'Keyboard' axes: 0, hats: 0, buttons: 256 (buffered) 1: 'Mouse' axes: 0, hats: 0, buttons: 8 (buffered) it's only just beginning --- src/arch/InputHandler/InputHandler_DirectInputHelper.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp index a47572aba2..b2a887cd34 100644 --- a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp @@ -322,7 +322,6 @@ static int ConvertScancodeToKey( int scancode ) static BOOL CALLBACK DIMouse_EnumDevObjectsProc(LPCDIDEVICEOBJECTINSTANCE dev, LPVOID data) { - /* DIDevice *device = (DIDevice *) data; input_t in; @@ -341,7 +340,6 @@ static BOOL CALLBACK DIMouse_EnumDevObjectsProc(LPCDIDEVICEOBJECTINSTANCE dev, L } device->Inputs.push_back(in); - */ return DIENUM_CONTINUE; } From 5597b86887f843851faeedf349d96d287be75501 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 15:00:16 -0600 Subject: [PATCH 012/143] the very beginning of mouse support in sm-ssc --- src/arch/InputHandler/InputHandler_DirectInput.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index 653409f6e2..eb9173e408 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -383,7 +383,6 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm ) if( hr == DIERR_INPUTLOST || hr == DIERR_NOTACQUIRED ) return; - /* // do button checks here for( unsigned i = 0; i < device.Inputs.size(); ++i ) { @@ -398,7 +397,6 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm ) break; } } - */ break; } } @@ -447,7 +445,7 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm break; case in.BUTTON: - /* + // hope this works... if(dev == DEVICE_MOUSE) { DeviceButton mouseInput = DeviceButton_Invalid; @@ -469,8 +467,7 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm ButtonPressed( DeviceInput(dev, mouseInput, !!evtbuf[i].dwData, tm) ); } else - */ - ButtonPressed( DeviceInput(dev, enum_add2(JOY_BUTTON_1, in.num), !!evtbuf[i].dwData, tm) ); + ButtonPressed( DeviceInput(dev, enum_add2(JOY_BUTTON_1, in.num), !!evtbuf[i].dwData, tm) ); break; case in.AXIS: From 641777ddf7fc06b21f1892b4c67bff4df7257f71 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 17:08:29 -0600 Subject: [PATCH 013/143] Found 2 DirectInput devices: 0: 'Keyboard' axes: 0, hats: 0, buttons: 256 (buffered) 1: 'Mouse' axes: 3, hats: 0, buttons: 8 (buffered) So let's get this straight: Left, Right, and Middle clicks work. Wheel Up and Wheel Down work. X/Y axis doesn't seem to work yet. --- src/InputMapper.cpp | 2 - src/RageInput.cpp | 12 +- src/RageInputDevice.cpp | 4 +- src/RageInputDevice.h | 5 + src/ScreenDebugOverlay.cpp | 4 +- .../InputHandler/InputHandler_DirectInput.cpp | 201 +++++++++++------- .../InputHandler_DirectInputHelper.cpp | 39 +++- .../InputHandler_DirectInputHelper.h | 2 - 8 files changed, 168 insertions(+), 101 deletions(-) diff --git a/src/InputMapper.cpp b/src/InputMapper.cpp index bc247c5552..e0eb9c88b7 100644 --- a/src/InputMapper.cpp +++ b/src/InputMapper.cpp @@ -559,9 +559,7 @@ void InputMapper::AutoMapJoysticksForCurrentGame() vector vDevices; INPUTMAN->GetDevicesAndDescriptions(vDevices); - // // fill vector with all auto mappings - // vector vAutoMappings; { // file automaps - Add these first so that they can match before the hard-coded mappings diff --git a/src/RageInput.cpp b/src/RageInput.cpp index ed34519072..99c9d6eba5 100644 --- a/src/RageInput.cpp +++ b/src/RageInput.cpp @@ -38,7 +38,7 @@ RageInput::RageInput() RageInput::~RageInput() { - /* Delete optional devices. */ + // Delete optional devices. for( unsigned i = 0; i < m_InputHandlers.size(); ++i ) delete m_InputHandlers[i].m_pDevice; m_InputHandlers.clear(); @@ -55,28 +55,28 @@ void RageInput::LoadDrivers() m_InputHandlers.clear(); g_mapDeviceToHandler.clear(); - /* Init optional devices. */ + // Init optional devices. vector apDevices; InputHandler::Create( g_sInputDrivers, apDevices ); for( unsigned i = 0; i < apDevices.size(); ++i ) AddHandler( apDevices[i] ); - /* If no input devices are loaded, the user won't be able to input anything. */ + // If no input devices are loaded, the user won't be able to input anything. if( apDevices.size() == 0 ) LOG->Warn( "No input devices were loaded." ); } void RageInput::Update() { - /* Update optional devices. */ + // Update optional devices. for( unsigned i = 0; i < m_InputHandlers.size(); ++i ) m_InputHandlers[i].m_pDevice->Update(); } bool RageInput::DevicesChanged() { - /* Update optional devices. */ + // Update optional devices. for( unsigned i = 0; i < m_InputHandlers.size(); ++i ) { if( m_InputHandlers[i].m_pDevice->DevicesChanged() ) @@ -111,7 +111,7 @@ void RageInput::AddHandler( InputHandler *pHandler ) g_mapDeviceToHandler[idi->id] = pHandler; } -/* Return the first InputDriver for the requested InputDevice. */ +/** @brief Return the first InputDriver for the requested InputDevice. */ InputHandler *RageInput::GetHandlerForDevice( const InputDevice id ) { map::iterator it = g_mapDeviceToHandler.find(id); diff --git a/src/RageInputDevice.cpp b/src/RageInputDevice.cpp index 7109c2c8c3..2bc1ae3979 100644 --- a/src/RageInputDevice.cpp +++ b/src/RageInputDevice.cpp @@ -130,10 +130,10 @@ static void InitNames() g_mapNamesToString[MOUSE_LEFT] = "left mouse button"; g_mapNamesToString[MOUSE_RIGHT] = "right mouse button"; g_mapNamesToString[MOUSE_MIDDLE] = "middle mouse button"; - g_mapNamesToString[MOUSE_FORWARD] = "forward mouse button"; - g_mapNamesToString[MOUSE_BACK] = "back mouse button"; g_mapNamesToString[MOUSE_WHEELUP] = "mousewheel up"; g_mapNamesToString[MOUSE_WHEELDOWN] = "mousewheel down"; + g_mapNamesToString[MOUSE_FORWARD] = "forward mouse button"; + g_mapNamesToString[MOUSE_BACK] = "back mouse button"; FOREACHM( DeviceButton, RString, g_mapNamesToString, m ) g_mapStringToNames[m->second] = m->first; diff --git a/src/RageInputDevice.h b/src/RageInputDevice.h index 3ced992701..09066df405 100644 --- a/src/RageInputDevice.h +++ b/src/RageInputDevice.h @@ -297,6 +297,11 @@ enum DeviceButton MOUSE_WHEELUP, MOUSE_WHEELDOWN, // for mice with forward and backwards buttons MOUSE_FORWARD, MOUSE_BACK, + // axis + MOUSE_X_LEFT, MOUSE_X_RIGHT, + MOUSE_Y_UP, MOUSE_Y_DOWN, + // mousewheel? + MOUSE_Z_UP, MOUSE_Z_DOWN, NUM_DeviceButton, DeviceButton_Invalid diff --git a/src/ScreenDebugOverlay.cpp b/src/ScreenDebugOverlay.cpp index 972ff0747d..f4610870d6 100644 --- a/src/ScreenDebugOverlay.cpp +++ b/src/ScreenDebugOverlay.cpp @@ -163,7 +163,7 @@ static LocalizedString DEBUG_MENU( "ScreenDebugOverlay", "Debug Menu" ); void ScreenDebugOverlay::Init() { Screen::Init(); - + // Init debug mappings // TODO: Arch-specific? { @@ -539,7 +539,6 @@ void ChangeVisualDelay( float fDelta ) pRet->Set( fSecs ); } - // DebugLines static LocalizedString AUTO_PLAY ( "ScreenDebugOverlay", "AutoPlay" ); static LocalizedString ASSIST ( "ScreenDebugOverlay", "Assist" ); @@ -579,7 +578,6 @@ static LocalizedString SONG ( "ScreenDebugOverlay", "Song" ); static LocalizedString MACHINE ( "ScreenDebugOverlay", "Machine" ); static LocalizedString SYNC_TEMPO ( "ScreenDebugOverlay", "Tempo" ); - class DebugLineAutoplay : public IDebugLine { virtual RString GetDisplayTitle() { return AUTO_PLAY.GetValue() + " (+Shift = AI) (+Alt = hide)"; } diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index eb9173e408..15aa64e2ae 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -307,71 +307,71 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm ) switch(in.type) { - case in.BUTTON: - { - DeviceInput di( dev, enum_add2(JOY_BUTTON_1, in.num), !!state.rgbButtons[in.ofs - DIJOFS_BUTTON0], tm ); - ButtonPressed( di ); - break; - } - - case in.AXIS: - { - DeviceButton neg = DeviceButton_Invalid, pos = DeviceButton_Invalid; - int val = 0; - switch( in.ofs ) + case in.BUTTON: { - case DIJOFS_X: neg = JOY_LEFT; pos = JOY_RIGHT; - val = state.lX; - break; - case DIJOFS_Y: neg = JOY_UP; pos = JOY_DOWN; - val = state.lY; - break; - case DIJOFS_Z: neg = JOY_Z_UP; pos = JOY_Z_DOWN; - val = state.lZ; - break; - case DIJOFS_RX: neg = JOY_ROT_LEFT; pos = JOY_ROT_RIGHT; - val = state.lRx; - break; - case DIJOFS_RY: neg = JOY_ROT_UP; pos = JOY_ROT_DOWN; - val = state.lRy; - break; - case DIJOFS_RZ: neg = JOY_ROT_Z_UP; pos = JOY_ROT_Z_DOWN; - val = state.lRz; - break; - case DIJOFS_SLIDER(0): - neg = JOY_AUX_1; pos = JOY_AUX_2; - val = state.rglSlider[0]; - break; - case DIJOFS_SLIDER(1): - neg = JOY_AUX_3; pos = JOY_AUX_4; - val = state.rglSlider[1]; - break; - default: LOG->MapLog( "unknown input", - "Controller '%s' is returning an unknown joystick offset, %i", - device.m_sName.c_str(), in.ofs ); - continue; - } - if( neg != DeviceButton_Invalid ) - { - float l = SCALE( int(val), 0.0f, 100.0f, 0.0f, 1.0f ); - ButtonPressed( DeviceInput(dev, neg, max(-l,0), tm) ); - ButtonPressed( DeviceInput(dev, pos, max(+l,0), tm) ); + DeviceInput di( dev, enum_add2(JOY_BUTTON_1, in.num), !!state.rgbButtons[in.ofs - DIJOFS_BUTTON0], tm ); + ButtonPressed( di ); + break; } - break; - } - - case in.HAT: - if( in.num == 0 ) + case in.AXIS: { - const int pos = TranslatePOV( state.rgdwPOV[in.ofs - DIJOFS_POV(0)] ); - ButtonPressed( DeviceInput(dev, JOY_HAT_UP, !!(pos & HAT_UP_MASK), tm) ); - ButtonPressed( DeviceInput(dev, JOY_HAT_DOWN, !!(pos & HAT_DOWN_MASK), tm) ); - ButtonPressed( DeviceInput(dev, JOY_HAT_LEFT, !!(pos & HAT_LEFT_MASK), tm) ); - ButtonPressed( DeviceInput(dev, JOY_HAT_RIGHT, !!(pos & HAT_RIGHT_MASK), tm) ); + DeviceButton neg = DeviceButton_Invalid, pos = DeviceButton_Invalid; + int val = 0; + switch( in.ofs ) + { + case DIJOFS_X: neg = JOY_LEFT; pos = JOY_RIGHT; + val = state.lX; + break; + case DIJOFS_Y: neg = JOY_UP; pos = JOY_DOWN; + val = state.lY; + break; + case DIJOFS_Z: neg = JOY_Z_UP; pos = JOY_Z_DOWN; + val = state.lZ; + break; + case DIJOFS_RX: neg = JOY_ROT_LEFT; pos = JOY_ROT_RIGHT; + val = state.lRx; + break; + case DIJOFS_RY: neg = JOY_ROT_UP; pos = JOY_ROT_DOWN; + val = state.lRy; + break; + case DIJOFS_RZ: neg = JOY_ROT_Z_UP; pos = JOY_ROT_Z_DOWN; + val = state.lRz; + break; + case DIJOFS_SLIDER(0): + neg = JOY_AUX_1; pos = JOY_AUX_2; + val = state.rglSlider[0]; + break; + case DIJOFS_SLIDER(1): + neg = JOY_AUX_3; pos = JOY_AUX_4; + val = state.rglSlider[1]; + break; + default: LOG->MapLog( "unknown input", + "Controller '%s' is returning an unknown joystick offset, %i", + device.m_sName.c_str(), in.ofs ); + continue; + } + if( neg != DeviceButton_Invalid ) + { + float l = SCALE( int(val), 0.0f, 100.0f, 0.0f, 1.0f ); + ButtonPressed( DeviceInput(dev, neg, max(-l,0), tm) ); + ButtonPressed( DeviceInput(dev, pos, max(+l,0), tm) ); + } + + break; } - break; + case in.HAT: + if( in.num == 0 ) + { + const int pos = TranslatePOV( state.rgdwPOV[in.ofs - DIJOFS_POV(0)] ); + ButtonPressed( DeviceInput(dev, JOY_HAT_UP, !!(pos & HAT_UP_MASK), tm) ); + ButtonPressed( DeviceInput(dev, JOY_HAT_DOWN, !!(pos & HAT_DOWN_MASK), tm) ); + ButtonPressed( DeviceInput(dev, JOY_HAT_LEFT, !!(pos & HAT_LEFT_MASK), tm) ); + ButtonPressed( DeviceInput(dev, JOY_HAT_RIGHT, !!(pos & HAT_RIGHT_MASK), tm) ); + } + + break; } } } @@ -383,7 +383,6 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm ) if( hr == DIERR_INPUTLOST || hr == DIERR_NOTACQUIRED ) return; - // do button checks here for( unsigned i = 0; i < device.Inputs.size(); ++i ) { const input_t &in = device.Inputs[i]; @@ -392,9 +391,40 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm ) switch(in.type) { case in.BUTTON: + { DeviceInput di( dev, enum_add2(MOUSE_LEFT, in.num), !!state.rgbButtons[in.ofs - DIMOFS_BUTTON0], tm ); ButtonPressed( di ); break; + } + case in.AXIS: + { + DeviceButton neg = DeviceButton_Invalid, pos = DeviceButton_Invalid; + int val = 0; + switch( in.ofs ) + { + case DIMOFS_X: neg = MOUSE_X_LEFT; pos = MOUSE_X_RIGHT; + val = state.lX; + break; + case DIMOFS_Y: neg = MOUSE_Y_UP; pos = MOUSE_Y_DOWN; + val = state.lY; + break; + case DIMOFS_Z: neg = MOUSE_Z_UP; pos = MOUSE_Z_DOWN; + val = state.lZ; + break; + default: LOG->MapLog( "unknown input", + "Mouse '%s' is returning an unknown mouse offset, %i", + device.m_sName.c_str(), in.ofs ); + continue; + } + + if( neg != DeviceButton_Invalid ) + { + float l = SCALE( int(val), 0.0f, 100.0f, 0.0f, 1.0f ); + ButtonPressed( DeviceInput(dev, neg, max(-l,0), tm) ); + ButtonPressed( DeviceInput(dev, pos, max(+l,0), tm) ); + } + break; + } } } break; @@ -427,7 +457,6 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm return; } - // todo: update for mouse? -aj for( int i = 0; i < (int) numevents; ++i ) { for(unsigned j = 0; j < device.Inputs.size(); ++j) @@ -445,7 +474,6 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm break; case in.BUTTON: - // hope this works... if(dev == DEVICE_MOUSE) { DeviceButton mouseInput = DeviceButton_Invalid; @@ -455,12 +483,8 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm case DIMOFS_BUTTON1: mouseInput = MOUSE_RIGHT; break; case DIMOFS_BUTTON2: mouseInput = MOUSE_MIDDLE; break; //case DIMOFS_BUTTON3: break; - // todo: handle directions - case DIMOFS_X: break; - case DIMOFS_Y: break; - case DIMOFS_Z: break; default: LOG->MapLog( "unknown input", - "Mouse '%s' is returning an unknown mouse offset, %i", + "Mouse '%s' is returning an unknown mouse offset [button], %i", device.m_sName.c_str(), in.ofs ); continue; } @@ -473,20 +497,37 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm case in.AXIS: { DeviceButton up = DeviceButton_Invalid, down = DeviceButton_Invalid; - switch(in.ofs) + if(dev == DEVICE_MOUSE) { - case DIJOFS_X: up = JOY_LEFT; down = JOY_RIGHT; break; - case DIJOFS_Y: up = JOY_UP; down = JOY_DOWN; break; - case DIJOFS_Z: up = JOY_Z_UP; down = JOY_Z_DOWN; break; - case DIJOFS_RX: up = JOY_ROT_UP; down = JOY_ROT_DOWN; break; - case DIJOFS_RY: up = JOY_ROT_LEFT; down = JOY_ROT_RIGHT; break; - case DIJOFS_RZ: up = JOY_ROT_Z_UP; down = JOY_ROT_Z_DOWN; break; - case DIJOFS_SLIDER(0): up = JOY_AUX_1; down = JOY_AUX_2; break; - case DIJOFS_SLIDER(1): up = JOY_AUX_3; down = JOY_AUX_4; break; - default: LOG->MapLog( "unknown input", - "Controller '%s' is returning an unknown joystick offset, %i", - device.m_sName.c_str(), in.ofs ); - continue; + switch(in.ofs) + { + case DIMOFS_X: up = MOUSE_X_LEFT; down = MOUSE_X_RIGHT; break; + case DIMOFS_Y: up = MOUSE_Y_UP; down = MOUSE_Y_DOWN; break; + case DIMOFS_Z: up = MOUSE_Z_UP; down = MOUSE_Z_DOWN; break; + default: LOG->MapLog( "unknown input", + "Controller '%s' is returning an unknown mouse offset [axis], %i", + device.m_sName.c_str(), in.ofs ); + continue; + } + } + else + { + switch(in.ofs) + { + // joystick + case DIJOFS_X: up = JOY_LEFT; down = JOY_RIGHT; break; + case DIJOFS_Y: up = JOY_UP; down = JOY_DOWN; break; + case DIJOFS_Z: up = JOY_Z_UP; down = JOY_Z_DOWN; break; + case DIJOFS_RX: up = JOY_ROT_UP; down = JOY_ROT_DOWN; break; + case DIJOFS_RY: up = JOY_ROT_LEFT; down = JOY_ROT_RIGHT; break; + case DIJOFS_RZ: up = JOY_ROT_Z_UP; down = JOY_ROT_Z_DOWN; break; + case DIJOFS_SLIDER(0): up = JOY_AUX_1; down = JOY_AUX_2; break; + case DIJOFS_SLIDER(1): up = JOY_AUX_3; down = JOY_AUX_4; break; + default: LOG->MapLog( "unknown input", + "Controller '%s' is returning an unknown joystick offset, %i", + device.m_sName.c_str(), in.ofs ); + continue; + } } float l = SCALE( int(evtbuf[i].dwData), 0.0f, 100.0f, 0.0f, 1.0f ); diff --git a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp index b2a887cd34..5ac087bfeb 100644 --- a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp @@ -24,7 +24,6 @@ DIDevice::DIDevice() dev = InputDevice_Invalid; buffered = true; memset(&JoystickInst, 0, sizeof(JoystickInst)); - memset(&MouseInst, 0, sizeof(MouseInst)); Device = NULL; } @@ -100,7 +99,7 @@ bool DIDevice::Open() } break; case MOUSE: - Device->EnumObjects( DIMouse_EnumDevObjectsProc, this, DIDFT_BUTTON | DIDFT_PSHBUTTON ); + Device->EnumObjects( DIMouse_EnumDevObjectsProc, this, DIDFT_BUTTON | DIDFT_AXIS ); break; } @@ -191,7 +190,7 @@ static BOOL CALLBACK DIJoystick_EnumDevObjectsProc(LPCDIDEVICEOBJECTINSTANCE dev dilong.dwData = 0; hr = device->Device->SetProperty( DIPROP_DEADZONE, &dilong.diph ); if ( hr != DI_OK ) - return DIENUM_CONTINUE; /* don't use this axis */ + return DIENUM_CONTINUE; // don't use this axis device->axes++; } @@ -323,21 +322,49 @@ static int ConvertScancodeToKey( int scancode ) static BOOL CALLBACK DIMouse_EnumDevObjectsProc(LPCDIDEVICEOBJECTINSTANCE dev, LPVOID data) { DIDevice *device = (DIDevice *) data; + //HRESULT hr; input_t in; - // todo: check mask for accuracy -aj - const int SupportedMask = DIDFT_BUTTON; + const int SupportedMask = DIDFT_BUTTON | DIDFT_AXIS; if(!(dev->dwType & SupportedMask)) return DIENUM_CONTINUE; // unsupported in.ofs = dev->dwOfs; // xxx: does this check for scrollwheels? -aj - if(dev->dwType & DIDFT_BUTTON ) { + if(dev->dwType & DIDFT_BUTTON) + { in.type = in.BUTTON; in.num = device->buttons; device->buttons++; } + else if(dev->dwType & DIDFT_AXIS) + { + LOG->Trace("found a mouse axis"); + // todo: how to handle this correctly? -aj + //DIPROPRANGE diprg; + + in.type = in.AXIS; + in.num = device->axes; + + /* + diprg.diph.dwSize = sizeof(diprg); + diprg.diph.dwHeaderSize = sizeof(diprg.diph); + diprg.diph.dwObj = dev->dwOfs; + diprg.diph.dwHow = DIPH_BYOFFSET; + diprg.lMin = -100; + diprg.lMax = 100; + + hr = device->Device->SetProperty( DIPROP_RANGE, &diprg.diph ); + if ( hr != DI_OK ) + { + LOG->Trace("error setting properties on mouse axis"); + return DIENUM_CONTINUE; // don't use this axis + } + */ + + device->axes++; + } device->Inputs.push_back(in); diff --git a/src/arch/InputHandler/InputHandler_DirectInputHelper.h b/src/arch/InputHandler/InputHandler_DirectInputHelper.h index 8519a2dbf2..60ddc6982f 100644 --- a/src/arch/InputHandler/InputHandler_DirectInputHelper.h +++ b/src/arch/InputHandler/InputHandler_DirectInputHelper.h @@ -23,11 +23,9 @@ typedef struct input_t struct DIDevice { DIDEVICEINSTANCE JoystickInst; - DIDEVICEINSTANCE MouseInst; LPDIRECTINPUTDEVICE2 Device; RString m_sName; - //enum { KEYBOARD, JOYSTICK } type; enum { KEYBOARD, JOYSTICK, MOUSE } type; bool buffered; From db8bc289a308b65141e598cbc40418157af32933 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 19:17:15 -0600 Subject: [PATCH 014/143] more mouse work; left, right, middle buttons + scrollwheel are recognized --- src/RageInputDevice.h | 4 +- .../InputHandler/InputHandler_DirectInput.cpp | 41 +++++++++++++------ 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/RageInputDevice.h b/src/RageInputDevice.h index 09066df405..c7857a100e 100644 --- a/src/RageInputDevice.h +++ b/src/RageInputDevice.h @@ -293,15 +293,13 @@ enum DeviceButton MOUSE_LEFT = 700, MOUSE_RIGHT, MOUSE_MIDDLE, - // wheel mice - MOUSE_WHEELUP, MOUSE_WHEELDOWN, // for mice with forward and backwards buttons MOUSE_FORWARD, MOUSE_BACK, // axis MOUSE_X_LEFT, MOUSE_X_RIGHT, MOUSE_Y_UP, MOUSE_Y_DOWN, // mousewheel? - MOUSE_Z_UP, MOUSE_Z_DOWN, + MOUSE_WHEELUP, MOUSE_WHEELDOWN, NUM_DeviceButton, DeviceButton_Invalid diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index 15aa64e2ae..125c4723b5 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -402,15 +402,21 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm ) int val = 0; switch( in.ofs ) { - case DIMOFS_X: neg = MOUSE_X_LEFT; pos = MOUSE_X_RIGHT; - val = state.lX; - break; - case DIMOFS_Y: neg = MOUSE_Y_UP; pos = MOUSE_Y_DOWN; - val = state.lY; - break; - case DIMOFS_Z: neg = MOUSE_Z_UP; pos = MOUSE_Z_DOWN; - val = state.lZ; - break; + case DIMOFS_X: + LOG->Trace("mouse X axis changed (polled)"); + neg = MOUSE_X_LEFT; pos = MOUSE_X_RIGHT; + val = state.lX; + break; + case DIMOFS_Y: + LOG->Trace("mouse Y axis changed (polled)"); + neg = MOUSE_Y_UP; pos = MOUSE_Y_DOWN; + val = state.lY; + break; + case DIMOFS_Z: + LOG->Trace("mouse Z axis changed (polled)"); + neg = MOUSE_WHEELUP; pos = MOUSE_WHEELDOWN; + val = state.lZ; + break; default: LOG->MapLog( "unknown input", "Mouse '%s' is returning an unknown mouse offset, %i", device.m_sName.c_str(), in.ofs ); @@ -501,11 +507,20 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm { switch(in.ofs) { - case DIMOFS_X: up = MOUSE_X_LEFT; down = MOUSE_X_RIGHT; break; - case DIMOFS_Y: up = MOUSE_Y_UP; down = MOUSE_Y_DOWN; break; - case DIMOFS_Z: up = MOUSE_Z_UP; down = MOUSE_Z_DOWN; break; + case DIMOFS_X: + LOG->Trace("mouse X axis changed (buffered)"); + up = MOUSE_X_LEFT; down = MOUSE_X_RIGHT; + break; + case DIMOFS_Y: + LOG->Trace("mouse Y axis changed (buffered)"); + up = MOUSE_Y_UP; down = MOUSE_Y_DOWN; + break; + case DIMOFS_Z: + LOG->Trace("mouse Z axis changed (buffered)"); + up = MOUSE_WHEELUP; down = MOUSE_WHEELDOWN; + break; default: LOG->MapLog( "unknown input", - "Controller '%s' is returning an unknown mouse offset [axis], %i", + "Mouse '%s' is returning an unknown mouse offset [axis], %i", device.m_sName.c_str(), in.ofs ); continue; } From 95af29b5e4d42a7ca18e69225c3ebdbd6d383b31 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 20:53:15 -0600 Subject: [PATCH 015/143] add #CHARTSTYLE tag to Steps for .ssc files; Keyboard/Pad/whatever else you can think of, just keep it standardized --- Docs/Changelog_SSCformat.txt | 3 +++ src/NotesLoaderSSC.cpp | 11 +++++++++++ src/NotesWriterSSC.cpp | 1 + src/Song.cpp | 5 +++-- src/Steps.cpp | 7 +++++++ src/Steps.h | 8 ++++++++ 6 files changed, 33 insertions(+), 2 deletions(-) diff --git a/Docs/Changelog_SSCformat.txt b/Docs/Changelog_SSCformat.txt index ae2eb57362..60301667a0 100644 --- a/Docs/Changelog_SSCformat.txt +++ b/Docs/Changelog_SSCformat.txt @@ -9,6 +9,9 @@ change to JSON, but it is unsure if this will be done. Implement .ssc at your own risk. ________________________________________________________________________________ +[v0.52] - AJ +* Add CHARTSTYLE tag to NoteData section. + [v0.51] - AJ * Move VERSION tag to the first line. * Limit VERSION tag to two decimal places. diff --git a/src/NotesLoaderSSC.cpp b/src/NotesLoaderSSC.cpp index b4be9ce8d2..63be9cacde 100644 --- a/src/NotesLoaderSSC.cpp +++ b/src/NotesLoaderSSC.cpp @@ -634,6 +634,11 @@ bool SSCLoader::LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCach pNewNotes->m_StepsType = GAMEMAN->StringToStepsType( sParams[1] ); } + else if( sValueName=="CHARTSTYLE" ) + { + pNewNotes->SetChartStyle( sParams[1] ); + } + else if( sValueName=="DESCRIPTION" ) { pNewNotes->SetDescription( sParams[1] ); @@ -990,6 +995,12 @@ bool SSCLoader::LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePat bSSCFormat = true; } + else if( sValueName=="CHARTSTYLE" ) + { + pNewNotes->SetChartStyle( sParams[1] ); + bSSCFormat = true; + } + else if( sValueName=="DESCRIPTION" ) { pNewNotes->SetDescription( sParams[1] ); diff --git a/src/NotesWriterSSC.cpp b/src/NotesWriterSSC.cpp index 5c7e8f3a68..0da790abd5 100644 --- a/src/NotesWriterSSC.cpp +++ b/src/NotesWriterSSC.cpp @@ -262,6 +262,7 @@ static RString GetSSCNotesTag( const Song &song, const Steps &in, bool bSavingCa lines.push_back( "#NOTEDATA:;" ); // our new separator. lines.push_back( ssprintf( "#STEPSTYPE:%s;", GAMEMAN->GetStepsTypeInfo(in.m_StepsType).szName ) ); lines.push_back( ssprintf( "#DESCRIPTION:%s;", SmEscape(in.GetDescription()).c_str() ) ); + lines.push_back( ssprintf( "#CHARTSTYLE:%s;", SmEscape(in.GetChartStyle()).c_str() ) ); lines.push_back( ssprintf( "#DIFFICULTY:%s;", DifficultyToString(in.GetDifficulty()).c_str() ) ); lines.push_back( ssprintf( "#METER:%d;", in.GetMeter() ) ); diff --git a/src/Song.cpp b/src/Song.cpp index b4e7fe088d..10512d4977 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -36,8 +36,9 @@ #include #include -const static float VERSION_NUMBER = 0.51f; -const int FILE_CACHE_VERSION = 163; // increment this to invalidate cache +/** @brief: The version of the .ssc file format. */ +const static float VERSION_NUMBER = 0.52f; +const int FILE_CACHE_VERSION = 164; // increment this to invalidate cache const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f; diff --git a/src/Steps.cpp b/src/Steps.cpp index 852c5b0b47..ff6ef6ce04 100644 --- a/src/Steps.cpp +++ b/src/Steps.cpp @@ -319,6 +319,7 @@ void Steps::DeAutogen( bool bCopyNoteData ) Decompress(); // fills in m_pNoteData with sliding window transform m_sDescription = Real()->m_sDescription; + m_sChartStyle = Real()->m_sChartStyle; m_Difficulty = Real()->m_Difficulty; m_iMeter = Real()->m_iMeter; copy( Real()->m_CachedRadarValues, Real()->m_CachedRadarValues + NUM_PLAYERS, m_CachedRadarValues ); @@ -372,6 +373,12 @@ void Steps::SetCredit( RString sCredit ) m_sCredit = sCredit; } +void Steps::SetChartStyle( RString sChartStyle ) +{ + DeAutogen(); + m_sChartStyle = sChartStyle; +} + bool Steps::MakeValidEditDescription( RString &sPreferredDescription ) { if( int(sPreferredDescription.size()) > MAX_EDIT_STEPS_DESCRIPTION_LENGTH ) diff --git a/src/Steps.h b/src/Steps.h index 532857381a..e87dfef458 100644 --- a/src/Steps.h +++ b/src/Steps.h @@ -67,6 +67,11 @@ public: * @return the description used for this edit. */ RString GetDescription() const { return Real()->m_sDescription; } + /** + * @brief Retrieve the ChartStyle used for this chart. + * @return the description used for this chart. + */ + RString GetChartStyle() const { return Real()->m_sChartStyle; } /** * @brief Retrieve the difficulty used for this edit. * @return the difficulty used for this edit. @@ -92,6 +97,7 @@ public: void SetDescription( RString sDescription ) { SetDifficultyAndDescription( this->GetDifficulty(), sDescription ); } void SetDifficultyAndDescription( Difficulty dc, RString sDescription ); void SetCredit( RString sCredit ); + void SetChartStyle( RString sChartStyle ); static bool MakeValidEditDescription( RString &sPreferredDescription ); // return true if was modified void SetLoadedFromProfile( ProfileSlot slot ) { m_LoadedFromProfile = slot; } @@ -146,6 +152,8 @@ private: /** @brief The name of the edit, or some other useful description. This used to also contain the step author's name. */ RString m_sDescription; + /** @brief The style of the chart. (e.g. "Pad", "Keyboard") */ + RString m_sChartStyle; /** @brief The difficulty that these steps are assigned to. */ Difficulty m_Difficulty; /** @brief The numeric difficulty of the Steps, ranging from MIN_METER to MAX_METER. */ From a2af7dc1a98b028acf93e8cc17514f67d62be6a8 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Mon, 14 Feb 2011 23:05:52 -0600 Subject: [PATCH 016/143] add #CHARTSTYLE to .ssc format (and now the editor too) --- Docs/Changelog_sm-ssc.txt | 4 ++++ Themes/_fallback/Languages/en.ini | 3 +++ src/ScreenEdit.cpp | 25 ++++++++++++++++++++++++- src/ScreenEdit.h | 1 + 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 12e18fbbe5..5715010638 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -13,6 +13,10 @@ _____________________________________________________________________________ sm-ssc v1.2.2 | 201102?? -------------------------------------------------------------------------------- +20110214 +-------- +* Added #CHARTSTYLE to .ssc format, mainly meant for Pad/Keyboard distinctions. [AJ] + 20110213 -------- * Life Difficulty 4 is now as difficult as Life 6 was. [AJ] diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index 032631c80e..9c544d3862 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -787,6 +787,7 @@ CelShadeModels=Cel-shaded Models Center Image=Center Image Chaos=Chaos Characters=Characters +Chart Style=Chart Style Choose=Choose Clear Bookkeeping Data=Clear Bookkeeping Data Clear Machine Edits=Clear Machine Edits @@ -1205,6 +1206,7 @@ Enter a new artist.=Enter a new artist. Enter a new genre.=Enter a new genre. Enter a new credit.=Enter a new credit. Enter a new description.=Enter a new description. +Enter a new chart style.=Enter a new chart style (e.g. "Pad", "Keyboard"). Enter the author who made this step pattern.=Enter the author who made this step pattern. Enter a new last beat hint.=Enter a new last beat hint. Enter a new main title transliteration.=Enter a new main title transliteration. @@ -1231,6 +1233,7 @@ Snap to=Snap to Selection beat=Selection beat Difficulty=Difficulty Description=Description +Chart Style=Chart Style Main title=Main title Subtitle=Subtitle Tap Steps=Tap Steps diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index f2e2594e6c..300633546c 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -542,6 +542,7 @@ static MenuDef g_StepsInformation( // xxx: this giant list of numbers SUUUUUUUUUUCKS -aj MenuRowDef( ScreenEdit::meter, "Meter", true, EditMode_Practice, true, false, 0, "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25" ), MenuRowDef( ScreenEdit::description, "Description", true, EditMode_Practice, true, true, 0, NULL ), + MenuRowDef( ScreenEdit::chartstyle, "Chart Style", true, EditMode_Practice, true, true, 0, NULL ), MenuRowDef( ScreenEdit::step_credit, "Step Author", true, EditMode_Practice, true, true, 0, NULL ), MenuRowDef( ScreenEdit::predict_meter, "Predicted Meter", false, EditMode_Full, true, true, 0, NULL ), MenuRowDef( ScreenEdit::tap_notes, "Tap Steps", false, EditMode_Full, true, true, 0, NULL ), @@ -1016,6 +1017,7 @@ static LocalizedString NOTES("ScreenEdit", "%s notes"); static LocalizedString SELECTION_BEAT("ScreenEdit", "Selection beat"); static LocalizedString DIFFICULTY("ScreenEdit", "Difficulty"); static LocalizedString DESCRIPTION("ScreenEdit", "Description"); +static LocalizedString CHART_STYLE("ScreenEdit", "Chart Style"); static LocalizedString MAIN_TITLE("ScreenEdit", "Main title"); static LocalizedString SUBTITLE("ScreenEdit", "Subtitle"); static LocalizedString TAP_STEPS("ScreenEdit", "Tap Steps"); @@ -1078,6 +1080,7 @@ void ScreenEdit::UpdateTextInfo() case EditMode_Full: sText += ssprintf( "%s:\n %s\n", DIFFICULTY.GetValue().c_str(), DifficultyToString( m_pSteps->GetDifficulty() ).c_str() ); sText += ssprintf( "%s:\n %s\n", DESCRIPTION.GetValue().c_str(), m_pSteps->GetDescription().c_str() ); + sText += ssprintf( "%s:\n %s\n", CHART_STYLE.GetValue().c_str(), m_pSteps->GetChartStyle().c_str() ); sText += ssprintf( "%s:\n %s\n", MAIN_TITLE.GetValue().c_str(), m_pSong->m_sMainTitle.c_str() ); if( m_pSong->m_sSubTitle.size() ) sText += ssprintf( "%s:\n %s\n", SUBTITLE.GetValue().c_str(), m_pSong->m_sSubTitle.c_str() ); @@ -2856,13 +2859,19 @@ static void ChangeDescription( const RString &sNew ) { Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1]; - /* Don't erase edit descriptions. */ + // Don't erase edit descriptions. if( sNew.empty() && pSteps->GetDifficulty() == Difficulty_Edit ) return; pSteps->SetDescription(sNew); } +static void ChangeChartStyle( const RString &sNew ) +{ + Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1]; + pSteps->SetChartStyle(sNew); +} + static void ChangeStepCredit( const RString &sNew ) { Steps* pSteps = GAMESTATE->m_pCurSteps[PLAYER_1]; @@ -3010,6 +3019,8 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector &iAns g_StepsInformation.rows[predict_meter].SetOneUnthemedChoice( ssprintf("%.2f",pSteps->PredictMeter()) ); g_StepsInformation.rows[description].bEnabled = (EDIT_MODE.GetValue() >= EditMode_Full); g_StepsInformation.rows[description].SetOneUnthemedChoice( pSteps->GetDescription() ); + g_StepsInformation.rows[chartstyle].bEnabled = (EDIT_MODE.GetValue() >= EditMode_Full); + g_StepsInformation.rows[chartstyle].SetOneUnthemedChoice( pSteps->GetChartStyle() ); g_StepsInformation.rows[step_credit].bEnabled = (EDIT_MODE.GetValue() >= EditMode_Full); g_StepsInformation.rows[step_credit].SetOneUnthemedChoice( pSteps->GetCredit() ); g_StepsInformation.rows[tap_notes].SetOneUnthemedChoice( ssprintf("%d", m_NoteDataEdit.GetNumTapNotes()) ); @@ -3475,6 +3486,7 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, const vector &iAns } static LocalizedString ENTER_NEW_DESCRIPTION( "ScreenEdit", "Enter a new description." ); +static LocalizedString ENTER_NEW_CHART_STYLE( "ScreenEdit", "Enter a new chart style." ); static LocalizedString ENTER_NEW_STEP_AUTHOR( "ScreenEdit", "Enter the author who made this step pattern." ); void ScreenEdit::HandleStepsInformationChoice( StepsInformationChoice c, const vector &iAnswers ) { @@ -3498,6 +3510,17 @@ void ScreenEdit::HandleStepsInformationChoice( StepsInformationChoice c, const v NULL ); break; + case chartstyle: + ScreenTextEntry::TextEntry( + SM_None, + ENTER_NEW_CHART_STYLE, + m_pSteps->GetChartStyle(), + 255, + NULL, + ChangeChartStyle, + NULL + ); + break; case step_credit: ScreenTextEntry::TextEntry( SM_None, diff --git a/src/ScreenEdit.h b/src/ScreenEdit.h index 4d7999b277..7587b98dcc 100644 --- a/src/ScreenEdit.h +++ b/src/ScreenEdit.h @@ -407,6 +407,7 @@ public: difficulty, meter, description, + chartstyle, step_credit, predict_meter, tap_notes, From bf9609ca5c93a7a10951588cb353f3042c2f64da Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 15 Feb 2011 01:54:43 -0600 Subject: [PATCH 017/143] latest work on mice stuff, still not too far. also slight cleanup --- src/InputFilter.cpp | 5 +++ src/InputFilter.h | 17 +++++----- src/InputMapper.cpp | 1 - src/InputMapper.h | 10 +++--- src/arch/InputHandler/InputHandler.h | 34 ++++++++----------- .../InputHandler/InputHandler_DirectInput.cpp | 18 ++++++---- src/archutils/Win32/DirectXHelpers.cpp | 2 +- 7 files changed, 46 insertions(+), 41 deletions(-) diff --git a/src/InputFilter.cpp b/src/InputFilter.cpp index 83f9caf0b0..2e98820b3f 100644 --- a/src/InputFilter.cpp +++ b/src/InputFilter.cpp @@ -397,6 +397,11 @@ void InputFilter::GetPressedButtons( vector &array ) const array = g_CurrentState; } +void InputFilter::UpdateCursorLocation() +{ + // todo +} + /* * (c) 2001-2004 Chris Danford * All rights reserved. diff --git a/src/InputFilter.h b/src/InputFilter.h index b71a3b0e46..7f6c010a2e 100644 --- a/src/InputFilter.h +++ b/src/InputFilter.h @@ -7,15 +7,15 @@ enum InputEventType { - /* The device was just pressed. */ + // The device was just pressed. IET_FIRST_PRESS, - /* The device is auto-repeating. This event is guaranteed to be sent only between - * IET_FIRST_PRESS and IET_RELEASE pairs. */ + /* The device is auto-repeating. This event is guaranteed to be sent only + * between IET_FIRST_PRESS and IET_RELEASE pairs. */ IET_REPEAT, - /* The device is no longer pressed. Exactly one IET_RELEASE event will be sent - * for each IET_FIRST_PRESS. */ + /* The device is no longer pressed. Exactly one IET_RELEASE event will be + * sent for each IET_FIRST_PRESS. */ IET_RELEASE, NUM_InputEventType, @@ -29,7 +29,7 @@ struct InputEvent DeviceInput di; InputEventType type; - /* A list of all buttons that were pressed at the time of this event: */ + // A list of all buttons that were pressed at the time of this event: DeviceInputList m_ButtonState; }; @@ -62,6 +62,9 @@ public: void GetInputEvents( vector &aEventOut ); void GetPressedButtons( vector &array ) const; + // cursor + void UpdateCursorLocation(); + private: void CheckButtonChange( ButtonState &bs, DeviceInput di, const RageTimer &now ); void ReportButtonChange( const DeviceInput &di, InputEventType t ); @@ -71,10 +74,8 @@ private: RageMutex *queuemutex; }; - extern InputFilter* INPUTFILTER; // global and accessable from anywhere in our program - #endif /* diff --git a/src/InputMapper.cpp b/src/InputMapper.cpp index e0eb9c88b7..3e495b9efc 100644 --- a/src/InputMapper.cpp +++ b/src/InputMapper.cpp @@ -34,7 +34,6 @@ InputMapper::InputMapper() m_pInputScheme = NULL; } - InputMapper::~InputMapper() { SaveMappingsToDisk(); diff --git a/src/InputMapper.h b/src/InputMapper.h index 992b89b7a0..3397f49b44 100644 --- a/src/InputMapper.h +++ b/src/InputMapper.h @@ -100,9 +100,9 @@ struct AutoMappings #undef PUSH } - /* Strings used by automatic joystick mappings. */ - RString m_sGame; // only used - RString m_sDriverRegex; // reported by InputHandler + // Strings used by automatic joystick mappings. + RString m_sGame; // only used + RString m_sDriverRegex; // reported by InputHandler RString m_sControllerName; // the product name of the controller vector m_vMaps; @@ -118,7 +118,7 @@ public: const char *m_szName; // The name used by the button graphics system. e.g. "left", "right", "middle C", "snare" GameButton m_SecondaryMenuButton; }; - /* Data for each Game-specific GameButton. This starts at GAME_BUTTON_NEXT. */ + // Data for each Game-specific GameButton. This starts at GAME_BUTTON_NEXT. GameButtonInfo m_GameButtonInfo[NUM_GameButton]; const AutoMappings *m_pAutoMappings; @@ -211,10 +211,8 @@ protected: const InputScheme *m_pInputScheme; }; - extern InputMapper* INPUTMAPPER; // global and accessable from anywhere in our program - #endif /* diff --git a/src/arch/InputHandler/InputHandler.h b/src/arch/InputHandler/InputHandler.h index 42c8803bc1..4282ffddd1 100644 --- a/src/arch/InputHandler/InputHandler.h +++ b/src/arch/InputHandler/InputHandler.h @@ -1,25 +1,21 @@ #ifndef INPUT_HANDLER_H #define INPUT_HANDLER_H -/* - * This is a simple class to handle special input devices. Update() - * will be called during the input update; the derived class should - * send appropriate events to InputHandler. - * - * Note that, if the underlying device is capable of it, you're free to - * start a blocking thread; just store inputs in your class and send them - * off in a batch on the next Update. This gets much more accurate timestamps; - * we get events more quickly and timestamp them, instead of having a rough - * timing granularity due to the framerate. - * - * Send input events for a specific type of device. Only one driver - * for a given set of InputDevice types should be loaded for a given - * arch. For example, any number of drivers may produce DEVICE_PUMPn - * events, but only one may be loaded at a time. (This will be inconvenient - * if, for example, we have two completely distinct methods of getting - * input for the same device; we have no method to allocate device numbers. - * We don't need this now; I'll write it if it becomes needed.) - */ +/* This is a simple class to handle special input devices. Update() will be + * called during the input update; the derived class should send appropriate + * events to InputHandler. + * Note that, if the underlying device is capable of it, you're free to start + * a blocking thread; just store inputs in your class and send them off in a + * batch on the next Update. This gets much more accurate timestamps; we get + * events more quickly and timestamp them, instead of having a rough timing + * granularity due to the framerate. + * Send input events for a specific type of device. Only one driver for a given + * set of InputDevice types should be loaded for a given arch. For example, + * any number of drivers may produce DEVICE_PUMPn events, but only one may be + * loaded at a time. (This will be inconvenient if, for example, we have two + * completely distinct methods of getting input for the same device; we have no + * method to allocate device numbers. We don't need this now; I'll write it + * if it becomes needed.) */ #include "RageInputDevice.h" // for InputDevice #include "arch/RageDriver.h" diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index 125c4723b5..4991b52adb 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -425,7 +425,8 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm ) if( neg != DeviceButton_Invalid ) { - float l = SCALE( int(val), 0.0f, 100.0f, 0.0f, 1.0f ); + //float l = SCALE( int(val), 0.0f, 100.0f, 0.0f, 1.0f ); + float l = val; ButtonPressed( DeviceInput(dev, neg, max(-l,0), tm) ); ButtonPressed( DeviceInput(dev, pos, max(+l,0), tm) ); } @@ -509,11 +510,14 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm { case DIMOFS_X: LOG->Trace("mouse X axis changed (buffered)"); + // todo: update cursor position -aj up = MOUSE_X_LEFT; down = MOUSE_X_RIGHT; break; case DIMOFS_Y: LOG->Trace("mouse Y axis changed (buffered)"); + // todo: update cursor position -aj up = MOUSE_Y_UP; down = MOUSE_Y_DOWN; + //INPUTFILTER->UpdateCursorLocation(0, evtbuf[i].dwData); break; case DIMOFS_Z: LOG->Trace("mouse Z axis changed (buffered)"); @@ -524,6 +528,9 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm device.m_sName.c_str(), in.ofs ); continue; } + float l = SCALE( int(evtbuf[i].dwData), 0.0f, 100.0f, 0.0f, 1.0f ); + ButtonPressed( DeviceInput(dev, up, max(-l,0), tm) ); + ButtonPressed( DeviceInput(dev, down, max(+l,0), tm) ); } else { @@ -532,7 +539,7 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm // joystick case DIJOFS_X: up = JOY_LEFT; down = JOY_RIGHT; break; case DIJOFS_Y: up = JOY_UP; down = JOY_DOWN; break; - case DIJOFS_Z: up = JOY_Z_UP; down = JOY_Z_DOWN; break; + case DIJOFS_Z: up = JOY_Z_UP; down = JOY_Z_DOWN; break; case DIJOFS_RX: up = JOY_ROT_UP; down = JOY_ROT_DOWN; break; case DIJOFS_RY: up = JOY_ROT_LEFT; down = JOY_ROT_RIGHT; break; case DIJOFS_RZ: up = JOY_ROT_Z_UP; down = JOY_ROT_Z_DOWN; break; @@ -543,11 +550,10 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm device.m_sName.c_str(), in.ofs ); continue; } + float l = SCALE( int(evtbuf[i].dwData), 0.0f, 100.0f, 0.0f, 1.0f ); + ButtonPressed( DeviceInput(dev, up, max(-l,0), tm) ); + ButtonPressed( DeviceInput(dev, down, max(+l,0), tm) ); } - - float l = SCALE( int(evtbuf[i].dwData), 0.0f, 100.0f, 0.0f, 1.0f ); - ButtonPressed( DeviceInput(dev, up, max(-l,0), tm) ); - ButtonPressed( DeviceInput(dev, down, max(+l,0), tm) ); break; } case in.HAT: diff --git a/src/archutils/Win32/DirectXHelpers.cpp b/src/archutils/Win32/DirectXHelpers.cpp index 3af1927673..aaf4767906 100644 --- a/src/archutils/Win32/DirectXHelpers.cpp +++ b/src/archutils/Win32/DirectXHelpers.cpp @@ -22,7 +22,7 @@ RString hr_ssprintf( int hr, const char *fmt, ... ) #ifdef _XBOX char szError[1024] = ""; D3DXGetErrorString( hr, szError, sizeof(szError) ); -#else +#else const char *szError = DXGetErrorString8( hr ); #endif From 186a36ddbf5d89b37d858d1fdee517a1df39361d Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 15 Feb 2011 02:00:49 -0600 Subject: [PATCH 018/143] slight comment/cleanup --- src/InputFilter.cpp | 77 +++++++++++++++++++++------------------------ src/Song.cpp | 2 +- 2 files changed, 37 insertions(+), 42 deletions(-) diff --git a/src/InputFilter.cpp b/src/InputFilter.cpp index 2e98820b3f..a4a602d185 100644 --- a/src/InputFilter.cpp +++ b/src/InputFilter.cpp @@ -23,8 +23,8 @@ struct ButtonState // The time that we actually reported the last event (used for debouncing). RageTimer m_LastReportTime; - // The timestamp of the last reported change. Unlike m_BeingHeldTime, this - // value is debounced along with the input state. (This is the same as + // The timestamp of the last reported change. Unlike m_BeingHeldTime, this + // value is debounced along with the input state. (This is the same as // m_fSecsHeld, except this isn't affected by Update scaling.) RageTimer m_LastInputTime; }; @@ -45,9 +45,9 @@ struct DeviceButtonPair namespace { /* Maintain a set of all interesting buttons: buttons which are being held - * down, or which were held down and need a RELEASE event. We use this to + * down, or which were held down and need a RELEASE event. We use this to * optimize InputFilter::Update, so we don't have to process every button - * we know about when most of them aren't in use. This set is protected + * we know about when most of them aren't in use. This set is protected * by queuemutex. */ typedef map ButtonStateMap; ButtonStateMap g_ButtonStates; @@ -64,22 +64,19 @@ namespace set g_DisableRepeat; } -/* - * Some input devices require debouncing. Do this on both press and release. After - * reporting a change in state, don't report another for the debounce period. If a - * button is reported pressed, report it. If the button is immediately reported - * released, wait a period before reporting it; if the button is repressed during - * that time, the release is never reported. - * +/* Some input devices require debouncing. Do this on both press and release. + * After reporting a change in state, don't report another for the debounce + * period. If a button is reported pressed, report it. If the button is + * immediately reported released, wait a period before reporting it; if the + * button is repressed during that time, the release is never reported. * The detail is important: if a button is pressed for 1ms and released, we must - * always report it, even if the debounce period is 10ms, since it might be a coin - * counter with a very short signal. The only time we discard events is if a button - * is pressed, released and then pressed again quickly. + * always report it, even if the debounce period is 10ms, since it might be a + * coin counter with a very short signal. The only time we discard events is if + * a button is pressed, released and then pressed again quickly. * - * This delay in events is ordinarily not noticable, because the we report initial + * This delay in events is ordinarily not noticable, because we report initial * presses and releases immediately. However, if a real press is ever delayed, - * this won't cause timing problems, because the event timestamp is preserved. - */ + * this won't cause timing problems, because the event timestamp is preserved. */ static Preference g_fInputDebounceTime( "InputDebounceTime", 0 ); InputFilter* INPUTFILTER = NULL; // global and accessable from anywhere in our program @@ -148,7 +145,7 @@ void InputFilter::ButtonPressed( const DeviceInput &di ) ButtonState &bs = GetButtonState( di ); - /* Flush any delayed input, like Update() (in case Update() isn't being called). */ + // Flush any delayed input, like Update() (in case Update() isn't being called). RageTimer now; CheckButtonChange( bs, di, now ); @@ -161,7 +158,7 @@ void InputFilter::ButtonPressed( const DeviceInput &di ) bs.m_BeingHeldTime = di.ts; } - /* Try to report presses immediately. */ + // Try to report presses immediately. MakeButtonStateList( g_CurrentState ); CheckButtonChange( bs, di, now ); } @@ -173,7 +170,7 @@ void InputFilter::SetButtonComment( const DeviceInput &di, const RString &sComme bs.m_sComment = sComment; } -/* Release all buttons on the given device. */ +/** @brief Release all buttons on the given device. */ void InputFilter::ResetDevice( InputDevice device ) { LockMut(*queuemutex); @@ -188,7 +185,7 @@ void InputFilter::ResetDevice( InputDevice device ) } } -/* Check for reportable presses. */ +/** @brief Check for reportable presses. */ void InputFilter::CheckButtonChange( ButtonState &bs, DeviceInput di, const RageTimer &now ) { if( bs.m_BeingHeld == bs.m_bLastReportedHeld ) @@ -222,13 +219,11 @@ void InputFilter::ReportButtonChange( const DeviceInput &di, InputEventType t ) ie.type = t; ie.di = di; - /* - * Include a list of all buttons that were pressed at the time of this event. We - * can create this efficiently using g_ButtonStates. Use a vector and not a - * map, for efficiency; most code will not use this information. Iterating over - * g_ButtonStates will be in DeviceInput order, so users can binary search this - * list (eg. std::lower_bound). - */ + /* Include a list of all buttons that were pressed at the time of this event. + * We can create this efficiently using g_ButtonStates. Use a vector and not + * a map, for efficiency; most code will not use this information. Iterating + * over g_ButtonStates will be in DeviceInput order, so users can binary + * search this list (eg. std::lower_bound). */ ie.m_ButtonState = g_CurrentState; } @@ -251,8 +246,8 @@ void InputFilter::Update( float fDeltaTime ) INPUTMAN->Update(); - /* Make sure that nothing gets inserted while we do this, to prevent - * things like "key pressed, key release, key repeat". */ + /* Make sure that nothing gets inserted while we do this, to prevent things + * like "key pressed, key release, key repeat". */ LockMut(*queuemutex); DeviceInput di( InputDevice_Invalid, DeviceButton_Invalid, 1.0f, now ); @@ -260,28 +255,28 @@ void InputFilter::Update( float fDeltaTime ) MakeButtonStateList( g_CurrentState ); vector ButtonsToErase; - + FOREACHM( DeviceButtonPair, ButtonState, g_ButtonStates, b ) { di.device = b->first.device; di.button = b->first.button; ButtonState &bs = b->second; - /* Generate IET_FIRST_PRESS and IET_RELEASE events that were delayed. */ + // Generate IET_FIRST_PRESS and IET_RELEASE events that were delayed. CheckButtonChange( bs, di, now ); - /* Generate IET_REPEAT events. */ + // Generate IET_REPEAT events. if( !bs.m_bLastReportedHeld ) { - // If the key isn't pressed, and hasn't been pressed for a while (so debouncing - // isn't interested in it), purge the entry. + // If the key isn't pressed, and hasn't been pressed for a while + // (so debouncing isn't interested in it), purge the entry. if( now - bs.m_LastReportTime > g_fInputDebounceTime && bs.m_DeviceInput.level == 0.0f ) ButtonsToErase.push_back( b ); continue; } - /* If repeats are disabled for this button, skip. */ + // If repeats are disabled for this button, skip. if( g_DisableRepeat.find(di) != g_DisableRepeat.end() ) continue; @@ -306,9 +301,9 @@ void InputFilter::Update( float fDeltaTime ) fRepeatTime = ftruncf( fNewHoldTime, g_fTimeBetweenRepeats ); } - /* Set the timestamp to the exact time of the repeat. This way, - * as long as tab/` aren't being used, the timestamp will always - * increase steadily during repeats. */ + /* Set the timestamp to the exact time of the repeat. This way, as long + * as tab/` aren't being used, the timestamp will always increase steadily + * during repeats. */ di.ts = bs.m_LastInputTime + fRepeatTime; ReportButtonChange( di, IET_REPEAT ); @@ -371,12 +366,12 @@ void InputFilter::ResetKeyRepeat( const DeviceInput &di ) GetButtonState( di ).m_fSecsHeld = 0; } -/* Stop repeating the specified key until released. */ +/** @brief Stop repeating the specified key until released. */ void InputFilter::RepeatStopKey( const DeviceInput &di ) { LockMut(*queuemutex); - /* If the button is up, do nothing. */ + // If the button is up, do nothing. ButtonState &bs = GetButtonState( di ); if( !bs.m_bLastReportedHeld ) return; diff --git a/src/Song.cpp b/src/Song.cpp index 10512d4977..be2852325b 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -36,7 +36,7 @@ #include #include -/** @brief: The version of the .ssc file format. */ +/** @brief The version of the .ssc file format. */ const static float VERSION_NUMBER = 0.52f; const int FILE_CACHE_VERSION = 164; // increment this to invalidate cache From 2d71b91c2538c802ca9f609f718ff64fde236848 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 15 Feb 2011 03:38:02 -0600 Subject: [PATCH 019/143] mouse code progress --- src/RageInputDevice.cpp | 2 -- src/RageInputDevice.h | 6 ++-- .../InputHandler/InputHandler_DirectInput.cpp | 28 +++++++++---------- .../InputHandler_DirectInputHelper.cpp | 22 ++------------- 4 files changed, 17 insertions(+), 41 deletions(-) diff --git a/src/RageInputDevice.cpp b/src/RageInputDevice.cpp index 2bc1ae3979..c276dea22c 100644 --- a/src/RageInputDevice.cpp +++ b/src/RageInputDevice.cpp @@ -132,8 +132,6 @@ static void InitNames() g_mapNamesToString[MOUSE_MIDDLE] = "middle mouse button"; g_mapNamesToString[MOUSE_WHEELUP] = "mousewheel up"; g_mapNamesToString[MOUSE_WHEELDOWN] = "mousewheel down"; - g_mapNamesToString[MOUSE_FORWARD] = "forward mouse button"; - g_mapNamesToString[MOUSE_BACK] = "back mouse button"; FOREACHM( DeviceButton, RString, g_mapNamesToString, m ) g_mapStringToNames[m->second] = m->first; diff --git a/src/RageInputDevice.h b/src/RageInputDevice.h index c7857a100e..704995736d 100644 --- a/src/RageInputDevice.h +++ b/src/RageInputDevice.h @@ -289,16 +289,14 @@ enum DeviceButton MIDI_FIRST = 600, MIDI_LAST = 699, - // Mouse: + // Mouse buttons MOUSE_LEFT = 700, MOUSE_RIGHT, MOUSE_MIDDLE, - // for mice with forward and backwards buttons - MOUSE_FORWARD, MOUSE_BACK, // axis MOUSE_X_LEFT, MOUSE_X_RIGHT, MOUSE_Y_UP, MOUSE_Y_DOWN, - // mousewheel? + // Mouse wheel (z axis) MOUSE_WHEELUP, MOUSE_WHEELDOWN, NUM_DeviceButton, diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index 4991b52adb..3cf10fb1d8 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -262,8 +262,8 @@ static HRESULT GetDeviceState( LPDIRECTINPUTDEVICE2 dev, int size, void *ptr ) return hr; } -/* This doesn't take a timestamp; instead, we let InputHandler::ButtonPressed figure - * it out. Be sure to call InputHandler::Update() between each poll. */ +/* This doesn't take a timestamp; instead, we let InputHandler::ButtonPressed + * figure it out. Be sure to call InputHandler::Update() between each poll. */ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm ) { switch( device.type ) @@ -403,17 +403,16 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm ) switch( in.ofs ) { case DIMOFS_X: - LOG->Trace("mouse X axis changed (polled)"); neg = MOUSE_X_LEFT; pos = MOUSE_X_RIGHT; val = state.lX; + LOG->Trace("mouse x: %d",val); break; case DIMOFS_Y: - LOG->Trace("mouse Y axis changed (polled)"); neg = MOUSE_Y_UP; pos = MOUSE_Y_DOWN; val = state.lY; + LOG->Trace("mouse y: %d",val); break; case DIMOFS_Z: - LOG->Trace("mouse Z axis changed (polled)"); neg = MOUSE_WHEELUP; pos = MOUSE_WHEELDOWN; val = state.lZ; break; @@ -489,7 +488,6 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm case DIMOFS_BUTTON0: mouseInput = MOUSE_LEFT; break; case DIMOFS_BUTTON1: mouseInput = MOUSE_RIGHT; break; case DIMOFS_BUTTON2: mouseInput = MOUSE_MIDDLE; break; - //case DIMOFS_BUTTON3: break; default: LOG->MapLog( "unknown input", "Mouse '%s' is returning an unknown mouse offset [button], %i", device.m_sName.c_str(), in.ofs ); @@ -506,31 +504,31 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm DeviceButton up = DeviceButton_Invalid, down = DeviceButton_Invalid; if(dev == DEVICE_MOUSE) { + // xxx: mouse position doesn't work here yet -aj + float l = int(evtbuf[i].dwData); switch(in.ofs) { case DIMOFS_X: - LOG->Trace("mouse X axis changed (buffered)"); - // todo: update cursor position -aj up = MOUSE_X_LEFT; down = MOUSE_X_RIGHT; + //cursorX += l; + LOG->Trace("dwData for mouse x: %f",l); break; case DIMOFS_Y: - LOG->Trace("mouse Y axis changed (buffered)"); - // todo: update cursor position -aj up = MOUSE_Y_UP; down = MOUSE_Y_DOWN; - //INPUTFILTER->UpdateCursorLocation(0, evtbuf[i].dwData); + //cursorY += l; + LOG->Trace("dwData for mouse y: %f",l); break; case DIMOFS_Z: - LOG->Trace("mouse Z axis changed (buffered)"); up = MOUSE_WHEELUP; down = MOUSE_WHEELDOWN; + l = SCALE( int(evtbuf[i].dwData), 0.0f, 100.0f, 0.0f, 1.0f ); + ButtonPressed( DeviceInput(dev, up, max(-l,0), tm) ); + ButtonPressed( DeviceInput(dev, down, max(+l,0), tm) ); break; default: LOG->MapLog( "unknown input", "Mouse '%s' is returning an unknown mouse offset [axis], %i", device.m_sName.c_str(), in.ofs ); continue; } - float l = SCALE( int(evtbuf[i].dwData), 0.0f, 100.0f, 0.0f, 1.0f ); - ButtonPressed( DeviceInput(dev, up, max(-l,0), tm) ); - ButtonPressed( DeviceInput(dev, down, max(+l,0), tm) ); } else { diff --git a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp index 5ac087bfeb..e71453aadb 100644 --- a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp @@ -99,7 +99,7 @@ bool DIDevice::Open() } break; case MOUSE: - Device->EnumObjects( DIMouse_EnumDevObjectsProc, this, DIDFT_BUTTON | DIDFT_AXIS ); + Device->EnumObjects( DIMouse_EnumDevObjectsProc, this, DIDFT_BUTTON | DIDFT_AXIS | DIDFT_ANYINSTANCE ); break; } @@ -325,7 +325,7 @@ static BOOL CALLBACK DIMouse_EnumDevObjectsProc(LPCDIDEVICEOBJECTINSTANCE dev, L //HRESULT hr; input_t in; - const int SupportedMask = DIDFT_BUTTON | DIDFT_AXIS; + const int SupportedMask = DIDFT_BUTTON | DIDFT_AXIS | DIDFT_ANYINSTANCE; if(!(dev->dwType & SupportedMask)) return DIENUM_CONTINUE; // unsupported @@ -342,27 +342,9 @@ static BOOL CALLBACK DIMouse_EnumDevObjectsProc(LPCDIDEVICEOBJECTINSTANCE dev, L { LOG->Trace("found a mouse axis"); // todo: how to handle this correctly? -aj - //DIPROPRANGE diprg; - in.type = in.AXIS; in.num = device->axes; - /* - diprg.diph.dwSize = sizeof(diprg); - diprg.diph.dwHeaderSize = sizeof(diprg.diph); - diprg.diph.dwObj = dev->dwOfs; - diprg.diph.dwHow = DIPH_BYOFFSET; - diprg.lMin = -100; - diprg.lMax = 100; - - hr = device->Device->SetProperty( DIPROP_RANGE, &diprg.diph ); - if ( hr != DI_OK ) - { - LOG->Trace("error setting properties on mouse axis"); - return DIENUM_CONTINUE; // don't use this axis - } - */ - device->axes++; } From eaba89aa036256f4bdbf5e517e68c7db695be47b Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 15 Feb 2011 04:05:43 -0600 Subject: [PATCH 020/143] last mouse code commit for the night --- src/RageInputDevice.h | 6 ++++++ src/arch/InputHandler/InputHandler_DirectInputHelper.cpp | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/RageInputDevice.h b/src/RageInputDevice.h index 704995736d..51e41a0c0d 100644 --- a/src/RageInputDevice.h +++ b/src/RageInputDevice.h @@ -320,12 +320,18 @@ public: * debouncing applied. */ bool bDown; + // Mouse coordinates + unsigned x; + unsigned y; + RageTimer ts; DeviceInput(): device(InputDevice_Invalid), button(DeviceButton_Invalid), level(0), bDown(false), ts(RageZeroTimer) { } DeviceInput( InputDevice d, DeviceButton b, float l=0 ): device(d), button(b), level(l), bDown(l > 0.5f), ts(RageZeroTimer) { } DeviceInput( InputDevice d, DeviceButton b, float l, const RageTimer &t ): device(d), button(b), level(l), bDown(level > 0.5f), ts(t) { } + DeviceInput( InputDevice d, DeviceButton b, const RageTimer &t, unsigned xPos=0, unsigned yPos=0 ): + device(d), button(b), x(xPos), y(yPos), bDown(false), ts(t) { } bool operator==( const DeviceInput &other ) const { diff --git a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp index e71453aadb..6860dcb74d 100644 --- a/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInputHelper.cpp @@ -340,7 +340,6 @@ static BOOL CALLBACK DIMouse_EnumDevObjectsProc(LPCDIDEVICEOBJECTINSTANCE dev, L } else if(dev->dwType & DIDFT_AXIS) { - LOG->Trace("found a mouse axis"); // todo: how to handle this correctly? -aj in.type = in.AXIS; in.num = device->axes; From 094afda043d188d722a4661f9b405ed62408c094 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 15 Feb 2011 22:19:24 -0600 Subject: [PATCH 021/143] add comment about ARROW_SIZE --- src/ScreenDimensions.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ScreenDimensions.h b/src/ScreenDimensions.h index 5d7dcba3c9..818fdd087c 100644 --- a/src/ScreenDimensions.h +++ b/src/ScreenDimensions.h @@ -27,6 +27,7 @@ namespace ScreenDimensions #define FullScreenRectF RectF(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) +// XXX: doesn't always have to be 64. -aj #define ARROW_SIZE (64) #endif From d53355e82e1fd8c7d355334ab4d9953b65be0d7a Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 15 Feb 2011 23:23:03 -0600 Subject: [PATCH 022/143] small whitespace thing --- src/PlayerState.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PlayerState.h b/src/PlayerState.h index 26559e50f8..e023bb7df0 100644 --- a/src/PlayerState.h +++ b/src/PlayerState.h @@ -46,7 +46,7 @@ public: * @brief Used to push note-changing modifiers back so that notes don't pop. * * This is used during gameplay and set by NoteField. */ - mutable float m_fLastDrawnBeat; + mutable float m_fLastDrawnBeat; /** @brief The Player's HealthState in general terms. */ HealthState m_HealthState; From 42693e91e7596fa29e41fbd65ad958cf15ca959a Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 15 Feb 2011 23:23:23 -0600 Subject: [PATCH 023/143] update comment --- src/ScreenDimensions.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ScreenDimensions.h b/src/ScreenDimensions.h index 818fdd087c..219e537bc4 100644 --- a/src/ScreenDimensions.h +++ b/src/ScreenDimensions.h @@ -28,6 +28,7 @@ namespace ScreenDimensions #define FullScreenRectF RectF(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) // XXX: doesn't always have to be 64. -aj +// Referenced in ArrowEffects, GameManager, NoteField, SnapDisplay. #define ARROW_SIZE (64) #endif From 072b7059ff669fcf9229c81f98814a900a4147b6 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 15 Feb 2011 23:25:30 -0600 Subject: [PATCH 024/143] eventually, I'd like the mousewheel to scroll the MusicWheel. --- src/ScreenSelectMusic.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ScreenSelectMusic.cpp b/src/ScreenSelectMusic.cpp index 7f1fe3abaa..b9c7014a2a 100644 --- a/src/ScreenSelectMusic.cpp +++ b/src/ScreenSelectMusic.cpp @@ -419,6 +419,8 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) } } + // todo: use mousewheel to scroll MusicWheel -aj + // debugging? // I just like being able to see untransliterated titles occasionally. if( input.DeviceI.device == DEVICE_KEYBOARD && input.DeviceI.button == KEY_F9 ) From 20b539f65255f2ca3bbc2968f73f6982ee61098a Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 15 Feb 2011 23:26:32 -0600 Subject: [PATCH 025/143] change z axis (wheeldown) scale to -120..120 to match input from mouse --- src/arch/InputHandler/InputHandler_DirectInput.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index 3cf10fb1d8..14ba9b309b 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -405,12 +405,10 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm ) case DIMOFS_X: neg = MOUSE_X_LEFT; pos = MOUSE_X_RIGHT; val = state.lX; - LOG->Trace("mouse x: %d",val); break; case DIMOFS_Y: neg = MOUSE_Y_UP; pos = MOUSE_Y_DOWN; val = state.lY; - LOG->Trace("mouse y: %d",val); break; case DIMOFS_Z: neg = MOUSE_WHEELUP; pos = MOUSE_WHEELDOWN; @@ -424,8 +422,7 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm ) if( neg != DeviceButton_Invalid ) { - //float l = SCALE( int(val), 0.0f, 100.0f, 0.0f, 1.0f ); - float l = val; + float l = SCALE( int(val), 0.0f, 100.0f, 0.0f, 1.0f ); ButtonPressed( DeviceInput(dev, neg, max(-l,0), tm) ); ButtonPressed( DeviceInput(dev, pos, max(+l,0), tm) ); } @@ -520,7 +517,7 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm break; case DIMOFS_Z: up = MOUSE_WHEELUP; down = MOUSE_WHEELDOWN; - l = SCALE( int(evtbuf[i].dwData), 0.0f, 100.0f, 0.0f, 1.0f ); + l = SCALE( int(evtbuf[i].dwData), -120.0f, 120.0f, -1.0f, 1.0f ); ButtonPressed( DeviceInput(dev, up, max(-l,0), tm) ); ButtonPressed( DeviceInput(dev, down, max(+l,0), tm) ); break; From 0b13f2f5a5e8b69b9b718cad9ce36fa6a6d0c3ef Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 15 Feb 2011 23:44:36 -0600 Subject: [PATCH 026/143] working towards issue 24 http://ssc.ajworld.net/sm-ssc/bugtracker/view.php?id=24 --- src/GameState.cpp | 18 ++++++++++++++++-- src/GameState.h | 16 +++++++++++----- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/GameState.cpp b/src/GameState.cpp index 0a190e750e..61fcc69f45 100644 --- a/src/GameState.cpp +++ b/src/GameState.cpp @@ -1389,8 +1389,6 @@ StageResult GameState::GetStageResult( PlayerNumber pn ) const return win; } - - void GameState::GetDefaultPlayerOptions( PlayerOptions &po ) { po.Init(); @@ -1450,6 +1448,22 @@ bool GameState::CurrentOptionsDisqualifyPlayer( PlayerNumber pn ) return po.IsEasierForSongAndSteps( m_pCurSong, m_pCurSteps[pn], pn); } +/* +void GameState::LoadNoteSkinMetrics( PlayerNumber pn ) +{ + // Read metrics from current noteskin for setting row/col spacing and + // arrow size (originally from StepMania AMX) + if( !IsPlayerEnabled( pn ) ) + return; + + ASSERT( this->m_pCurSteps[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()); +} +*/ + /* reset noteskins (?) * GameState::ResetNoteSkins() * GameState::ResetNoteSkinsForPlayer( PlayerNumber pn ) diff --git a/src/GameState.h b/src/GameState.h index 370f789a6c..72c3d57ad8 100644 --- a/src/GameState.h +++ b/src/GameState.h @@ -123,7 +123,6 @@ public: bool IsCpuPlayer( PlayerNumber pn ) const; bool AnyPlayersAreCpu() const; - bool IsCourseMode() const; bool IsBattleMode() const; // not Rave @@ -214,10 +213,17 @@ public: BroadcastOnChange m_bGameplayLeadIn; // Metricable noteskin things - // void LoadNoteSkinMetrics( PlayerNumber pn ); - // int m_iRowSpacing; - // int m_iColSpacing; - // int m_iArrowSize; + /* + void LoadNoteSkinMetrics( PlayerNumber pn ); + int m_iNoteSkinColSpacing[NUM_PLAYERS]; + int m_iNoteSkinArrowSize[NUM_PLAYERS]; + */ + // 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; From 2864b64dae25bbebb6e5f395a6220273332de9a9 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Wed, 16 Feb 2011 15:47:18 -0500 Subject: [PATCH 027/143] Minor doxygen while I can. --- src/ScreenDimensions.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/ScreenDimensions.h b/src/ScreenDimensions.h index 219e537bc4..d463acf087 100644 --- a/src/ScreenDimensions.h +++ b/src/ScreenDimensions.h @@ -1,4 +1,4 @@ -/* ScreenDimensions - defines for screen resolutions. */ +/** @brief ScreenDimensions - defines for screen resolutions. */ #ifndef SCREEN_DIMENSIONS_H #define SCREEN_DIMENSIONS_H @@ -27,14 +27,20 @@ namespace ScreenDimensions #define FullScreenRectF RectF(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) -// XXX: doesn't always have to be 64. -aj -// Referenced in ArrowEffects, GameManager, NoteField, SnapDisplay. +/** + * @brief The size of the arrows. + * + * This is referenced in ArrowEffects, GameManager, NoteField, and SnapDisplay. + * XXX: doesn't always have to be 64. -aj + */ #define ARROW_SIZE (64) #endif -/* - * (c) 2001-2002 Chris Danford +/** + * @file + * @author Chris Danford (c) 2001-2002 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a From 69491c7ccb23f653cf01150ac7cda64096e205df Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Thu, 17 Feb 2011 14:42:40 -0600 Subject: [PATCH 028/143] damnit I wanted to be able to refresh font settings and now I can again. --- Docs/Changelog_sm-ssc.txt | 4 ++++ src/Font.cpp | 4 ++-- src/FontManager.cpp | 12 +++++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 5715010638..25bbfc906f 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -13,6 +13,10 @@ _____________________________________________________________________________ sm-ssc v1.2.2 | 201102?? -------------------------------------------------------------------------------- +20110217 +-------- +* Allowed refreshing of Fonts again. [AJ] + 20110214 -------- * Added #CHARTSTYLE to .ssc format, mainly meant for Pad/Keyboard distinctions. [AJ] diff --git a/src/Font.cpp b/src/Font.cpp index ec00195979..049b8f137d 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -237,7 +237,7 @@ Font::~Font() void Font::Unload() { - LOG->Trace("Font:Unload '%s'",path.c_str()); + //LOG->Trace("Font:Unload '%s'",path.c_str()); for( unsigned i = 0; i < m_apPages.size(); ++i ) delete m_apPages[i]; m_apPages.clear(); @@ -655,7 +655,7 @@ void Font::Load( const RString &sIniPath, RString sChars ) { ASSERT_M( !GetExtension(sIniPath).CompareNoCase("ini"), sIniPath ); - LOG->Trace( "Font: Loading new font '%s'",sIniPath.c_str()); + //LOG->Trace( "Font: Loading new font '%s'",sIniPath.c_str()); // Check for recursion (recursive imports). for( unsigned i = 0; i < LoadStack.size(); ++i ) diff --git a/src/FontManager.cpp b/src/FontManager.cpp index 837a5d5aa1..5aba61bad2 100644 --- a/src/FontManager.cpp +++ b/src/FontManager.cpp @@ -43,10 +43,10 @@ Font* FontManager::LoadFont( const RString &sFontOrTextureFilePath, RString sCha 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 the same bitmap if there are equivalent but different paths - // (e.g. "graphics\blah.png" and "..\stepmania\graphics\blah.png" ). + /* 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 + * the same bitmap if there are equivalent but different paths + * (e.g. "graphics\blah.png" and "..\stepmania\graphics\blah.png" ). */ CHECKPOINT_M( ssprintf("FontManager::LoadFont(%s).", sFontOrTextureFilePath.c_str()) ); const FontName NewName( sFontOrTextureFilePath, sChars ); @@ -54,6 +54,8 @@ Font* FontManager::LoadFont( const RString &sFontOrTextureFilePath, RString sCha if( p != g_mapPathToFont.end() ) { pFont=p->second; + // reload in case metrics may have changed + pFont->Load(sFontOrTextureFilePath, sChars); } else { pFont= new Font; @@ -61,7 +63,7 @@ Font* FontManager::LoadFont( const RString &sFontOrTextureFilePath, RString sCha g_mapPathToFont[NewName] = pFont; } - ++pFont->m_iRefCount; + pFont->m_iRefCount++; return pFont; } From 8283a5bdda509c338cab8fb38d4f2111c90e23fc Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Thu, 17 Feb 2011 15:00:58 -0600 Subject: [PATCH 029/143] font reloading for real this time --- src/Font.cpp | 7 ++++--- src/FontManager.cpp | 4 +--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Font.cpp b/src/Font.cpp index 049b8f137d..ca95e58605 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -726,9 +726,10 @@ void Font::Load( const RString &sIniPath, RString sChars ) continue; } - Font *subfont=FONT->LoadFont(path,""); - MergeFont(*subfont); - FONT->UnloadFont(subfont); + Font subfont; + subfont.Load(path,""); + MergeFont(subfont); + //FONT->UnloadFont(subfont); } } diff --git a/src/FontManager.cpp b/src/FontManager.cpp index 5aba61bad2..243c06adbc 100644 --- a/src/FontManager.cpp +++ b/src/FontManager.cpp @@ -54,8 +54,7 @@ Font* FontManager::LoadFont( const RString &sFontOrTextureFilePath, RString sCha if( p != g_mapPathToFont.end() ) { pFont=p->second; - // reload in case metrics may have changed - pFont->Load(sFontOrTextureFilePath, sChars); + pFont->m_iRefCount++; } else { pFont= new Font; @@ -63,7 +62,6 @@ Font* FontManager::LoadFont( const RString &sFontOrTextureFilePath, RString sCha g_mapPathToFont[NewName] = pFont; } - pFont->m_iRefCount++; return pFont; } From 4ef10e3025f7747c98d87a4dd57dda9123b7d625 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Thu, 17 Feb 2011 16:13:00 -0500 Subject: [PATCH 030/143] More doxygen before class. (again) --- src/Font.h | 52 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/src/Font.h b/src/Font.h index 3d3219c739..fd5a5f2917 100644 --- a/src/Font.h +++ b/src/Font.h @@ -1,4 +1,4 @@ -/* Font - stores a font, used by BitmapText. */ +/** @brief Font - stores a font, used by BitmapText. */ #ifndef FONT_H #define FONT_H @@ -12,13 +12,17 @@ class FontPage; class RageTexture; class IniFile; +/** @brief The textures used by the font. */ struct FontPageTextures { + /** @brief The primary texture drawn underneath Main. */ RageTexture *m_pTextureMain; - /* an optional texture drawn underneath Main that can help to acheive - * complicated layer styles. */ + /** @brief an optional texture drawn underneath Main. + * + * This can help to acheive complicated layer styles. */ RageTexture *m_pTextureStroke; + /** @brief Set up the initial textures. */ FontPageTextures() { m_pTextureMain = NULL; @@ -26,25 +30,31 @@ struct FontPageTextures } }; +/** @brief The components of a glyph (not technically a character). */ struct glyph { + /** @brief the FontPage that is needed. */ FontPage *m_pPage; + /** @brief the textures for the glyph. */ FontPageTextures m_FontPageTextures; FontPageTextures *GetFontPageTextures() const { return const_cast(&m_FontPageTextures); } - // Number of pixels to advance horizontally after drawing this character. + /** @brief Number of pixels to advance horizontally after drawing this character. */ int m_iHadvance; - // Size of the actual rendered character. - float m_fWidth, m_fHeight; + /** @brief Width of the actual rendered character. */ + float m_fWidth; + /** @brief Height of the actual rendered character. */ + float m_fHeight; - // Number of pixels to offset this character when rendering. + /** @brief Number of pixels to offset this character when rendering. */ float m_fHshift; // , m_fVshift; - // Texture coordinate rect. + /** @brief Texture coordinate rect. */ RectF m_TexRect; }; +/** @brief The settings used for the FontPage. */ struct FontPageSettings { RString m_sTexturePath; @@ -64,6 +74,7 @@ struct FontPageSettings // If a value is missing, the width of the texture frame is used. map m_mapGlyphWidths; + /** @brief The initial settings for the FontPage. */ FontPageSettings(): m_iDrawExtraPixelsLeft(0), m_iDrawExtraPixelsRight(0), m_iAddToAllWidths(0), @@ -76,8 +87,13 @@ struct FontPageSettings m_sTextureHints("default") { } - /* Map a range from a character map to glyphs. If cnt is -1, map the - * whole map. Returns "" or an error message. */ + /** + * @briefMap a range from a character map to glyphs. + * @param sMapping the intended mapping. + * @param iMapOffset the number of maps to offset. + * @param iGlyphOffset the number of glyphs to offset. + * @param iCount the range to map. If -1, the range is the entire map. + * @return the empty string on success, or an error message on failure. */ RString MapRange( RString sMapping, int iMapOffset, int iGlyphOffset, int iCount ); }; @@ -96,14 +112,15 @@ public: int GetCenter() const { return m_iHeight/2; } // Remember these only for GetLineWidthInSourcePixels. - int m_iDrawExtraPixelsLeft, m_iDrawExtraPixelsRight; + int m_iDrawExtraPixelsLeft, + m_iDrawExtraPixelsRight; FontPageTextures m_FontPageTextures; // XXX: remove? RString m_sTexturePath; - // All glyphs in this list will point to m_pTexture. + /** @brief All glyphs in this list will point to m_pTexture. */ vector m_aGlyphs; map m_iCharToGlyphNo; @@ -178,14 +195,17 @@ private: RString GetPageNameFromFileName( const RString &sFilename ); }; -/* Last private-use Unicode character: */ -/* This is in the header to reduce file dependencies. */ +/** + * @brief Last private-use Unicode character: + * + * This is in the header to reduce file dependencies. */ const wchar_t FONT_DEFAULT_GLYPH = 0xF8FF; #endif -/* - * (c) 2001-2004 Glenn Maynard, Chris Danford +/** + * @file + * @author Glenn Maynard, Chris Danford (c) 2001-2004 * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a From 204f9321551fe6250250ab940f2084ea4ace36e6 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Fri, 18 Feb 2011 13:47:32 -0600 Subject: [PATCH 031/143] [WheelBase] enable SetOpenSection Lua binding --- src/WheelBase.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/WheelBase.cpp b/src/WheelBase.cpp index 62acfd2adb..6dc3b74b2d 100644 --- a/src/WheelBase.cpp +++ b/src/WheelBase.cpp @@ -41,15 +41,15 @@ void WheelBase::Load( RString sType ) m_iSwitchesLeftInSpinDown = 0; m_Moving = 0; - SWITCH_SECONDS .Load(sType,"SwitchSeconds"); - LOCKED_INITIAL_VELOCITY .Load(sType,"LockedInitialVelocity"); - SCROLL_BAR_HEIGHT .Load(sType,"ScrollBarHeight"); + SWITCH_SECONDS.Load(sType,"SwitchSeconds"); + LOCKED_INITIAL_VELOCITY.Load(sType,"LockedInitialVelocity"); + SCROLL_BAR_HEIGHT.Load(sType,"ScrollBarHeight"); m_exprItemTransformFunction.SetFromReference( THEME->GetMetricR(sType,"ItemTransformFunction") ); - NUM_WHEEL_ITEMS_TO_DRAW .Load(sType,"NumWheelItems"); - WHEEL_ITEM_LOCKED_COLOR .Load(sType,"WheelItemLockedColor"); + NUM_WHEEL_ITEMS_TO_DRAW.Load(sType,"NumWheelItems"); + WHEEL_ITEM_LOCKED_COLOR.Load(sType,"WheelItemLockedColor"); - m_soundChangeMusic.Load( THEME->GetPathS(sType,"change"), true ); - m_soundLocked.Load( THEME->GetPathS(sType,"locked"), true ); + m_soundChangeMusic.Load(THEME->GetPathS(sType,"change"), true); + m_soundLocked.Load(THEME->GetPathS(sType,"locked"), true); WheelItemBase *pTempl = MakeItem(); ActorUtil::LoadAllCommands( *pTempl, m_sName ); @@ -525,22 +525,22 @@ public: } static int IsSettled( T* p, lua_State *L ){ lua_pushboolean( L, p->IsSettled() ); return 1; } static int IsLocked( T* p, lua_State *L ){ lua_pushboolean( L, p->WheelIsLocked() ); return 1; } + static int SetOpenSection( T* p, lua_State *L ){ p->SetOpenSection( SArg(1) ); return 0; } // evil shit //static int Move( T* p, lua_State *L ){ p->Move( IArg(1) ); return 0; } //static int ChangeMusic( T* p, lua_State *L ){ p->ChangeMusic( IArg(1) ); return 0; } //static int ChangeMusicUnlessLocked( T* p, lua_State *L ){ p->ChangeMusicUnlessLocked( IArg(1) ); return 0; } - //static int SetOpenSection( T* p, lua_State *L ){ p->SetOpenSection( SArg(1) ); return 0; } LunaWheelBase() { ADD_METHOD( GetWheelItem ); ADD_METHOD( IsSettled ); ADD_METHOD( IsLocked ); + ADD_METHOD( SetOpenSection ); // evil shit //ADD_METHOD( Move ); //ADD_METHOD( ChangeMusic ); //ADD_METHOD( ChangeMusicUnlessLocked ); - //ADD_METHOD( SetOpenSection ); } }; From 9eb9a577f66ac36cd04ef5ac1b93929484402ee2 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Fri, 18 Feb 2011 13:48:23 -0600 Subject: [PATCH 032/143] update changelog, plans for custom wheel item --- Docs/Changelog_sm-ssc.txt | 4 ++++ src/WheelItemBase.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 25bbfc906f..2c1cd0334d 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -13,6 +13,10 @@ _____________________________________________________________________________ sm-ssc v1.2.2 | 201102?? -------------------------------------------------------------------------------- +20110218 +-------- +* [WheelBase] Added SetOpenSection Lua binding [AJ] + 20110217 -------- * Allowed refreshing of Fonts again. [AJ] diff --git a/src/WheelItemBase.h b/src/WheelItemBase.h index 7021b18614..9e51f95d5a 100644 --- a/src/WheelItemBase.h +++ b/src/WheelItemBase.h @@ -20,7 +20,8 @@ enum WheelItemDataType TYPE_RANDOM, TYPE_PORTAL, TYPE_COURSE, - TYPE_SORT + TYPE_SORT/*, + TYPE_CUSTOM*/ }; struct WheelItemBaseData From 6a198fd6443189f251f7d7019170071df691dfb6 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Fri, 18 Feb 2011 14:07:21 -0600 Subject: [PATCH 033/143] cleanup --- src/WheelBase.cpp | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/src/WheelBase.cpp b/src/WheelBase.cpp index 6dc3b74b2d..d813ccb5d8 100644 --- a/src/WheelBase.cpp +++ b/src/WheelBase.cpp @@ -16,7 +16,6 @@ #include "ThemeMetric.h" #include "ScreenDimensions.h" - const int MAX_WHEEL_SOUND_SPEED = 15; AutoScreenMessage( SM_SongChanged ) // TODO: Replace this with a Message and MESSAGEMAN @@ -88,7 +87,7 @@ void WheelBase::BeginScreen() void WheelBase::SetItemPosition( Actor &item, float fPosOffsetsFromMiddle ) { - /* Don't supply and item index or num items. The number of items can be so + /* Don't supply and item index or num items. The number of items can be so * large that transforms that depend on such large numbers are likely to break. */ int iItemIndex = 0; // dummy int iNumItems = 1; // dummy @@ -161,8 +160,8 @@ void WheelBase::Update( float fDeltaTime ) pDisplay->m_colorLocked = RageColor(0,0,0,0); } - //Moved to CommonUpdateProcedure, seems to work fine - //Revert if it happens to break something + // Moved to CommonUpdateProcedure, seems to work fine. Revert if it happens + // to break something. UpdateScrollbar(); if( m_Moving ) @@ -178,9 +177,8 @@ void WheelBase::Update( float fDeltaTime ) if( m_WheelState == STATE_LOCKED ) { - /* Do this in at most .1 sec chunks, so we don't get weird if we - * stop for some reason (and so it behaves the same when being - * single stepped). */ + /* Do this in at most .1 sec chunks, so we don't get weird if we stop + * for some reason (and so it behaves the same when being single stepped). */ float fTime = fDeltaTime; while( fTime > 0 ) { @@ -207,13 +205,12 @@ void WheelBase::Update( float fDeltaTime ) if( IsMoving() ) { - /* We're automatically moving. Move linearly, and don't clamp - * to the selection. */ + // We're automatically moving. Move linearly, and don't clamp to the selection. float fSpinSpeed = m_SpinSpeed*m_Moving; m_fPositionOffsetFromSelection -= fSpinSpeed*fDeltaTime; - /* Make sure that we don't go further than 1 away, in case the - * speed is very high or we miss a lot of frames. */ + /* Make sure that we don't go further than 1 away, in case the speed is + * very high or we miss a lot of frames. */ m_fPositionOffsetFromSelection = clamp(m_fPositionOffsetFromSelection, -1.0f, 1.0f); // If it passed the selection, move again. @@ -285,10 +282,10 @@ bool WheelBase::Select() // return true if this selection can end the screen case TYPE_SECTION: { RString sThisItemSectionName = m_CurWheelItemData[m_iSelection]->m_sText; - if( m_sExpandedSectionName == sThisItemSectionName ) // already expanded - SetOpenSection( "" ); // collapse it - else // already collapsed - SetOpenSection( sThisItemSectionName ); // expand it + if( m_sExpandedSectionName == sThisItemSectionName ) // already expanded + SetOpenSection( "" ); // collapse it + else // already collapsed + SetOpenSection( sThisItemSectionName ); // expand it m_soundExpand.Play(); } @@ -375,7 +372,7 @@ void WheelBase::Move(int n) m_TimeBeforeMovingBegins = 1/4.0f; m_SpinSpeed = float(PREFSMAN->m_iMusicWheelSwitchSpeed); m_Moving = n; - + if( m_Moving ) ChangeMusic(m_Moving); } @@ -528,8 +525,7 @@ public: static int SetOpenSection( T* p, lua_State *L ){ p->SetOpenSection( SArg(1) ); return 0; } // evil shit //static int Move( T* p, lua_State *L ){ p->Move( IArg(1) ); return 0; } - //static int ChangeMusic( T* p, lua_State *L ){ p->ChangeMusic( IArg(1) ); return 0; } - //static int ChangeMusicUnlessLocked( T* p, lua_State *L ){ p->ChangeMusicUnlessLocked( IArg(1) ); return 0; } + //static int ChangeMusic( T* p, lua_State *L ){ p->ChangeMusicUnlessLocked( IArg(1) ); return 0; } LunaWheelBase() { @@ -540,7 +536,6 @@ public: // evil shit //ADD_METHOD( Move ); //ADD_METHOD( ChangeMusic ); - //ADD_METHOD( ChangeMusicUnlessLocked ); } }; From 86dab159371ad6ecd4871e173123d5487ba763d8 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Fri, 18 Feb 2011 14:07:41 -0600 Subject: [PATCH 034/143] remove unused logging --- src/MusicWheel.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/MusicWheel.cpp b/src/MusicWheel.cpp index ec0a1b4b7f..9c81215790 100644 --- a/src/MusicWheel.cpp +++ b/src/MusicWheel.cpp @@ -1048,11 +1048,6 @@ bool MusicWheel::Select() // return true if this selection ends the screen case TYPE_PORTAL: break; case TYPE_SORT: - /* - LOG->Trace("New sort order selected: %s - %s", - GetCurWheelItemData(m_iSelection)->m_sLabel.c_str(), - SortOrderToString(GetCurWheelItemData(m_iSelection)->m_pAction->m_SortOrder).c_str() ); - */ GetCurWheelItemData(m_iSelection)->m_pAction->ApplyToAllPlayers(); ChangeSort( GAMESTATE->m_PreferredSortOrder ); m_sLastModeMenuItem = GetCurWheelItemData(m_iSelection)->m_pAction->m_sName; From 8d3bcae3e57fe32f1bf8aa4de50c9fa7706f346d Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Fri, 18 Feb 2011 14:08:26 -0600 Subject: [PATCH 035/143] set this to update for now but it may bring back crashes, not 100% sure --- src/ScreenNetEvaluation.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ScreenNetEvaluation.cpp b/src/ScreenNetEvaluation.cpp index 7a75a0f09a..ce321ec1ad 100644 --- a/src/ScreenNetEvaluation.cpp +++ b/src/ScreenNetEvaluation.cpp @@ -190,14 +190,12 @@ void ScreenNetEvaluation::UpdateStats() if( THEME->GetMetricB(m_sName,"ShowScoreArea") ) m_textScore[m_pActivePlayer].SetTargetNumber( NSMAN->m_EvalPlayerData[m_iCurrentPlayer].score ); - //Values greater than 6 will cause a crash - /* + //Values greater than 6 will cause a crash/* if( NSMAN->m_EvalPlayerData[m_iCurrentPlayer].difficulty < 6 ) { m_DifficultyIcon[m_pActivePlayer].SetPlayer( m_pActivePlayer ); m_DifficultyIcon[m_pActivePlayer].SetFromDifficulty( NSMAN->m_EvalPlayerData[m_iCurrentPlayer].difficulty ); } - */ for( int j=0; j Date: Fri, 18 Feb 2011 15:10:11 -0500 Subject: [PATCH 036/143] More sporadic doxygen documenting. Really need a themer for Actor stuff. --- src/Actor.h | 97 +++++++++++++++++++++++++++++++++++++---------------- src/Font.h | 31 +++++++++++------ 2 files changed, 90 insertions(+), 38 deletions(-) diff --git a/src/Actor.h b/src/Actor.h index b68dde38f8..e4244dd824 100644 --- a/src/Actor.h +++ b/src/Actor.h @@ -1,4 +1,4 @@ -/* Actor - Base class for all objects that appear on the screen. */ +/** @brief Actor - Base class for all objects that appear on the screen. */ #ifndef ACTOR_H #define ACTOR_H @@ -16,42 +16,54 @@ class LuaClass; typedef AutoPtrCopyOnWrite apActorCommands; -// background +/** @brief The background layer. */ #define DRAW_ORDER_BEFORE_EVERYTHING -200 -// underlay +/** @brief The underlay layer. */ #define DRAW_ORDER_UNDERLAY -100 -// decorations -#define DRAW_ORDER_DECORATIONS 0 -// normal screen elements go here +/** @brief The decorations layer. */ +#define DRAW_ORDER_DECORATIONS 0 +/** @brief The overlay layer. + * + * Normal screen elements go here. */ #define DRAW_ORDER_OVERLAY +100 +/** @brief The transitions layer. */ #define DRAW_ORDER_TRANSITIONS +200 +/** @brief The over everything layer. */ #define DRAW_ORDER_AFTER_EVERYTHING +300 +/** @brief The different horizontal alignments. */ enum HorizAlign { - HorizAlign_Left, - HorizAlign_Center, - HorizAlign_Right, - NUM_HorizAlign, + HorizAlign_Left, /**< Align to the left. */ + HorizAlign_Center, /**< Align to the center. */ + HorizAlign_Right, /**< Align to the right. */ + NUM_HorizAlign, /**< The number of horizontal alignments. */ HorizAlign_Invalid }; LuaDeclareType( HorizAlign ); +/** @brief The different vertical alignments. */ enum VertAlign { - VertAlign_Top, - VertAlign_Middle, - VertAlign_Bottom, - NUM_VertAlign, + VertAlign_Top, /**< Align to the top. */ + VertAlign_Middle, /**< Align to the middle. */ + VertAlign_Bottom, /**< Align to the bottom. */ + NUM_VertAlign, /**< The number of vertical alignments. */ VertAlign_Invalid }; LuaDeclareType( VertAlign ); +/** @brief The left horizontal alignment constant. */ #define align_left 0.0f +/** @brief The center horizontal alignment constant. */ #define align_center 0.5f +/** @brief The right horizontal alignment constant. */ #define align_right 1.0f +/** @brief The top vertical alignment constant. */ #define align_top 0.0f +/** @brief The middle vertical alignment constant. */ #define align_middle 0.5f +/** @brief The bottom vertical alignment constant. */ #define align_bottom 1.0f class Actor : public MessageSubscriber @@ -67,8 +79,11 @@ public: static void SetBGMTime( float fTime, float fBeat, float fTimeNoOffset, float fBeatNoOffset ); static void SetBGMLight( int iLightNumber, float fCabinetLights ); - // todo: split out into diffuse effects and translation effects, or - // create an effect stack instead. -aj + /** + * @brief The list of the different effects. + * + * 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, @@ -99,8 +114,16 @@ public: RageVector4 quat; RageVector3 scale; float fSkewX, fSkewY; - RectF crop; // 0 = no cropping, 1 = fully cropped - RectF fade; // 0 = no fade + /** + * @brief The amount of cropping involved. + * + * If 0, there is no cropping. If 1, it's fully cropped. */ + RectF crop; + /** + * @brief The amount of fading involved. + * + * If 0, there is no fade. If 1, it's fully faded. */ + RectF fade; RageColor diffuse[4]; RageColor glow; float aux; @@ -417,9 +440,12 @@ protected: TweenInfo &operator=( const TweenInfo &rhs ); ITween *m_pTween; - float m_fTimeLeftInTween; // how far into the tween are we? - float m_fTweenTime; // seconds between Start and End positions/zooms - RString m_sCommandName; // command to execute when this TweenState goes into effect + /** @brief How far into the tween are we? */ + float m_fTimeLeftInTween; + /** @brief The number of seconds between Start and End positions/zooms. */ + float m_fTweenTime; + /** @brief The command to execute when this TweenState goes into effect. */ + RString m_sCommandName; }; RageVector3 m_baseRotation; @@ -436,14 +462,20 @@ protected: }; vector m_Tweens; - // Temporary variables that are filled just before drawing + /** @brief Temporary variables that are filled just before drawing */ TweenState *m_pTempState; bool m_bFirstUpdate; // Stuff for alignment - float m_fHorizAlign; /* 0.0 left 0.5 center 1.0 right */ - float m_fVertAlign; /* 0.0 top 0.5 center 1.0 bottom */ + /** @brief The particular horizontal alignment. + * + * Use the defined constant values for best effect. */ + float m_fHorizAlign; + /** @brief The particular vertical alignment. + * + * Use the defined constant values for best effect. */ + float m_fVertAlign; // Stuff for effects @@ -480,7 +512,10 @@ protected: float m_fShadowLengthX; float m_fShadowLengthY; RageColor m_ShadowColor; - int m_iDrawOrder; // lower first + /** @brief The draw order priority. + * + * The lower this number is, the sooner it is drawn. */ + int m_iDrawOrder; // render states BlendMode m_BlendMode; @@ -490,7 +525,11 @@ protected: bool m_bTextureFiltering; bool m_bClearZBuffer; bool m_bZWrite; - float m_fZBias; // 0 = no bias; 1 = full bias + /** + * @brief The amount of bias. + * + * If 0, there is no bias. If 1, there is a full bias. */ + float m_fZBias; // global state static float g_fCurrentBGMTime, g_fCurrentBGMBeat; @@ -503,8 +542,10 @@ private: #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/Font.h b/src/Font.h index fd5a5f2917..c47b22efb5 100644 --- a/src/Font.h +++ b/src/Font.h @@ -146,10 +146,15 @@ public: bool FontCompleteForString( const wstring &str ) const; - // Add a FontPage to this font. + /** + * @brief Add a FontPage to this font. + * @param fp the FontPage to be added. + */ void AddPage(FontPage *fp); - // Steal all of a font's pages. + /** + * @brief Steal all of a font's pages. + * @param f the font whose pages we are stealing. */ void MergeFont(Font &f); void Load(const RString &sFontOrTextureFilePath, RString sChars); @@ -169,25 +174,31 @@ public: const RageColor &GetDefaultStrokeColor() const { return m_DefaultStrokeColor; }; private: - // List of pages and fonts that we use (and are responsible for freeing). + /** @brief List of pages and fonts that we use (and are responsible for freeing). */ vector m_apPages; - /* This is the primary fontpage of this font; font-wide height, center, - * etc. is pulled from it. (This is one of pages[].) */ + /** + * @brief This is the primary fontpage of this font. + * + * The font-wide height, center, etc. is pulled from it. + * (This is one of pages[].) */ FontPage *m_pDefault; - // Map from characters to glyphs. (Each glyph* is part of one of pages[].) + /** @brief Map from characters to glyphs. */ map m_iCharToGlyph; + /** @brief Each glyph is part of one of the pages[]. */ glyph *m_iCharToGlyphCache[128]; - // True for Hebrew, Arabic, Urdu fonts. - // This will also change the way glyphs from the default FontPage are rendered. - // There may be a better way to handle this. + /** + * @brief True for Hebrew, Arabic, Urdu fonts. + * + * This will also change the way glyphs from the default FontPage are rendered. + * There may be a better way to handle this. */ bool m_bRightToLeft; RageColor m_DefaultStrokeColor; - // We keep this around only for reloading. + /** @brief We keep this around only for reloading. */ RString m_sChars; void LoadFontPageSettings( FontPageSettings &cfg, IniFile &ini, const RString &sTexturePath, const RString &PageName, RString sChars ); From 2f54be53cb51707698d61f705c32fcce27e5bf13 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Fri, 18 Feb 2011 14:10:56 -0600 Subject: [PATCH 037/143] comment changes and such --- src/ScreenNetEvaluation.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/ScreenNetEvaluation.cpp b/src/ScreenNetEvaluation.cpp index ce321ec1ad..247d4b79c4 100644 --- a/src/ScreenNetEvaluation.cpp +++ b/src/ScreenNetEvaluation.cpp @@ -133,9 +133,9 @@ void ScreenNetEvaluation::HandleScreenMessage( const ScreenMessage SM ) LOG->Trace( "SMNETCheckpoint" ); for( int i=0; i= NSMAN->m_EvalPlayerData.size() ) break; @@ -152,16 +152,14 @@ void ScreenNetEvaluation::HandleScreenMessage( const ScreenMessage SM ) // Yes, hardcoded (I'd like to leave it that way) -CNLohr (in reference to Grade_Tier03) // Themes can read this differently. The correct solution depends... - // TODO: make this a server-side variable, or just find out - // the data from the theme? If we find out from the theme, people - // will be using different themes so it means nothing. -aj + // TODO: make this a server-side variable. -aj if( NSMAN->m_EvalPlayerData[i].grade < Grade_Tier03 ) m_textUsers[i].PlayCommand("Tier02OrBetter"); ON_COMMAND( m_textUsers[i] ); LOG->Trace( "SMNETCheckpoint%d", i ); } - return; //no need to let ScreenEvaluation get ahold of this. + return; // No need to let ScreenEvaluation get a hold of this. } else if( SM == SM_GoToNextScreen ) { @@ -190,7 +188,7 @@ void ScreenNetEvaluation::UpdateStats() if( THEME->GetMetricB(m_sName,"ShowScoreArea") ) m_textScore[m_pActivePlayer].SetTargetNumber( NSMAN->m_EvalPlayerData[m_iCurrentPlayer].score ); - //Values greater than 6 will cause a crash/* + //Values greater than 6 will cause a crash if( NSMAN->m_EvalPlayerData[m_iCurrentPlayer].difficulty < 6 ) { m_DifficultyIcon[m_pActivePlayer].SetPlayer( m_pActivePlayer ); From d8ed9306b838905a99e98b9092fc2b1e5823dd40 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 15:20:20 -0500 Subject: [PATCH 038/143] More brief doxygen-ating. --- src/ActorFrame.h | 26 +++++++++++++++++++++----- src/ActorFrameTexture.h | 21 +++++++++++++++------ src/ActorMultiTexture.h | 8 +++++--- 3 files changed, 41 insertions(+), 14 deletions(-) diff --git a/src/ActorFrame.h b/src/ActorFrame.h index bd871e95a0..cba0ad677d 100644 --- a/src/ActorFrame.h +++ b/src/ActorFrame.h @@ -1,4 +1,4 @@ -/* ActorFrame - A container for other actors. */ +/** @brief ActorFrame - A container for other actors. */ #ifndef ACTORFRAME_H #define ACTORFRAME_H @@ -12,6 +12,7 @@ public: ActorFrame( const ActorFrame &cpy ); virtual ~ActorFrame(); + /** @brief Set up the initial state. */ virtual void InitState(); void LoadFromNode( const XNode* pNode ); virtual ActorFrame *Copy() const; @@ -23,8 +24,17 @@ public: vector GetChildren() { return m_SubActors; } int GetNumChildren() const { return m_SubActors.size(); } + /** @brief Remove all of the children from the frame. */ void RemoveAllChildren(); + /** + * @brief Move a particular actor to the tail. + * @param pActor the actor to go to the tail. + */ void MoveToTail( Actor* pActor ); + /** + * @brief Move a particular actor to the head. + * @param pActor the actor to go to the head. + */ void MoveToHead( Actor* pActor ); void SortByDrawOrder(); void SetDrawByZPosition( bool b ); @@ -73,7 +83,7 @@ public: virtual void SetPropagateCommands( bool b ); - // Amount of time until all tweens (and all children's tweens) have stopped: + /** @brief Amount of time until all tweens (and all children's tweens) have stopped: */ virtual float GetTweenTimeLeft() const; virtual void HandleMessage( const Message &msg ); @@ -95,7 +105,11 @@ protected: float m_fFOV; // -1 = no change float m_fVanishX; float m_fVanishY; - bool m_bOverrideLighting; // if true, set lighting to m_bLighting + /** + * @brief A flad to see if an override for the lighting is needed. + * + * If true, set lightning to m_bLightning. */ + bool m_bOverrideLighting; bool m_bLighting; // lighting variables @@ -115,8 +129,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/ActorFrameTexture.h b/src/ActorFrameTexture.h index 915c9c017b..ae9c873c3d 100644 --- a/src/ActorFrameTexture.h +++ b/src/ActorFrameTexture.h @@ -12,11 +12,18 @@ public: virtual ~ActorFrameTexture(); virtual ActorFrameTexture *Copy() const; - /* Set the texture name, which can be used with RageTextureManager (and users, - * eg. Sprite) to load the texture. If no name is supplied, a unique one will - * be generated. In that case, the only way to access the texture is via - * GetTextureName. */ + /** + * @brief Set the texture name. + * + * This can be used with RageTextureManager (and users, eg. Sprite) + * to load the texture. If no name is supplied, a unique one will + * be generated. In that case, the only way to access the texture + * is via GetTextureName. + * @param sName the new name. */ void SetTextureName( const RString &sName ) { m_sTextureName = sName; } + /** + * @brief Retrieve the texture name. + * @return the texture name. */ RString GetTextureName() const { return m_sTextureName; } RageTextureRenderTarget *GetTexture() { return m_pRenderTarget; } @@ -52,8 +59,10 @@ public: #endif -/* - * (c) 2006 Glenn Maynard +/** + * @file + * @author Glenn Maynard (c) 2006 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/ActorMultiTexture.h b/src/ActorMultiTexture.h index f0f0f70919..5973ab6234 100644 --- a/src/ActorMultiTexture.h +++ b/src/ActorMultiTexture.h @@ -1,4 +1,4 @@ -/* ActorMultiTexture - A texture created from multiple textures. */ +/** @brief ActorMultiTexture - A texture created from multiple textures. */ #ifndef ACTOR_MULTI_TEXTURE_H #define ACTOR_MULTI_TEXTURE_H @@ -45,8 +45,10 @@ private: #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 From 4a4b2ff4401ba74eb7d1a24e70ee399d3a083998 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 15:34:33 -0500 Subject: [PATCH 039/143] You know the drill. --- src/RollingNumbers.h | 20 ++++++++++++++------ src/Sprite.h | 23 ++++++++++++++++------- src/Tween.h | 27 ++++++++++++++++++--------- 3 files changed, 48 insertions(+), 22 deletions(-) diff --git a/src/RollingNumbers.h b/src/RollingNumbers.h index 62f8c88226..954ed3cb14 100644 --- a/src/RollingNumbers.h +++ b/src/RollingNumbers.h @@ -1,4 +1,4 @@ -/* RollingNumbers - animates from one number to another by scrolling its digits. */ +/** @brief RollingNumbers - animates from one number to another by scrolling its digits. */ #ifndef RollingNumbers_H #define RollingNumbers_H @@ -17,6 +17,9 @@ public: virtual void DrawPrimitives(); virtual void Update( float fDeltaTime ); + /** + * @brief Set the new target number to be reached. + * @param fTargetNumber the new target number. */ void SetTargetNumber( float fTargetNumber ); void UpdateText(); @@ -30,15 +33,20 @@ private: ThemeMetric COMMIFY; ThemeMetric LEADING_ZERO_MULTIPLY_COLOR; - float m_fCurrentNumber; // currently showing this - float m_fTargetNumber; // approach this - float m_fScoreVelocity; // approach target at this speed + /** @brief The currently showing number. */ + float m_fCurrentNumber; + /** @brief The number we are trying to approach. */ + float m_fTargetNumber; + /** @brief The speed we are trying to reach the target number. */ + float m_fScoreVelocity; }; #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/Sprite.h b/src/Sprite.h index effefd073e..756d6fe6b7 100644 --- a/src/Sprite.h +++ b/src/Sprite.h @@ -1,4 +1,4 @@ -/* Sprite - A bitmap Actor that animates and moves around. */ +/** @brief Sprite - A bitmap Actor that animates and moves around. */ #ifndef SPRITE_H #define SPRITE_H @@ -61,8 +61,12 @@ public: void SetEffectMode( EffectMode em ) { m_EffectMode = em; } void SetTexCoordVelocity(float fVelX, float fVelY); - // Scale the Sprite maintaining the aspect ratio so that it fits - // within (fWidth,fHeight) and is clipped to (fWidth,fHeight). + /** + * @brief Scale the Sprite while maintaining the aspect ratio. + * + * It has to fit within and become clipped to the given parameters. + * @param fWidth the new width. + * @param fHeight the new height. */ void ScaleToClipped( float fWidth, float fHeight ); void CropTo( float fWidth, float fHeight ); static bool IsDiagonalBanner( int iWidth, int iHeight ); @@ -82,14 +86,17 @@ private: RageTexture* m_pTexture; + /** @brief The Sprite's present state. */ struct State { RectF rect; - float fDelay; // "seconds to show" + /** @brief The number of "seconds to show". */ + float fDelay; }; vector m_States; int m_iCurState; - float m_fSecsIntoState; // number of seconds that have elapsed since we switched to this frame + /** @brief The number of seconds that have elapsed since we switched to this frame. */ + float m_fSecsIntoState; EffectMode m_EffectMode; bool m_bUsingCustomTexCoords; @@ -106,8 +113,10 @@ private: #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/Tween.h b/src/Tween.h index 0fa8d6ece0..304ee6a75b 100644 --- a/src/Tween.h +++ b/src/Tween.h @@ -1,4 +1,4 @@ -/* ITween - Interface for simple interpolation. */ +/** @brief ITween - Interface for simple interpolation. */ #ifndef TWEEN_H #define TWEEN_H @@ -8,22 +8,29 @@ struct lua_State; typedef lua_State Lua; +/** @brief The different tweening types available. */ enum TweenType { - TWEEN_LINEAR, - TWEEN_ACCELERATE, - TWEEN_DECELERATE, - TWEEN_SPRING, - TWEEN_BEZIER, - NUM_TweenType, + TWEEN_LINEAR, /**< A linear tween. */ + TWEEN_ACCELERATE, /**< An accelerating tween. */ + TWEEN_DECELERATE, /**< A decelerating tween. */ + TWEEN_SPRING, /**< A spring tween. */ + TWEEN_BEZIER, /**< A bezier tween. */ + NUM_TweenType, /**< The number of tween types. */ TweenType_Invalid }; +/** @brief A custom foreach loop iterating through the tween types. */ #define FOREACH_TweenType( tt ) FOREACH_ENUM( TweenType, tt ) LuaDeclareType( TweenType ); +/** + * @brief The interface for simple interpolation. + * + * Funny enough, this is a class. */ class ITween { public: + /** @brief Create the initial interface. */ virtual ~ITween() { } virtual float Tween( float f ) const = 0; virtual ITween *Copy() const = 0; @@ -34,8 +41,10 @@ public: #endif -/* - * (c) 2006 Glenn Maynard +/** + * @file + * @author Glenn Maynard (c) 2006 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a From 293eebe8760b2ccb56b48b8d2b082fa02a945866 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Fri, 18 Feb 2011 14:44:38 -0600 Subject: [PATCH 040/143] tiny commit for testing --- src/Actor.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Actor.h b/src/Actor.h index e4244dd824..96792e029e 100644 --- a/src/Actor.h +++ b/src/Actor.h @@ -185,7 +185,7 @@ public: void SetWidth( float width ) { m_size.x = width; } void SetHeight( float height ) { m_size.y = height; } - // Base + // Base values float GetBaseZoomX() const { return m_baseScale.x; } void SetBaseZoomX( float zoom ) { m_baseScale.x = zoom; } float GetBaseZoomY() const { return m_baseScale.y; } @@ -199,7 +199,6 @@ 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 float GetZoomX() const { return DestTweenState().scale.x; } float GetZoomY() const { return DestTweenState().scale.y; } From 79cbd57da1788b99f71efd47bbe4df5e46acd546 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Fri, 18 Feb 2011 14:49:30 -0600 Subject: [PATCH 041/143] one mall doxygen plus more testing --- src/Actor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Actor.h b/src/Actor.h index 96792e029e..14375c2994 100644 --- a/src/Actor.h +++ b/src/Actor.h @@ -129,6 +129,7 @@ public: float aux; }; + /** @brief Various values an Actor's effect can be tied to. */ enum EffectClock { CLOCK_TIMER, From 74e45aa4324756fdab908f22abe9245699c66777 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 15:52:44 -0500 Subject: [PATCH 042/143] More doxygen. --- src/ScreenOptions.h | 26 +++++++++++++++----------- src/SpecialFiles.h | 20 ++++++++++++++++---- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/src/ScreenOptions.h b/src/ScreenOptions.h index e9ec4f93d7..8e23a14f00 100644 --- a/src/ScreenOptions.h +++ b/src/ScreenOptions.h @@ -1,4 +1,4 @@ -/* ScreenOptions - A grid of options; the selected option is drawn with a highlight rectangle. */ +/** @brief ScreenOptions - A grid of options; the selected option is drawn with a highlight rectangle. */ #ifndef SCREENOPTIONS_H #define SCREENOPTIONS_H @@ -16,15 +16,17 @@ class OptionRowHandler; AutoScreenMessage( SM_ExportOptions ) +/** @brief The list of input modes for the given row. */ enum InputMode { - INPUTMODE_INDIVIDUAL, // each player controls their own cursor - INPUTMODE_SHARE_CURSOR, // both players control the same cursor - NUM_InputMode, + INPUTMODE_INDIVIDUAL, /**< each player controls their own cursor */ + INPUTMODE_SHARE_CURSOR, /**< both players control the same cursor */ + NUM_InputMode, /**< The number of input modes available. */ InputMode_Invalid }; InputMode StringToInputMode( const RString& str ); +/** @brief A custom foreach loop for the player options for each player. */ #define FOREACH_OptionsPlayer( pn ) \ for( PlayerNumber pn=GetNextHumanPlayer((PlayerNumber)-1); pn!=PLAYER_INVALID && (m_InputMode==INPUTMODE_INDIVIDUAL || pn==0); pn=GetNextHumanPlayer(pn) ) @@ -112,12 +114,12 @@ protected: // derived classes need access to these ActorFrame m_frameContainer; AutoActor m_sprPage; - OptionsCursor m_Cursor[NUM_PLAYERS]; + OptionsCursor m_Cursor[NUM_PLAYERS]; AutoActor m_sprLineHighlight[NUM_PLAYERS]; BitmapText m_textExplanation[NUM_PLAYERS]; BitmapText m_textExplanationTogether; - DualScrollBar m_ScrollBar; + DualScrollBar m_ScrollBar; AutoActor m_sprMore; RageSound m_SoundChangeCol; @@ -131,7 +133,7 @@ protected: // derived classes need access to these ThemeMetric ROW_INIT_COMMAND; ThemeMetric ROW_ON_COMMAND; ThemeMetric ROW_OFF_COMMAND; - LuaExpressionTransform m_exprRowPositionTransformFunction; // params: self,offsetFromCenter,itemIndex,numItems + LuaExpressionTransform m_exprRowPositionTransformFunction; // params: self,offsetFromCenter,itemIndex,numItems ThemeMetric SHOW_SCROLL_BAR; ThemeMetric SCROLL_BAR_HEIGHT; ThemeMetric SCROLL_BAR_TIME; @@ -143,14 +145,16 @@ protected: // derived classes need access to these ThemeMetric ALLOW_REPEATING_CHANGE_VALUE_INPUT; ThemeMetric CURSOR_TWEEN_SECONDS; ThemeMetric WRAP_VALUE_IN_ROW; - ThemeMetric OPTION_ROW_NORMAL_METRICS_GROUP; - ThemeMetric OPTION_ROW_EXIT_METRICS_GROUP; + ThemeMetric OPTION_ROW_NORMAL_METRICS_GROUP; + ThemeMetric OPTION_ROW_EXIT_METRICS_GROUP; }; #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/SpecialFiles.h b/src/SpecialFiles.h index 193de622a0..b8ef3faa5b 100644 --- a/src/SpecialFiles.h +++ b/src/SpecialFiles.h @@ -3,10 +3,20 @@ #ifndef SpecialFiles_H #define SpecialFiles_H +/** @brief The listing of the special files and directories in use. */ namespace SpecialFiles { - extern const RString USER_PACKAGES_DIR; // user packages should be a separate dir from system packages so that we can write to it (installing a package) - extern const RString PACKAGES_DIR; // system packages (not user packages) + /** + * @brief The user packages directory. + * + * This should be separate from system packages so that + * we can write to it (installing a package). + */ + extern const RString USER_PACKAGES_DIR; + /** @brief The system packages directory. + * + * This is not the user packages directory. */ + extern const RString PACKAGES_DIR; extern const RString KEYMAPS_PATH; extern const RString PREFERENCES_INI_PATH; extern const RString THEMES_DIR; @@ -25,8 +35,10 @@ namespace SpecialFiles #endif -/* - * (c) 2003-2005 Chris Danford +/** + * @file + * @author Chris Danford (c) 2003-2005 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a From 2cce8507b42213cf60e8c05416bdfb8f07d0ca05 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 16:07:40 -0500 Subject: [PATCH 043/143] Let's see if the CIA bot works now. --- src/ScreenSelect.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/ScreenSelect.h b/src/ScreenSelect.h index efdc9e92ab..af2cb62f63 100644 --- a/src/ScreenSelect.h +++ b/src/ScreenSelect.h @@ -1,4 +1,4 @@ -/* ScreenSelect - Base class for Style, Difficulty, and Mode selection screens. */ +/** @brief ScreenSelect - Base class for Style, Difficulty, and Mode selection screens. */ #ifndef SCREEN_SELECT_H #define SCREEN_SELECT_H @@ -25,12 +25,18 @@ protected: virtual int GetSelectionIndex( PlayerNumber pn ) = 0; virtual void UpdateSelectableChoices() = 0; // derived screens must handle this - vector m_aGameCommands; // derived classes should look here for what choices are available + /** + * @brief The game commands available. + * + * Derived classes should look here for the choices. */ + vector m_aGameCommands; vector m_asSubscribedMessages; - RageTimer m_timerIdleComment; // count up to time between idle comment announcer sounds - RageTimer m_timerIdleTimeout; // count up to go to the timeout screen + /** @brief Count up to the time between idle comment announcer sounds. */ + RageTimer m_timerIdleComment; + /** @brief Count up to go to the timeout screen. */ + RageTimer m_timerIdleTimeout; ThemeMetric IDLE_COMMENT_SECONDS; ThemeMetric IDLE_TIMEOUT_SECONDS; @@ -39,8 +45,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 From 7193a9a418b4a617c1529ca506b1f479191a6e74 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 16:21:34 -0500 Subject: [PATCH 044/143] Start of doxygen-ing this file. More soon: testing something first. --- src/Song.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Song.h b/src/Song.h index 942534491c..07368fb4c5 100644 --- a/src/Song.h +++ b/src/Song.h @@ -1,4 +1,4 @@ -/* Song - Holds all music metadata and steps for one song. */ +/** @brief Song - Holds all music metadata and steps for one song. */ #ifndef SONG_H #define SONG_H @@ -260,8 +260,10 @@ private: #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 From 93bb4499877496982e81e66bd775a5cb90ad2110 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 16:27:02 -0500 Subject: [PATCH 045/143] More testing. --- src/Song.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Song.h b/src/Song.h index 07368fb4c5..d2e73163aa 100644 --- a/src/Song.h +++ b/src/Song.h @@ -23,6 +23,7 @@ const int MAX_EDITS_PER_SONG = 5*NUM_ProfileSlot; extern const int FILE_CACHE_VERSION; +/** @brief The different background layers available. */ enum BackgroundLayer { BACKGROUND_LAYER_1, @@ -31,6 +32,7 @@ enum BackgroundLayer NUM_BackgroundLayer, BACKGROUND_LAYER_Invalid }; +/** @brief A custom foreach loop for the different background layers. */ #define FOREACH_BackgroundLayer( bl ) FOREACH_ENUM( BackgroundLayer, bl ) enum InstrumentTrack From 1c8cc6e8d2822a66ed272b95b06b609563c4b57c Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 16:30:33 -0500 Subject: [PATCH 046/143] Try this again. --- src/Song.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Song.h b/src/Song.h index d2e73163aa..eff9ecab89 100644 --- a/src/Song.h +++ b/src/Song.h @@ -35,6 +35,7 @@ enum BackgroundLayer /** @brief A custom foreach loop for the different background layers. */ #define FOREACH_BackgroundLayer( bl ) FOREACH_ENUM( BackgroundLayer, bl ) +/** @brief The different instrument tracks for band type games. */ enum InstrumentTrack { InstrumentTrack_Guitar, @@ -59,11 +60,11 @@ class Song public: void SetSongDir( const RString sDir ) { m_sSongDir = sDir; } - // Set when this song should be displayed in the music wheel: + /** @brief When should this song should be displayed in the music wheel? */ enum SelectionDisplay { - SHOW_ALWAYS, // always - SHOW_NEVER // never (unless song hiding is turned off) + SHOW_ALWAYS, /**< always show on the wheel. */ + SHOW_NEVER /**< never show on the wheel (unless song hiding is turned off). */ } m_SelectionDisplay; Song(); From ce59fe80116a32b40a5737388459b62d1d09be44 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 16:39:09 -0500 Subject: [PATCH 047/143] More testing of the CIA bot. --- src/Song.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Song.h b/src/Song.h index eff9ecab89..de2b54d5b8 100644 --- a/src/Song.h +++ b/src/Song.h @@ -72,7 +72,11 @@ public: void Reset(); void DetachSteps(); - // This one assumes the song is currently empty + /** + * @brief Load a song from the chosen directory. + * + * This assumes that there is no song present right now. + * @param sDir the song directory from which to load. */ bool LoadFromSongDir( RString sDir ); // This one takes the effort to reuse Steps pointers as best as it can bool ReloadFromSongDir( RString sDir ); @@ -82,7 +86,8 @@ public: void TranslateTitles(); // called by TidyUpData bool SaveToSSCFile( RString sPath, bool bSavingCache ); - void Save(); // saves SSC and SM guaranteed. + /** @brief Save to the SSC and SM files no matter what. */ + void Save(); bool SaveToCacheFile(); bool SaveToSMFile(); bool SaveToDWIFile(); From 977b4857fb9a68d309c450d32a7d875fd7bb0585 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 17:04:21 -0500 Subject: [PATCH 048/143] More doxygen. --- src/Song.h | 42 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/src/Song.h b/src/Song.h index de2b54d5b8..7c8f845966 100644 --- a/src/Song.h +++ b/src/Song.h @@ -85,6 +85,11 @@ public: void ReCalculateRadarValuesAndLastBeat(); // called by TidyUpData, and after saving void TranslateTitles(); // called by TidyUpData + /** + * @brief Save to the new SSC file format. + * @param sPath the path where we're saving the file. + * @param bSavingCache a flag to determine if we're saving cache data. + */ bool SaveToSSCFile( RString sPath, bool bSavingCache ); /** @brief Save to the SSC and SM files no matter what. */ void Save(); @@ -96,15 +101,23 @@ public: RString GetCacheFilePath() const; void AddAutoGenNotes(); - void AutoGen( StepsType ntTo, StepsType ntFrom ); // create Steps of type ntTo from Steps of type ntFrom + /** + * @brief Automatically generate steps from one type to another. + * @param ntTo the StepsType we're making. + * @param ntFrom the StepsType we're generating from. + */ + void AutoGen( StepsType ntTo, StepsType ntFrom ); void RemoveAutoGenNotes(); // Directory this song data came from: const RString &GetSongDir() const { return m_sSongDir; } - /* Filename associated with this file. This will always have a .SSC - * extension. If we loaded a .SSC, this will point to it, but if we loaded - * any other type, this will point to a generated .SSC filename. */ + /** + * @brief Filename associated with this file. + * + * This will always have a .SSC extension. If we loaded a .SSC, + * this will point to it, but if we loaded any other type, + * this will point to a generated .SSC filename. */ RString m_sSongFileName; RString m_sGroupName; @@ -131,12 +144,15 @@ public: RString GetDisplayFullTitle() const; RString GetTranslitFullTitle() const; - // allow versioning with the song. + /** @brief The version of the song/file. */ float m_fVersion; RString m_sGenre; - // This is read and saved, but never actually used. + /** + * @brief The person who worked with the song file who should be credited. + * + * This is read and saved, but never actually used. */ RString m_sCredit; RString m_sMusicFile; @@ -156,6 +172,7 @@ public: //RString m_sJacketFile; // typically square (e.g. 192x192, 256x256) //RString m_sCDFile; // square (e.g. 128x128 [DDR 1st-3rd]) //RString m_sDiscFile; // rectangular (e.g. 256x192 [Pump], 200x150 [MGD3]) + /** @brief The location of the lyrics file, if it exists. */ RString m_sLyricsFile; RString m_sBackgroundFile; RString m_sCDTitleFile; @@ -204,7 +221,11 @@ public: const vector &GetForegroundChanges() const; vector &GetForegroundChanges(); - vector m_LyricSegments; // this must be sorted before gameplay + /** + * @brief The list of LyricSegments. + * + * This must be sorted before gameplay. */ + vector m_LyricSegments; void AddBPMSegment( const BPMSegment &seg ) { m_Timing.AddBPMSegment( seg ); } void AddStopSegment( const StopSegment &seg ) { m_Timing.AddStopSegment( seg ); } @@ -240,7 +261,12 @@ public: bool NormallyDisplayed() const; bool ShowInDemonstrationAndRanking() const; - void AddSteps( Steps* pSteps ); // we are responsible for deleting the memory pointed to by pSteps! + /** + * @brief Add the chosen Steps to the Song. + * + * We are responsible for deleting the memory pointed to by pSteps! + * @param pSteps the new steps. */ + void AddSteps( Steps* pSteps ); void DeleteSteps( const Steps* pSteps, bool bReAutoGen = true ); void FreeAllLoadedFromProfile( ProfileSlot slot = ProfileSlot_Invalid, const set *setInUse = NULL ); From bcac26f0d27cbded03e7e4188c4334ad22ff22e6 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 17:08:46 -0500 Subject: [PATCH 049/143] Quiet 64-bit to 32-bit warning. Revert this if it causes problems with ffmpeg. --- src/ffmpeg/include/ffmpeg/rational.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ffmpeg/include/ffmpeg/rational.h b/src/ffmpeg/include/ffmpeg/rational.h index 63c0b150f2..23da2e2421 100644 --- a/src/ffmpeg/include/ffmpeg/rational.h +++ b/src/ffmpeg/include/ffmpeg/rational.h @@ -46,7 +46,7 @@ typedef struct AVRational{ static inline int av_cmp_q(AVRational a, AVRational b){ const int64_t tmp= a.num * (int64_t)b.den - b.num * (int64_t)a.den; - if(tmp) return (tmp>>63)|1; + if(tmp) return (int)((tmp>>63)|1); else return 0; } From 255209685c826ff72075204daaebca42bb8905df Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 17:31:35 -0500 Subject: [PATCH 050/143] More doxygen. --- src/Song.cpp | 9 +++++++-- src/Song.h | 46 +++++++++++++++++++++++++++++++++++----------- 2 files changed, 42 insertions(+), 13 deletions(-) diff --git a/src/Song.cpp b/src/Song.cpp index be2852325b..0906ee7f6d 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -38,13 +38,18 @@ /** @brief The version of the .ssc file format. */ const static float VERSION_NUMBER = 0.52f; -const int FILE_CACHE_VERSION = 164; // increment this to invalidate cache +/** + * @brief The internal version of the cache for StepMania. + * + * Increment this value to invalidate the current cache. */ +const int FILE_CACHE_VERSION = 164; +/** @brief How long does a song sample last by default? */ const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f; static Preference g_fLongVerSongSeconds( "LongVerSongSeconds", 60*2.5f ); static Preference g_fMarathonVerSongSeconds( "MarathonVerSongSeconds", 60*5.f ); -static Preference g_BackUpAllSongSaves( "BackUpAllSongSaves", false ); +static Preference g_BackUpAllSongSaves( "BackUpAllSongSaves", false ); static const char *InstrumentTrackNames[] = { "Guitar", diff --git a/src/Song.h b/src/Song.h index 7c8f845966..360eb8f129 100644 --- a/src/Song.h +++ b/src/Song.h @@ -18,7 +18,9 @@ class StepsID; struct lua_State; struct BackgroundChange; +/** @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? */ const int MAX_EDITS_PER_SONG = 5*NUM_ProfileSlot; extern const int FILE_CACHE_VERSION; @@ -47,11 +49,12 @@ enum InstrumentTrack const RString& InstrumentTrackToString( InstrumentTrack it ); InstrumentTrack StringToInstrumentTrack( const RString& s ); +/** @brief The collection of lyrics for the Song. */ struct LyricSegment { - float m_fStartTime; - RString m_sLyric; - RageColor m_Color; + float m_fStartTime; /** @brief When does the lyric show up? */ + RString m_sLyric; /** @brief The lyrics themselves. */ + RageColor m_Color; /** @brief The color of the lyrics. */ }; class Song @@ -81,9 +84,19 @@ public: // This one takes the effort to reuse Steps pointers as best as it can bool ReloadFromSongDir( RString sDir ); - void TidyUpData(); // call after loading to clean up invalid data - void ReCalculateRadarValuesAndLastBeat(); // called by TidyUpData, and after saving - void TranslateTitles(); // called by TidyUpData + /** @brief Call this after loading a song to clean up invalid data. */ + void TidyUpData(); + + /** + * @brief Get the new radar values, and determine the last beat at the same time. + * + * This is called by TidyUpData, after saving the Song. */ + void ReCalculateRadarValuesAndLastBeat(); + /** + * @brief Translate any titles that aren't in english. + * + * This is called by TidyUpData. */ + void TranslateTitles(); /** * @brief Save to the new SSC file format. @@ -93,8 +106,17 @@ public: bool SaveToSSCFile( RString sPath, bool bSavingCache ); /** @brief Save to the SSC and SM files no matter what. */ void Save(); + /** + * @brief Save the current Song to a cache file using the preferred format. + * @return its success or failure. */ bool SaveToCacheFile(); + /** + * @brief Save the current Song to a SM file. + * @return its success or failure. */ bool SaveToSMFile(); + /** + * @brief Save the current Song to a DWI file if possible. + * @return its success or failure. */ bool SaveToDWIFile(); const RString &GetSongFilePath() const; @@ -275,11 +297,13 @@ public: int GetNumStepsLoadedFromProfile( ProfileSlot slot ) const; bool IsEditAlreadyLoaded( Steps* pSteps ) const; - // An array of keysound file names (e.g. "beep.wav"). - // The index in this array corresponds to the index in TapNote. If you - // change the index in here, you must change all NoteData too. - // Any note that doesn't have a value in the range of this array - // means "this note doesn't have a keysound". + /** + * @brief An array of keysound file names (e.g. "beep.wav"). + * + * The index in this array corresponds to the index in TapNote. If you + * change the index in here, you must change all NoteData too. + * Any note that doesn't have a value in the range of this array + * means "this note doesn't have a keysound". */ vector m_vsKeysoundFile; CachedObject m_CachedObject; From 4621c132431f51c441785aa6386e0889c0b3aa90 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 17:47:46 -0500 Subject: [PATCH 051/143] The usual. --- src/Font.h | 2 +- src/ScreenGameplay.h | 46 ++++++++++++++++++++++++++++++-------------- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/src/Font.h b/src/Font.h index c47b22efb5..3582556655 100644 --- a/src/Font.h +++ b/src/Font.h @@ -88,7 +88,7 @@ struct FontPageSettings { } /** - * @briefMap a range from a character map to glyphs. + * @brief Map a range from a character map to glyphs. * @param sMapping the intended mapping. * @param iMapOffset the number of maps to offset. * @param iGlyphOffset the number of glyphs to offset. diff --git a/src/ScreenGameplay.h b/src/ScreenGameplay.h index 84dccd5a40..895f537000 100644 --- a/src/ScreenGameplay.h +++ b/src/ScreenGameplay.h @@ -1,4 +1,4 @@ -/* ScreenGameplay - The music plays, the notes scroll, and the Player is pressing buttons. */ +/** @brief ScreenGameplay - The music plays, the notes scroll, and the Player is pressing buttons. */ #ifndef SCREEN_GAMEPLAY_H #define SCREEN_GAMEPLAY_H @@ -46,11 +46,15 @@ public: void Load( PlayerNumber pn, MultiPlayer mp, bool bShowNoteField, int iAddToDifficulty ); void LoadDummyP1( int iDummyIndex, int iAddToDifficulty ); + /** @brief The player has lost all of their lives: show the special game over. */ void ShowOniGameOver(); MultiPlayer GetPlayerStateAndStageStatsIndex() { return m_pn == PLAYER_INVALID ? m_mp : (MultiPlayer)m_pn; } PlayerState *GetPlayerState(); PlayerStageStats *GetPlayerStageStats(); PlayerNumber GetStepsAndTrailIndex() { return m_pn == PLAYER_INVALID ? PLAYER_1 : m_pn; } + /** + * @brief Determine if the player information is enabled. + * @return its success or failure. */ bool IsEnabled(); bool IsMultiPlayer() const { return m_mp != MultiPlayer_Invalid; } RString GetName() const @@ -66,13 +70,13 @@ public: // Lua void PushSelf( lua_State *L ); - PlayerNumber m_pn; - MultiPlayer m_mp; - bool m_bIsDummy; + PlayerNumber m_pn; + MultiPlayer m_mp; + bool m_bIsDummy; int m_iDummyIndex; int m_iAddToDifficulty; // if > 0, use the Nth harder Steps - bool m_bPlayerEnabled; // IsEnabled cache for iterators - PlayerState m_PlayerStateDummy; + bool m_bPlayerEnabled; // IsEnabled cache for iterators + PlayerState m_PlayerStateDummy; PlayerStageStats m_PlayerStageStatsDummy; SoundEffectControl m_SoundEffectControl; @@ -83,8 +87,8 @@ public: BitmapText *m_ptextCourseSongNumber; BitmapText *m_ptextStepsDescription; - ScoreDisplay *m_pPrimaryScoreDisplay; - ScoreDisplay *m_pSecondaryScoreDisplay; + ScoreDisplay *m_pPrimaryScoreDisplay; + ScoreDisplay *m_pSecondaryScoreDisplay; ScoreKeeper *m_pPrimaryScoreKeeper; ScoreKeeper *m_pSecondaryScoreKeeper; BitmapText *m_ptextPlayerOptions; @@ -93,7 +97,10 @@ public: NoteData m_NoteData; Player *m_pPlayer; - // used in PLAY_MODE_BATTLE + /** + * @brief The inventory of attacks. + * + * This is mainly used in PLAY_MODE_BATTLE. */ Inventory *m_pInventory; StepsDisplay *m_pStepsDisplay; @@ -190,7 +197,11 @@ protected: bool m_bPaused; GameController m_PauseController; - vector m_apSongsQueue; // size may be >1 if playing a course + /** + * @brief The songs left to play. + * + * The size can be greater than 1 if playing a course. */ + vector m_apSongsQueue; float m_fTimeSinceLastDancingComment; // this counter is only running while STATE_DANCING @@ -199,7 +210,8 @@ protected: Background *m_pSongBackground; Foreground *m_pSongForeground; - Transition m_NextSong; // shows between songs in a course + /** @brief Used between songs in a course to show the next song. */ + Transition m_NextSong; CombinedLifeMeter* m_pCombinedLifeMeter; @@ -218,7 +230,11 @@ protected: Transition m_Failed; Transition m_Toasty; // easter egg - BitmapText m_textSurviveTime; // used in extra stage. TODO: Move this into a BGA + /** + * @brief How much time has the player survived in the extra stage? + * + * TODO: Move this into a BGA. */ + BitmapText m_textSurviveTime; AutoKeysounds m_AutoKeysounds; @@ -258,8 +274,10 @@ vector::iterator GetNextVisiblePlayerInfo ( vector::ite #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 From e3e6eae012ca711c2504b977bf572bfe2a47e48f Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 20:35:49 -0500 Subject: [PATCH 052/143] More doxygen. Start of AutoScreenMessage( * ); The lack of semicolon messes up the doc generator. --- src/Screen.h | 52 ++++++++++++++++++++++++++++++-------------- src/ScreenGameplay.h | 47 ++++++++++++++++++++++++++++++++------- 2 files changed, 75 insertions(+), 24 deletions(-) diff --git a/src/Screen.h b/src/Screen.h index 837d4114c5..e230958714 100644 --- a/src/Screen.h +++ b/src/Screen.h @@ -1,5 +1,3 @@ -/* Screen - Class that holds a screen-full of Actors. */ - #ifndef SCREEN_H #define SCREEN_H @@ -22,18 +20,20 @@ struct RegisterScreenClass { RegisterScreenClass( const RString &sClassName, Cre static Screen* Create##className( const RString &sName ) { LuaThreadVariable var( "LoadingScreen", sName ); Screen *pRet = new className; pRet->SetName( sName ); Screen::InitScreen( pRet ); return pRet; } \ static RegisterScreenClass register_##className( #className, Create##className ) +/** @brief The different types of screens available. */ enum ScreenType { - attract, - game_menu, - gameplay, - system_menu, - NUM_ScreenType, + attract, /**< The attract/demo mode, inviting players to play. */ + game_menu, /**< The menu screens, where options can be set before playing. */ + gameplay, /**< The gameplay screen, where the actual game takes place. */ + system_menu, /**< The system/operator menu, where special options are set. */ + NUM_ScreenType, /**< The number of screen types. */ ScreenType_Invalid }; const RString& ScreenTypeToString( ScreenType st ); LuaDeclareType( ScreenType ); +/** @brief Class that holds a screen-full of Actors. */ class Screen : public ActorFrame { public: @@ -41,14 +41,17 @@ public: virtual ~Screen(); - /* This is called immediately after construction, to allow initializing after all - * derived classes exist. (Don't call it directly; use InitScreen.) */ + /** + * @brief This is called immediately after construction, + * to allow initializing after all derived classes exist. + * + * Don't call it directly; use InitScreen instead. */ virtual void Init(); - // This is called immediately before the screen is used. + /** @brief This is called immediately before the screen is used. */ virtual void BeginScreen(); - // This is called when the screen is popped. + /** @brief This is called when the screen is popped. */ virtual void EndScreen(); virtual void Update( float fDeltaTime ); @@ -58,34 +61,49 @@ public: void SetLockInputSecs( float f ) { m_fLockInputSecs = f; } void PostScreenMessage( const ScreenMessage SM, float fDelay ); + /** @brief Clear the entire message queue. */ void ClearMessageQueue(); - void ClearMessageQueue( const ScreenMessage SM ); // clear of a specific SM + /** + * @brief Clear the message queue of a specific ScreenMessage. + * @param SM the specific ScreenMessage to get out of the Queue. */ + void ClearMessageQueue( const ScreenMessage SM ); virtual ScreenType GetScreenType() const { return ALLOW_OPERATOR_MENU_BUTTON ? game_menu : system_menu; } bool AllowOperatorMenuButton() const { return ALLOW_OPERATOR_MENU_BUTTON; } + /** + * @brief Determine if we allow extra players to join in on this screen. + * @return false, for players should never be able to join while in progress. */ virtual bool AllowLateJoin() const { return false; } // Lua virtual void PushSelf( lua_State *L ); protected: - // structure for holding messages sent to a Screen + /** @brief Holds the messages sent to a Screen. */ struct QueuedScreenMessage { + /** @brief The message being held. */ ScreenMessage SM; + /** @brief How long the message is up. */ float fDelayRemaining; }; + /** @brief The list of messages that are sent to a Screen. */ vector m_QueuedMessages; static bool SortMessagesByDelayRemaining(const QueuedScreenMessage &m1, const QueuedScreenMessage &m2); InputQueueCodeSet m_Codes; + /** @brief Do we allow the operator menu button to be pressed here? */ ThemeMetric ALLOW_OPERATOR_MENU_BUTTON; + /** @brief Do we handle the back button being pressed here? */ ThemeMetric HANDLE_BACK_BUTTON; ThemeMetric REPEAT_RATE; ThemeMetric REPEAT_DELAY; ThemeMetric LIGHTS_MODE; - // If left blank, the NextScreen metric will be used. + /** + * @brief The next screen to go to once this screen is done. + * + * If this is blank, the NextScreen metric will be used. */ RString m_sNextScreen; RString m_sPrevScreen; ScreenMessage m_smSendOnPop; @@ -112,8 +130,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/ScreenGameplay.h b/src/ScreenGameplay.h index 895f537000..0ee6a7d5f3 100644 --- a/src/ScreenGameplay.h +++ b/src/ScreenGameplay.h @@ -1,5 +1,3 @@ -/** @brief ScreenGameplay - The music plays, the notes scroll, and the Player is pressing buttons. */ - #ifndef SCREEN_GAMEPLAY_H #define SCREEN_GAMEPLAY_H @@ -33,9 +31,9 @@ class ScoreKeeper; class Background; class Foreground; -AutoScreenMessage( SM_NotesEnded ) -AutoScreenMessage( SM_BeginFailed ) -AutoScreenMessage( SM_LeaveGameplay ) +AutoScreenMessage( SM_NotesEnded ); +AutoScreenMessage( SM_BeginFailed ); +AutoScreenMessage( SM_LeaveGameplay ); class PlayerInfo { @@ -48,6 +46,10 @@ public: /** @brief The player has lost all of their lives: show the special game over. */ void ShowOniGameOver(); + /** + * @brief Retrieve the player's state and stage stats index. + * @return the player's state and stage stats index. + */ MultiPlayer GetPlayerStateAndStageStatsIndex() { return m_pn == PLAYER_INVALID ? m_mp : (MultiPlayer)m_pn; } PlayerState *GetPlayerState(); PlayerStageStats *GetPlayerStageStats(); @@ -56,6 +58,9 @@ public: * @brief Determine if the player information is enabled. * @return its success or failure. */ bool IsEnabled(); + /** + * @brief Determine if we're in MultiPlayer. + * @return true if it is MultiPlayer, false otherwise. */ bool IsMultiPlayer() const { return m_mp != MultiPlayer_Invalid; } RString GetName() const { @@ -70,6 +75,7 @@ public: // Lua void PushSelf( lua_State *L ); + /** @brief The present Player that is playing the game. */ PlayerNumber m_pn; MultiPlayer m_mp; bool m_bIsDummy; @@ -80,20 +86,38 @@ public: PlayerStageStats m_PlayerStageStatsDummy; SoundEffectControl m_SoundEffectControl; - vector m_vpStepsQueue; // size may be >1 if playing a course - vector m_asModifiersQueue;// size may be >1 if playing a course + /** + * @brief The list of Steps a player has to go through in this set. + * + * The size may be greater than 1 if playing a course. */ + vector m_vpStepsQueue; + /** + * @brief The list of attack modifiers a player has to go through in this set. + * + * The size may be greater than 1 if playing a course. */ + vector m_asModifiersQueue; + /** @brief The LifeMeter showing a Player's health. */ LifeMeter *m_pLifeMeter; + /** @brief The current Song number in a Course. */ BitmapText *m_ptextCourseSongNumber; + /** @brief The description of the current Steps. */ BitmapText *m_ptextStepsDescription; + /** @brief The display for the primary ScoreKeeper. */ ScoreDisplay *m_pPrimaryScoreDisplay; + /** @brief The display for the secondary ScoreKeeper. */ ScoreDisplay *m_pSecondaryScoreDisplay; + /** @brief The primary ScoreKeeper for keeping track of the score. */ ScoreKeeper *m_pPrimaryScoreKeeper; + /** @brief The secondary ScoreKeeper for keeping track of the score. */ ScoreKeeper *m_pSecondaryScoreKeeper; + /** @brief The current PlayerOptions that are activated. */ BitmapText *m_ptextPlayerOptions; + /** @brief The current attack modifiers that are in play for the moment. */ ActiveAttackList *m_pActiveAttackList; + /** @brief The NoteData the Player has to get through. */ NoteData m_NoteData; Player *m_pPlayer; @@ -103,11 +127,12 @@ public: * This is mainly used in PLAY_MODE_BATTLE. */ Inventory *m_pInventory; - StepsDisplay *m_pStepsDisplay; + StepsDisplay *m_pStepsDisplay; AutoActor m_sprOniGameOver; }; +/** @brief The music plays, the notes scroll, and the Player is pressing buttons. */ class ScreenGameplay : public ScreenWithMenuElements { public: @@ -122,8 +147,14 @@ public: virtual void HandleMessage( const Message &msg ); virtual void Cancel( ScreenMessage smSendWhenDone ); + /** + * @brief Retrieve the current ScreenType. + * @return the gameplay ScreenType. */ virtual ScreenType GetScreenType() const { return gameplay; } + /** + * @brief Determine if we are to center the columns for just one player. + * @return true if we center the solo player, false otherwise. */ bool Center1Player() const; // Lua From 00257e79958d8edafbd4a65b22e11f2234e596f7 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 20:40:51 -0500 Subject: [PATCH 053/143] Consistent semicolon use. This is C++, not Python! --- src/MusicWheel.cpp | 2 +- src/NetworkSyncManager.cpp | 2 +- src/RoomInfoDisplay.cpp | 4 ++-- src/RoomWheel.cpp | 6 +++--- src/ScreenAttract.h | 2 +- src/ScreenEditMenu.cpp | 4 ++-- src/ScreenEvaluation.cpp | 2 +- src/ScreenGameplay.cpp | 14 +++++++------- src/ScreenMessage.h | 2 +- src/ScreenMiniMenu.cpp | 4 ++-- src/ScreenNetEvaluation.cpp | 2 +- src/ScreenNetRoom.cpp | 14 +++++++------- src/ScreenNetSelectBase.cpp | 6 +++--- src/ScreenNetSelectMusic.cpp | 16 ++++++++-------- src/ScreenNetworkOptions.cpp | 2 +- src/ScreenOptions.h | 2 +- src/ScreenOptionsCourseOverview.cpp | 6 +++--- src/ScreenOptionsManageEditSteps.cpp | 6 +++--- src/ScreenOptionsManageProfiles.cpp | 10 +++++----- src/ScreenPackages.cpp | 2 +- src/ScreenRanking.cpp | 4 ++-- src/ScreenSMOnlineLogin.cpp | 6 +++--- src/ScreenSelectMaster.cpp | 2 +- src/ScreenSelectMusic.cpp | 11 ++++++----- src/ScreenTestFonts.cpp | 4 +++- src/WheelBase.cpp | 2 +- 26 files changed, 70 insertions(+), 67 deletions(-) diff --git a/src/MusicWheel.cpp b/src/MusicWheel.cpp index 9c81215790..2c31041280 100644 --- a/src/MusicWheel.cpp +++ b/src/MusicWheel.cpp @@ -30,7 +30,7 @@ static Preference g_bMoveRandomToEnd( "MoveRandomToEnd", false ); static RString SECTION_COLORS_NAME( size_t i ) { return ssprintf("SectionColor%d",int(i+1)); } static RString CHOICE_NAME( RString s ) { return ssprintf("Choice%s",s.c_str()); } -AutoScreenMessage( SM_SongChanged ) // TODO: Replace this with a Message and MESSAGEMAN +AutoScreenMessage( SM_SongChanged ); // TODO: Replace this with a Message and MESSAGEMAN AutoScreenMessage( SM_SortOrderChanging ); AutoScreenMessage( SM_SortOrderChanged ); diff --git a/src/NetworkSyncManager.cpp b/src/NetworkSyncManager.cpp index c762fa3239..6ef6f83c2a 100644 --- a/src/NetworkSyncManager.cpp +++ b/src/NetworkSyncManager.cpp @@ -43,7 +43,7 @@ void NetworkSyncManager::GetListOfLANServers( vector& AllServers #include "PlayerState.h" #include "CryptManager.h" -AutoScreenMessage( SM_AddToChat ) +AutoScreenMessage( SM_AddToChat ); AutoScreenMessage( SM_ChangeSong ); AutoScreenMessage( SM_GotEval ); AutoScreenMessage( SM_UsersUpdate ); diff --git a/src/RoomInfoDisplay.cpp b/src/RoomInfoDisplay.cpp index b86f3b33e2..0a2bc9b977 100644 --- a/src/RoomInfoDisplay.cpp +++ b/src/RoomInfoDisplay.cpp @@ -5,8 +5,8 @@ #include "NetworkSyncManager.h" #include "LocalizedString.h" -AutoScreenMessage( SM_RoomInfoRetract ) -AutoScreenMessage( SM_RoomInfoDeploy ) +AutoScreenMessage( SM_RoomInfoRetract ); +AutoScreenMessage( SM_RoomInfoDeploy ); static LocalizedString LAST_ROUND_INFO ( "RoomInfoDisplay", "Last Round Info:" ); static LocalizedString ROOM_NAME ( "RoomInfoDisplay", "Room Name:" ); diff --git a/src/RoomWheel.cpp b/src/RoomWheel.cpp index 77d9087676..9013068fbd 100644 --- a/src/RoomWheel.cpp +++ b/src/RoomWheel.cpp @@ -8,9 +8,9 @@ #include "ScreenManager.h" #include "ActorUtil.h" -AutoScreenMessage( SM_BackFromRoomName ) -AutoScreenMessage( SM_RoomInfoRetract ) -AutoScreenMessage( SM_RoomInfoDeploy ) +AutoScreenMessage( SM_BackFromRoomName ); +AutoScreenMessage( SM_RoomInfoRetract ); +AutoScreenMessage( SM_RoomInfoDeploy ); RoomWheel::~RoomWheel() { diff --git a/src/ScreenAttract.h b/src/ScreenAttract.h index 68a2837836..a4494b3d7f 100644 --- a/src/ScreenAttract.h +++ b/src/ScreenAttract.h @@ -5,7 +5,7 @@ #include "ScreenWithMenuElements.h" -AutoScreenMessage( SM_GoToStartScreen ) +AutoScreenMessage( SM_GoToStartScreen ); class ScreenAttract : public ScreenWithMenuElements { diff --git a/src/ScreenEditMenu.cpp b/src/ScreenEditMenu.cpp index 7a8e6d9e40..961e793120 100644 --- a/src/ScreenEditMenu.cpp +++ b/src/ScreenEditMenu.cpp @@ -24,8 +24,8 @@ static const RString TEMP_FILE_NAME = "--temp--"; #define EXPLANATION_TEXT( row ) THEME->GetString(m_sName,"Explanation"+EditMenuRowToString(row)) #define EDIT_MENU_TYPE THEME->GetMetric(m_sName,"EditMenuType") -AutoScreenMessage( SM_RefreshSelector ) -AutoScreenMessage( SM_BackFromEditDescription ) +AutoScreenMessage( SM_RefreshSelector ); +AutoScreenMessage( SM_BackFromEditDescription ); REGISTER_SCREEN_CLASS( ScreenEditMenu ); diff --git a/src/ScreenEvaluation.cpp b/src/ScreenEvaluation.cpp index fa28f8fb5b..ee24a8187c 100644 --- a/src/ScreenEvaluation.cpp +++ b/src/ScreenEvaluation.cpp @@ -74,7 +74,7 @@ XToString( DetailLine ); static const int NUM_SHOWN_RADAR_CATEGORIES = 5; -AutoScreenMessage( SM_PlayCheer ) +AutoScreenMessage( SM_PlayCheer ); REGISTER_SCREEN_CLASS( ScreenEvaluation ); void ScreenEvaluation::Init() diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index 7978ab8b8c..a885fc37cb 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -71,19 +71,19 @@ static ThemeMetric INITIAL_BACKGROUND_BRIGHTNESS ("ScreenGameplay","Initi static ThemeMetric SECONDS_BETWEEN_COMMENTS ("ScreenGameplay","SecondsBetweenComments"); static ThemeMetric SCORE_KEEPER_CLASS ("ScreenGameplay","ScoreKeeperClass"); -AutoScreenMessage( SM_PlayGo ) +AutoScreenMessage( SM_PlayGo ); // received while STATE_DANCING -AutoScreenMessage( SM_LoadNextSong ) -AutoScreenMessage( SM_StartLoadingNextSong ) +AutoScreenMessage( SM_LoadNextSong ); +AutoScreenMessage( SM_StartLoadingNextSong ); // received while STATE_OUTRO -AutoScreenMessage( SM_DoPrevScreen ) -AutoScreenMessage( SM_DoNextScreen ) +AutoScreenMessage( SM_DoPrevScreen ); +AutoScreenMessage( SM_DoNextScreen ); // received while STATE_INTRO -AutoScreenMessage( SM_StartHereWeGo ) -AutoScreenMessage( SM_StopHereWeGo ) +AutoScreenMessage( SM_StartHereWeGo ); +AutoScreenMessage( SM_StopHereWeGo ); AutoScreenMessage( SM_BattleTrickLevel1 ); AutoScreenMessage( SM_BattleTrickLevel2 ); diff --git a/src/ScreenMessage.h b/src/ScreenMessage.h index 9f92f4f8f0..de01907747 100644 --- a/src/ScreenMessage.h +++ b/src/ScreenMessage.h @@ -26,7 +26,7 @@ namespace ScreenMessageHelpers // Automatically generate a unique ScreenMessage value #define AutoScreenMessage( x ) \ - const ScreenMessage x = ScreenMessageHelpers::ToScreenMessage( #x ); + const ScreenMessage x = ScreenMessageHelpers::ToScreenMessage( #x ) #endif diff --git a/src/ScreenMiniMenu.cpp b/src/ScreenMiniMenu.cpp index b318616bbd..0139716d92 100644 --- a/src/ScreenMiniMenu.cpp +++ b/src/ScreenMiniMenu.cpp @@ -10,8 +10,8 @@ #include "OptionRowHandler.h" #include "PrefsManager.h" -AutoScreenMessage( SM_GoToOK ) -AutoScreenMessage( SM_GoToCancel ) +AutoScreenMessage( SM_GoToOK ); +AutoScreenMessage( SM_GoToCancel ); bool ScreenMiniMenu::s_bCancelled = false; int ScreenMiniMenu::s_iLastRowCode = -1; diff --git a/src/ScreenNetEvaluation.cpp b/src/ScreenNetEvaluation.cpp index 247d4b79c4..99199e0d8a 100644 --- a/src/ScreenNetEvaluation.cpp +++ b/src/ScreenNetEvaluation.cpp @@ -19,7 +19,7 @@ static const int NUM_SCORE_DIGITS = 9; #define MAX_COMBO_NUM_DIGITS THEME->GetMetricI("ScreenEvaluation","MaxComboNumDigits") -static AutoScreenMessage( SM_GotEval ) +static AutoScreenMessage( SM_GotEval ); REGISTER_SCREEN_CLASS( ScreenNetEvaluation ); diff --git a/src/ScreenNetRoom.cpp b/src/ScreenNetRoom.cpp index e6d7362977..db99a368aa 100644 --- a/src/ScreenNetRoom.cpp +++ b/src/ScreenNetRoom.cpp @@ -11,13 +11,13 @@ #include "InputEventPlus.h" #include "LocalizedString.h" -AutoScreenMessage( SM_SMOnlinePack ) -AutoScreenMessage( SM_BackFromRoomName ) -AutoScreenMessage( SM_BackFromRoomDesc ) -AutoScreenMessage( SM_BackFromRoomPass ) -AutoScreenMessage( SM_BackFromReqPass ) -AutoScreenMessage( SM_RoomInfoRetract ) -AutoScreenMessage( SM_RoomInfoDeploy ) +AutoScreenMessage( SM_SMOnlinePack ); +AutoScreenMessage( SM_BackFromRoomName ); +AutoScreenMessage( SM_BackFromRoomDesc ); +AutoScreenMessage( SM_BackFromRoomPass ); +AutoScreenMessage( SM_BackFromReqPass ); +AutoScreenMessage( SM_RoomInfoRetract ); +AutoScreenMessage( SM_RoomInfoDeploy ); static LocalizedString ENTER_ROOM_DESCRIPTION ("ScreenNetRoom","Enter a description for the room:"); static LocalizedString ENTER_ROOM_PASSWORD ("ScreenNetRoom","Enter a password for the room (blank, no password):"); diff --git a/src/ScreenNetSelectBase.cpp b/src/ScreenNetSelectBase.cpp index 5d7cf813e6..8dfd75f7c3 100644 --- a/src/ScreenNetSelectBase.cpp +++ b/src/ScreenNetSelectBase.cpp @@ -26,9 +26,9 @@ #define USER_SPACING_X THEME->GetMetricF(m_sName,"UserSpacingX") #define USER_ADD_Y THEME->GetMetricF(m_sName,"UserLine2Y") -AutoScreenMessage( SM_AddToChat ) -AutoScreenMessage( SM_UsersUpdate ) -AutoScreenMessage( SM_SMOnlinePack ) +AutoScreenMessage( SM_AddToChat ); +AutoScreenMessage( SM_UsersUpdate ); +AutoScreenMessage( SM_SMOnlinePack ); REGISTER_SCREEN_CLASS( ScreenNetSelectBase ); diff --git a/src/ScreenNetSelectMusic.cpp b/src/ScreenNetSelectMusic.cpp index 4cbc1e8733..a1969836fe 100644 --- a/src/ScreenNetSelectMusic.cpp +++ b/src/ScreenNetSelectMusic.cpp @@ -26,14 +26,14 @@ #include "SongManager.h" #include "CodeDetector.h" -AutoScreenMessage( SM_NoSongs ) -AutoScreenMessage( SM_ChangeSong ) -AutoScreenMessage( SM_SMOnlinePack ) -AutoScreenMessage( SM_SetWheelSong ) -AutoScreenMessage( SM_RefreshWheelLocation ) -AutoScreenMessage( SM_SongChanged ) -AutoScreenMessage( SM_UsersUpdate ) -AutoScreenMessage( SM_BackFromPlayerOptions ) +AutoScreenMessage( SM_NoSongs ); +AutoScreenMessage( SM_ChangeSong ); +AutoScreenMessage( SM_SMOnlinePack ); +AutoScreenMessage( SM_SetWheelSong ); +AutoScreenMessage( SM_RefreshWheelLocation ); +AutoScreenMessage( SM_SongChanged ); +AutoScreenMessage( SM_UsersUpdate ); +AutoScreenMessage( SM_BackFromPlayerOptions ); REGISTER_SCREEN_CLASS( ScreenNetSelectMusic ); diff --git a/src/ScreenNetworkOptions.cpp b/src/ScreenNetworkOptions.cpp index 51d8dff800..c90545523e 100644 --- a/src/ScreenNetworkOptions.cpp +++ b/src/ScreenNetworkOptions.cpp @@ -36,7 +36,7 @@ enum DisplayScoreboard NO_SCOREBOARD_ON }; -AutoScreenMessage( SM_DoneConnecting ) +AutoScreenMessage( SM_DoneConnecting ); Preference g_sLastServer( "LastConnectedServer", "" ); diff --git a/src/ScreenOptions.h b/src/ScreenOptions.h index 8e23a14f00..d9d96273d4 100644 --- a/src/ScreenOptions.h +++ b/src/ScreenOptions.h @@ -14,7 +14,7 @@ class OptionRowHandler; -AutoScreenMessage( SM_ExportOptions ) +AutoScreenMessage( SM_ExportOptions ); /** @brief The list of input modes for the given row. */ enum InputMode diff --git a/src/ScreenOptionsCourseOverview.cpp b/src/ScreenOptionsCourseOverview.cpp index 21ed2b4ca3..65219a6c53 100644 --- a/src/ScreenOptionsCourseOverview.cpp +++ b/src/ScreenOptionsCourseOverview.cpp @@ -57,9 +57,9 @@ static LocalizedString ERROR_DELETING_FILE ("ScreenOptionsCourseOverview", static LocalizedString COURSE_WILL_BE_LOST ("ScreenOptionsCourseOverview", "This course will be lost permanently."); static LocalizedString CONTINUE_WITH_DELETE ("ScreenOptionsCourseOverview", "Continue with delete?"); -AutoScreenMessage( SM_BackFromEnterName ) -AutoScreenMessage( SM_BackFromRename ) -AutoScreenMessage( SM_BackFromDelete ) +AutoScreenMessage( SM_BackFromEnterName ); +AutoScreenMessage( SM_BackFromRename ); +AutoScreenMessage( SM_BackFromDelete ); void ScreenOptionsCourseOverview::Init() { diff --git a/src/ScreenOptionsManageEditSteps.cpp b/src/ScreenOptionsManageEditSteps.cpp index 2c49ddc879..ee5d23807c 100644 --- a/src/ScreenOptionsManageEditSteps.cpp +++ b/src/ScreenOptionsManageEditSteps.cpp @@ -20,9 +20,9 @@ #include "SpecialFiles.h" #include "NotesWriterSM.h" -AutoScreenMessage( SM_BackFromRename ) -AutoScreenMessage( SM_BackFromDelete ) -AutoScreenMessage( SM_BackFromContextMenu ) +AutoScreenMessage( SM_BackFromRename ); +AutoScreenMessage( SM_BackFromDelete ); +AutoScreenMessage( SM_BackFromContextMenu ); enum StepsEditAction { diff --git a/src/ScreenOptionsManageProfiles.cpp b/src/ScreenOptionsManageProfiles.cpp index f8dbca6666..7c75399601 100644 --- a/src/ScreenOptionsManageProfiles.cpp +++ b/src/ScreenOptionsManageProfiles.cpp @@ -16,11 +16,11 @@ static LocalizedString NEW_PROFILE_DEFAULT_NAME( "ScreenOptionsManageProfiles", #define SHOW_CREATE_NEW (!PROFILEMAN->FixedProfiles()) -AutoScreenMessage( SM_BackFromEnterNameForNew ) -AutoScreenMessage( SM_BackFromRename ) -AutoScreenMessage( SM_BackFromDeleteConfirm ) -AutoScreenMessage( SM_BackFromClearConfirm ) -AutoScreenMessage( SM_BackFromContextMenu ) +AutoScreenMessage( SM_BackFromEnterNameForNew ); +AutoScreenMessage( SM_BackFromRename ); +AutoScreenMessage( SM_BackFromDeleteConfirm ); +AutoScreenMessage( SM_BackFromClearConfirm ); +AutoScreenMessage( SM_BackFromContextMenu ); enum ProfileAction { diff --git a/src/ScreenPackages.cpp b/src/ScreenPackages.cpp index ba115a715e..7e35aa4148 100644 --- a/src/ScreenPackages.cpp +++ b/src/ScreenPackages.cpp @@ -14,7 +14,7 @@ #include #include "LocalizedString.h" -AutoScreenMessage( SM_BackFromURL ) +AutoScreenMessage( SM_BackFromURL ); REGISTER_SCREEN_CLASS( ScreenPackages ); diff --git a/src/ScreenRanking.cpp b/src/ScreenRanking.cpp index 16833db8bc..f1c2d0dbea 100644 --- a/src/ScreenRanking.cpp +++ b/src/ScreenRanking.cpp @@ -15,8 +15,8 @@ static const char *RankingTypeNames[] = { XToString( RankingType ); LuaXType( RankingType ); -AutoScreenMessage( SM_ShowNextPage ) -AutoScreenMessage( SM_HidePage ) +AutoScreenMessage( SM_ShowNextPage ); +AutoScreenMessage( SM_HidePage ); REGISTER_SCREEN_CLASS( ScreenRanking ); diff --git a/src/ScreenSMOnlineLogin.cpp b/src/ScreenSMOnlineLogin.cpp index 1ddf9b0bc6..bca827b014 100644 --- a/src/ScreenSMOnlineLogin.cpp +++ b/src/ScreenSMOnlineLogin.cpp @@ -17,9 +17,9 @@ REGISTER_SCREEN_CLASS(ScreenSMOnlineLogin); -AutoScreenMessage( SM_SMOnlinePack ) -AutoScreenMessage( SM_PasswordDone ) -AutoScreenMessage( SM_NoProfilesDefined ) +AutoScreenMessage( SM_SMOnlinePack ); +AutoScreenMessage( SM_PasswordDone ); +AutoScreenMessage( SM_NoProfilesDefined ); static LocalizedString DEFINE_A_PROFILE( "ScreenSMOnlineLogin", "You must define a Profile." ); void ScreenSMOnlineLogin::Init() diff --git a/src/ScreenSelectMaster.cpp b/src/ScreenSelectMaster.cpp index 1d0b7d4343..7f775ff215 100644 --- a/src/ScreenSelectMaster.cpp +++ b/src/ScreenSelectMaster.cpp @@ -22,7 +22,7 @@ static const char *MenuDirNames[] = { }; XToString( MenuDir ); -AutoScreenMessage( SM_PlayPostSwitchPage ) +AutoScreenMessage( SM_PlayPostSwitchPage ); static RString CURSOR_OFFSET_X_FROM_ICON_NAME( size_t p ) { return ssprintf("CursorP%dOffsetXFromIcon",int(p+1)); } static RString CURSOR_OFFSET_Y_FROM_ICON_NAME( size_t p ) { return ssprintf("CursorP%dOffsetYFromIcon",int(p+1)); } diff --git a/src/ScreenSelectMusic.cpp b/src/ScreenSelectMusic.cpp index b9c7014a2a..f28d6a0396 100644 --- a/src/ScreenSelectMusic.cpp +++ b/src/ScreenSelectMusic.cpp @@ -38,15 +38,16 @@ static const char *SelectionStateNames[] = { }; XToString( SelectionState ); +/** @brief The maximum number of digits for the ScoreDisplay. */ const int NUM_SCORE_DIGITS = 9; #define SHOW_OPTIONS_MESSAGE_SECONDS THEME->GetMetricF( m_sName, "ShowOptionsMessageSeconds" ) -AutoScreenMessage( SM_AllowOptionsMenuRepeat ) -AutoScreenMessage( SM_SongChanged ) -AutoScreenMessage( SM_SortOrderChanging ) -AutoScreenMessage( SM_SortOrderChanged ) -AutoScreenMessage( SM_BackFromPlayerOptions ) +AutoScreenMessage( SM_AllowOptionsMenuRepeat ); +AutoScreenMessage( SM_SongChanged ); +AutoScreenMessage( SM_SortOrderChanging ); +AutoScreenMessage( SM_SortOrderChanged ); +AutoScreenMessage( SM_BackFromPlayerOptions ); static RString g_sCDTitlePath; static bool g_bWantFallbackCdTitle; diff --git a/src/ScreenTestFonts.cpp b/src/ScreenTestFonts.cpp index 530a037256..9178700ace 100644 --- a/src/ScreenTestFonts.cpp +++ b/src/ScreenTestFonts.cpp @@ -11,7 +11,9 @@ static const float LineWidth = 400; static const float LineHeight = 50; +/** @brief A quick way of getting a font metric. */ #define FONT( i ) THEME->GetMetric (m_sName,ssprintf("Font%i",i)) +/** @brief A quick way of getting a particular string. */ #define TEXT( i ) THEME->GetString (m_sName,ssprintf("Text%i",i)) static RString g_sCustomText; @@ -21,7 +23,7 @@ static void ChangeText( const RString &sText ) g_sCustomText = sText; } -AutoScreenMessage( SM_ChangeText ) +AutoScreenMessage( SM_ChangeText ); void ScreenTestFonts::HandleScreenMessage( const ScreenMessage SM ) { diff --git a/src/WheelBase.cpp b/src/WheelBase.cpp index d813ccb5d8..42dddc8bd0 100644 --- a/src/WheelBase.cpp +++ b/src/WheelBase.cpp @@ -17,7 +17,7 @@ #include "ScreenDimensions.h" const int MAX_WHEEL_SOUND_SPEED = 15; -AutoScreenMessage( SM_SongChanged ) // TODO: Replace this with a Message and MESSAGEMAN +AutoScreenMessage( SM_SongChanged ); // TODO: Replace this with a Message and MESSAGEMAN WheelBase::~WheelBase() { From 6f276da8251a6389dd942cd9575a4e7ee93ae0b7 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 21:16:11 -0500 Subject: [PATCH 054/143] Document all FOREACH loops. --- src/Course.h | 1 + src/Difficulty.h | 1 + src/EditMenu.h | 1 + src/EnumHelper.h | 8 ++++++-- src/Foreach.h | 19 +++++++++++++++++-- src/GameConstantsAndTypes.h | 1 + src/GameInput.h | 1 + src/GameState.h | 19 ++++++++++++------- src/Grade.h | 1 + src/InputMapper.h | 1 + src/LightsManager.h | 1 + src/LuaManager.h | 16 +++++++++------- src/NetworkSyncManager.h | 1 + src/NoteData.h | 9 +++++++-- src/NoteDisplay.cpp | 1 + src/NoteDisplay.h | 2 ++ src/PlayerNumber.h | 4 ++-- src/RageInputDevice.h | 3 ++- src/ScreenEdit.h | 1 + src/ScreenGameplay.h | 5 +++++ src/ScreenOptionsManageEditSteps.cpp | 1 + src/ScreenOptionsManageProfiles.cpp | 1 + src/ScreenSelectMaster.h | 1 + src/ScreenSetTime.cpp | 1 + src/ScreenTextEntry.h | 25 ++++++++++++++++++++----- src/ThemeManager.h | 1 + src/XmlFile.h | 8 ++++---- 27 files changed, 102 insertions(+), 32 deletions(-) diff --git a/src/Course.h b/src/Course.h index e9a83ad52b..0cf8656271 100644 --- a/src/Course.h +++ b/src/Course.h @@ -33,6 +33,7 @@ enum SongSort SongSort_LowestGrades, NUM_SongSort, }; +/** @brief Loop through the various Song Sorts. */ #define FOREACH_SongSort( i ) FOREACH_ENUM( SongSort, i ) const RString& SongSortToString( SongSort ss ); const RString& SongSortToLocalizedString( SongSort ss ); diff --git a/src/Difficulty.h b/src/Difficulty.h index 8cf64671bb..63840eb1d9 100644 --- a/src/Difficulty.h +++ b/src/Difficulty.h @@ -26,6 +26,7 @@ Difficulty DwiCompatibleStringToDifficulty( const RString& sDC ); typedef Difficulty CourseDifficulty; const int NUM_CourseDifficulty = NUM_Difficulty; +/** @brief Loop through the shown course difficulties. */ #define FOREACH_ShownCourseDifficulty( cd ) for( Difficulty cd=GetNextShownCourseDifficulty((CourseDifficulty)-1); cd!=Difficulty_Invalid; cd=GetNextShownCourseDifficulty(cd) ) const RString& CourseDifficultyToLocalizedString( Difficulty dc ); diff --git a/src/EditMenu.h b/src/EditMenu.h index 0d03ef1e04..0709670202 100644 --- a/src/EditMenu.h +++ b/src/EditMenu.h @@ -23,6 +23,7 @@ enum EditMenuRow ROW_ACTION, NUM_EditMenuRow }; +/** @brief Loop through each EditMenuRow. */ #define FOREACH_EditMenuRow( r ) FOREACH_ENUM( EditMenuRow, r ) const RString& EditMenuRowToString( EditMenuRow r ); const RString& EditMenuRowToLocalizedString( EditMenuRow r ); diff --git a/src/EnumHelper.h b/src/EnumHelper.h index e7bba4e8a3..fc32a8589a 100644 --- a/src/EnumHelper.h +++ b/src/EnumHelper.h @@ -10,7 +10,9 @@ extern "C" #include "lua-5.1/src/lua.h" } +/** @brief A general foreach loop for enumerators, going up to a max value. */ #define FOREACH_ENUM_N( e, max, var ) for( e var=(e)0; var( var, +1 ) ) +/** @brief A general foreach loop for enumerators. */ #define FOREACH_ENUM( e, var ) for( e var=(e)0; var( var, +1 ) ) int CheckEnum( lua_State *L, LuaReference &table, int iPos, int iInvalid, const char *szType, bool bAllowInvalid ); @@ -126,8 +128,10 @@ namespace LuaHelpers { template<> void Push( lua_State *L, const X &Object ) #endif -/* - * (c) 2004-2006 Chris Danford, Glenn Maynard +/** + * @file + * @author Chris Danford, Glenn Maynard (c) 2004-2006 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/Foreach.h b/src/Foreach.h index f4482e12a4..93ae960c66 100644 --- a/src/Foreach.h +++ b/src/Foreach.h @@ -1,38 +1,53 @@ #ifndef Foreach_H #define Foreach_H +/** @brief General foreach loop iterating over a vector. */ #define FOREACH( elemType, vect, var ) \ for( vector::iterator var = (vect).begin(); var != (vect).end(); ++var ) +/** @brief General foreach loop iterating over a vector, using a constant iterator. */ #define FOREACH_CONST( elemType, vect, var ) \ for( vector::const_iterator var = (vect).begin(); var != (vect).end(); ++var ) +/** @brief General foreach loop iterating over a deque. */ #define FOREACHD( elemType, vect, var ) \ for( deque::iterator var = (vect).begin(); var != (vect).end(); ++var ) +/** @brief General foreach loop iterating over a deque, using a constant iterator. */ #define FOREACHD_CONST( elemType, vect, var ) \ for( deque::const_iterator var = (vect).begin(); var != (vect).end(); ++var ) +/** @brief General foreach loop iterating over a set. */ #define FOREACHS( elemType, vect, var ) \ for( set::iterator var = (vect).begin(); var != (vect).end(); ++var ) +/** @brief General foreach loop iterating over a set, using a constant iterator. */ #define FOREACHS_CONST( elemType, vect, var ) \ for( set::const_iterator var = (vect).begin(); var != (vect).end(); ++var ) +/** @brief General foreach loop iterating over a list. */ #define FOREACHL( elemType, vect, var ) \ for( list::iterator var = (vect).begin(); var != (vect).end(); ++var ) +/** @brief General foreach loop iterating over a list, using a constant iterator. */ #define FOREACHL_CONST( elemType, vect, var ) \ for( list::const_iterator var = (vect).begin(); var != (vect).end(); ++var ) +/** @brief General foreach loop iterating over a map. */ #define FOREACHM( keyType, valType, vect, var ) \ for( map::iterator var = (vect).begin(); var != (vect).end(); ++var ) +/** @brief General foreach loop iterating over a map, using a constant iterator. */ #define FOREACHM_CONST( keyType, valType, vect, var ) \ for( map::const_iterator var = (vect).begin(); var != (vect).end(); ++var ) +/** @brief General foreach loop iterating over a multimap. */ #define FOREACHMM( keyType, valType, vect, var ) \ for( multimap::iterator var = (vect).begin(); var != (vect).end(); ++var ) +/* Hmm...any reason why there is no FOREACHMM_CONST? */ + #endif -/* - * (c) 2004-2005 Chris Danford +/** + * @file + * @author Chris Danford (c) 2004-2005 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/GameConstantsAndTypes.h b/src/GameConstantsAndTypes.h index 9bd115b913..24fd0fc8f1 100644 --- a/src/GameConstantsAndTypes.h +++ b/src/GameConstantsAndTypes.h @@ -662,6 +662,7 @@ enum CourseType NUM_CourseType, CourseType_Invalid }; +/** @brief A special iterator for handling the CourseTypes. */ #define FOREACH_CourseType( i ) FOREACH_ENUM( CourseType, i ) const RString& CourseTypeToString( CourseType i ); const RString& CourseTypeToLocalizedString( CourseType i ); diff --git a/src/GameInput.h b/src/GameInput.h index 37f4a72af3..0872a04860 100644 --- a/src/GameInput.h +++ b/src/GameInput.h @@ -58,6 +58,7 @@ RString GameButtonToString( const InputScheme* pInputs, GameButton i ); RString GameButtonToLocalizedString( const InputScheme* pInputs, GameButton i ); GameButton StringToGameButton( const InputScheme* pInputs, const RString& s ); +/** @brief A special way to loop through each game button. */ #define FOREACH_GameButton_Custom( gb ) for( GameButton gb=GAME_BUTTON_CUSTOM_01; gb NUM_GRADE_TIERS_USED; #define NUM_POSSIBLE_GRADES (NUM_GRADE_TIERS_USED+1) Grade GetNextPossibleGrade( Grade g ); +/** @brief Loop through each possible Grade. */ #define FOREACH_PossibleGrade( g ) for( Grade g = (Grade)(0); g != Grade_Invalid; g = GetNextPossibleGrade(g) ) #endif diff --git a/src/InputMapper.h b/src/InputMapper.h index 3397f49b44..66aadc2f09 100644 --- a/src/InputMapper.h +++ b/src/InputMapper.h @@ -129,6 +129,7 @@ public: const GameButtonInfo *GetGameButtonInfo( GameButton gb ) const; const char *GetGameButtonName( GameButton gb ) const; }; +/** @brief A special foreach loop to handle the various GameButtons. */ #define FOREACH_GameButtonInScheme( s, var ) for( GameButton var=(GameButton)0; varm_iButtonsPerController; enum_add( var, +1 ) ) class InputMappings diff --git a/src/LightsManager.h b/src/LightsManager.h index 0934744ba6..6fff605686 100644 --- a/src/LightsManager.h +++ b/src/LightsManager.h @@ -23,6 +23,7 @@ enum CabinetLight NUM_CabinetLight, CabinetLight_Invalid }; +/** @brief Loop through each CabinetLight on the machine. */ #define FOREACH_CabinetLight( i ) FOREACH_ENUM( CabinetLight, i ) const RString& CabinetLightToString( CabinetLight cl ); CabinetLight StringToCabinetLight( const RString& s); diff --git a/src/LuaManager.h b/src/LuaManager.h index 83485a526e..9a644bd6f3 100644 --- a/src/LuaManager.h +++ b/src/LuaManager.h @@ -157,19 +157,21 @@ private: LuaReference *m_pOldValue; }; -/* Iterate over all elements in the table. For safety reasons, the key is pushed onto - * the stack and can be read (safely) as a string and popped or altered in any way. - * Stack management is handled automatically. That is, you need not remove all stack - * elements above the key. Once the loop exits normally, the top of the stack will be - * where it was before. If you break out of the loop early, you need to handle that - * explicitly. */ +/** + * @brief Iterate over all elements in the table. + * + * For safety reasons, the key is pushed onto the stack and can be read (safely) + * as a string and popped or altered in any way. Stack management is handled + * automatically. That is, you need not remove all stack elements above the key. + * Once the loop exits normally, the top of the stack will be where it was before. + * If you break out of the loop early, you need to handle that explicitly. */ #define FOREACH_LUATABLE(L,index) \ for( const int UNIQUE_NAME(tab) = LuaHelpers::AbsIndex(L,index), \ UNIQUE_NAME(top) = (lua_pushnil(L),lua_gettop(L)); \ lua_next(L, UNIQUE_NAME(tab)) && (lua_pushvalue(L,-2),true); \ lua_settop(L,UNIQUE_NAME(top)) ) -/* Iterate over the array elements of a table. */ +/** @brief Iterate over the array elements of a table. */ #define FOREACH_LUATABLEI(L, index, i) \ for( int UNIQUE_NAME(tab) = LuaHelpers::AbsIndex(L,index), \ UNIQUE_NAME(top) = lua_gettop(L), i = 1; \ diff --git a/src/NetworkSyncManager.h b/src/NetworkSyncManager.h index 382a753e1d..18a34455ae 100644 --- a/src/NetworkSyncManager.h +++ b/src/NetworkSyncManager.h @@ -74,6 +74,7 @@ enum NSScoreBoardColumn NUM_NSScoreBoardColumn, NSScoreBoardColumn_Invalid }; +/** @brief A special foreach loop going through each NSScoreBoardColumn. */ #define FOREACH_NSScoreBoardColumn( sc ) FOREACH_ENUM( NSScoreBoardColumn, sc ) struct NetServerInfo diff --git a/src/NoteData.h b/src/NoteData.h index 482310c4fe..af6f8bd64a 100644 --- a/src/NoteData.h +++ b/src/NoteData.h @@ -1,5 +1,3 @@ -/* NoteData - Holds data about the notes that the player is supposed to hit. */ - #ifndef NOTE_DATA_H #define NOTE_DATA_H @@ -8,17 +6,24 @@ #include #include +/** @brief Act on each non empty row in the specific track. */ #define FOREACH_NONEMPTY_ROW_IN_TRACK( nd, track, row ) \ for( int row = -1; (nd).GetNextTapNoteRowForTrack(track,row); ) +/** @brief Act on each non empty row in the specified track within the specified range. */ #define FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( nd, track, row, start, last ) \ for( int row = start-1; (nd).GetNextTapNoteRowForTrack(track,row) && row < (last); ) +/** @brief Act on each non empty row in the specified track within the specified range, + going in reverse order. */ #define FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE_REVERSE( nd, track, row, start, last ) \ for( int row = last; (nd).GetPrevTapNoteRowForTrack(track,row) && row >= (start); ) +/** @brief Act on each non empty row for all of the tracks. */ #define FOREACH_NONEMPTY_ROW_ALL_TRACKS( nd, row ) \ for( int row = -1; (nd).GetNextTapNoteRowForAllTracks(row); ) +/** @brief Act on each non empty row for all of the tracks within the specified range. */ #define FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( nd, row, start, last ) \ for( int row = start-1; (nd).GetNextTapNoteRowForAllTracks(row) && row < (last); ) +/** @brief Holds data about the notes that the player is supposed to hit. */ class NoteData { public: diff --git a/src/NoteDisplay.cpp b/src/NoteDisplay.cpp index 238bdf84f0..25f224f9c8 100644 --- a/src/NoteDisplay.cpp +++ b/src/NoteDisplay.cpp @@ -15,6 +15,7 @@ #include "RageMath.h" const RString& NoteNotePartToString( NotePart i ); +/** @brief A foreach loop going through the different NoteParts. */ #define FOREACH_NotePart( i ) FOREACH_ENUM( NotePart, i ) static const char *NotePartNames[] = { diff --git a/src/NoteDisplay.h b/src/NoteDisplay.h index 1e9def75b4..8690ae13a6 100644 --- a/src/NoteDisplay.h +++ b/src/NoteDisplay.h @@ -56,6 +56,7 @@ enum HoldType NUM_HoldType, HoldType_Invalid }; +/** @brief Loop through each HoldType. */ #define FOREACH_HoldType( i ) FOREACH_ENUM( HoldType, i ) const RString &HoldTypeToString( HoldType ht ); @@ -66,6 +67,7 @@ enum ActiveType NUM_ActiveType, ActiveType_Invalid }; +/** @brief Loop through each ActiveType. */ #define FOREACH_ActiveType( i ) FOREACH_ENUM( ActiveType, i ) const RString &ActiveTypeToString( ActiveType at ); diff --git a/src/PlayerNumber.h b/src/PlayerNumber.h index 11bd42a8b1..109deea091 100644 --- a/src/PlayerNumber.h +++ b/src/PlayerNumber.h @@ -19,7 +19,7 @@ const PlayerNumber PLAYER_INVALID = PlayerNumber_Invalid; const RString& PlayerNumberToString( PlayerNumber pn ); const RString& PlayerNumberToLocalizedString( PlayerNumber pn ); LuaDeclareType( PlayerNumber ); - +/** @brief A foreach loop to handle the different players. */ #define FOREACH_PlayerNumber( pn ) FOREACH_ENUM( PlayerNumber, pn ) const PlayerNumber OPPOSITE_PLAYER[NUM_PLAYERS] = { PLAYER_2, PLAYER_1 }; @@ -65,7 +65,7 @@ enum MultiPlayer const RString& MultiPlayerToString( MultiPlayer mp ); const RString& MultiPlayerToLocalizedString( MultiPlayer mp ); LuaDeclareType( MultiPlayer ); - +/** @brief A foreach loop to handle the different Players in MultiPlayer. */ #define FOREACH_MultiPlayer( pn ) FOREACH_ENUM( MultiPlayer, pn ) #endif diff --git a/src/RageInputDevice.h b/src/RageInputDevice.h index 51e41a0c0d..d27e76134b 100644 --- a/src/RageInputDevice.h +++ b/src/RageInputDevice.h @@ -48,8 +48,9 @@ enum InputDevice DEVICE_MIDI, DEVICE_MOUSE, NUM_InputDevice, // leave this at the end - InputDevice_Invalid // means this is NULL + InputDevice_Invalid // means this is NULL }; +/** @brief A special foreach loop for each input device. */ #define FOREACH_InputDevice( i ) FOREACH_ENUM( InputDevice, i ) const RString& InputDeviceToString( InputDevice i ); InputDevice StringToInputDevice( const RString& s ); diff --git a/src/ScreenEdit.h b/src/ScreenEdit.h index 7587b98dcc..1fe452b6d6 100644 --- a/src/ScreenEdit.h +++ b/src/ScreenEdit.h @@ -136,6 +136,7 @@ enum EditButton NUM_EditButton, // leave this at the end EditButton_Invalid }; +/** @brief A special foreach loop for the different edit buttons. */ #define FOREACH_EditButton( e ) FOREACH_ENUM( EditButton, e ) const int NUM_EDIT_TO_DEVICE_SLOTS = 2; const int NUM_EDIT_TO_MENU_SLOTS = 2; diff --git a/src/ScreenGameplay.h b/src/ScreenGameplay.h index 0ee6a7d5f3..80d2af4b3b 100644 --- a/src/ScreenGameplay.h +++ b/src/ScreenGameplay.h @@ -296,10 +296,15 @@ vector::iterator GetNextEnabledPlayerNumberInfo ( vector vector::iterator GetNextPlayerNumberInfo ( vector::iterator iter, vector &v ); vector::iterator GetNextVisiblePlayerInfo ( vector::iterator iter, vector &v ); +/** @brief Get each enabled Player's info. */ #define FOREACH_EnabledPlayerInfo( v, pi ) for( vector::iterator pi = GetNextEnabledPlayerInfo (v.begin(),v); pi != v.end(); pi = GetNextEnabledPlayerInfo(++pi,v) ) +/** @brief Get each enabled Player's info as long as it's not a dummy player. */ #define FOREACH_EnabledPlayerInfoNotDummy( v, pi ) for( vector::iterator pi = GetNextEnabledPlayerInfoNotDummy (v.begin(),v); pi != v.end(); pi = GetNextEnabledPlayerInfoNotDummy(++pi,v) ) +/** @brief Get each enabled Player Number's info. */ #define FOREACH_EnabledPlayerNumberInfo( v, pi ) for( vector::iterator pi = GetNextEnabledPlayerNumberInfo (v.begin(),v); pi != v.end(); pi = GetNextEnabledPlayerNumberInfo(++pi,v) ) +/** @brief Get each Player Number's info, regardless of whether it's enabled or not. */ #define FOREACH_PlayerNumberInfo( v, pi ) for( vector::iterator pi = GetNextPlayerNumberInfo (v.begin(),v); pi != v.end(); pi = GetNextPlayerNumberInfo(++pi,v) ) +/** @brief Get each visible Player's info. */ #define FOREACH_VisiblePlayerInfo( v, pi ) for( vector::iterator pi = GetNextVisiblePlayerInfo (v.begin(),v); pi != v.end(); pi = GetNextVisiblePlayerInfo(++pi,v) ) diff --git a/src/ScreenOptionsManageEditSteps.cpp b/src/ScreenOptionsManageEditSteps.cpp index ee5d23807c..7fc0b1f7de 100644 --- a/src/ScreenOptionsManageEditSteps.cpp +++ b/src/ScreenOptionsManageEditSteps.cpp @@ -37,6 +37,7 @@ static const char *StepsEditActionNames[] = { "Delete", }; XToString( StepsEditAction ); +/** @brief Loop through each StepsEditAction. */ #define FOREACH_StepsEditAction( i ) FOREACH_ENUM( StepsEditAction, i ) static MenuDef g_TempMenu( diff --git a/src/ScreenOptionsManageProfiles.cpp b/src/ScreenOptionsManageProfiles.cpp index 7c75399601..272dd2d478 100644 --- a/src/ScreenOptionsManageProfiles.cpp +++ b/src/ScreenOptionsManageProfiles.cpp @@ -42,6 +42,7 @@ static const char *ProfileActionNames[] = { }; XToString( ProfileAction ); XToLocalizedString( ProfileAction ); +/** @brief Loop through each ProfileAction. */ #define FOREACH_ProfileAction( i ) FOREACH_ENUM( ProfileAction, i ) static MenuDef g_TempMenu( diff --git a/src/ScreenSelectMaster.h b/src/ScreenSelectMaster.h index b2f1e30cd1..b86679feff 100644 --- a/src/ScreenSelectMaster.h +++ b/src/ScreenSelectMaster.h @@ -16,6 +16,7 @@ enum MenuDir MenuDir_Auto, // when players join and the selection becomes invalid NUM_MenuDir, }; +/** @brief A special foreach loop through the different menu directions. */ #define FOREACH_MenuDir( md ) FOREACH_ENUM( MenuDir, md ) const RString& MenuDirToString( MenuDir md ); diff --git a/src/ScreenSetTime.cpp b/src/ScreenSetTime.cpp index 72eaea7a82..1860a316b5 100644 --- a/src/ScreenSetTime.cpp +++ b/src/ScreenSetTime.cpp @@ -18,6 +18,7 @@ static const char *SetTimeSelectionNames[] = { "Second", }; XToString( SetTimeSelection ); +/** @brief A foreach iterator through the time selections. */ #define FOREACH_SetTimeSelection( s ) FOREACH_ENUM( SetTimeSelection, s ) const float g_X[NUM_SetTimeSelection] = diff --git a/src/ScreenTextEntry.h b/src/ScreenTextEntry.h index 04d2b0ffe0..0bebcee94d 100644 --- a/src/ScreenTextEntry.h +++ b/src/ScreenTextEntry.h @@ -1,5 +1,3 @@ -/* ScreenTextEntry - Displays a text entry box over the top of another screen. */ - #ifndef SCREEN_TEXT_ENTRY_H #define SCREEN_TEXT_ENTRY_H @@ -9,20 +7,34 @@ #include "ThemeMetric.h" #include "InputEventPlus.h" +/** @brief The list of possible keyboard rows. */ enum KeyboardRow { - R1, R2, R3, R4, R5, R6, R7, + R1, + R2, + R3, + R4, + R5, + R6, + R7, KEYBOARD_ROW_SPECIAL, NUM_KeyboardRow, KeyboardRow_Invalid }; +/** @brief A special foreach loop for the KeyboardRow enum. */ #define FOREACH_KeyboardRow( i ) FOREACH_ENUM( KeyboardRow, i ) +/** @brief The maximum number of keys per row. */ const int KEYS_PER_ROW = 13; +/** @brief The list of very special keys inside some rows. */ enum KeyboardRowSpecialKey { - SPACEBAR=2, BACKSPACE=5, CANCEL=8, DONE=11 + SPACEBAR=2, /**< The space bar key. */ + BACKSPACE=5, /**< The backspace key. */ + CANCEL=8, + DONE=11 }; +/** @brief Displays a text entry box over the top of another screen. */ class ScreenTextEntry : public ScreenWithMenuElements { public: @@ -64,7 +76,10 @@ public: RString sQuestion; RString sInitialAnswer; int iMaxInputLength; - bool bPassword; // (optional) + /** @brief Is there a password involved with this setting? + * + * This parameter doesn't have to be used. */ + bool bPassword; LuaReference Validate; // (RString sAnswer, RString sErrorOut; optional) LuaReference OnOK; // (RString sAnswer; optional) LuaReference OnCancel; // (optional) diff --git a/src/ThemeManager.h b/src/ThemeManager.h index f4e9212a16..7a78b777af 100644 --- a/src/ThemeManager.h +++ b/src/ThemeManager.h @@ -21,6 +21,7 @@ enum ElementCategory NUM_ElementCategory, ElementCategory_Invalid }; +/** @brief A special foreach loop going through each ElementCategory. */ #define FOREACH_ElementCategory( ec ) FOREACH_ENUM( ElementCategory, ec ) const RString& ElementCategoryToString( ElementCategory ec ); ElementCategory StringToElementCategory( const RString& s ); diff --git a/src/XmlFile.h b/src/XmlFile.h index 2c81898b76..3afeb82873 100644 --- a/src/XmlFile.h +++ b/src/XmlFile.h @@ -55,24 +55,24 @@ public: typedef map XAttrs; class XNode; typedef vector XNodes; - +/** @brief Loop through each node. */ #define FOREACH_Attr( pNode, Var ) \ for( XAttrs::iterator Var = (pNode)->m_attrs.begin(); \ Var != (pNode)->m_attrs.end(); \ ++Var ) - +/** @brief Loop through each node, using a constant iterator. */ #define FOREACH_CONST_Attr( pNode, Var ) \ for( XAttrs::const_iterator Var = (pNode)->m_attrs.begin(); \ Var != (pNode)->m_attrs.end(); \ ++Var ) - +/** @brief Loop through each child. */ #define FOREACH_Child( pNode, Var ) \ XNode *Var = NULL; \ for( XNodes::iterator Var##Iter = (pNode)->m_childs.begin(); \ Var = (Var##Iter != (pNode)->m_childs.end())? *Var##Iter:NULL, \ Var##Iter != (pNode)->m_childs.end(); \ ++Var##Iter ) - +/** @brief Loop through each child, using a constant iterator. */ #define FOREACH_CONST_Child( pNode, Var ) \ const XNode *Var = NULL; \ for( XNodes::const_iterator Var##Iter = (pNode)->m_childs.begin(); \ From 2d76ee1023ba39e77ad2b303a91b0686a68b9eb1 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 21:24:00 -0500 Subject: [PATCH 055/143] Move some top comments to above the class. The original attempt was not working for doxygen purposes. --- src/Course.h | 4 +--- src/EditMenu.h | 6 ++++-- src/GameState.h | 3 +-- src/InputMapper.h | 4 +--- src/LightsManager.h | 4 +--- src/LuaManager.h | 5 ++--- src/NetworkSyncManager.h | 4 +--- src/NoteDisplay.h | 4 +--- src/ScreenEdit.h | 4 +--- src/ScreenOptions.h | 3 +-- src/ScreenSelectMaster.h | 1 + src/Song.h | 3 +-- src/ThemeManager.h | 4 +--- src/Tween.h | 2 -- 14 files changed, 17 insertions(+), 34 deletions(-) diff --git a/src/Course.h b/src/Course.h index 0cf8656271..b83b627334 100644 --- a/src/Course.h +++ b/src/Course.h @@ -1,5 +1,3 @@ -/* Course - A queue of songs and notes. */ - #ifndef COURSE_H #define COURSE_H @@ -79,7 +77,7 @@ public: void PushSelf( lua_State *L ); }; - +/** @brief A queue of songs and notes. */ class Course { public: diff --git a/src/EditMenu.h b/src/EditMenu.h index 0709670202..6d641cbdec 100644 --- a/src/EditMenu.h +++ b/src/EditMenu.h @@ -1,5 +1,3 @@ -/* EditMenu - UI on Edit Menu screen. Create Steps, delete Steps, or launch Steps in editor. */ - #ifndef EDIT_MENU_H #define EDIT_MENU_H @@ -43,6 +41,10 @@ const RString& EditMenuActionToLocalizedString( EditMenuAction ema ); const int NUM_ARROWS = 2; +/** + * @brief UI on Edit Menu screen. + * + * Create Steps, delete Steps, or launch Steps in editor. */ class EditMenu: public ActorFrame { public: diff --git a/src/GameState.h b/src/GameState.h index 032f75d58f..89de4c05dc 100644 --- a/src/GameState.h +++ b/src/GameState.h @@ -1,5 +1,3 @@ -/** @brief GameState - Holds game data that is not saved between sessions. */ - #ifndef GAMESTATE_H #define GAMESTATE_H @@ -33,6 +31,7 @@ class Style; class TimingData; class Trail; +/** @brief Holds game data that is not saved between sessions. */ class GameState { public: diff --git a/src/InputMapper.h b/src/InputMapper.h index 66aadc2f09..f823f6549a 100644 --- a/src/InputMapper.h +++ b/src/InputMapper.h @@ -1,5 +1,3 @@ -/* InputMapper - Holds user-chosen input preferences and saves it between sessions. */ - #ifndef INPUT_MAPPER_H #define INPUT_MAPPER_H @@ -151,7 +149,7 @@ public: void ClearFromInputMap( const DeviceInput &DeviceI ); bool ClearFromInputMap( const GameInput &GameI, int iSlotIndex ); }; - +/** @brief Holds user-chosen input preferences and saves it between sessions. */ class InputMapper { public: diff --git a/src/LightsManager.h b/src/LightsManager.h index 6fff605686..1e75a683b7 100644 --- a/src/LightsManager.h +++ b/src/LightsManager.h @@ -1,5 +1,3 @@ -/* LightsManager - Control lights. */ - #ifndef LightsManager_H #define LightsManager_H @@ -56,7 +54,7 @@ struct LightsState }; class LightsDriver; - +/** @brief Control lights. */ class LightsManager { public: diff --git a/src/LuaManager.h b/src/LuaManager.h index 9a644bd6f3..ef6bd4454d 100644 --- a/src/LuaManager.h +++ b/src/LuaManager.h @@ -15,9 +15,6 @@ extern "C" #include "lua-5.1/src/lauxlib.h" } -class LuaManager; -extern LuaManager *LUA; - class LuaManager { public: @@ -47,6 +44,8 @@ private: lua_State *m_pLuaMain; }; +extern LuaManager *LUA; + namespace LuaHelpers { diff --git a/src/NetworkSyncManager.h b/src/NetworkSyncManager.h index 18a34455ae..0c92c70d91 100644 --- a/src/NetworkSyncManager.h +++ b/src/NetworkSyncManager.h @@ -1,5 +1,3 @@ -/* NetworkSyncManager - Uses ezsockets for primitive song syncing and score reporting. */ - #ifndef NetworkSyncManager_H #define NetworkSyncManager_H @@ -107,7 +105,7 @@ public: void ClearPacket(); }; - +/** @brief Uses ezsockets for primitive song syncing and score reporting. */ class NetworkSyncManager { public: diff --git a/src/NoteDisplay.h b/src/NoteDisplay.h index 8690ae13a6..0f1d938798 100644 --- a/src/NoteDisplay.h +++ b/src/NoteDisplay.h @@ -1,5 +1,3 @@ -/* NoteDisplay - Draws TapNotes and HoldNotes. */ - #ifndef NOTE_DISPLAY_H #define NOTE_DISPLAY_H @@ -71,7 +69,7 @@ enum ActiveType #define FOREACH_ActiveType( i ) FOREACH_ENUM( ActiveType, i ) const RString &ActiveTypeToString( ActiveType at ); - +/** @brief Draws TapNotes and HoldNotes. */ class NoteDisplay { public: diff --git a/src/ScreenEdit.h b/src/ScreenEdit.h index 1fe452b6d6..f4f38717f7 100644 --- a/src/ScreenEdit.h +++ b/src/ScreenEdit.h @@ -1,5 +1,3 @@ -/* ScreenEdit - Edit, record, playback, and synchronize notes. */ - #ifndef SCREEN_EDIT_H #define SCREEN_EDIT_H @@ -171,7 +169,7 @@ struct MapEditButtonToMenuButton button[e][slot] = GameButton_Invalid; } }; - +/** @brief Edit, record, playback, and synchronize notes. */ class ScreenEdit : public ScreenWithMenuElements { public: diff --git a/src/ScreenOptions.h b/src/ScreenOptions.h index d9d96273d4..a0ddfa948c 100644 --- a/src/ScreenOptions.h +++ b/src/ScreenOptions.h @@ -1,5 +1,3 @@ -/** @brief ScreenOptions - A grid of options; the selected option is drawn with a highlight rectangle. */ - #ifndef SCREENOPTIONS_H #define SCREENOPTIONS_H @@ -30,6 +28,7 @@ InputMode StringToInputMode( const RString& str ); #define FOREACH_OptionsPlayer( pn ) \ for( PlayerNumber pn=GetNextHumanPlayer((PlayerNumber)-1); pn!=PLAYER_INVALID && (m_InputMode==INPUTMODE_INDIVIDUAL || pn==0); pn=GetNextHumanPlayer(pn) ) +/** @brief A grid of options; the selected option is drawn with a highlight rectangle. */ class ScreenOptions : public ScreenWithMenuElements { public: diff --git a/src/ScreenSelectMaster.h b/src/ScreenSelectMaster.h index b86679feff..838e6821d0 100644 --- a/src/ScreenSelectMaster.h +++ b/src/ScreenSelectMaster.h @@ -20,6 +20,7 @@ enum MenuDir #define FOREACH_MenuDir( md ) FOREACH_ENUM( MenuDir, md ) const RString& MenuDirToString( MenuDir md ); +/** @brief The master Screen for many children Screens. */ class ScreenSelectMaster : public ScreenSelect { public: diff --git a/src/Song.h b/src/Song.h index 360eb8f129..215e583d64 100644 --- a/src/Song.h +++ b/src/Song.h @@ -1,5 +1,3 @@ -/** @brief Song - Holds all music metadata and steps for one song. */ - #ifndef SONG_H #define SONG_H @@ -57,6 +55,7 @@ struct LyricSegment RageColor m_Color; /** @brief The color of the lyrics. */ }; +/** @brief Holds all music metadata and steps for one song. */ class Song { RString m_sSongDir; diff --git a/src/ThemeManager.h b/src/ThemeManager.h index 7a78b777af..a8c20e7067 100644 --- a/src/ThemeManager.h +++ b/src/ThemeManager.h @@ -1,5 +1,3 @@ -/* ThemeManager - Manages theme paths and metrics. */ - #ifndef THEMEMANAGER_H #define THEMEMANAGER_H @@ -27,7 +25,7 @@ const RString& ElementCategoryToString( ElementCategory ec ); ElementCategory StringToElementCategory( const RString& s ); struct Theme; - +/** @brief Manages theme paths and metrics. */ class ThemeManager { public: diff --git a/src/Tween.h b/src/Tween.h index 304ee6a75b..a9e6cbca42 100644 --- a/src/Tween.h +++ b/src/Tween.h @@ -1,5 +1,3 @@ -/** @brief ITween - Interface for simple interpolation. */ - #ifndef TWEEN_H #define TWEEN_H From 26b9f7502f9af2f203bdc8f7e699521a9428a313 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 21:30:03 -0500 Subject: [PATCH 056/143] General doxygen updates. --- src/Bookkeeper.h | 29 ++++++++++++++++++++++------- src/Screen.h | 10 +++++++++- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/Bookkeeper.h b/src/Bookkeeper.h index 24a46baed7..07272e7928 100644 --- a/src/Bookkeeper.h +++ b/src/Bookkeeper.h @@ -1,5 +1,3 @@ -/* Bookkeeper - coin tracking. */ - #ifndef Bookkeeper_H #define Bookkeeper_H @@ -7,6 +5,7 @@ #include class XNode; +/** @brief Track when coins were put into the machine. */ class Bookkeeper { public: @@ -30,12 +29,26 @@ public: void WriteToDisk(); private: + /** @brief A simple way of handling the date. */ struct Date { - int m_iHour; // 0 = midnight - int m_iDayOfYear; // 0 = Jan 1 - int m_iYear; // eg. 2005 + /** + * @brief The hour of the date. + * + * The value 0 is defined to be midnight. */ + int m_iHour; + /** + * @brief The day of the year of the date. + * + * The value 0 is defined to be January 1st. */ + int m_iDayOfYear; + /** @brief The year of the date (e.g., 2005). */ + int m_iYear; + /** @brief Set up a date with initial values. */ Date() { m_iHour = m_iDayOfYear = m_iYear = 0; } + /** + * @brief Set up a date based on the given time. + * @param time the time to turn into a Date. */ Date( tm time ) { Set(time); } void Set( time_t t ); void Set( tm pTime ); @@ -53,8 +66,10 @@ extern Bookkeeper* BOOKKEEPER; // 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/Screen.h b/src/Screen.h index e230958714..8b87e3afe8 100644 --- a/src/Screen.h +++ b/src/Screen.h @@ -14,7 +14,11 @@ class InputEventPlus; class Screen; typedef Screen* (*CreateScreenFn)(const RString& sClassName); -// Each Screen class should have a REGISTER_SCREEN_CLASS in its CPP file. +/** + * @brief Allow registering the screen for easier access. + * + * Each Screen class should have a REGISTER_SCREEN_CLASS in its CPP file. + */ struct RegisterScreenClass { RegisterScreenClass( const RString &sClassName, CreateScreenFn pfn ); }; #define REGISTER_SCREEN_CLASS( className ) \ static Screen* Create##className( const RString &sName ) { LuaThreadVariable var( "LoadingScreen", sName ); Screen *pRet = new className; pRet->SetName( sName ); Screen::InitScreen( pRet ); return pRet; } \ @@ -60,6 +64,10 @@ public: virtual void HandleScreenMessage( const ScreenMessage SM ); void SetLockInputSecs( float f ) { m_fLockInputSecs = f; } + /** + * @brief Put the specified message onto the screen for a specified time. + * @param SM the message to put on the screen. + * @param fDelay The length of time it stays up. */ void PostScreenMessage( const ScreenMessage SM, float fDelay ); /** @brief Clear the entire message queue. */ void ClearMessageQueue(); From 8cc38194b2200c845c42cfaa16d07e0abc1f2394 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 21:47:52 -0500 Subject: [PATCH 057/143] Some more doxygen. --- src/InputQueue.h | 3 +-- src/NotesWriterSM.h | 31 +++++++++++++++++++++++++++---- src/PrefsManager.h | 6 ++++-- src/ScreenNameEntry.h | 4 +--- src/ScreenTestSound.h | 7 +++++-- src/StageStats.h | 36 +++++++++++++++++++++++++++--------- 6 files changed, 65 insertions(+), 22 deletions(-) diff --git a/src/InputQueue.h b/src/InputQueue.h index 9cce2fb0ff..902eba46db 100644 --- a/src/InputQueue.h +++ b/src/InputQueue.h @@ -1,5 +1,3 @@ -/* InputQueue - Stores a list of the most recently pressed MenuInputs for each player. */ - #ifndef INPUT_QUEUE_H #define INPUT_QUEUE_H @@ -9,6 +7,7 @@ class InputEventPlus; class RageTimer; +/** @brief Stores a list of the most recently pressed MenuInputs for each player. */ class InputQueue { public: diff --git a/src/NotesWriterSM.h b/src/NotesWriterSM.h index 7427248425..7907bf7eed 100644 --- a/src/NotesWriterSM.h +++ b/src/NotesWriterSM.h @@ -1,22 +1,45 @@ -/* NotesWriterSM - Writes a Song to an .SM file. */ - #ifndef NOTES_WRITER_SM_H #define NOTES_WRITER_SM_H class Song; class Steps; +/** @brief Writes a Song to an .SM file. */ namespace NotesWriterSM { + /** + * @brief Write the song out to a file. + * @param sPath the path to write the file. + * @param out the Song to be written out. + * @return its success or failure. */ bool Write( RString sPath, const Song &out ); + /** + * @brief Get some contents about the edit file first. + * @param pSong the Song in question. + * @param pSteps the Steps in question. + * @param sOut unused? + */ void GetEditFileContents( const Song *pSong, const Steps *pSteps, RString &sOut ); + /** + * @brief Get the name of the edit file to use. + * @param pSong the Song in question. + * @param pSteps the Steps in question. + * @return the name of the edit file. */ RString GetEditFileName( const Song *pSong, const Steps *pSteps ); + /** + * @param Write the edit file to the machine for future use. + * @param pSong the Song in question. + * @param pSteps the Steps in question. + * @param sErrorOut any error messages that may have occurred. + * @return its success or failure. */ bool WriteEditFileToMachine( const Song *pSong, Steps *pSteps, RString &sErrorOut ); } #endif -/* - * (c) 2001-2004 Chris Danford, Glenn Maynard +/** + * @file + * @author Chris Danford, Glenn Maynard (c) 2001-2004 + * @seciton LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/PrefsManager.h b/src/PrefsManager.h index f9443ac9e5..ebec3fb8f5 100644 --- a/src/PrefsManager.h +++ b/src/PrefsManager.h @@ -1,5 +1,3 @@ -/* PrefsManager - Holds user-chosen preferences that are saved between sessions. */ - #ifndef PREFSMANAGER_H #define PREFSMANAGER_H @@ -7,6 +5,9 @@ class IniFile; +/** @brief How many songs can be played during a normal game max? + * + * This assumes no extra stages, no event mode, no course modes. */ const int MAX_SONGS_PER_PLAY = 7; enum MusicWheelUsesSections @@ -125,6 +126,7 @@ enum DefaultFailType DefaultFailType_Invalid }; +/** @brief Holds user-chosen preferences that are saved between sessions. */ class PrefsManager { public: diff --git a/src/ScreenNameEntry.h b/src/ScreenNameEntry.h index cef8e00436..e785b4056e 100644 --- a/src/ScreenNameEntry.h +++ b/src/ScreenNameEntry.h @@ -1,5 +1,3 @@ -/* ScreenNameEntry - Enter a name for a new high score. */ - #ifndef SCREEN_NAME_ENTRY_H #define SCREEN_NAME_ENTRY_H @@ -7,7 +5,7 @@ #include "BitmapText.h" #include "ReceptorArrowRow.h" #include "RageSound.h" - +/** @brief Enter a name for a new high score. */ class ScreenNameEntry : public ScreenWithMenuElements { public: diff --git a/src/ScreenTestSound.h b/src/ScreenTestSound.h index 46f1899f47..d9024a63b6 100644 --- a/src/ScreenTestSound.h +++ b/src/ScreenTestSound.h @@ -5,6 +5,7 @@ #include "BitmapText.h" #include "RageSound.h" +/** @brief The number of sounds allowed for testing. */ const int nsounds = 5; class ScreenTestSound : public Screen @@ -31,8 +32,10 @@ public: #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/StageStats.h b/src/StageStats.h index 6b4ae273a6..842c3bba54 100644 --- a/src/StageStats.h +++ b/src/StageStats.h @@ -1,5 +1,3 @@ -/* StageStats - Contains statistics for one stage of play - either one song, or a whole course. */ - #ifndef StageStats_H #define StageStats_H @@ -9,7 +7,10 @@ class Song; class Style; struct lua_State; - +/** + * @brief Contains statistics for one stage of play. + * + * This is either one song, or a whole course. */ class StageStats { public: @@ -34,13 +35,24 @@ public: vector m_vpPossibleSongs; EarnedExtraStage m_EarnedExtraStage; - bool m_bGaveUp; // exited gameplay by giving up - bool m_bUsedAutoplay; // used autoplay at any point during gameplay + /** @brief Was the gameplay exited by the Player giving up? */ + bool m_bGaveUp; + /** @brief Did the PLayer use Autoplay at any point during gameplay? */ + bool m_bUsedAutoplay; // TODO: These are updated in ScreenGameplay::Update based on fDelta. // They should be made more accurate. - float m_fGameplaySeconds; // how many seconds before gameplay ended. Updated by Gameplay, not scaled by music rate. - float m_fStepsSeconds; // this is <= fGameplaySeconds unless the song has steps past the end + /** + * @brief How many seconds were there before gameplay ended? + * + * This is updated by Gameplay, and not scaled by the music rate. */ + float m_fGameplaySeconds; + /** + * @brief How many seconds are we in a song? + * + * This is equivalent to m_fGameplaySeconds unless the song has steps past the end. */ + float m_fStepsSeconds; + /** @brief How fast was the music going compared to normal? */ float m_fMusicRate; // Total number of seconds between first beat and last beat for every song. @@ -50,6 +62,10 @@ public: PlayerStageStats m_multiPlayer[NUM_MultiPlayer]; void FinalizeScores( bool bSummary ); + /** + * @brief Determine if the PlayerNumber has a high score. + * @param pn the PlayerNumber in question. + * @return true if the PlayerNumber has a high score, false otherwise. */ bool PlayerHasHighScore( PlayerNumber pn ) const; int GetMinimumMissCombo() const; @@ -59,8 +75,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 From 5e3165c8550e1edc81e3812b09e2a78cdfbedf89 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 22:09:25 -0500 Subject: [PATCH 058/143] Add docs, another bot test. --- src/NotesWriterSM.cpp | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/NotesWriterSM.cpp b/src/NotesWriterSM.cpp index 285fa2311b..f43643b343 100644 --- a/src/NotesWriterSM.cpp +++ b/src/NotesWriterSM.cpp @@ -16,6 +16,10 @@ #include "Song.h" #include "Steps.h" +/** + * @brief Turn the BackgroundChange into a string. + * @param bgc the BackgroundChange in question. + * @return the converted string. */ static RString BackgroundChangeToString( const BackgroundChange &bgc ) { // TODO: Technically we need to double-escape the filename (because it might @@ -37,9 +41,12 @@ static RString BackgroundChangeToString( const BackgroundChange &bgc ) return s; } +/** + * @brief Write out the common tags for .SM files. + * @param f the file in question. + * @param out the Song in question. */ static void WriteGlobalTags( RageFile &f, const Song &out ) { - //f.PutLine( ssprintf( "#SMVERSION:;", SmEscape(RString("ssc-v1.0")).c_str() ) ); 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() ) ); @@ -58,7 +65,8 @@ static void WriteGlobalTags( RageFile &f, const Song &out ) vector vs; FOREACH_ENUM( InstrumentTrack, it ) if( out.HasInstrumentTrack(it) ) - vs.push_back( InstrumentTrackToString(it) + "=" + out.m_sInstrumentTrackFile[it] ); + vs.push_back( InstrumentTrackToString(it) + + "=" + out.m_sInstrumentTrackFile[it] ); if( !vs.empty() ) { RString s = join( ",", vs ); @@ -90,7 +98,8 @@ static void WriteGlobalTags( RageFile &f, const Song &out ) if( out.m_fSpecifiedBPMMin == out.m_fSpecifiedBPMMax ) f.PutLine( ssprintf( "#DISPLAYBPM:%.6f;", out.m_fSpecifiedBPMMin ) ); else - f.PutLine( ssprintf( "#DISPLAYBPM:%.6f:%.6f;", out.m_fSpecifiedBPMMin, out.m_fSpecifiedBPMMax ) ); + f.PutLine( ssprintf( "#DISPLAYBPM:%.6f:%.6f;", + out.m_fSpecifiedBPMMin, out.m_fSpecifiedBPMMax ) ); break; case Song::DISPLAY_RANDOM: f.PutLine( ssprintf( "#DISPLAYBPM:*;" ) ); @@ -154,7 +163,8 @@ static void WriteGlobalTags( RageFile &f, const Song &out ) f.Write( "#TIMESIGNATURES:" ); FOREACH_CONST( TimeSignatureSegment, out.m_Timing.m_vTimeSignatureSegments, iter ) { - f.PutLine( ssprintf( "%.6f=%d=%d", NoteRowToBeat(iter->m_iStartRow), iter->m_iNumerator, iter->m_iDenominator ) ); + f.PutLine( ssprintf( "%.6f=%d=%d", NoteRowToBeat(iter->m_iStartRow), + iter->m_iNumerator, iter->m_iDenominator ) ); vector::const_iterator iter2 = iter; iter2++; if( iter2 != out.m_Timing.m_vTimeSignatureSegments.end() ) @@ -226,6 +236,10 @@ static void WriteGlobalTags( RageFile &f, const Song &out ) f.PutLine( ";" ); } +/** + * @brief Turn a vector of lines into a single line joined by newline characters. + * @param lines the list of lines to join. + * @return the joined lines. */ static RString JoinLineList( vector &lines ) { for( unsigned i = 0; i < lines.size(); ++i ) @@ -239,6 +253,11 @@ static RString JoinLineList( vector &lines ) return join( "\r\n", lines.begin()+j, lines.end() ); } +/** + * @brief Retrieve the notes from the #NOTES tag. + * @param song the Song in question. + * @param in the Steps in question. + * @return the #NOTES tag. */ static RString GetSMNotesTag( const Song &song, const Steps &in ) { vector lines; From 7539c2f97ed02748f7e94122898d4c10f4d235a6 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 22:27:59 -0500 Subject: [PATCH 059/143] Update comments. Consistent naming. TODO: Look into using NotesWriterSM in NotesWriterSSC for common functionality. --- src/NotesWriterSM.h | 2 +- src/NotesWriterSSC.cpp | 23 ++++++++++++++++++++--- src/NotesWriterSSC.h | 33 +++++++++++++++++++++++++++++---- 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/src/NotesWriterSM.h b/src/NotesWriterSM.h index 7907bf7eed..f394a5934b 100644 --- a/src/NotesWriterSM.h +++ b/src/NotesWriterSM.h @@ -16,7 +16,7 @@ namespace NotesWriterSM * @brief Get some contents about the edit file first. * @param pSong the Song in question. * @param pSteps the Steps in question. - * @param sOut unused? + * @param sOut the start of the file contents. */ void GetEditFileContents( const Song *pSong, const Steps *pSteps, RString &sOut ); /** diff --git a/src/NotesWriterSSC.cpp b/src/NotesWriterSSC.cpp index 0da790abd5..d665db7b98 100644 --- a/src/NotesWriterSSC.cpp +++ b/src/NotesWriterSSC.cpp @@ -16,6 +16,10 @@ #include "Song.h" #include "Steps.h" +/** + * @brief Turn the BackgroundChange into a string. + * @param bgc the BackgroundChange in question. + * @return the converted string. */ static RString BackgroundChangeToString( const BackgroundChange &bgc ) { // TODO: Technically we need to double-escape the filename (because it might contain '=') and then @@ -37,6 +41,10 @@ static RString BackgroundChangeToString( const BackgroundChange &bgc ) return s; } +/** + * @brief Write out the common tags for .SM files. + * @param f the file in question. + * @param out the Song in question. */ static void WriteGlobalTags( RageFile &f, const Song &out ) { f.PutLine( ssprintf( "#VERSION:%.2f;", out.m_fVersion ) ); @@ -238,6 +246,10 @@ static void WriteGlobalTags( RageFile &f, const Song &out ) f.PutLine( ";" ); } +/** + * @brief Turn a vector of lines into a single line joined by newline characters. + * @param lines the list of lines to join. + * @return the joined lines. */ static RString JoinLineList( vector &lines ) { for( unsigned i = 0; i < lines.size(); ++i ) @@ -251,7 +263,12 @@ static RString JoinLineList( vector &lines ) return join( "\r\n", lines.begin()+j, lines.end() ); } -static RString GetSSCNotesTag( const Song &song, const Steps &in, bool bSavingCache ) +/** + * @brief Retrieve the individual batches of NoteData. + * @param song the Song in question. + * @param in the Steps in question. + * @return the NoteData in RString form. */ +static RString GetSSCNoteData( const Song &song, const Steps &in, bool bSavingCache ) { vector lines; @@ -396,7 +413,7 @@ bool NotesWriterSSC::Write( RString sPath, const Song &out, const vector FOREACH_CONST( Steps*, vpStepsToSave, s ) { const Steps* pSteps = *s; - RString sTag = GetSSCNotesTag( out, *pSteps, bSavingCache ); + RString sTag = GetSSCNoteData( out, *pSteps, bSavingCache ); f.PutLine( sTag ); } if( f.Flush() == -1 ) @@ -416,7 +433,7 @@ void NotesWriterSSC::GetEditFileContents( const Song *pSong, const Steps *pSteps if( asParts.size() ) sDir = join( "/", asParts.begin()+1, asParts.end() ); sOut += ssprintf( "#SONG:%s;\r\n", sDir.c_str() ); - sOut += GetSSCNotesTag( *pSong, *pSteps, false ); + sOut += GetSSCNoteData( *pSong, *pSteps, false ); } RString NotesWriterSSC::GetEditFileName( const Song *pSong, const Steps *pSteps ) diff --git a/src/NotesWriterSSC.h b/src/NotesWriterSSC.h index 4819dc60d9..f22ba24421 100644 --- a/src/NotesWriterSSC.h +++ b/src/NotesWriterSSC.h @@ -1,22 +1,47 @@ -/* NotesWriterSSC - Writes a Song to an .SSC file. */ - #ifndef NOTES_WRITER_SSC_H #define NOTES_WRITER_SSC_H class Song; class Steps; +/** @brief Writes a Song to an .SSC file. */ namespace NotesWriterSSC { + /** + * @brief Write the song out to a file. + * @param sPath the path to write the file. + * @param out the Song to be written out. + * @param vpStepsToSave the Steps to save. + * @param bSavingCache a flag to see if we're saving certain cache data. + * @return its success or failure. */ bool Write( RString sPath, const Song &out, const vector& vpStepsToSave, bool bSavingCache ); + /** + * @brief Get some contents about the edit file first. + * @param pSong the Song in question. + * @param pSteps the Steps in question. + * @param sOut the start of the file contents. + */ void GetEditFileContents( const Song *pSong, const Steps *pSteps, RString &sOut ); + /** + * @brief Get the name of the edit file to use. + * @param pSong the Song in question. + * @param pSteps the Steps in question. + * @return the name of the edit file. */ RString GetEditFileName( const Song *pSong, const Steps *pSteps ); + /** + * @param Write the edit file to the machine for future use. + * @param pSong the Song in question. + * @param pSteps the Steps in question. + * @param sErrorOut any error messages that may have occurred. + * @return its success or failure. */ bool WriteEditFileToMachine( const Song *pSong, Steps *pSteps, RString &sErrorOut ); } #endif -/* - * (c) 2011 Jason Felds +/** + * @file + * @author Jason Felds (c) 2011 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a From 9de60aa55524e691aa9d950b040e83ce6ae3e655 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 22:59:13 -0500 Subject: [PATCH 060/143] More doc updates. --- src/AdjustSync.h | 19 ++-- src/CourseUtil.h | 4 +- src/NoteData.h | 1 + src/NoteDataUtil.h | 19 ++-- src/NoteDataWithScoring.h | 3 +- src/NotesLoader.h | 23 ++++- src/NotesLoaderPMS.h | 10 +- src/NotesWriterDWI.cpp | 197 ++++++++++++++++++-------------------- src/NotesWriterDWI.h | 14 ++- src/OptionRowHandler.h | 5 +- 10 files changed, 156 insertions(+), 139 deletions(-) diff --git a/src/AdjustSync.h b/src/AdjustSync.h index 9131992b94..3a77f35c24 100644 --- a/src/AdjustSync.h +++ b/src/AdjustSync.h @@ -1,14 +1,15 @@ -/* AdjustSync - Allows for adjusting the sync of a song. */ #ifndef AdjustSync_H #define AdjustSync_H -/* This class defines two ways of adjusting the sync of a song. +class TimingData; +/** + * @brief Allows for adjusting the sync of a song. + * + * This class defines two ways of adjusting the sync of a song. * The first adjusts only the offset, "on the fly". It can adjust either the * song itself or the machine. The other style adjusts both the BPM and the - * offset of the song, but it needs more data. */ - -class TimingData; - + * offset of the song, but it needs more data. + */ class AdjustSync { public: @@ -49,8 +50,10 @@ public: #endif -/* - * (c) 2003-2006 Chris Danford, John Bauer +/** + * @file + * @author Chris Danford, John Bauer (c) 2003-2006 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/CourseUtil.h b/src/CourseUtil.h index d0c4738cef..3d707a1052 100644 --- a/src/CourseUtil.h +++ b/src/CourseUtil.h @@ -1,5 +1,3 @@ -/** @brief CourseUtil - Utility functions that deal with Course. */ - #ifndef COURSEUTIL_H #define COURSEUTIL_H @@ -13,6 +11,7 @@ class XNode; class CourseEntry; class Song; +/** @brief Utility functions that deal with Courses. */ namespace CourseUtil { void SortCoursePointerArrayByDifficulty( vector &vpCoursesInOut ); @@ -43,6 +42,7 @@ namespace CourseUtil //RString GetSectionNameFromCourseAndSort( const Course *pCourse, SortOrder so ); }; +/** @brief Utility functions that deal with Edit Courses. */ namespace EditCourseUtil { void UpdateAndSetTrail(); diff --git a/src/NoteData.h b/src/NoteData.h index af6f8bd64a..9b76d93bb7 100644 --- a/src/NoteData.h +++ b/src/NoteData.h @@ -223,6 +223,7 @@ public: void LoadFromNode( const XNode* pNode ); }; +/** @brief Allow a quick way to swap notedata. */ namespace std { template<> inline void swap( NoteData &nd1, NoteData &nd2 ) { nd1.swap( nd2 ); } diff --git a/src/NoteDataUtil.h b/src/NoteDataUtil.h index 82e434ea84..76995bd17e 100644 --- a/src/NoteDataUtil.h +++ b/src/NoteDataUtil.h @@ -1,5 +1,3 @@ -/* NoteDataUtil - Utility functions that deal with NoteData. */ - #ifndef NOTEDATAUTIL_H #define NOTEDATAUTIL_H @@ -12,10 +10,12 @@ class NoteData; class Song; struct AttackArray; -/* Utils for NoteData. Things should go in here if they can be (cleanly and - * efficiently) implemented using only NoteData's primitives; this improves - * abstraction and makes it much easier to change NoteData internally in - * the future. */ +/** + * @brief Utility functions that deal with NoteData. + * + * Things should go in here if they can be (cleanly and efficiently) + * implemented using only NoteData's primitives; this improves abstraction + * and makes it much easier to change NoteData internally in the future. */ namespace NoteDataUtil { NoteType GetSmallestNoteTypeForMeasure( const NoteData &nd, int iMeasureIndex ); @@ -74,7 +74,9 @@ namespace NoteDataUtil void Twister( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ); void ConvertTapsToHolds( NoteData &inout, int iSimultaneousHolds, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ); - // Change all TAP_ADDITION_TAPs to TAP_ORIGINAL_TAPs. + /** + * @brief Convert all taps added via transforms into original style tap notes. + * @param inout the NoteData to convert. */ void ConvertAdditionsToRegular( NoteData &inout ); void Backwards( NoteData &inout ); @@ -100,7 +102,8 @@ namespace NoteDataUtil bool RowPassesValidMask( NoteData &inout, int row, const bool bValidMask[] ); void TransformNoteData( NoteData &nd, const AttackArray &aa, StepsType st, Song* pSong ); - void TransformNoteData( NoteData &nd, const PlayerOptions &po, StepsType st, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ); + void TransformNoteData( NoteData &nd, const PlayerOptions &po, StepsType st, + int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ); void AddTapAttacks( NoteData &nd, Song* pSong ); // void Scale( NoteData &nd, float fScale ); diff --git a/src/NoteDataWithScoring.h b/src/NoteDataWithScoring.h index e4a8d50cc2..5ae36adc56 100644 --- a/src/NoteDataWithScoring.h +++ b/src/NoteDataWithScoring.h @@ -1,5 +1,3 @@ -/* NoteDataWithScoring - NoteData with scores for each TapNote and HoldNote. */ - #ifndef NOTE_DATA_WITH_SCORING_H #define NOTE_DATA_WITH_SCORING_H @@ -12,6 +10,7 @@ class PlayerStageStats; class NoteData; struct TapNote; +/** @brief NoteData with scores for each TapNote and HoldNote. */ namespace NoteDataWithScoring { bool IsRowCompletelyJudged( const NoteData &in, unsigned iRow ); diff --git a/src/NotesLoader.h b/src/NotesLoader.h index 3b4e6b6ca5..626f3c1979 100644 --- a/src/NotesLoader.h +++ b/src/NotesLoader.h @@ -1,5 +1,3 @@ -/* NotesLoader - Base class for step file loaders. */ - #ifndef NOTES_LOADER_H #define NOTES_LOADER_H @@ -7,16 +5,31 @@ class Song; +/** @brief Base class for step file loaders. */ namespace NotesLoader { - void GetMainAndSubTitlesFromFullTitle( const RString &sFullTitle, RString &sMainTitleOut, RString &sSubTitleOut ); + /** + * @brief Identify the main and sub titles from a full title. + * @param sFullTitle the full title. + * @param sMainTitleOut the eventual main title. + * @param sSubTitleOut the ventual sub title. */ + void GetMainAndSubTitlesFromFullTitle( const RString &sFullTitle, + RString &sMainTitleOut, RString &sSubTitleOut ); + /** + * @brief Attempt to load a Song from the given directory. + * @param sPath the path to the file. + * @param out the Song in question. + * @param BlacklistedImages images to exclude (DWI files only for some reason). + * @return its success or failure. */ bool LoadFromDir( const RString &sPath, Song &out, set &BlacklistedImages ); } #endif -/* - * (c) 2001-2003,2007 Chris Danford, Glenn Maynard, Steve Checkoway +/** + * @file + * @author Chris Danford, Glenn Maynard, Steve Checkoway (c) 2001-2003,2007 + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/NotesLoaderPMS.h b/src/NotesLoaderPMS.h index 3baa700fb9..557274875d 100644 --- a/src/NotesLoaderPMS.h +++ b/src/NotesLoaderPMS.h @@ -1,10 +1,8 @@ -/* PMSLoader - reads a Song from a set of .PMS files. */ - #ifndef NOTES_LOADER_PMS_H #define NOTES_LOADER_PMS_H class Song; - +/** @brief Reads a Song from a set of .PMS files. */ namespace PMSLoader { void GetApplicableFiles( const RString &sPath, vector &out ); @@ -13,8 +11,10 @@ namespace PMSLoader #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/NotesWriterDWI.cpp b/src/NotesWriterDWI.cpp index 8b5f930b7e..6465efb82a 100644 --- a/src/NotesWriterDWI.cpp +++ b/src/NotesWriterDWI.cpp @@ -11,98 +11,11 @@ #include "Song.h" #include "Steps.h" -static RString OptimizeDWIString( RString holds, RString taps ); - -/* Output is an angle bracket expression without angle brackets, eg. "468". */ -static RString NotesToDWIString( const TapNote tnCols[6] ) -{ - const char dirs[] = { '4', 'C', '2', '8', 'D', '6' }; - RString taps, holds, ret; - for( int col = 0; col < 6; ++col ) - { - switch( tnCols[col].type ) - { - case TapNote::empty: - case TapNote::mine: - continue; - } - - if( tnCols[col].type == TapNote::hold_head ) - holds += dirs[col]; - else - taps += dirs[col]; - } - - if( holds.size() + taps.size() == 0 ) - return "0"; - -// RString combine = taps; -// for( unsigned i = 0; i < holds.size(); ++i ) -// combine += ssprintf("%c!%c", holds[i], holds[i]); - -// if( holds.size() + taps.size() > 1 ) -// combine = ssprintf("<%s>", combine.c_str() ); - -// return combine; - - /* More than one. */ - return OptimizeDWIString( holds, taps ); -/* struct DWICharLookup { - char c; - bool bCol[6]; - } const lookup[] = { - { '0', { 0, 0, 0, 0, 0, 0 } }, - { '1', { 1, 0, 1, 0, 0, 0 } }, - { '2', { 0, 0, 1, 0, 0, 0 } }, - { '3', { 0, 0, 1, 0, 0, 1 } }, - { '4', { 1, 0, 0, 0, 0, 0 } }, - { '6', { 0, 0, 0, 0, 0, 1 } }, - { '7', { 1, 0, 0, 1, 0, 0 } }, - { '8', { 0, 0, 0, 1, 0, 0 } }, - { '9', { 0, 0, 0, 1, 0, 1 } }, - { 'A', { 0, 0, 1, 1, 0, 0 } }, - { 'B', { 1, 0, 0, 0, 0, 1 } }, - { 'C', { 0, 1, 0, 0, 0, 0 } }, - { 'D', { 0, 0, 0, 0, 1, 0 } }, - { 'E', { 1, 1, 0, 0, 0, 0 } }, - { 'F', { 0, 1, 1, 0, 0, 0 } }, - { 'G', { 0, 1, 0, 1, 0, 0 } }, - { 'H', { 0, 1, 0, 0, 0, 1 } }, - { 'I', { 1, 0, 0, 0, 1, 0 } }, - { 'J', { 0, 0, 1, 0, 1, 0 } }, - { 'K', { 0, 0, 0, 1, 1, 0 } }, - { 'L', { 0, 0, 0, 0, 1, 1 } }, - { 'M', { 0, 1, 0, 0, 1, 0 } }, - }; - const int iNumLookups = sizeof(lookup) / sizeof(*lookup); - - for( int i=0; iWarn( "Failed to find the DWI character for the row %d %d %d %d %d %d", bCol1, bCol2, bCol3, bCol4, bCol5, bCol6 ); - return '0';*/ -} - -static RString NotesToDWIString( TapNote tnCol1, TapNote tnCol2, TapNote tnCol3, TapNote tnCol4, TapNote tnCol5, TapNote tnCol6 ) -{ - TapNote tnCols[6]; - tnCols[0] = tnCol1; - tnCols[1] = tnCol2; - tnCols[2] = tnCol3; - tnCols[3] = tnCol4; - tnCols[4] = tnCol5; - tnCols[5] = tnCol6; - return NotesToDWIString( tnCols ); -} - -static RString NotesToDWIString( TapNote tnCol1, TapNote tnCol2, TapNote tnCol3, TapNote tnCol4 ) -{ - return NotesToDWIString( tnCol1, TAP_EMPTY, tnCol2, tnCol3, TAP_EMPTY, tnCol4 ); -} - +/** + * @brief Optimize an individual pair of characters whenever possible. + * @param c1 the first character. + * @param c2 the second character. + * @return the one singular character. */ static char OptimizeDWIPair( char c1, char c2 ) { typedef pair cpair; @@ -128,16 +41,21 @@ static char OptimizeDWIPair( char c1, char c2 ) joins[ cpair('8', 'D') ] = 'K'; joins[ cpair('6', 'D') ] = 'L'; } - + if( c1 > c2 ) swap( c1, c2 ); - + map< cpair, char >::const_iterator it = joins.find( cpair(c1, c2) ); ASSERT( it != joins.end() ); - + return it->second; } +/** + * @brief Shrink the file contents as best as possible. + * @param holds the holds in the file. + * @param taps the taps in the file. + * @return the optimized string. */ RString OptimizeDWIString( RString holds, RString taps ) { /* First, sort the holds and taps in ASCII order. This puts 2468 first. @@ -145,17 +63,17 @@ RString OptimizeDWIString( RString holds, RString taps ) * do eg. 1D, not 2I. */ sort( holds.begin(), holds.end() ); sort( taps.begin(), taps.end() ); - + /* Combine characters as much as possible. */ RString comb_taps, comb_holds; - + /* 24 -> 1 */ while( taps.size() > 1 ) { comb_taps += OptimizeDWIPair( taps[0], taps[1] ); taps.erase(0, 2); } - + /* 2!24!4 -> 1!1 */ while( holds.size() > 1 ) { @@ -163,10 +81,10 @@ RString OptimizeDWIString( RString holds, RString taps ) holds.erase(0, 2); comb_holds += ssprintf( "%c!%c", to, to ); } - + ASSERT( taps.size() <= 1 ); ASSERT( holds.size() <= 1 ); - + /* 24!4 -> 1!4 */ while( holds.size() == 1 && taps.size() == 1 ) { @@ -175,7 +93,7 @@ RString OptimizeDWIString( RString holds, RString taps ) taps.erase(0, 1); holds.erase(0, 1); } - + /* Now we have at most one single tap and one hold remaining, and any * number of taps and holds in comb_taps and comb_holds. */ RString ret; @@ -184,15 +102,85 @@ RString OptimizeDWIString( RString holds, RString taps ) if( holds.size() == 1 ) ret += ssprintf( "%c!%c", holds[0], holds[0] ); ret += comb_holds; - + if( ret.size() == 1 || (ret.size() == 3 && ret[1] == '!') ) return ret; else return ssprintf( "<%s>", ret.c_str() ); } +/** + * @brief Turn the Notes into a DWI string without angle brackets whenever possible. + * @param tnCols the columns of TapNotes in question. + * @return the DWI'ed string. */ +static RString NotesToDWIString( const TapNote tnCols[6] ) +{ + const char dirs[] = { '4', 'C', '2', '8', 'D', '6' }; + RString taps, holds, ret; + for( int col = 0; col < 6; ++col ) + { + switch( tnCols[col].type ) + { + case TapNote::empty: + case TapNote::mine: + continue; + } + + if( tnCols[col].type == TapNote::hold_head ) + holds += dirs[col]; + else + taps += dirs[col]; + } + + if( holds.size() + taps.size() == 0 ) + return "0"; + + /* More than one. */ + return OptimizeDWIString( holds, taps ); +} + +/** + * @brief Turn the Notes into a DWI string without angle brackets whenever possible. + * @param tnCol1 the first column. + * @param tnCol2 the second column. + * @param tnCol3 the third column. + * @param tnCol4 the fourth column. + * @param tnCol5 the fifth column. + * @param tnCol6 the sisth column. + * @return the DWI'ed string. */ +static RString NotesToDWIString( TapNote tnCol1, TapNote tnCol2, TapNote tnCol3, + TapNote tnCol4, TapNote tnCol5, TapNote tnCol6 ) +{ + TapNote tnCols[6]; + tnCols[0] = tnCol1; + tnCols[1] = tnCol2; + tnCols[2] = tnCol3; + tnCols[3] = tnCol4; + tnCols[4] = tnCol5; + tnCols[5] = tnCol6; + return NotesToDWIString( tnCols ); +} + +/** + * @brief Turn the Notes into a DWI string without angle brackets whenever possible. + * @param tnCol1 the first column. + * @param tnCol2 the second column. + * @param tnCol3 the third column. + * @param tnCol4 the fourth column. + * @return the DWI'ed string. */ +static RString NotesToDWIString( TapNote tnCol1, TapNote tnCol2, TapNote tnCol3, TapNote tnCol4 ) +{ + return NotesToDWIString( tnCol1, TAP_EMPTY, tnCol2, tnCol3, TAP_EMPTY, tnCol4 ); +} + +/** @brief The number of beats per measure for a DWI file. */ static const int BEATS_PER_MEASURE = 4; +/** + * @brief Write out the notes for a DWI file. + * @param f the file to write out to. + * @param out the Steps in question. + * @param start the starting position. */ static void WriteDWINotesField( RageFile &f, const Steps &out, int start ) { NoteData notedata; @@ -315,6 +303,11 @@ static void WriteDWINotesField( RageFile &f, const Steps &out, int start ) } } +/** + * @brief Attempt to write a DWI's #NOTES tag. + * @param f the file to write out to. + * @param out the Steps in question. + * @return its success or failure. */ static bool WriteDWINotesTag( RageFile &f, const Steps &out ) { if( out.GetDifficulty() == Difficulty_Edit ) diff --git a/src/NotesWriterDWI.h b/src/NotesWriterDWI.h index ced57d528f..5c581139ed 100644 --- a/src/NotesWriterDWI.h +++ b/src/NotesWriterDWI.h @@ -1,18 +1,24 @@ -/* NotesWriterDWI - Writes a Song to a .DWI file. */ - #ifndef NOTES_WRITER_DWI_H #define NOTES_WRITER_DWI_H class Song; +/** @brief Writes a Song to a .DWI file. */ namespace NotesWriterDWI { + /** + * @brief Write the song out to a file. + * @param sPath the path to write the file. + * @param out the Song to be written out. + * @return its success or failure. */ bool Write( RString sPath, const Song &out ); } #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/OptionRowHandler.h b/src/OptionRowHandler.h index f2591f1873..af02574a3c 100644 --- a/src/OptionRowHandler.h +++ b/src/OptionRowHandler.h @@ -1,5 +1,3 @@ -/* OptionRowHandler - Shows PlayerOptions and SongOptions in icon form. */ - #ifndef OptionRowHandler_H #define OptionRowHandler_H @@ -84,6 +82,7 @@ struct OptionRowDefinition } }; +/** @brief Shows PlayerOptions and SongOptions in icon form. */ class OptionRowHandler { public: @@ -130,7 +129,7 @@ public: virtual RString GetScreen( int iChoice ) const { return RString(); } }; - +/** @brief Utilities for the OptionRowHandlers. */ namespace OptionRowHandlerUtil { OptionRowHandler* Make( const Commands &cmds ); From 16abbfb0fbb48e945e5f504f83f29f5b7578d3be Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 23:32:08 -0500 Subject: [PATCH 061/143] The only place that had judg"e"ment. --- src/ScreenHowToPlay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ScreenHowToPlay.cpp b/src/ScreenHowToPlay.cpp index 16ddba07a2..e2140ccc4c 100644 --- a/src/ScreenHowToPlay.cpp +++ b/src/ScreenHowToPlay.cpp @@ -169,7 +169,7 @@ void ScreenHowToPlay::Init() this->AddChild( m_Player ); ActorUtil::LoadAllCommandsAndSetXY( m_Player, m_sName ); - // Don't show judgement + // Don't show judgment PO_GROUP_ASSIGN( GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions, ModsLevel_Stage, m_fBlind, 1.0f ); GAMESTATE->m_MasterPlayerNumber = PLAYER_1; GAMESTATE->m_bDemonstrationOrJukebox = true; From 020e3a70fe1fb58d78a0fa43b470b358ae9539af Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 23:48:13 -0500 Subject: [PATCH 062/143] More doxygen updates. --- src/HighScore.h | 6 ++-- src/Player.cpp | 6 ++-- src/Player.h | 5 ++-- src/ScoreDisplayLifeTime.h | 6 ++-- src/ScreenEvaluation.h | 59 +++++++++++++++++++++----------------- 5 files changed, 47 insertions(+), 35 deletions(-) diff --git a/src/HighScore.h b/src/HighScore.h index ba493e4d10..fb99deb4c0 100644 --- a/src/HighScore.h +++ b/src/HighScore.h @@ -1,5 +1,3 @@ -/** @brief HighScore - Player scoring data that persists between sessions. */ - #ifndef HIGH_SCORE_H #define HIGH_SCORE_H @@ -13,7 +11,9 @@ struct RadarValues; struct lua_State; struct HighScoreImpl; -/** @brief The high score that is earned by a player. */ +/** @brief The high score that is earned by a player. + * + * This is scoring data that is persisted between sessions. */ struct HighScore { HighScore(); diff --git a/src/Player.cpp b/src/Player.cpp index fd3a45e715..87625838bc 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -91,8 +91,10 @@ public: RString ATTACK_DISPLAY_X_NAME( size_t p, size_t both_sides ) { return "AttackDisplayXOffset" + (both_sides ? RString("BothSides") : ssprintf("OneSideP%d",int(p+1)) ); } -/* Distance to search for a note in Step(), in seconds. */ -// TODO: This should be calculated based on the max size of the current judgment windows. +/** + * @brief Distance to search for a note in Step(), in seconds. + * + * TODO: This should be calculated based on the max size of the current judgment windows. */ static const float StepSearchDistance = 1.0f; void TimingWindowSecondsInit( size_t /*TimingWindow*/ i, RString &sNameOut, float &defaultValueOut ) diff --git a/src/Player.h b/src/Player.h index 82118d95ce..4afd0c76e9 100644 --- a/src/Player.h +++ b/src/Player.h @@ -1,5 +1,3 @@ -/* Player - Accepts input, knocks down TapNotes that were stepped on, and keeps score for the player. */ - #ifndef PLAYER_H #define PLAYER_H @@ -37,6 +35,7 @@ AutoScreenMessage( SM_1000Combo ); AutoScreenMessage( SM_ComboStopped ); AutoScreenMessage( SM_ComboContinuing ); +/** @brief Accepts input, knocks down TapNotes that were stepped on, and keeps score for the player. */ class Player: public ActorFrame { public: @@ -145,7 +144,9 @@ protected: bool m_bLoaded; + /** @brief The player's present state. */ PlayerState *m_pPlayerState; + /** @brief The player's present stage stats. */ PlayerStageStats *m_pPlayerStageStats; float m_fNoteFieldHeight; diff --git a/src/ScoreDisplayLifeTime.h b/src/ScoreDisplayLifeTime.h index e9bd02500e..8972c97899 100644 --- a/src/ScoreDisplayLifeTime.h +++ b/src/ScoreDisplayLifeTime.h @@ -1,5 +1,3 @@ -/* ScoreDisplayLifeTime - Display a updating count of life time remaining. */ - #ifndef ScoreDisplayLifeTime_H #define ScoreDisplayLifeTime_H @@ -7,6 +5,10 @@ #include "BitmapText.h" #include "AutoActor.h" +/** + * @breif Display a updating count of life time remaining. + * + * This is mainly used for Survival mode. */ class ScoreDisplayLifeTime : public ScoreDisplay { public: diff --git a/src/ScreenEvaluation.h b/src/ScreenEvaluation.h index 5053600aa0..3e6c3f1280 100644 --- a/src/ScreenEvaluation.h +++ b/src/ScreenEvaluation.h @@ -1,5 +1,3 @@ -/* ScreenEvaluation - Shows the player their score after gameplay has ended. */ - #ifndef SCREEN_EVALUATION_H #define SCREEN_EVALUATION_H @@ -14,31 +12,38 @@ #include "ThemeMetric.h" #include "RollingNumbers.h" -const int MAX_SONGS_TO_SHOW = 5; // In summary, we show last 3 stages, plus extra stages if passed +/** + * @brief How many songs are shown at the end? + * + * In the traditional summary, only the last three stages are shown. + * If any extra stages are passed, those get shown as well. */ +const int MAX_SONGS_TO_SHOW = 5; +/** @brief The different judgment lines shown. */ enum JudgmentLine { - JudgmentLine_W1, - JudgmentLine_W2, - JudgmentLine_W3, - JudgmentLine_W4, - JudgmentLine_W5, - JudgmentLine_Miss, - JudgmentLine_Held, - JudgmentLine_MaxCombo, - NUM_JudgmentLine, + JudgmentLine_W1, /**< The line showing absolutely perfect hits. */ + JudgmentLine_W2, /**< The line showing just-a-smidge-off perfect hits. */ + JudgmentLine_W3, /**< The line showing almost perfect hits. */ + JudgmentLine_W4, /**< The line showing hits that were not that good. */ + JudgmentLine_W5, /**< The line showing hits that were almost missed. */ + JudgmentLine_Miss, /**< The line showing missed notes. */ + JudgmentLine_Held, /**< The line showing held down notes. */ + JudgmentLine_MaxCombo, /**< The line showing the player's max combo. */ + NUM_JudgmentLine, /**< The number of judgment lines available. */ JudgmentLine_Invalid }; +/** @brief The number of details based on the radar categories. */ enum DetailLine { - DetailLine_NumSteps, - DetailLine_Jumps, - DetailLine_Holds, - DetailLine_Mines, - DetailLine_Hands, - DetailLine_Rolls, - NUM_DetailLine + DetailLine_NumSteps, /**< The number of steps hit. */ + DetailLine_Jumps, /**< The number of jumps hit together. */ + DetailLine_Holds, /**< The number of holds held. */ + DetailLine_Mines, /**< The number of mines avoided. */ + DetailLine_Hands, /**< The number of hands hit (somehow) */ + DetailLine_Rolls, /**< The number of rolls hit repeatedly. */ + NUM_DetailLine /**< The nuber of detailed lines. */ }; - +/** @brief Shows the player their score after gameplay has ended. */ class ScreenEvaluation : public ScreenWithMenuElements { public: @@ -69,7 +74,7 @@ protected: // grade area AutoActor m_sprGradeFrame[NUM_PLAYERS]; - GradeDisplay m_Grades[NUM_PLAYERS]; + GradeDisplay m_Grades[NUM_PLAYERS]; // points area bool m_bNewSongsUnlocked; @@ -91,7 +96,7 @@ protected: // judgment area AutoActor m_sprSharedJudgmentLineLabels[NUM_JudgmentLine]; - RollingNumbers m_textJudgmentLineNumber[NUM_JudgmentLine][NUM_PLAYERS]; + RollingNumbers m_textJudgmentLineNumber[NUM_JudgmentLine][NUM_PLAYERS]; // stats area AutoActor m_sprDetailFrame[NUM_PLAYERS]; @@ -99,7 +104,7 @@ protected: // score area AutoActor m_sprScoreLabel; - RollingNumbers m_textScore[NUM_PLAYERS]; + RollingNumbers m_textScore[NUM_PLAYERS]; // time area AutoActor m_sprTimeLabel; @@ -108,14 +113,16 @@ protected: RageSound m_soundStart; // sound played if the player passes or fails ThemeMetric SUMMARY; - + /** @brief Did a player save a screenshot of their score? */ bool m_bSavedScreenshot[NUM_PLAYERS]; }; #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 From 1bed6d36308406a4f08a4cad040324952a855bf7 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Fri, 18 Feb 2011 23:55:41 -0500 Subject: [PATCH 063/143] De-Python-ize REGISTER_ACTOR_CLASS(*). --- src/Actor.cpp | 2 +- src/ActorFrame.cpp | 4 ++-- src/ActorFrameTexture.cpp | 2 +- src/ActorMultiTexture.cpp | 2 +- src/ActorProxy.cpp | 2 +- src/ActorScroller.cpp | 4 ++-- src/ActorSound.cpp | 2 +- src/ActorUtil.h | 13 ++++++++++--- src/BGAnimation.cpp | 2 +- src/BPMDisplay.cpp | 4 ++-- src/Banner.cpp | 2 +- src/BitmapText.cpp | 2 +- src/ComboGraph.cpp | 2 +- src/ControllerStateDisplay.cpp | 2 +- src/CourseContentsList.cpp | 2 +- src/DifficultyIcon.cpp | 2 +- src/DifficultyList.cpp | 2 +- src/DynamicActorScroller.cpp | 2 +- src/FadingBanner.cpp | 2 +- src/GradeDisplay.cpp | 2 +- src/GraphDisplay.cpp | 4 ++-- src/GrooveRadar.cpp | 2 +- src/HelpDisplay.cpp | 2 +- src/HoldJudgment.cpp | 2 +- src/MemoryCardDisplay.cpp | 2 +- src/MeterDisplay.cpp | 4 ++-- src/ModIconRow.cpp | 2 +- src/Model.cpp | 2 +- src/PaneDisplay.cpp | 2 +- src/PercentageDisplay.cpp | 2 +- src/Quad.cpp | 2 +- src/RollingNumbers.cpp | 2 +- src/ScoreDisplayAliveTime.cpp | 2 +- src/ScoreDisplayCalories.cpp | 2 +- src/Sprite.cpp | 2 +- src/TextBanner.cpp | 2 +- src/WorkoutGraph.cpp | 2 +- 37 files changed, 51 insertions(+), 44 deletions(-) diff --git a/src/Actor.cpp b/src/Actor.cpp index 973a22f514..153b947950 100644 --- a/src/Actor.cpp +++ b/src/Actor.cpp @@ -27,7 +27,7 @@ public: HiddenActor() { SetVisible(false); } virtual HiddenActor *Copy() const; }; -REGISTER_ACTOR_CLASS_WITH_NAME( HiddenActor, Actor ) +REGISTER_ACTOR_CLASS_WITH_NAME( HiddenActor, Actor ); float Actor::g_fCurrentBGMTime = 0, Actor::g_fCurrentBGMBeat; float Actor::g_fCurrentBGMTimeNoOffset = 0, Actor::g_fCurrentBGMBeatNoOffset = 0; diff --git a/src/ActorFrame.cpp b/src/ActorFrame.cpp index 0f83865b3c..672cac0279 100644 --- a/src/ActorFrame.cpp +++ b/src/ActorFrame.cpp @@ -16,8 +16,8 @@ * children. The name "ActorFrame" is widely used in Lua, so we'll have * that string instead create an ActorFrameAutoDeleteChildren object. */ -//REGISTER_ACTOR_CLASS( ActorFrame ) -REGISTER_ACTOR_CLASS_WITH_NAME( ActorFrameAutoDeleteChildren, ActorFrame ) +//REGISTER_ACTOR_CLASS( ActorFrame ); +REGISTER_ACTOR_CLASS_WITH_NAME( ActorFrameAutoDeleteChildren, ActorFrame ); ActorFrame *ActorFrame::Copy() const { return new ActorFrame(*this); } diff --git a/src/ActorFrameTexture.cpp b/src/ActorFrameTexture.cpp index f770dc0b48..f86cfa225d 100644 --- a/src/ActorFrameTexture.cpp +++ b/src/ActorFrameTexture.cpp @@ -4,7 +4,7 @@ #include "RageTextureManager.h" #include "ActorUtil.h" -REGISTER_ACTOR_CLASS_WITH_NAME( ActorFrameTextureAutoDeleteChildren, ActorFrameTexture ) +REGISTER_ACTOR_CLASS_WITH_NAME( ActorFrameTextureAutoDeleteChildren, ActorFrameTexture ); ActorFrameTexture *ActorFrameTexture::Copy() const { return new ActorFrameTexture(*this); } ActorFrameTexture::ActorFrameTexture() diff --git a/src/ActorMultiTexture.cpp b/src/ActorMultiTexture.cpp index ef93b9b766..1b69a5c0f0 100644 --- a/src/ActorMultiTexture.cpp +++ b/src/ActorMultiTexture.cpp @@ -13,7 +13,7 @@ #include "LuaBinding.h" #include "LuaManager.h" -REGISTER_ACTOR_CLASS( ActorMultiTexture ) +REGISTER_ACTOR_CLASS( ActorMultiTexture ); ActorMultiTexture::ActorMultiTexture() diff --git a/src/ActorProxy.cpp b/src/ActorProxy.cpp index a977a69730..8429ecab96 100644 --- a/src/ActorProxy.cpp +++ b/src/ActorProxy.cpp @@ -2,7 +2,7 @@ #include "ActorProxy.h" #include "ActorUtil.h" -REGISTER_ACTOR_CLASS( ActorProxy ) +REGISTER_ACTOR_CLASS( ActorProxy ); ActorProxy::ActorProxy() { diff --git a/src/ActorScroller.cpp b/src/ActorScroller.cpp index 53a6cd19c3..3d65ad01d2 100644 --- a/src/ActorScroller.cpp +++ b/src/ActorScroller.cpp @@ -12,8 +12,8 @@ * We don't want classes that derive from ActorFrame to auto delete their * children. The name "ActorFrame" is widely used in Lua, so we'll have * that string instead create an ActorFrameAutoDeleteChildren object. */ -//REGISTER_ACTOR_CLASS( ActorScroller ) -REGISTER_ACTOR_CLASS_WITH_NAME( ActorScrollerAutoDeleteChildren, ActorScroller ) +//REGISTER_ACTOR_CLASS( ActorScroller ); +REGISTER_ACTOR_CLASS_WITH_NAME( ActorScrollerAutoDeleteChildren, ActorScroller ); ActorScroller *ActorScroller::Copy() const { return new ActorScroller(*this); } diff --git a/src/ActorSound.cpp b/src/ActorSound.cpp index c750739353..b70fe7fce6 100644 --- a/src/ActorSound.cpp +++ b/src/ActorSound.cpp @@ -5,7 +5,7 @@ #include "XmlFile.h" #include "RageUtil.h" -REGISTER_ACTOR_CLASS_WITH_NAME( ActorSound, Sound ) +REGISTER_ACTOR_CLASS_WITH_NAME( ActorSound, Sound ); void ActorSound::Load( const RString &sPath ) { diff --git a/src/ActorUtil.h b/src/ActorUtil.h index f8c2b56b41..3d199bf1c9 100644 --- a/src/ActorUtil.h +++ b/src/ActorUtil.h @@ -13,14 +13,21 @@ typedef Actor* (*CreateActorFn)(); template Actor *CreateActor() { return new T; } -// Each Actor class should have a REGISTER_ACTOR_CLASS in its CPP file. +/** + * @brief Register the requested Actor with the specified external name. + * + * This should be called manually only if needed. */ #define REGISTER_ACTOR_CLASS_WITH_NAME( className, externalClassName ) \ struct Register##className { \ Register##className() { ActorUtil::Register(#externalClassName, CreateActor); } \ }; \ - static Register##className register##className; \ - className *className::Copy() const { return new className(*this); } + className *className::Copy() const { return new className(*this); } \ + static Register##className register##className +/** + * @brief Register the requested Actor so that it's more accessible. + * + * Each Actor class should have a REGISTER_ACTOR_CLASS in its CPP file. */ #define REGISTER_ACTOR_CLASS( className ) REGISTER_ACTOR_CLASS_WITH_NAME( className, className ) enum FileType diff --git a/src/BGAnimation.cpp b/src/BGAnimation.cpp index cac4f31866..dd93e73a8a 100644 --- a/src/BGAnimation.cpp +++ b/src/BGAnimation.cpp @@ -7,7 +7,7 @@ #include "Foreach.h" #include "LuaManager.h" -REGISTER_ACTOR_CLASS(BGAnimation) +REGISTER_ACTOR_CLASS(BGAnimation); BGAnimation::BGAnimation() { diff --git a/src/BPMDisplay.cpp b/src/BPMDisplay.cpp index b079cf9f93..19a28a077f 100644 --- a/src/BPMDisplay.cpp +++ b/src/BPMDisplay.cpp @@ -12,7 +12,7 @@ #include -REGISTER_ACTOR_CLASS( BPMDisplay ) +REGISTER_ACTOR_CLASS( BPMDisplay ); BPMDisplay::BPMDisplay() { @@ -286,7 +286,7 @@ void SongBPMDisplay::Update( float fDeltaTime ) BPMDisplay::Update( fDeltaTime ); } -REGISTER_ACTOR_CLASS( SongBPMDisplay ) +REGISTER_ACTOR_CLASS( SongBPMDisplay ); #include "LuaBinding.h" /** @brief Allow Lua to have access to the BPMDisplay. */ diff --git a/src/Banner.cpp b/src/Banner.cpp index c3ee65fab7..485722754c 100644 --- a/src/Banner.cpp +++ b/src/Banner.cpp @@ -13,7 +13,7 @@ #include "UnlockManager.h" #include "PrefsManager.h" -REGISTER_ACTOR_CLASS( Banner ) +REGISTER_ACTOR_CLASS( Banner ); ThemeMetric SCROLL_RANDOM ("Banner","ScrollRandom"); ThemeMetric SCROLL_ROULETTE ("Banner","ScrollRoulette"); diff --git a/src/BitmapText.cpp b/src/BitmapText.cpp index 141a661c75..d65911721a 100644 --- a/src/BitmapText.cpp +++ b/src/BitmapText.cpp @@ -11,7 +11,7 @@ #include "LuaBinding.h" #include "Foreach.h" -REGISTER_ACTOR_CLASS( BitmapText ) +REGISTER_ACTOR_CLASS( BitmapText ); /* XXX: Changing a whole array of diffuse colors every frame (several times) is * a waste, when we're usually setting them all to the same value. Rainbow and diff --git a/src/ComboGraph.cpp b/src/ComboGraph.cpp index bc033c296b..21d157b8bd 100644 --- a/src/ComboGraph.cpp +++ b/src/ComboGraph.cpp @@ -8,7 +8,7 @@ const int MinComboSizeToShow = 5; -REGISTER_ACTOR_CLASS( ComboGraph ) +REGISTER_ACTOR_CLASS( ComboGraph ); ComboGraph::ComboGraph() { diff --git a/src/ControllerStateDisplay.cpp b/src/ControllerStateDisplay.cpp index f8a69de06d..12b9cc5471 100644 --- a/src/ControllerStateDisplay.cpp +++ b/src/ControllerStateDisplay.cpp @@ -27,7 +27,7 @@ static const GameButton ControllerStateButtonToGameButton[] = { PUMP_BUTTON_DOWNRIGHT, }; -REGISTER_ACTOR_CLASS( ControllerStateDisplay ) +REGISTER_ACTOR_CLASS( ControllerStateDisplay ); ControllerStateDisplay::ControllerStateDisplay() { diff --git a/src/CourseContentsList.cpp b/src/CourseContentsList.cpp index 98dfa1d61f..14b332e0bc 100644 --- a/src/CourseContentsList.cpp +++ b/src/CourseContentsList.cpp @@ -10,7 +10,7 @@ #include "RageUtil.h" #include "Steps.h" -REGISTER_ACTOR_CLASS( CourseContentsList ) +REGISTER_ACTOR_CLASS( CourseContentsList ); CourseContentsList::~CourseContentsList() { diff --git a/src/DifficultyIcon.cpp b/src/DifficultyIcon.cpp index 8cde519d76..e2f8c450b5 100644 --- a/src/DifficultyIcon.cpp +++ b/src/DifficultyIcon.cpp @@ -12,7 +12,7 @@ #include "XmlFile.h" #include "LuaManager.h" -REGISTER_ACTOR_CLASS(DifficultyIcon) +REGISTER_ACTOR_CLASS(DifficultyIcon); DifficultyIcon::DifficultyIcon() { diff --git a/src/DifficultyList.cpp b/src/DifficultyList.cpp index 668061d8c8..153f1beaa7 100644 --- a/src/DifficultyList.cpp +++ b/src/DifficultyList.cpp @@ -24,7 +24,7 @@ // "magic" 6. -aj #define MAX_METERS (NUM_Difficulty * 6) + MAX_EDITS_PER_SONG -REGISTER_ACTOR_CLASS( StepsDisplayList ) +REGISTER_ACTOR_CLASS( StepsDisplayList ); StepsDisplayList::StepsDisplayList() { diff --git a/src/DynamicActorScroller.cpp b/src/DynamicActorScroller.cpp index e79e2a4392..51f256cc6a 100644 --- a/src/DynamicActorScroller.cpp +++ b/src/DynamicActorScroller.cpp @@ -126,7 +126,7 @@ void DynamicActorScroller::ConfigureActor( Actor *pActor, int iItem ) LUA->Release(L); } -REGISTER_ACTOR_CLASS_WITH_NAME( DynamicActorScrollerAutoDeleteChildren, DynamicActorScroller ) +REGISTER_ACTOR_CLASS_WITH_NAME( DynamicActorScrollerAutoDeleteChildren, DynamicActorScroller ); /* * (c) 2005 Glenn Maynard diff --git a/src/FadingBanner.cpp b/src/FadingBanner.cpp index b3bbe3e81a..f11baa0421 100644 --- a/src/FadingBanner.cpp +++ b/src/FadingBanner.cpp @@ -11,7 +11,7 @@ #include "ThemeMetric.h" #include "ActorUtil.h" -REGISTER_ACTOR_CLASS( FadingBanner ) +REGISTER_ACTOR_CLASS( FadingBanner ); /* Allow fading from one banner to another. We can handle two fades at once; * this is used to fade from an old banner to a low-quality banner to a high- diff --git a/src/GradeDisplay.cpp b/src/GradeDisplay.cpp index 49f7ca60f1..7760ca877b 100644 --- a/src/GradeDisplay.cpp +++ b/src/GradeDisplay.cpp @@ -6,7 +6,7 @@ #include "ActorUtil.h" #include "ThemeManager.h" -REGISTER_ACTOR_CLASS( GradeDisplay ) +REGISTER_ACTOR_CLASS( GradeDisplay ); void GradeDisplay::Load( RString sMetricsGroup ) { diff --git a/src/GraphDisplay.cpp b/src/GraphDisplay.cpp index cc5e2c29ab..adf88abfa5 100644 --- a/src/GraphDisplay.cpp +++ b/src/GraphDisplay.cpp @@ -13,7 +13,7 @@ #include "XmlFile.h" //#define DIVIDE_LINE_WIDTH THEME->GetMetricI(m_sName,"TexturedBottomHalf") -REGISTER_ACTOR_CLASS( GraphDisplay ) +REGISTER_ACTOR_CLASS( GraphDisplay ); enum { VALUE_RESOLUTION=100 }; @@ -108,7 +108,7 @@ private: vector m_Quads; vector m_pCircles; }; -REGISTER_ACTOR_CLASS( GraphLine ) +REGISTER_ACTOR_CLASS( GraphLine ); class GraphBody: public Actor { diff --git a/src/GrooveRadar.cpp b/src/GrooveRadar.cpp index 2544efafad..9f5a3c3fbe 100644 --- a/src/GrooveRadar.cpp +++ b/src/GrooveRadar.cpp @@ -11,7 +11,7 @@ #include "CommonMetrics.h" #include "ActorUtil.h" -REGISTER_ACTOR_CLASS(GrooveRadar) +REGISTER_ACTOR_CLASS(GrooveRadar); #define LABEL_OFFSET_X( i ) THEME->GetMetricF("GrooveRadar",ssprintf("Label%dOffsetX",i+1)) #define LABEL_OFFSET_Y( i ) THEME->GetMetricF("GrooveRadar",ssprintf("Label%dOffsetY",i+1)) diff --git a/src/HelpDisplay.cpp b/src/HelpDisplay.cpp index 544d5a691f..bef56bf06e 100644 --- a/src/HelpDisplay.cpp +++ b/src/HelpDisplay.cpp @@ -5,7 +5,7 @@ #include "ThemeManager.h" #include "ActorUtil.h" -REGISTER_ACTOR_CLASS( HelpDisplay ) +REGISTER_ACTOR_CLASS( HelpDisplay ); HelpDisplay::HelpDisplay() { diff --git a/src/HoldJudgment.cpp b/src/HoldJudgment.cpp index d6062f5550..fb9d99a435 100644 --- a/src/HoldJudgment.cpp +++ b/src/HoldJudgment.cpp @@ -7,7 +7,7 @@ #include "ActorUtil.h" #include "XmlFile.h" -REGISTER_ACTOR_CLASS( HoldJudgment ) +REGISTER_ACTOR_CLASS( HoldJudgment ); HoldJudgment::HoldJudgment() { diff --git a/src/MemoryCardDisplay.cpp b/src/MemoryCardDisplay.cpp index 9790355799..0a7ff18ab8 100644 --- a/src/MemoryCardDisplay.cpp +++ b/src/MemoryCardDisplay.cpp @@ -6,7 +6,7 @@ #include "XmlFile.h" #include "ActorUtil.h" -REGISTER_ACTOR_CLASS( MemoryCardDisplay ) +REGISTER_ACTOR_CLASS( MemoryCardDisplay ); MemoryCardDisplay::MemoryCardDisplay() { diff --git a/src/MeterDisplay.cpp b/src/MeterDisplay.cpp index e8b037bcb3..8f04782eef 100644 --- a/src/MeterDisplay.cpp +++ b/src/MeterDisplay.cpp @@ -8,8 +8,8 @@ #include "RageLog.h" #include "LuaManager.h" -REGISTER_ACTOR_CLASS(MeterDisplay) -REGISTER_ACTOR_CLASS(SongMeterDisplay) +REGISTER_ACTOR_CLASS(MeterDisplay); +REGISTER_ACTOR_CLASS(SongMeterDisplay); MeterDisplay::MeterDisplay() { diff --git a/src/ModIconRow.cpp b/src/ModIconRow.cpp index d5cfaa2963..19e0785a10 100644 --- a/src/ModIconRow.cpp +++ b/src/ModIconRow.cpp @@ -10,7 +10,7 @@ #include "LuaManager.h" #include "Foreach.h" -REGISTER_ACTOR_CLASS( ModIconRow ) +REGISTER_ACTOR_CLASS( ModIconRow ); ModIconRow::ModIconRow() { diff --git a/src/Model.cpp b/src/Model.cpp index c73a573975..f61bc45567 100644 --- a/src/Model.cpp +++ b/src/Model.cpp @@ -14,7 +14,7 @@ #include "LuaBinding.h" #include "PrefsManager.h" -REGISTER_ACTOR_CLASS( Model ) +REGISTER_ACTOR_CLASS( Model ); static const float FRAMES_PER_SECOND = 30; static const RString DEFAULT_ANIMATION_NAME = "default"; diff --git a/src/PaneDisplay.cpp b/src/PaneDisplay.cpp index ab7097baf4..88bb957b4e 100644 --- a/src/PaneDisplay.cpp +++ b/src/PaneDisplay.cpp @@ -55,7 +55,7 @@ static const Content_t g_Contents[NUM_PaneCategory] = { NEED_NOTES|NEED_PROFILE, "score" }, // ProfileHighScore }; -REGISTER_ACTOR_CLASS( PaneDisplay ) +REGISTER_ACTOR_CLASS( PaneDisplay ); void PaneDisplay::Load( const RString &sMetricsGroup, PlayerNumber pn ) { diff --git a/src/PercentageDisplay.cpp b/src/PercentageDisplay.cpp index 6f22bffd5b..66dcacc8f6 100644 --- a/src/PercentageDisplay.cpp +++ b/src/PercentageDisplay.cpp @@ -12,7 +12,7 @@ #include "Course.h" -REGISTER_ACTOR_CLASS( PercentageDisplay ) +REGISTER_ACTOR_CLASS( PercentageDisplay ); PercentageDisplay::PercentageDisplay() { diff --git a/src/Quad.cpp b/src/Quad.cpp index 6562b2b6cc..3a9d087ede 100644 --- a/src/Quad.cpp +++ b/src/Quad.cpp @@ -3,7 +3,7 @@ #include "ActorUtil.h" #include "RageTextureManager.h" -REGISTER_ACTOR_CLASS( Quad ) +REGISTER_ACTOR_CLASS( Quad ); Quad::Quad() { diff --git a/src/RollingNumbers.cpp b/src/RollingNumbers.cpp index d005b35a72..713a175b5e 100644 --- a/src/RollingNumbers.cpp +++ b/src/RollingNumbers.cpp @@ -5,7 +5,7 @@ #include "ActorUtil.h" #include "LuaManager.h" #include "ThemeManager.h" -REGISTER_ACTOR_CLASS( RollingNumbers ) +REGISTER_ACTOR_CLASS( RollingNumbers ); RollingNumbers::RollingNumbers() { diff --git a/src/ScoreDisplayAliveTime.cpp b/src/ScoreDisplayAliveTime.cpp index 8a6b9e43ba..434d093def 100644 --- a/src/ScoreDisplayAliveTime.cpp +++ b/src/ScoreDisplayAliveTime.cpp @@ -9,7 +9,7 @@ #include "LuaManager.h" #include "RageLog.h" -REGISTER_ACTOR_CLASS( ScoreDisplayAliveTime ) +REGISTER_ACTOR_CLASS( ScoreDisplayAliveTime ); ScoreDisplayAliveTime::ScoreDisplayAliveTime() diff --git a/src/ScoreDisplayCalories.cpp b/src/ScoreDisplayCalories.cpp index 0eb4681379..808447f70a 100644 --- a/src/ScoreDisplayCalories.cpp +++ b/src/ScoreDisplayCalories.cpp @@ -10,7 +10,7 @@ #include "StatsManager.h" #include "LuaManager.h" -REGISTER_ACTOR_CLASS( ScoreDisplayCalories ) +REGISTER_ACTOR_CLASS( ScoreDisplayCalories ); ScoreDisplayCalories::ScoreDisplayCalories() { diff --git a/src/Sprite.cpp b/src/Sprite.cpp index 25a7033a1d..eaee5cbf0c 100644 --- a/src/Sprite.cpp +++ b/src/Sprite.cpp @@ -14,7 +14,7 @@ #include "LuaBinding.h" #include "LuaManager.h" -REGISTER_ACTOR_CLASS( Sprite ) +REGISTER_ACTOR_CLASS( Sprite ); Sprite::Sprite() diff --git a/src/TextBanner.cpp b/src/TextBanner.cpp index 61d6a85181..22c7d38624 100644 --- a/src/TextBanner.cpp +++ b/src/TextBanner.cpp @@ -5,7 +5,7 @@ #include "ThemeManager.h" #include "XmlFile.h" -REGISTER_ACTOR_CLASS( TextBanner ) +REGISTER_ACTOR_CLASS( TextBanner ); void TextBanner::LoadFromNode( const XNode* pNode ) { diff --git a/src/WorkoutGraph.cpp b/src/WorkoutGraph.cpp index 1846cc897c..d886c71fa0 100644 --- a/src/WorkoutGraph.cpp +++ b/src/WorkoutGraph.cpp @@ -14,7 +14,7 @@ const int MAX_METERS_TO_SHOW = 50; -REGISTER_ACTOR_CLASS( WorkoutGraph ) +REGISTER_ACTOR_CLASS( WorkoutGraph ); WorkoutGraph::WorkoutGraph() { From 6a75b3bdc2d646d228f01d1cd56dd734e7e5f7ff Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Fri, 18 Feb 2011 23:01:46 -0600 Subject: [PATCH 064/143] small stuff --- src/OptionRow.cpp | 2 +- src/OptionRow.h | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/OptionRow.cpp b/src/OptionRow.cpp index cc37ffb4dc..e6734e114a 100644 --- a/src/OptionRow.cpp +++ b/src/OptionRow.cpp @@ -17,7 +17,7 @@ const RString EXIT_NAME = "Exit"; RString OptionRow::GetThemedItemText( int iChoice ) const { RString s = m_pHand->GetThemedItemText( iChoice ); - + // HACK: Always theme the NEXT_ROW and EXIT items. if( m_bFirstItemGoesDown && iChoice == 0 ) s = CommonMetrics::LocalizeOptionItem( NEXT_ROW_NAME, false ); diff --git a/src/OptionRow.h b/src/OptionRow.h index 6d05764488..d05c0b4e1b 100644 --- a/src/OptionRow.h +++ b/src/OptionRow.h @@ -116,21 +116,21 @@ public: protected: RString GetRowTitle() const; - const OptionRowType *m_pParentType; - RowType m_RowType; - OptionRowHandler* m_pHand; + const OptionRowType *m_pParentType; + RowType m_RowType; + OptionRowHandler* m_pHand; - ActorFrame m_Frame; + ActorFrame m_Frame; - vector m_textItems; // size depends on m_bRowIsLong and which players are joined + vector m_textItems; // size depends on m_bRowIsLong and which players are joined vector m_Underline[NUM_PLAYERS]; // size depends on m_bRowIsLong and which players are joined - Actor *m_sprFrame; - BitmapText *m_textTitle; - ModIcon *m_ModIcons[NUM_PLAYERS]; + Actor *m_sprFrame; + BitmapText *m_textTitle; + ModIcon *m_ModIcons[NUM_PLAYERS]; - bool m_bFirstItemGoesDown; - bool m_bRowHasFocus[NUM_PLAYERS]; + bool m_bFirstItemGoesDown; + bool m_bRowHasFocus[NUM_PLAYERS]; int m_iChoiceInRowWithFocus[NUM_PLAYERS]; // this choice has input focus // Only one will true at a time if m_pHand->m_Def.bMultiSelect From 2c70b65711e043438d8fd1c950c7b5c64b2bfcce Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sat, 19 Feb 2011 00:48:42 -0500 Subject: [PATCH 065/143] Fix doxygen warnings. The code seems to run fine, but please TEST THIS. Revert this if required. --- src/MsdFile.h | 2 +- src/NoteData.cpp | 23 +++++++++-------------- src/NoteData.h | 31 +++++++++++++++++++++++++------ src/NoteDataUtil.cpp | 6 +++--- src/NotesLoaderMidi.cpp | 4 ++-- src/NotesWriterSM.h | 4 ++-- src/NotesWriterSSC.cpp | 1 + src/NotesWriterSSC.h | 2 +- src/Player.cpp | 6 +++--- src/ScoreDisplayLifeTime.h | 2 +- 10 files changed, 48 insertions(+), 33 deletions(-) diff --git a/src/MsdFile.h b/src/MsdFile.h index 0b52d639ab..229f329082 100644 --- a/src/MsdFile.h +++ b/src/MsdFile.h @@ -10,7 +10,7 @@ public: /** * @brief The list of params found in the files. * - * Note that #param:param:param:param; is one whole value. */ + * Note that #param:param:param:param; is one whole value. */ struct value_t { /** @brief The list of parameters. */ diff --git a/src/NoteData.cpp b/src/NoteData.cpp index 414ccee44e..49449cc833 100644 --- a/src/NoteData.cpp +++ b/src/NoteData.cpp @@ -52,7 +52,7 @@ void NoteData::ClearRangeForTrack( int rowBegin, int rowEnd, int iTrack ) if( rowBegin == rowEnd ) return; - iterator begin, end; + NoteData::TrackMap::iterator begin, end; GetTapNoteRangeInclusive( iTrack, rowBegin, rowEnd, begin, end ); if( begin != end && begin->first < rowBegin && begin->first + begin->second.iDuration > rowEnd ) @@ -86,7 +86,7 @@ void NoteData::ClearRangeForTrack( int rowBegin, int rowEnd, int iTrack ) if( begin != end ) { - iterator prev = end; + NoteData::TrackMap::iterator prev = end; --prev; TapNote tn = begin->second; int iRow = prev->first; @@ -138,7 +138,7 @@ void NoteData::CopyRange( const NoteData& from, int rowFromBegin, int rowFromEnd for( int t=0; t= iStartRow, ssprintf("EndRow %d < StartRow %d",iEndRow,iStartRow) ); /* Include adjacent (non-overlapping) hold notes, since we need to merge with them. */ - iterator begin, end; + NoteData::TrackMap::iterator begin, end; GetTapNoteRangeInclusive( iTrack, iStartRow, iEndRow, begin, end, true ); // Look for other hold notes that overlap and merge them into add. @@ -590,7 +590,7 @@ int NoteData::GetNumHoldNotes( int iStartIndex, int iEndIndex ) const int iNumHolds = 0; for( int t=0; t= 27*4-2 && nnt == green ) // LOG->Trace( "shortening hold at %f, length %d", fBeat, length ); diff --git a/src/NotesWriterSM.h b/src/NotesWriterSM.h index f394a5934b..c8c8f7775b 100644 --- a/src/NotesWriterSM.h +++ b/src/NotesWriterSM.h @@ -26,7 +26,7 @@ namespace NotesWriterSM * @return the name of the edit file. */ RString GetEditFileName( const Song *pSong, const Steps *pSteps ); /** - * @param Write the edit file to the machine for future use. + * @brief Write the edit file to the machine for future use. * @param pSong the Song in question. * @param pSteps the Steps in question. * @param sErrorOut any error messages that may have occurred. @@ -39,7 +39,7 @@ namespace NotesWriterSM /** * @file * @author Chris Danford, Glenn Maynard (c) 2001-2004 - * @seciton LICENSE + * @section LICENSE * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/src/NotesWriterSSC.cpp b/src/NotesWriterSSC.cpp index d665db7b98..0a77bae975 100644 --- a/src/NotesWriterSSC.cpp +++ b/src/NotesWriterSSC.cpp @@ -267,6 +267,7 @@ static RString JoinLineList( vector &lines ) * @brief Retrieve the individual batches of NoteData. * @param song the Song in question. * @param in the Steps in question. + * @param bSavingCache a flag to see if we're saving certain cache data. * @return the NoteData in RString form. */ static RString GetSSCNoteData( const Song &song, const Steps &in, bool bSavingCache ) { diff --git a/src/NotesWriterSSC.h b/src/NotesWriterSSC.h index f22ba24421..aaadfc2812 100644 --- a/src/NotesWriterSSC.h +++ b/src/NotesWriterSSC.h @@ -28,7 +28,7 @@ namespace NotesWriterSSC * @return the name of the edit file. */ RString GetEditFileName( const Song *pSong, const Steps *pSteps ); /** - * @param Write the edit file to the machine for future use. + * @brief Write the edit file to the machine for future use. * @param pSong the Song in question. * @param pSteps the Steps in question. * @param sErrorOut any error messages that may have occurred. diff --git a/src/Player.cpp b/src/Player.cpp index 87625838bc..d9caa5f183 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -1668,7 +1668,7 @@ void Player::Fret( int col, int row, const RageTimer &tm, bool bHeld, bool bRele // Since this is being called every frame, let's not check the whole array every time. // Instead, only check 1 beat back. Even 1 is overkill. const int iStartCheckingAt = max( 0, iSongRow-BeatToNoteRow(1) ); - NoteData::iterator begin, end; + NoteData::TrackMap::iterator begin, end; m_NoteData.GetTapNoteRangeInclusive( iTrack, iStartCheckingAt, iSongRow+1, begin, end ); for( ; begin != end; ++begin ) { @@ -1756,7 +1756,7 @@ void Player::ScoreAllActiveHoldsLetGo() // Since this is being called every frame, let's not check the whole array every time. // Instead, only check 1 beat back. Even 1 is overkill. const int iStartCheckingAt = max( 0, iSongRow-BeatToNoteRow(1) ); - NoteData::iterator begin, end; + NoteData::TrackMap::iterator begin, end; m_NoteData.GetTapNoteRangeInclusive( iTrack, iStartCheckingAt, iSongRow+1, begin, end ); for( ; begin != end; ++begin ) { @@ -1807,7 +1807,7 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b // Instead, only check 1 beat back. Even 1 is overkill. // Just update the life here and let Update judge the roll. const int iStartCheckingAt = max( 0, iSongRow-BeatToNoteRow(1) ); - NoteData::iterator begin, end; + NoteData::TrackMap::iterator begin, end; m_NoteData.GetTapNoteRangeInclusive( col, iStartCheckingAt, iSongRow+1, begin, end ); for( ; begin != end; ++begin ) { diff --git a/src/ScoreDisplayLifeTime.h b/src/ScoreDisplayLifeTime.h index 8972c97899..15e3c228a1 100644 --- a/src/ScoreDisplayLifeTime.h +++ b/src/ScoreDisplayLifeTime.h @@ -6,7 +6,7 @@ #include "AutoActor.h" /** - * @breif Display a updating count of life time remaining. + * @brief Display a updating count of life time remaining. * * This is mainly used for Survival mode. */ class ScoreDisplayLifeTime : public ScoreDisplay From 27fac03ad482e6e19790499210b2709fc787e649 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 19 Feb 2011 00:01:17 -0600 Subject: [PATCH 066/143] remove comment; if anyone ever tries anything like this again, i'll just put it back --- src/StepsDisplay.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/StepsDisplay.cpp b/src/StepsDisplay.cpp index 92c3639d4e..40654ea342 100644 --- a/src/StepsDisplay.cpp +++ b/src/StepsDisplay.cpp @@ -127,12 +127,7 @@ void StepsDisplay::SetFromGameState( PlayerNumber pn ) if( pTrail ) SetFromTrail( pTrail ); else - { - // why was it pTrail->m_CourseType as the last argument when pTrail - // can't possibly exist here? -aj - //pTrail = GAMESTATE->m_pPreferredCourse->GetTrail(GAMESTATE->m_PreferredStepsType, GAMESTATE->m_PreferredCourseDifficulty[pn]); SetFromStepsTypeAndMeterAndDifficultyAndCourseType( StepsType_Invalid, 0, GAMESTATE->m_PreferredCourseDifficulty[pn], CourseType_Invalid ); - } } else { From ee0eda2ede0accf8c06c964078e2c9189b83bdbe Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sat, 19 Feb 2011 01:15:34 -0500 Subject: [PATCH 067/143] Add general doxygen generator file. Don't worry: the generated files are not included. Don't think we can handle 100+ MB of data here. --- .hgignore | 1 + Docs/Doxyfile | 1722 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1723 insertions(+) create mode 100644 Docs/Doxyfile diff --git a/.hgignore b/.hgignore index 2b9724952e..030bb58b79 100644 --- a/.hgignore +++ b/.hgignore @@ -24,6 +24,7 @@ Thumbs.db *.mode1v3 *.exe *.vdi +Docs/doxygen PBProject/build Xcode/build src/build-* diff --git a/Docs/Doxyfile b/Docs/Doxyfile new file mode 100644 index 0000000000..e2e1b5d78d --- /dev/null +++ b/Docs/Doxyfile @@ -0,0 +1,1722 @@ +# Doxyfile 1.7.3 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = sm-ssc + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "StepMania Fork with more flexibility" + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = ../icons/hicolor/48x48/apps/stepmania-ssc.png + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = doxygen + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = YES + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. The create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = YES + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = ../src + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.d \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox \ + *.py \ + *.f90 \ + *.f \ + *.for \ + *.vhd \ + *.vhdl + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = ../src/PitchDetectionTestUtil.cpp \ + ../src/PitchDetectionTestUtil.h \ + ../src/PitchDetectionTest.h \ + ../src/PitchDetectionTest.cpp + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the stylesheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [0,1..20]) +# that doxygen will group on one line in the generated HTML documentation. +# Note that a value of 0 will completely suppress the enum values from +# appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the +# mathjax.org site, so you can quickly see the result without installing +# MathJax, but it is strongly recommended to install a local copy of MathJax +# before deployment. + +MATHJAX_RELPATH = http://www.mathjax.org/mathjax + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = YES + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = YES + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = ../src/libjpeg + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = NO + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 16 + +# By default doxygen will write a font called Helvetica to the output +# directory and reference it in all dot files that doxygen generates. +# When you want a differently looking font you can specify the font name +# using DOT_FONTNAME. You need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, svg, gif or svg. +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = /usr/local/graphviz-2.14/bin + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES From 038a9fda8c64c8bf582080c1b534ea1f9c3f7274 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sat, 19 Feb 2011 01:39:45 -0500 Subject: [PATCH 068/143] Simplify thanks to TaroNuke. --- src/Player.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Player.cpp b/src/Player.cpp index d9caa5f183..0be0925070 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -1255,13 +1255,13 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vectorTrace("initiated note and let go :("); } } - else + else if( SCORE_MISSED_HOLDS_AND_ROLLS ) { - //LOG->Trace("did not initiate note"); - if( !bInitiatedNote && !SCORE_MISSED_HOLDS_AND_ROLLS ) - hns = HNS_None; - else - hns = HNS_LetGo; + hns = HNS_LetGo; + } + else + { + hns = HNS_None; } } From 8ba27c0d9f6ce2edd925f14c734e17f117f32214 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sat, 19 Feb 2011 01:40:29 -0500 Subject: [PATCH 069/143] Ignore DiffMerge temporary files. --- .hgignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgignore b/.hgignore index 030bb58b79..20acb94e67 100644 --- a/.hgignore +++ b/.hgignore @@ -12,6 +12,7 @@ tests/*.err *.idb *.pdb *.exp +___* .hg .hgignore .hgtags From ffc466bec76be24100c036a3a1d243472bd9acc9 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 19 Feb 2011 00:54:28 -0600 Subject: [PATCH 070/143] add comment --- src/GrooveRadar.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/GrooveRadar.cpp b/src/GrooveRadar.cpp index 9f5a3c3fbe..5228f955d9 100644 --- a/src/GrooveRadar.cpp +++ b/src/GrooveRadar.cpp @@ -198,6 +198,8 @@ void GrooveRadar::GrooveRadarValueMap::DrawPrimitives() DISPLAY->DrawFan( v, NUM_SHOWN_RADAR_CATEGORIES+2 ); // use a line loop to draw the thick line + // TODO: If two players are active, and their RadarValues are the same, draw + // the inside of P2's Radar with the line from P1's radar -aj for( int i=0; i<=NUM_SHOWN_RADAR_CATEGORIES; i++ ) { const int c = i%NUM_SHOWN_RADAR_CATEGORIES; From 1fd81cfe9cb9db917c795f2224e563d0ddbeb409 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sat, 19 Feb 2011 02:10:45 -0500 Subject: [PATCH 071/143] Quick doxygens. --- src/ActorProxy.h | 4 +--- src/ActorUtil.h | 3 +-- src/CourseContentsList.h | 4 +--- src/FontCharAliases.h | 2 +- src/GameSoundManager.h | 4 +--- src/LifeMeterBattery.h | 4 +--- src/MemoryCardDisplay.h | 4 +--- src/PercentageDisplay.h | 3 +-- src/Player.cpp | 4 +++- 9 files changed, 11 insertions(+), 21 deletions(-) diff --git a/src/ActorProxy.h b/src/ActorProxy.h index c30b4d5a9a..2416c6e7b5 100644 --- a/src/ActorProxy.h +++ b/src/ActorProxy.h @@ -1,12 +1,10 @@ -/* ActorProxy - renders another actor. */ - #ifndef ACTOR_PROXY_H #define ACTOR_PROXY_H #include "Actor.h" struct lua_State; - +/** @brief Rendrs another actor. */ class ActorProxy: public Actor { public: diff --git a/src/ActorUtil.h b/src/ActorUtil.h index 3d199bf1c9..bab0991a96 100644 --- a/src/ActorUtil.h +++ b/src/ActorUtil.h @@ -1,5 +1,3 @@ -/* ActorUtil - Utility functions for creating and manipulating Actors. */ - #ifndef ActorUtil_H #define ActorUtil_H @@ -43,6 +41,7 @@ enum FileType }; const RString& FileTypeToString( FileType ft ); +/** @brief Utility functions for creating and manipulating Actors. */ namespace ActorUtil { // Every screen should register its class at program initialization. diff --git a/src/CourseContentsList.h b/src/CourseContentsList.h index f0b38cbb04..7d11a09df4 100644 --- a/src/CourseContentsList.h +++ b/src/CourseContentsList.h @@ -1,11 +1,9 @@ -/* CourseContentsList - Holds course name and banner. */ - #ifndef COURSE_CONTENTS_LIST_H #define COURSE_CONTENTS_LIST_H #include "ActorScroller.h" class CourseEntryDisplay; - +/** @brief Holds course name and banner. */ class CourseContentsList : public ActorScroller { public: diff --git a/src/FontCharAliases.h b/src/FontCharAliases.h index 299622b987..ebb694ab5c 100644 --- a/src/FontCharAliases.h +++ b/src/FontCharAliases.h @@ -1,7 +1,7 @@ -/* FontCharAliases - Provides support for nonstandard characters in text. */ #ifndef FONT_CHAR_ALIASES #define FONT_CHAR_ALIASES +/** @brief Provides support for nonstandard characters in text. */ namespace FontCharAliases { void ReplaceMarkers( RString &sText ); diff --git a/src/GameSoundManager.h b/src/GameSoundManager.h index 49d321fece..df7b801d8b 100644 --- a/src/GameSoundManager.h +++ b/src/GameSoundManager.h @@ -1,5 +1,3 @@ -/* GameSoundManager - High-level sound utilities. */ - #ifndef RAGE_SOUNDS_H #define RAGE_SOUNDS_H @@ -8,7 +6,7 @@ class TimingData; class RageSound; struct lua_State; - +/** @brief High-level sound utilities. */ class GameSoundManager { public: diff --git a/src/LifeMeterBattery.h b/src/LifeMeterBattery.h index ea5afc6fba..67a40cd99c 100644 --- a/src/LifeMeterBattery.h +++ b/src/LifeMeterBattery.h @@ -1,5 +1,3 @@ -/* LifeMeterBattery - Battery life meter used in Oni mode. */ - #ifndef LIFEMETERBATTERY_H #define LIFEMETERBATTERY_H @@ -10,7 +8,7 @@ #include "PercentageDisplay.h" #include "ThemeMetric.h" - +/** @brief Battery life meter used in Oni mode. */ class LifeMeterBattery : public LifeMeter { public: diff --git a/src/MemoryCardDisplay.h b/src/MemoryCardDisplay.h index 3021aeb765..fcf478aedd 100644 --- a/src/MemoryCardDisplay.h +++ b/src/MemoryCardDisplay.h @@ -1,5 +1,3 @@ -/* MemoryCardDisplay - A graphic displaying the state of memory cards. */ - #ifndef MEMORY_CARD_DISPLAY_H #define MEMORY_CARD_DISPLAY_H @@ -7,7 +5,7 @@ #include "PlayerNumber.h" #include "Sprite.h" #include "ActorFrame.h" - +/** @brief A graphic displaying the state of memory cards. */ class MemoryCardDisplay : public ActorFrame { public: diff --git a/src/PercentageDisplay.h b/src/PercentageDisplay.h index 9afcfd02bf..875b6ee664 100644 --- a/src/PercentageDisplay.h +++ b/src/PercentageDisplay.h @@ -1,5 +1,3 @@ -/* PercentageDisplay - An Actor that displays a percentage. */ - #ifndef PERCENTAGE_DISPLAY_H #define PERCENTAGE_DISPLAY_H @@ -11,6 +9,7 @@ class PlayerState; +/** @brief An Actor that displays a percentage. */ class PercentageDisplay: public ActorFrame { public: diff --git a/src/Player.cpp b/src/Player.cpp index 0be0925070..9e8a7c4d58 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -42,7 +42,9 @@ #include "LocalizedString.h" #include "AdjustSync.h" -// Helper class to ensure that each row is only judged once without taking too much memory. +/** + * @brief Helper class to ensure that each row is only judged once without taking too much memory. + */ class JudgedRows { vector m_vRows; From c3e3cf336166d2ee7faa6b65a0fcad0d5810bbbe Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 19 Feb 2011 03:34:58 -0600 Subject: [PATCH 072/143] [BPMDisplay] Added FormatString metric. --- Docs/Changelog_sm-ssc.txt | 6 +++++- Themes/_fallback/metrics.ini | 2 ++ src/BPMDisplay.cpp | 7 ++++--- src/BPMDisplay.h | 2 ++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 2c1cd0334d..9388049917 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -13,9 +13,13 @@ _____________________________________________________________________________ sm-ssc v1.2.2 | 201102?? -------------------------------------------------------------------------------- +20110219 +-------- +* [BPMDisplay] Added FormatString metric. [AJ] + 20110218 -------- -* [WheelBase] Added SetOpenSection Lua binding [AJ] +* [WheelBase] Added SetOpenSection Lua binding. [AJ] 20110217 -------- diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index c93357f68f..42029f569e 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -218,6 +218,8 @@ QuestionMarksText="???" RandomText="!!!" # xxx: localize me -aj VariousText="000" +FormatString="%03.0f" + [CodeDetector] # Codes on the MusicWheel that change stuff! PrevSteps1="Up,Up" diff --git a/src/BPMDisplay.cpp b/src/BPMDisplay.cpp index 19a28a077f..5acf484d4e 100644 --- a/src/BPMDisplay.cpp +++ b/src/BPMDisplay.cpp @@ -38,6 +38,7 @@ void BPMDisplay::Load() QUESTIONMARKS_TEXT.Load( m_sName, "QuestionMarksText" ); RANDOM_TEXT.Load( m_sName, "RandomText" ); VARIOUS_TEXT.Load( m_sName, "VariousText" ); + BPM_FORMAT_STRING.Load( m_sName, "FormatString" ); RunCommands( SET_NORMAL_COMMAND ); } @@ -76,9 +77,9 @@ void BPMDisplay::Update( float fDeltaTime ) { m_fBPMFrom = -1; if( (bool)SHOW_QMARKS ) - SetText( (RandomFloat(0,1)>0.90f) ? (RString)QUESTIONMARKS_TEXT : ssprintf("%03.0f",RandomFloat(0,999)) ); + SetText( (RandomFloat(0,1)>0.90f) ? (RString)QUESTIONMARKS_TEXT : ssprintf((RString)BPM_FORMAT_STRING,RandomFloat(0,999)) ); else - SetText( ssprintf("%03.0f",RandomFloat(0,999)) ); + SetText( ssprintf((RString)BPM_FORMAT_STRING, RandomFloat(0,999)) ); } else if(m_fBPMFrom == -1) { @@ -89,7 +90,7 @@ void BPMDisplay::Update( float fDeltaTime ) if( m_fBPMTo != -1) { const float fActualBPM = GetActiveBPM(); - SetText( ssprintf("%03.0f", fActualBPM) ); + SetText( ssprintf((RString)BPM_FORMAT_STRING, fActualBPM) ); } } diff --git a/src/BPMDisplay.h b/src/BPMDisplay.h index d6fb4f5e71..566993a681 100644 --- a/src/BPMDisplay.h +++ b/src/BPMDisplay.h @@ -94,6 +94,8 @@ protected: ThemeMetric RANDOM_TEXT; /** @brief The text used as one possible option for random BPM. */ ThemeMetric QUESTIONMARKS_TEXT; + /** @brief The format string used for the numbers. */ + ThemeMetric BPM_FORMAT_STRING; /** @brief The lowest valued BPM. */ float m_fBPMFrom; From d2b903f39c4979fd0932bae752a51bed6a5f5fe8 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 19 Feb 2011 04:12:13 -0600 Subject: [PATCH 073/143] [GrooveRadar] Changed "Label#OffsetX/Y" metrics to "Label#X/Y". --- Docs/Changelog_sm-ssc.txt | 1 + src/GrooveRadar.cpp | 19 ++++++++----------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 9388049917..d60d061c11 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -16,6 +16,7 @@ sm-ssc v1.2.2 | 201102?? 20110219 -------- * [BPMDisplay] Added FormatString metric. [AJ] +* [GrooveRadar] Changed "Label#OffsetX/Y" metrics to "Label#X/Y". [AJ] 20110218 -------- diff --git a/src/GrooveRadar.cpp b/src/GrooveRadar.cpp index 5228f955d9..3928440d18 100644 --- a/src/GrooveRadar.cpp +++ b/src/GrooveRadar.cpp @@ -13,8 +13,6 @@ REGISTER_ACTOR_CLASS(GrooveRadar); -#define LABEL_OFFSET_X( i ) THEME->GetMetricF("GrooveRadar",ssprintf("Label%dOffsetX",i+1)) -#define LABEL_OFFSET_Y( i ) THEME->GetMetricF("GrooveRadar",ssprintf("Label%dOffsetY",i+1)) static const ThemeMetric LABEL_ON_DELAY ("GrooveRadar","LabelOnDelay"); static const ThemeMetric RADAR_EDGE_WIDTH ("GrooveRadar","EdgeWidth"); static const ThemeMetric RADAR_CENTER_ALPHA ("GrooveRadar","CenterAlpha"); @@ -42,12 +40,11 @@ GrooveRadar::GrooveRadar() for( int c=0; cGetPathG("GrooveRadar","labels 1x5") ); m_sprRadarLabels[c].StopAnimating(); m_sprRadarLabels[c].SetState( c ); - m_sprRadarLabels[c].SetXY( LABEL_OFFSET_X(c), LABEL_OFFSET_Y(c) ); - ActorUtil::LoadAllCommands( m_sprRadarLabels[c], "GrooveRadar" ); + ActorUtil::LoadAllCommandsAndSetXY( m_sprRadarLabels[c], "GrooveRadar" ); this->AddChild( &m_sprRadarLabels[c] ); } } @@ -61,7 +58,7 @@ void GrooveRadar::TweenOnScreen() { for( int c=0; cDrawFan( v, NUM_SHOWN_RADAR_CATEGORIES+2 ); // use a line loop to draw the thick line - // TODO: If two players are active, and their RadarValues are the same, draw - // the inside of P2's Radar with the line from P1's radar -aj + // TODO: If two players are active and their RadarValues are the same, + // only draw the line from P1's radar. -aj for( int i=0; i<=NUM_SHOWN_RADAR_CATEGORIES; i++ ) { const int c = i%NUM_SHOWN_RADAR_CATEGORIES; @@ -213,8 +211,7 @@ void GrooveRadar::GrooveRadarValueMap::DrawPrimitives() v[i].c = this->m_pTempState->diffuse[0]; } - // TODO: Add this back in. -Chris - // TODO: Add this back in as a theme metric. -aj + // TODO: Add this back in -Chris // switch( PREFSMAN->m_iPolygonRadar ) // { // case 0: DISPLAY->DrawLoop_LinesAndPoints( v, NUM_SHOWN_RADAR_CATEGORIES, RADAR_EDGE_WIDTH ); break; From 38656091caf2e14c7c821fd906ff1dd5cfb444c0 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 19 Feb 2011 04:24:50 -0600 Subject: [PATCH 074/143] [GrooveRadar] Fixed RadarFrame from not running commands on RadarFrame base. --- Docs/Changelog_sm-ssc.txt | 1 + src/GrooveRadar.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index d60d061c11..3ec74ecd4c 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -17,6 +17,7 @@ sm-ssc v1.2.2 | 201102?? -------- * [BPMDisplay] Added FormatString metric. [AJ] * [GrooveRadar] Changed "Label#OffsetX/Y" metrics to "Label#X/Y". [AJ] +* [GrooveRadar] Fixed RadarFrame from not running commands on RadarFrame base. [AJ] 20110218 -------- diff --git a/src/GrooveRadar.cpp b/src/GrooveRadar.cpp index 3928440d18..0c76223e1a 100644 --- a/src/GrooveRadar.cpp +++ b/src/GrooveRadar.cpp @@ -25,8 +25,8 @@ GrooveRadar::GrooveRadar() { m_sprRadarBase.Load( THEME->GetPathG("GrooveRadar","base") ); m_Frame.AddChild( m_sprRadarBase ); - LOAD_ALL_COMMANDS( m_Frame ); m_Frame.SetName( "RadarFrame" ); + ActorUtil::LoadAllCommands( m_Frame, "GrooveRadar" ); FOREACH_PlayerNumber( p ) { From 8cedfa2a67105d41cb6876b7910b2a2fc72bb867 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 19 Feb 2011 04:27:38 -0600 Subject: [PATCH 075/143] [GrooveRadar] Removed RadarFrameTweenOnScreen and RadarFrameTweenOffScreen metrics. (Themers: Use RadarFrameOnCommand and RadarFrameOffCommand instead) --- Docs/Changelog_sm-ssc.txt | 1 + src/GrooveRadar.cpp | 9 --------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 3ec74ecd4c..839ecac782 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -18,6 +18,7 @@ sm-ssc v1.2.2 | 201102?? * [BPMDisplay] Added FormatString metric. [AJ] * [GrooveRadar] Changed "Label#OffsetX/Y" metrics to "Label#X/Y". [AJ] * [GrooveRadar] Fixed RadarFrame from not running commands on RadarFrame base. [AJ] +* [GrooveRadar] Removed RadarFrameTweenOnScreen and RadarFrameTweenOffScreen metrics. (Themers: Use RadarFrameOnCommand and RadarFrameOffCommand instead) [AJ] 20110218 -------- diff --git a/src/GrooveRadar.cpp b/src/GrooveRadar.cpp index 0c76223e1a..a496654d96 100644 --- a/src/GrooveRadar.cpp +++ b/src/GrooveRadar.cpp @@ -63,15 +63,6 @@ void GrooveRadar::TweenOnScreen() m_sprRadarLabels[c].BeginTweening( LABEL_ON_DELAY*c ); // sleep m_sprRadarLabels[c].PlayCommand( "PostDelayOn" ); } - - m_Frame.PlayCommand("TweenOnScreen"); - /* - m_Frame.SetZoom( 0.5f ); - m_Frame.SetRotationZ( 720 ); - m_Frame.BeginTweening( 0.6f ); - m_Frame.SetZoom( 1 ); - m_Frame.SetRotationZ( 0 ); - */ } void GrooveRadar::TweenOffScreen() From 1331097d96d29b116ca20bcdeb0377468f6634ab Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 19 Feb 2011 04:28:29 -0600 Subject: [PATCH 076/143] actually remove TweenOffScreen. --- src/GrooveRadar.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/GrooveRadar.cpp b/src/GrooveRadar.cpp index a496654d96..297a12b217 100644 --- a/src/GrooveRadar.cpp +++ b/src/GrooveRadar.cpp @@ -77,13 +77,6 @@ void GrooveRadar::TweenOffScreen() m_sprRadarLabels[c].SetGlow( RageColor(1,1,1,0) ); m_sprRadarLabels[c].SetDiffuse( RageColor(1,1,1,0) ); } - - m_Frame.PlayCommand("TweenOffScreen"); - /* - m_Frame.BeginTweening( 0.6f ); - m_Frame.SetRotationZ( 180*4 ); - m_Frame.SetZoom( 0 ); - */ } void GrooveRadar::SetEmpty( PlayerNumber pn ) From 610871b50d4063f78f611ea3149d6aea31eeae4d Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 19 Feb 2011 04:43:54 -0600 Subject: [PATCH 077/143] [GrooveRadar] Removed non-working PreDelayOnCommand, PostDelayOnCommand. (Themers: Use Label#OnCommand and Label#OffCommand instead.) --- Docs/Changelog_sm-ssc.txt | 1 + Themes/_fallback/metrics.ini | 4 +--- src/GrooveRadar.cpp | 27 ++------------------------- src/GrooveRadar.h | 3 --- 4 files changed, 4 insertions(+), 31 deletions(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 839ecac782..8ddc4013d5 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -19,6 +19,7 @@ sm-ssc v1.2.2 | 201102?? * [GrooveRadar] Changed "Label#OffsetX/Y" metrics to "Label#X/Y". [AJ] * [GrooveRadar] Fixed RadarFrame from not running commands on RadarFrame base. [AJ] * [GrooveRadar] Removed RadarFrameTweenOnScreen and RadarFrameTweenOffScreen metrics. (Themers: Use RadarFrameOnCommand and RadarFrameOffCommand instead) [AJ] +* [GrooveRadar] Removed non-working PreDelayOnCommand, PostDelayOnCommand. (Themers: Use Label#OnCommand and Label#OffCommand instead.) [AJ] 20110218 -------- diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 42029f569e..c0c7348f48 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -514,11 +514,9 @@ DisablePremiumInEventMode=false # Polar graph that shows difficulty stuff in depth # how thick the line is EdgeWidth=2 -# ? -LabelOnDelay=0 # How visible the middle is CenterAlpha=0.25 -# what to do with each players part of the graph +# what to do with each player's part of the graph RadarValueMapP1OnCommand=diffuse,PlayerColor(PLAYER_1) RadarValueMapP2OnCommand=diffuse,PlayerColor(PLAYER_2) diff --git a/src/GrooveRadar.cpp b/src/GrooveRadar.cpp index 297a12b217..fb1712a330 100644 --- a/src/GrooveRadar.cpp +++ b/src/GrooveRadar.cpp @@ -54,31 +54,6 @@ void GrooveRadar::LoadFromNode( const XNode* pNode ) ActorFrame::LoadFromNode( pNode ); } -void GrooveRadar::TweenOnScreen() -{ - for( int c=0; cSetTextureMode( TextureUnit_1, TextureMode_Modulate ); RageSpriteVertex v[12]; // needed to draw 5 fan primitives and 10 strip primitives + // xxx: We could either make the values invisible or draw a dot + // (simulating real DDR). TODO: Make that choice up to the themer. -aj if( !m_bValuesVisible ) return; diff --git a/src/GrooveRadar.h b/src/GrooveRadar.h index 79d1f1df28..0df4108aaf 100644 --- a/src/GrooveRadar.h +++ b/src/GrooveRadar.h @@ -22,9 +22,6 @@ public: void SetFromRadarValues( PlayerNumber pn, const RadarValues &rv ); void SetFromSteps( PlayerNumber pn, Steps* pSteps ); // NULL means no Steps - void TweenOnScreen(); - void TweenOffScreen(); - // Lua void PushSelf( lua_State *L ); From 02a7f3d12c210288da38a0431aa45f948d106dbf Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 19 Feb 2011 05:51:08 -0600 Subject: [PATCH 078/143] remove lua bindings to fix compile --- src/GrooveRadar.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/GrooveRadar.cpp b/src/GrooveRadar.cpp index fb1712a330..06ce8d4c9a 100644 --- a/src/GrooveRadar.cpp +++ b/src/GrooveRadar.cpp @@ -10,6 +10,8 @@ #include "ThemeMetric.h" #include "CommonMetrics.h" #include "ActorUtil.h" +// I feel weird about this coupling, but it has to be done. -aj +#include "GameState.h" REGISTER_ACTOR_CLASS(GrooveRadar); @@ -106,7 +108,7 @@ void GrooveRadar::GrooveRadarValueMap::SetFromSteps( const RadarValues &rv ) if( !m_bValuesVisible ) // the values WERE invisible m_PercentTowardNew = 1; else - m_PercentTowardNew = 0; + m_PercentTowardNew = 0; } void GrooveRadar::GrooveRadarValueMap::Update( float fDeltaTime ) @@ -157,8 +159,6 @@ void GrooveRadar::GrooveRadarValueMap::DrawPrimitives() DISPLAY->DrawFan( v, NUM_SHOWN_RADAR_CATEGORIES+2 ); // use a line loop to draw the thick line - // TODO: If two players are active and their RadarValues are the same, - // only draw the line from P1's radar. -aj for( int i=0; i<=NUM_SHOWN_RADAR_CATEGORIES; i++ ) { const int c = i%NUM_SHOWN_RADAR_CATEGORIES; @@ -205,15 +205,11 @@ public: return 0; } static int SetEmpty( T* p, lua_State *L ) { p->SetEmpty( Enum::Check(L, 1) ); return 0; } - static int tweenonscreen( T* p, lua_State *L ) { p->TweenOnScreen(); return 0; } - static int tweenoffscreen( T* p, lua_State *L ) { p->TweenOffScreen(); return 0; } LunaGrooveRadar() { ADD_METHOD( SetFromRadarValues ); ADD_METHOD( SetEmpty ); - ADD_METHOD( tweenonscreen ); - ADD_METHOD( tweenoffscreen ); } }; From 7666a68151ccd9a038dfb79c8ade84372c34100a Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 19 Feb 2011 05:59:18 -0600 Subject: [PATCH 079/143] shut up noisy logging for now --- src/arch/InputHandler/InputHandler_DirectInput.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index 14ba9b309b..513041a124 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -508,12 +508,12 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm case DIMOFS_X: up = MOUSE_X_LEFT; down = MOUSE_X_RIGHT; //cursorX += l; - LOG->Trace("dwData for mouse x: %f",l); + //LOG->Trace("dwData for mouse x: %f",l); break; case DIMOFS_Y: up = MOUSE_Y_UP; down = MOUSE_Y_DOWN; //cursorY += l; - LOG->Trace("dwData for mouse y: %f",l); + //LOG->Trace("dwData for mouse y: %f",l); break; case DIMOFS_Z: up = MOUSE_WHEELUP; down = MOUSE_WHEELDOWN; From ffebd5010f316b2996fed8b286dc69bba38c05a2 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sat, 19 Feb 2011 11:35:15 -0500 Subject: [PATCH 080/143] More doxygen. Learning how to manually link to other classes. We may have to take advantage of this to keep proper english. --- src/StepsUtil.h | 42 +++++++++++++++++++++++++++++++++++------- src/Trail.h | 16 +++++++++++----- src/TrailUtil.h | 10 ++++++++++ src/XmlFileUtil.h | 12 ++++++++---- 4 files changed, 64 insertions(+), 16 deletions(-) diff --git a/src/StepsUtil.h b/src/StepsUtil.h index f84c5b660e..924d70f1a6 100644 --- a/src/StepsUtil.h +++ b/src/StepsUtil.h @@ -11,19 +11,43 @@ class Profile; class XNode; class SongCriteria; +/** @brief the criteria for finding certain Steps. */ class StepsCriteria { public: - Difficulty m_difficulty; // don't filter if Difficulty_Invalid - int m_iLowMeter; // don't filter if -1 - int m_iHighMeter; // don't filter if -1 + /** + * @brief the Difficulty to search for. + * + * Don't filter here if the Difficulty is Difficulty_Invalid. */ + Difficulty m_difficulty; + /** + * @brief The lowest meter to search for. + * + * Don't filter here if the meter is -1. */ + int m_iLowMeter; + /** + * @brief The highest meter to search for. + * + * Don't filter here if the meter is -1. */ + int m_iHighMeter; // Currently, Songs have BPM since TimingData is by Song. These are just // here for the inevitable chart-based BPMs future. -aj // float m_fLowBPM; // don't filter if -1 // float m_fHighBPM; // don't filter if -1 - StepsType m_st; // don't filter if StepsType_Invalid - enum Locked { Locked_Locked, Locked_Unlocked, Locked_DontCare } m_Locked; + /** + * @brief the step type to search for. + * + * Don't filter here if the StepsType is StepsType_Invalid. */ + StepsType m_st; + /** @brief Check a song's locked status for searching. */ + enum Locked + { + Locked_Locked, /**< We want songs that are locked. */ + Locked_Unlocked, /**< We want songs that are unlocked. */ + Locked_DontCare /**< We don't care if the songs are locked or not. */ + } m_Locked; + /** @brief Set up the initial criteria. */ StepsCriteria() { m_difficulty = Difficulty_Invalid; @@ -45,6 +69,7 @@ public: bool operator!=( const StepsCriteria &other ) const { return !operator==( other ); } }; +/** @brief A Song and one of its Steps. */ class SongAndSteps { public: @@ -56,6 +81,7 @@ public: bool operator<( const SongAndSteps& other ) const { if( pSong!=other.pSong ) return pSong &out ); // look up in SONGMAN @@ -103,8 +129,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/Trail.h b/src/Trail.h index db0f05b632..2e53965319 100644 --- a/src/Trail.h +++ b/src/Trail.h @@ -1,5 +1,3 @@ -/* Trail - A queue of Songs and Steps that are generated from a Course. */ - #ifndef TRAIL_H #define TRAIL_H @@ -12,6 +10,7 @@ class Song; class Steps; struct lua_State; +/** @brief One such Song and Step in the entire Trail. */ struct TrailEntry { TrailEntry(): @@ -29,7 +28,11 @@ struct TrailEntry Steps* pSteps; RString Modifiers; AttackArray Attacks; - bool bSecret; // show "???" + /** + * @brief Is this Song and its Step meant to be a secret? + * + * If so, it will show text such as "???" to indicate that it's a mystery. */ + bool bSecret; /* These represent the meter and difficulty used by the course to pick the * steps; if you want the real difficulty and meter, look at pSteps. */ @@ -44,6 +47,7 @@ struct TrailEntry void PushSelf( lua_State *L ); }; +/** @brief A queue of Songs and Steps that are generated from a Course. */ class Trail { public: @@ -85,8 +89,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/TrailUtil.h b/src/TrailUtil.h index 951fcbee75..eb3c5871e8 100644 --- a/src/TrailUtil.h +++ b/src/TrailUtil.h @@ -10,9 +10,19 @@ class Trail; class Course; class XNode; +/** @brief Utility functions for dealing with the Trail. */ namespace TrailUtil { + /** + * @brief Retrieve the number of + * Songs in the Trail. + * @param pTrail the Trail itself. + * @return the number of Songs. */ int GetNumSongs( const Trail *pTrail ); + /** + * @brief Retrieve how long the Trail will last in seconds. + * @param pTrail the Trail itself. + * @return the total run time of the Trail. */ float GetTotalSeconds( const Trail *pTrail ); }; diff --git a/src/XmlFileUtil.h b/src/XmlFileUtil.h index e5e584c556..528f97c8ea 100644 --- a/src/XmlFileUtil.h +++ b/src/XmlFileUtil.h @@ -1,5 +1,3 @@ -/* XmlFileUtil - A little graphic to the left of the song's text banner in the MusicWheel. */ - #ifndef XML_FILE_UTIL_H #define XML_FILE_UTIL_H @@ -7,6 +5,10 @@ class RageFileBasic; class XNode; struct lua_State; +/** + * @brief A little graphic to the left of the song's text banner in the MusicWheel. + * + * This is designed to help work with XML files. */ namespace XmlFileUtil { bool LoadFromFileShowErrors( XNode &xml, const RString &sFile ); @@ -27,8 +29,10 @@ namespace XmlFileUtil #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 From 1a1ff7d7012ebaef38d06420fa912960fbe2303e Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sat, 19 Feb 2011 12:09:03 -0500 Subject: [PATCH 081/143] Give @briefs to all namespaces. This will force recompilation of all files. --- src/BackgroundUtil.h | 4 +-- src/EnumHelper.h | 2 +- src/FontCharmaps.h | 3 +- src/GameLoop.h | 4 +-- src/GamePreferences.h | 2 +- src/JsonUtil.h | 4 +-- src/LuaManager.cpp | 2 ++ src/LuaManager.h | 1 + src/LuaReference.cpp | 2 ++ src/MessageManager.h | 9 ++++- src/NotesLoaderBMS.h | 4 +-- src/NotesLoaderKSF.h | 4 +-- src/NotesLoaderMidi.cpp | 5 ++- src/NotesLoaderMidi.h | 4 +-- src/NotesLoaderSM.h | 10 +++--- src/Preference.h | 1 + src/RageDisplay_OGL_Helpers.h | 1 + src/RageException.h | 7 ++-- src/RageFile.cpp | 2 +- src/RageFile.h | 2 +- src/RageFileManager.h | 6 ++-- src/RageFileManager_ReadAhead.h | 2 +- src/RageSoundReader_Resample_Good.cpp | 2 +- src/RageSoundUtil.h | 4 +-- src/RageSurfaceUtils.h | 1 + src/RageSurfaceUtils_Dither.h | 1 + src/RageSurfaceUtils_Palettize.h | 1 + src/RageSurfaceUtils_Zoom.h | 1 + src/RageSurface_Load.h | 1 + src/RageSurface_Save_BMP.h | 1 + src/RageSurface_Save_JPEG.cpp | 1 + src/RageSurface_Save_JPEG.h | 1 + src/RageSurface_Save_PNG.h | 1 + src/RageTypes.cpp | 2 +- src/RageUtil.h | 1 + src/RageUtil_CachedObject.h | 6 ++-- src/ScreenManager.cpp | 1 + src/ScreenMessage.h | 4 +-- src/StdString.h | 48 +++++++++++++-------------- src/StepMania.h | 1 + src/Trail.h | 7 +++- 41 files changed, 91 insertions(+), 75 deletions(-) diff --git a/src/BackgroundUtil.h b/src/BackgroundUtil.h index 855b13f349..be93fa640e 100644 --- a/src/BackgroundUtil.h +++ b/src/BackgroundUtil.h @@ -1,5 +1,3 @@ -/* BackgroundUtil - Shared background-related routines. */ - #ifndef BackgroundUtil_H #define BackgroundUtil_H @@ -61,7 +59,7 @@ struct BackgroundChange RString GetTextDescription() const; }; - +/** @brief Shared background-related routines. */ namespace BackgroundUtil { void SortBackgroundChangesArray( vector &vBackgroundChanges ); diff --git a/src/EnumHelper.h b/src/EnumHelper.h index fc32a8589a..5c8b222523 100644 --- a/src/EnumHelper.h +++ b/src/EnumHelper.h @@ -27,7 +27,7 @@ struct EnumTraits }; template LuaReference EnumTraits::StringToEnum; template LuaReference EnumTraits::EnumToString; - +/** @brief Lua helpers for Enumerators. */ namespace Enum { template diff --git a/src/FontCharmaps.h b/src/FontCharmaps.h index da8cdbee85..28307dc2a8 100644 --- a/src/FontCharmaps.h +++ b/src/FontCharmaps.h @@ -1,7 +1,6 @@ -/* FontCharmaps - Defines common frame to character mappings for Fonts. */ #ifndef FONT_CHARMAPS_H #define FONT_CHARMAPS_H - +/** @brief Defines common frame to character mappings for Fonts. */ namespace FontCharmaps { extern const wchar_t M_SKIP; diff --git a/src/GameLoop.h b/src/GameLoop.h index d35374d9f2..365e74daf8 100644 --- a/src/GameLoop.h +++ b/src/GameLoop.h @@ -1,8 +1,6 @@ -/* GameLoop - Main rendering and update loop. */ - #ifndef GAME_LOOP_H #define GAME_LOOP_H - +/** @brief Main rendering and update loop. */ namespace GameLoop { void RunGameLoop(); diff --git a/src/GamePreferences.h b/src/GamePreferences.h index dc9ee840e1..28ff545170 100644 --- a/src/GamePreferences.h +++ b/src/GamePreferences.h @@ -3,7 +3,7 @@ #include "Preference.h" #include "GameConstantsAndTypes.h" - +/** @brief Quick access to other variables. */ namespace GamePreferences { extern Preference m_CoinMode; diff --git a/src/JsonUtil.h b/src/JsonUtil.h index 26ab10e6f4..c676af1ebc 100644 --- a/src/JsonUtil.h +++ b/src/JsonUtil.h @@ -1,11 +1,9 @@ -/* JsonUtil - Utilities for handling JSON data. */ - #ifndef JsonUtil_H #define JsonUtil_H class RageFileBasic; #include "jsoncpp/include/json/value.h" - +/** @brief Utilities for handling JSON data. */ namespace JsonUtil { bool LoadFromString( Json::Value &root, RString sData, RString &sErrorOut ); diff --git a/src/LuaManager.cpp b/src/LuaManager.cpp index 32cef86941..b39217f3f7 100644 --- a/src/LuaManager.cpp +++ b/src/LuaManager.cpp @@ -33,6 +33,7 @@ static Impl *pImpl = NULL; #pragma warning (disable : 4611) #endif +/** @brief Utilities for working with Lua. */ namespace LuaHelpers { template<> void Push( lua_State *L, const bool &Object ); @@ -70,6 +71,7 @@ void LuaManager::UnsetGlobal( const RString &sName ) Release( L ); } +/** @brief Utilities for working with Lua. */ namespace LuaHelpers { template<> void Push( lua_State *L, const bool &Object ) { lua_pushboolean( L, Object ); } diff --git a/src/LuaManager.h b/src/LuaManager.h index ef6bd4454d..08beb9aa0d 100644 --- a/src/LuaManager.h +++ b/src/LuaManager.h @@ -47,6 +47,7 @@ private: extern LuaManager *LUA; +/** @brief Utilities for working with Lua. */ namespace LuaHelpers { /* Load the given script with the given name. On success, the resulting diff --git a/src/LuaReference.cpp b/src/LuaReference.cpp index 1d819ffe0f..ec036d2911 100644 --- a/src/LuaReference.cpp +++ b/src/LuaReference.cpp @@ -158,6 +158,7 @@ RString LuaReference::Serialize() const return sRet; } +/** @brief Utilities for working with Lua. */ namespace LuaHelpers { template<> bool FromStack( lua_State *L, LuaReference &Object, int iOffset ) @@ -200,6 +201,7 @@ void LuaTable::Get( Lua *L, const RString &sKey ) lua_remove( L, -2 ); // remove self } +/** @brief Utilities for working with Lua. */ namespace LuaHelpers { template<> void Push( lua_State *L, const LuaReference &Object ) diff --git a/src/MessageManager.h b/src/MessageManager.h index 3d424ce3aa..256dbf41fc 100644 --- a/src/MessageManager.h +++ b/src/MessageManager.h @@ -207,7 +207,14 @@ public: bool operator != ( const T &other ) const { return val != other; } }; -namespace LuaHelpers { template void Push( lua_State *L, const BroadcastOnChange &Object ) { LuaHelpers::Push( L, Object.Get() ); } } +/** @brief Utilities for working with Lua. */ +namespace LuaHelpers +{ + template void Push( lua_State *L, const BroadcastOnChange &Object ) + { + LuaHelpers::Push( L, Object.Get() ); + } +} template class BroadcastOnChange1D diff --git a/src/NotesLoaderBMS.h b/src/NotesLoaderBMS.h index bcce260b1b..74c51d9d9c 100644 --- a/src/NotesLoaderBMS.h +++ b/src/NotesLoaderBMS.h @@ -1,10 +1,8 @@ -/* BMSLoader - reads a Song from a set of .BMS files. */ - #ifndef NOTES_LOADER_BMS_H #define NOTES_LOADER_BMS_H class Song; - +/** @brief Reads a Song from a set of .BMS files. */ namespace BMSLoader { void GetApplicableFiles( const RString &sPath, vector &out ); diff --git a/src/NotesLoaderKSF.h b/src/NotesLoaderKSF.h index fcc53682de..e6bfbdd193 100644 --- a/src/NotesLoaderKSF.h +++ b/src/NotesLoaderKSF.h @@ -1,10 +1,8 @@ -/* KSFLoader - Reads a Song from a set of .KSF files. */ - #ifndef NOTES_LOADER_KSF_H #define NOTES_LOADER_KSF_H class Song; - +/** @brief Reads a Song from a set of .KSF files. */ namespace KSFLoader { void GetApplicableFiles( const RString &sPath, vector &out ); diff --git a/src/NotesLoaderMidi.cpp b/src/NotesLoaderMidi.cpp index 2153d177f9..96f5375e1e 100644 --- a/src/NotesLoaderMidi.cpp +++ b/src/NotesLoaderMidi.cpp @@ -562,7 +562,10 @@ bool MidiFileIn :: readVariableLength( unsigned long *value ) return true; } - +/** + * @brief Utilities for working with the Guitar mode. + * + * Is this going to be kept in sm-ssc? */ namespace Guitar { enum GuitarDifficulty { easy, medium, hard, expert, NUM_GuitarDifficulty }; diff --git a/src/NotesLoaderMidi.h b/src/NotesLoaderMidi.h index 09ef41a700..4b496a122b 100644 --- a/src/NotesLoaderMidi.h +++ b/src/NotesLoaderMidi.h @@ -1,10 +1,8 @@ -/* MidiLoader - Reads a Song from a .mid file. */ - #ifndef NotesLoaderMidi_H #define NotesLoaderMidi_H class Song; - +/** @brief Reads a Song from a .mid file. */ namespace MidiLoader { void GetApplicableFiles( const RString &sPath, vector &out ); diff --git a/src/NotesLoaderSM.h b/src/NotesLoaderSM.h index f8a7e78352..4864c74411 100644 --- a/src/NotesLoaderSM.h +++ b/src/NotesLoaderSM.h @@ -1,5 +1,3 @@ -/* SMLoader - Reads a Song from an .SM file. */ - #ifndef NotesLoaderSM_H #define NotesLoaderSM_H @@ -9,7 +7,7 @@ class MsdFile; class Song; class Steps; class TimingData; - +/** @brief Reads a Song from an .SM file. */ namespace SMLoader { void LoadFromSMTokens( RString sStepsType, RString sDescription, RString sDifficulty, @@ -29,8 +27,10 @@ namespace SMLoader #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/Preference.h b/src/Preference.h index 317936fe20..4fdcdc1346 100644 --- a/src/Preference.h +++ b/src/Preference.h @@ -121,6 +121,7 @@ private: void (*m_pfnValidate)(T& val); }; +/** @brief Utilities for working with Lua. */ namespace LuaHelpers { template void Push( lua_State *L, const Preference &Object ) { LuaHelpers::Push( L, Object.Get() ); } } template diff --git a/src/RageDisplay_OGL_Helpers.h b/src/RageDisplay_OGL_Helpers.h index 5f232e2b74..3a59abe38e 100644 --- a/src/RageDisplay_OGL_Helpers.h +++ b/src/RageDisplay_OGL_Helpers.h @@ -30,6 +30,7 @@ /* Not in glext.h: */ typedef bool (APIENTRY * PWSWAPINTERVALEXTPROC) (int interval); +/** @brief Utilities for working with the RageDisplay. */ namespace RageDisplay_OGL_Helpers { void Init(); diff --git a/src/RageException.h b/src/RageException.h index db97dae7d3..0d87af61c4 100644 --- a/src/RageException.h +++ b/src/RageException.h @@ -1,8 +1,9 @@ -/* RageException - Class for throwing fatal errors. */ - #ifndef RAGE_EXCEPTION_H #define RAGE_EXCEPTION_H - +/** + * @brief Namespace for throwing fatal errors. + * + * The original documentation stated this was a class for some reason. */ namespace RageException { void NORETURN Throw( const char *fmt, ... ) PRINTF(1,2); diff --git a/src/RageFile.cpp b/src/RageFile.cpp index 471e39c34e..89133252e8 100644 --- a/src/RageFile.cpp +++ b/src/RageFile.cpp @@ -424,7 +424,7 @@ public: }; LUA_REGISTER_CLASS( RageFile ) - +/** @brief Utilities for working with RageFiles. */ namespace RageFileUtil { int CreateRageFile( lua_State *L ) diff --git a/src/RageFile.h b/src/RageFile.h index 013b59eb6c..700f4de36f 100644 --- a/src/RageFile.h +++ b/src/RageFile.h @@ -83,7 +83,7 @@ private: int m_Mode; }; -/* Convenience wrappers for reading binary files. */ +/** @brief Convenience wrappers for reading binary files. */ namespace FileReading { /* On error, these set sError to the error message. If sError is already diff --git a/src/RageFileManager.h b/src/RageFileManager.h index 2013864719..a8ad652585 100644 --- a/src/RageFileManager.h +++ b/src/RageFileManager.h @@ -1,8 +1,6 @@ -/* RageFileManager - File utilities and high-level manager for RageFile objects. */ - #ifndef RAGE_FILE_MANAGER_H #define RAGE_FILE_MANAGER_H - +/** @brief Constants for working with the RageFileManager. */ namespace RageFileManagerUtil { extern RString sInitialWorkingDirectory; @@ -12,7 +10,7 @@ namespace RageFileManagerUtil class RageFileDriver; class RageFileBasic; struct lua_State; - +/** @brief File utilities and high-level manager for RageFile objects. */ class RageFileManager { public: diff --git a/src/RageFileManager_ReadAhead.h b/src/RageFileManager_ReadAhead.h index a5091ca089..7e42687cc5 100644 --- a/src/RageFileManager_ReadAhead.h +++ b/src/RageFileManager_ReadAhead.h @@ -2,7 +2,7 @@ #define RAGE_FILE_MANAGER_READAHEAD_H #include "RageFileBasic.h" - +/** @brief Utilities for reading the RageFiles. */ namespace RageFileManagerReadAhead { void Init(); diff --git a/src/RageSoundReader_Resample_Good.cpp b/src/RageSoundReader_Resample_Good.cpp index fc0e7ae428..4084641bde 100644 --- a/src/RageSoundReader_Resample_Good.cpp +++ b/src/RageSoundReader_Resample_Good.cpp @@ -396,7 +396,7 @@ int PolyphaseFilter::NumInputsForOutputSamples( const State &State, int iOut, in return iIn; } - +/** @brief Utilities for working with the PolyphaseFilter cache. */ namespace PolyphaseFilterCache { /* Cache filter data, and reuse it without copying. All operations after creation diff --git a/src/RageSoundUtil.h b/src/RageSoundUtil.h index 99153f87eb..d87ad11249 100644 --- a/src/RageSoundUtil.h +++ b/src/RageSoundUtil.h @@ -1,8 +1,6 @@ -/* RageSoundUtil - simple utilities that operate on sound buffers. */ - #ifndef RAGE_SOUND_UTIL_H #define RAGE_SOUND_UTIL_H - +/** @brief Simple utilities that operate on sound buffers. */ namespace RageSoundUtil { void Attenuate( float *pBuf, int iSamples, float fVolume ); diff --git a/src/RageSurfaceUtils.h b/src/RageSurfaceUtils.h index 1ed132c69b..8492be00dc 100644 --- a/src/RageSurfaceUtils.h +++ b/src/RageSurfaceUtils.h @@ -8,6 +8,7 @@ struct RageSurfacePalette; struct RageSurfaceFormat; struct RageSurface; +/** @brief Utility functions for the RageSurfaces. */ namespace RageSurfaceUtils { uint32_t decodepixel( const uint8_t *p, int bpp ); diff --git a/src/RageSurfaceUtils_Dither.h b/src/RageSurfaceUtils_Dither.h index c72a5cdd29..62a67437d8 100644 --- a/src/RageSurfaceUtils_Dither.h +++ b/src/RageSurfaceUtils_Dither.h @@ -2,6 +2,7 @@ #define RAGE_SURFACE_UTILS_DITHER_H struct RageSurface; +/** @brief Utility functions for the RageSurfaces. */ namespace RageSurfaceUtils { void OrderedDither(const RageSurface *src, RageSurface *dst); diff --git a/src/RageSurfaceUtils_Palettize.h b/src/RageSurfaceUtils_Palettize.h index 8ea56b1cf8..9a5a86b7d5 100644 --- a/src/RageSurfaceUtils_Palettize.h +++ b/src/RageSurfaceUtils_Palettize.h @@ -4,6 +4,7 @@ #define RAGE_SURFACE_UTILS_PALETTIZE struct RageSurface; +/** @brief Utility functions for the RageSurfaces. */ namespace RageSurfaceUtils { void Palettize( RageSurface *&pImg, int iColors=256, bool bDither=true ); diff --git a/src/RageSurfaceUtils_Zoom.h b/src/RageSurfaceUtils_Zoom.h index f5378e59cd..01b56fc1f7 100644 --- a/src/RageSurfaceUtils_Zoom.h +++ b/src/RageSurfaceUtils_Zoom.h @@ -2,6 +2,7 @@ #define RAGE_SURFACE_UTILS_ZOOM_H struct RageSurface; +/** @brief Utility functions for the RageSurfaces. */ namespace RageSurfaceUtils { void Zoom( RageSurface *&src, int width, int height ); diff --git a/src/RageSurface_Load.h b/src/RageSurface_Load.h index 9935695566..04765fccf7 100644 --- a/src/RageSurface_Load.h +++ b/src/RageSurface_Load.h @@ -2,6 +2,7 @@ #define RAGE_SURFACE_LOAD_H struct RageSurface; +/** @brief Utility functions for the RageSurfaces. */ namespace RageSurfaceUtils { enum OpenResult diff --git a/src/RageSurface_Save_BMP.h b/src/RageSurface_Save_BMP.h index eb928a1eb8..ed5cb58c32 100644 --- a/src/RageSurface_Save_BMP.h +++ b/src/RageSurface_Save_BMP.h @@ -5,6 +5,7 @@ struct RageSurface; class RageFile; +/** @brief Utility functions for the RageSurfaces. */ namespace RageSurfaceUtils { bool SaveBMP( RageSurface *surface, RageFile &f ); diff --git a/src/RageSurface_Save_JPEG.cpp b/src/RageSurface_Save_JPEG.cpp index 4587ec3c3d..ef1ca8faf2 100644 --- a/src/RageSurface_Save_JPEG.cpp +++ b/src/RageSurface_Save_JPEG.cpp @@ -7,6 +7,7 @@ #include "RageFile.h" #undef FAR /* fix for VC */ +/** @brief A helper to get the jpeg lib. */ namespace jpeg { extern "C" diff --git a/src/RageSurface_Save_JPEG.h b/src/RageSurface_Save_JPEG.h index ebde4ab2f8..b41fbae9ff 100644 --- a/src/RageSurface_Save_JPEG.h +++ b/src/RageSurface_Save_JPEG.h @@ -5,6 +5,7 @@ struct RageSurface; class RageFile; +/** @brief Utility functions for the RageSurfaces. */ namespace RageSurfaceUtils { bool SaveJPEG( RageSurface *surface, RageFile &f, bool bHighQual=true ); diff --git a/src/RageSurface_Save_PNG.h b/src/RageSurface_Save_PNG.h index 2d7ba4c355..67ae9f74a9 100644 --- a/src/RageSurface_Save_PNG.h +++ b/src/RageSurface_Save_PNG.h @@ -5,6 +5,7 @@ struct RageSurface; class RageFile; +/** @brief Utility functions for the RageSurfaces. */ namespace RageSurfaceUtils { bool SavePNG( RageSurface *pImg, RageFile &f, RString &sError ); diff --git a/src/RageTypes.cpp b/src/RageTypes.cpp index 2b87f0d499..977c17f2ec 100644 --- a/src/RageTypes.cpp +++ b/src/RageTypes.cpp @@ -73,7 +73,7 @@ RString RageColor::NormalizeColorString( RString sColor ) return ""; return c.ToString(); } - +/** @brief Utilities for working with Lua. */ namespace LuaHelpers { template<> bool FromStack( lua_State *L, RageColor &Object, int iOffset ) diff --git a/src/RageUtil.h b/src/RageUtil.h index eb489e50ca..ac9c68f377 100644 --- a/src/RageUtil.h +++ b/src/RageUtil.h @@ -615,6 +615,7 @@ int GetFileSizeInBytes( const RString &sFilePath ); void FixSlashesInPlace( RString &sPath ); void CollapsePath( RString &sPath, bool bRemoveLeadingDot=false ); +/** @brief Utilities for converting the RStrings. */ namespace StringConversion { template diff --git a/src/RageUtil_CachedObject.h b/src/RageUtil_CachedObject.h index 71215d9e9d..a7b1e94180 100644 --- a/src/RageUtil_CachedObject.h +++ b/src/RageUtil_CachedObject.h @@ -1,5 +1,3 @@ -/* CachedObject - cached object pointers with automatic invalidation. */ - #ifndef RAGE_UTIL_CACHED_OBJECT_H #define RAGE_UTIL_CACHED_OBJECT_H @@ -7,13 +5,15 @@ template class CachedObjectPointer; - +/** @brief Utilities for working with the + CachedObjects. */ namespace CachedObjectHelpers { void Lock(); void Unlock(); } +/** @brief Cached object pointers with automatic invalidation. */ template class CachedObject { diff --git a/src/ScreenManager.cpp b/src/ScreenManager.cpp index b10963b20f..701b27d574 100644 --- a/src/ScreenManager.cpp +++ b/src/ScreenManager.cpp @@ -81,6 +81,7 @@ static Preference g_bPruneFonts( "PruneFonts", true ); // Screen registration static map *g_pmapRegistrees = NULL; +/** @brief Utility functions for the ScreenManager. */ namespace ScreenManagerUtil { // in draw order first to last diff --git a/src/ScreenMessage.h b/src/ScreenMessage.h index de01907747..5124cd52a0 100644 --- a/src/ScreenMessage.h +++ b/src/ScreenMessage.h @@ -17,14 +17,14 @@ extern const ScreenMessage SM_LoseFocus; extern const ScreenMessage SM_Pause; extern const ScreenMessage SM_Success; extern const ScreenMessage SM_Failure; - +/** @brief Helpers for the ScreenMessages. */ namespace ScreenMessageHelpers { ScreenMessage ToScreenMessage( const RString & Name ); RString ScreenMessageToString( ScreenMessage SM ); }; -// Automatically generate a unique ScreenMessage value +/** @brief Automatically generate a unique ScreenMessage value */ #define AutoScreenMessage( x ) \ const ScreenMessage x = ScreenMessageHelpers::ToScreenMessage( #x ) diff --git a/src/StdString.h b/src/StdString.h index f92cd07a65..cb13bbb796 100644 --- a/src/StdString.h +++ b/src/StdString.h @@ -1,5 +1,3 @@ -/** @brief StdString - std::string convenience wrapper. */ - // ============================================================================= // FILE: StdString.h // AUTHOR: Joe O'Leary (with outside help noted in comments) @@ -122,29 +120,29 @@ void MakeLower( char *p, size_t iLen ); void MakeUpper( wchar_t *p, size_t iLen ); void MakeLower( wchar_t *p, size_t iLen ); -// ============================================================================= -// INLINE FUNCTIONS ON WHICH CSTDSTRING RELIES -// -// Usually for generic text mapping, we rely on preprocessor macro definitions -// to map to string functions. However the CStdStr<> template cannot use -// macro-based generic text mappings because its character types do not get -// resolved until template processing which comes AFTER macro processing. In -// other words, UNICODE is of little help to us in the CStdStr template -// -// Therefore, to keep the CStdStr declaration simple, we have these inline -// functions. The template calls them often. Since they are inline (and NOT -// exported when this is built as a DLL), they will probably be resolved away -// to nothing. -// -// Without these functions, the CStdStr<> template would probably have to broken -// out into two, almost identical classes. Either that or it would be a huge, -// convoluted mess, with tons of "if" statements all over the place checking the -// size of template parameter CT. -// -// In several cases, you will see two versions of each function. One version is -// the more portable, standard way of doing things, while the other is the -// non-standard, but often significantly faster Visual C++ way. -// ============================================================================= +/** + * @brief Inline functions on which CStdString relies on. + * + * Usually for generic text mapping, we rely on preprocessor macro definitions + * to map to string functions. However the CStdStr<> template cannot use + * macro-based generic text mappings because its character types do not get + * resolved until template processing which comes AFTER macro processing. In + * other words, UNICODE is of little help to us in the CStdStr template. + * + * Therefore, to keep the CStdStr declaration simple, we have these inline + * functions. The template calls them often. Since they are inline (and NOT + * exported when this is built as a DLL), they will probably be resolved away + * to nothing. + * + * Without these functions, the CStdStr<> template would probably have to broken + * out into two, almost identical classes. Either that or it would be a huge, + * convoluted mess, with tons of "if" statements all over the place checking the + * size of template parameter CT. + * + * In several cases, you will see two versions of each function. One version is + * the more portable, standard way of doing things, while the other is the + * non-standard, but often significantly faster Visual C++ way. + */ namespace StdString { // ----------------------------------------------------------------------------- diff --git a/src/StepMania.h b/src/StepMania.h index 04aa4754bc..d5e66b1890 100644 --- a/src/StepMania.h +++ b/src/StepMania.h @@ -7,6 +7,7 @@ class VideoModeParams; int main( int argc, char* argv[] ); +/** @brief Utility functions for controlling the whole game. */ namespace StepMania { void ApplyGraphicOptions(); diff --git a/src/Trail.h b/src/Trail.h index 2e53965319..f0f9fb040f 100644 --- a/src/Trail.h +++ b/src/Trail.h @@ -10,7 +10,8 @@ class Song; class Steps; struct lua_State; -/** @brief One such Song and Step in the entire Trail. */ +/** @brief One such Song and + * Step in the entire Trail. */ struct TrailEntry { TrailEntry(): @@ -24,9 +25,13 @@ struct TrailEntry } void GetAttackArray( AttackArray &out ) const; + /** @brief The Song involved in the entry. */ Song* pSong; + /** @brief The Step involved in the entry. */ Steps* pSteps; + /** @brief The Modifiers applied for the whole Song. */ RString Modifiers; + /** @brief The Attacks that will take place durring the Song. */ AttackArray Attacks; /** * @brief Is this Song and its Step meant to be a secret? From 9d13036e0872a56e1319c25bea16c868b1883397 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sat, 19 Feb 2011 12:26:18 -0500 Subject: [PATCH 082/143] Add @briefs to the Luna classes. Yeah...there was a lot. */ --- src/Actor.cpp | 1 + src/ActorFrame.cpp | 1 + src/ActorFrameTexture.cpp | 1 + src/ActorMultiTexture.cpp | 1 + src/ActorProxy.cpp | 1 + src/ActorScroller.cpp | 1 + src/ActorSound.cpp | 1 + src/AnnouncerManager.cpp | 1 + src/Banner.cpp | 1 + src/BitmapText.cpp | 2 ++ src/Character.cpp | 1 + src/CharacterManager.cpp | 1 + src/ComboGraph.cpp | 1 + src/ControllerStateDisplay.cpp | 3 ++- src/Course.cpp | 2 ++ src/CourseContentsList.cpp | 1 + src/CryptManager.cpp | 1 + src/DifficultyIcon.cpp | 1 + src/DifficultyList.cpp | 1 + src/FadingBanner.cpp | 1 + src/Game.cpp | 1 + src/GameCommand.cpp | 1 + src/GameManager.cpp | 1 + src/GameSoundManager.cpp | 1 + src/GameState.cpp | 1 + src/GradeDisplay.cpp | 1 + src/GraphDisplay.cpp | 1 + src/GrooveRadar.cpp | 1 + src/HelpDisplay.cpp | 2 ++ src/HoldJudgment.cpp | 1 + src/LifeMeter.cpp | 1 + src/LifeMeterBattery.cpp | 1 + src/LuaBinding.h | 1 + src/MemoryCardManager.cpp | 1 + src/MenuTimer.cpp | 1 + src/MessageManager.cpp | 1 + src/ModIconRow.cpp | 1 + src/Model.cpp | 1 + src/NoteSkinManager.cpp | 1 + src/PaneDisplay.cpp | 1 + src/PercentageDisplay.cpp | 1 + src/Player.cpp | 1 + src/PlayerStageStats.cpp | 1 + src/PlayerState.cpp | 1 + src/PrefsManager.cpp | 1 + src/Profile.cpp | 1 + src/ProfileManager.cpp | 1 + src/RadarValues.cpp | 1 + src/RageDisplay.cpp | 2 ++ src/RageFile.cpp | 1 + src/RageFileManager.cpp | 1 + src/RageInput.cpp | 1 + src/RageSound.cpp | 1 + src/RageTexture.cpp | 1 + src/RageTextureRenderTarget.cpp | 1 + src/RollingNumbers.cpp | 1 + src/ScoreDisplayAliveTime.cpp | 1 + src/ScoreDisplayCalories.cpp | 1 + src/Screen.cpp | 1 + src/ScreenAttract.cpp | 1 + src/ScreenEdit.cpp | 1 + src/ScreenEvaluation.cpp | 1 + src/ScreenGameplay.cpp | 2 ++ src/ScreenHowToPlay.cpp | 1 + src/ScreenManager.cpp | 1 + src/ScreenNameEntryTraditional.cpp | 1 + src/ScreenNetEvaluation.cpp | 1 + src/ScreenOptions.cpp | 1 + src/ScreenPlayerOptions.cpp | 1 + src/ScreenProfileLoad.cpp | 1 + src/ScreenProfileSave.cpp | 1 + src/ScreenPrompt.cpp | 2 ++ src/ScreenSelectMaster.cpp | 1 + src/ScreenSelectMusic.cpp | 1 + src/ScreenSelectProfile.cpp | 1 + src/ScreenTextEntry.cpp | 2 +- src/ScreenWithMenuElements.cpp | 3 ++- src/Song.cpp | 1 + src/SongManager.cpp | 1 + src/Sprite.cpp | 1 + src/StageStats.cpp | 1 + src/StatsManager.cpp | 1 + src/StepsDisplay.cpp | 1 + src/Style.cpp | 1 + src/TextBanner.cpp | 1 + src/ThemeManager.cpp | 1 + src/TimingData.cpp | 1 + src/Trail.cpp | 3 +++ src/UnlockManager.cpp | 2 ++ src/WheelBase.cpp | 1 + src/WorkoutGraph.cpp | 1 + 91 files changed, 102 insertions(+), 3 deletions(-) diff --git a/src/Actor.cpp b/src/Actor.cpp index 153b947950..ac61bb1e85 100644 --- a/src/Actor.cpp +++ b/src/Actor.cpp @@ -1307,6 +1307,7 @@ Actor::TweenInfo &Actor::TweenInfo::operator=( const TweenInfo &rhs ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the Actor. */ class LunaActor : public Luna { public: diff --git a/src/ActorFrame.cpp b/src/ActorFrame.cpp index 672cac0279..bbe12260a5 100644 --- a/src/ActorFrame.cpp +++ b/src/ActorFrame.cpp @@ -451,6 +451,7 @@ void ActorFrame::SetDrawByZPosition( bool b ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ActorFrame. */ class LunaActorFrame : public Luna { public: diff --git a/src/ActorFrameTexture.cpp b/src/ActorFrameTexture.cpp index f86cfa225d..9b36b85e5e 100644 --- a/src/ActorFrameTexture.cpp +++ b/src/ActorFrameTexture.cpp @@ -67,6 +67,7 @@ void ActorFrameTexture::DrawPrimitives() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ActorFrameTexture. */ class LunaActorFrameTexture : public Luna { public: diff --git a/src/ActorMultiTexture.cpp b/src/ActorMultiTexture.cpp index 1b69a5c0f0..7b7fd85f21 100644 --- a/src/ActorMultiTexture.cpp +++ b/src/ActorMultiTexture.cpp @@ -134,6 +134,7 @@ bool ActorMultiTexture::EarlyAbortDraw() const // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ActorMultiTexture. */ class LunaActorMultiTexture: public Luna { public: diff --git a/src/ActorProxy.cpp b/src/ActorProxy.cpp index 8429ecab96..38938818d0 100644 --- a/src/ActorProxy.cpp +++ b/src/ActorProxy.cpp @@ -33,6 +33,7 @@ void ActorProxy::LoadFromNode( const XNode* pNode ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ActorProxy. */ class LunaActorProxy: public Luna { public: diff --git a/src/ActorScroller.cpp b/src/ActorScroller.cpp index 3d65ad01d2..91f1927a7c 100644 --- a/src/ActorScroller.cpp +++ b/src/ActorScroller.cpp @@ -309,6 +309,7 @@ void ActorScroller::PositionItemsAndDrawPrimitives( bool bDrawPrimitives ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ActorScroller. */ class LunaActorScroller: public Luna { public: diff --git a/src/ActorSound.cpp b/src/ActorSound.cpp index b70fe7fce6..054ee2c2a7 100644 --- a/src/ActorSound.cpp +++ b/src/ActorSound.cpp @@ -53,6 +53,7 @@ void ActorSound::LoadFromNode( const XNode* pNode ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ActorSound. */ class LunaActorSound: public Luna { public: diff --git a/src/AnnouncerManager.cpp b/src/AnnouncerManager.cpp index 888321f2d8..50759c01dd 100644 --- a/src/AnnouncerManager.cpp +++ b/src/AnnouncerManager.cpp @@ -166,6 +166,7 @@ void AnnouncerManager::NextAnnouncer() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the AnnouncerManager. */ class LunaAnnouncerManager: public Luna { public: diff --git a/src/Banner.cpp b/src/Banner.cpp index 485722754c..eec43af0de 100644 --- a/src/Banner.cpp +++ b/src/Banner.cpp @@ -232,6 +232,7 @@ void Banner::LoadFromSortOrder( SortOrder so ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the Banner. */ class LunaBanner: public Luna { public: diff --git a/src/BitmapText.cpp b/src/BitmapText.cpp index d65911721a..a67f670aa4 100644 --- a/src/BitmapText.cpp +++ b/src/BitmapText.cpp @@ -794,6 +794,8 @@ void BitmapText::Attribute::FromStack( lua_State *L, int iPos ) // lua start #include "FontCharAliases.h" + +/** @brief Allow Lua to have access to the BitmapText. */ class LunaBitmapText: public Luna { public: diff --git a/src/Character.cpp b/src/Character.cpp index ac8a8da14d..a925c8b563 100644 --- a/src/Character.cpp +++ b/src/Character.cpp @@ -198,6 +198,7 @@ void Character::UndemandGraphics() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the Character. */ class LunaCharacter: public Luna { public: diff --git a/src/CharacterManager.cpp b/src/CharacterManager.cpp index 7a0b6b6fa3..f00522ec7c 100644 --- a/src/CharacterManager.cpp +++ b/src/CharacterManager.cpp @@ -120,6 +120,7 @@ Character* CharacterManager::GetCharacterFromID( RString sCharacterID ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the CharacterManager. */ class LunaCharacterManager: public Luna { public: diff --git a/src/ComboGraph.cpp b/src/ComboGraph.cpp index 21d157b8bd..01f22e373a 100644 --- a/src/ComboGraph.cpp +++ b/src/ComboGraph.cpp @@ -112,6 +112,7 @@ void ComboGraph::Set( const StageStats &s, const PlayerStageStats &pss ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ComboGraph. */ class LunaComboGraph: public Luna { public: diff --git a/src/ControllerStateDisplay.cpp b/src/ControllerStateDisplay.cpp index 12b9cc5471..d97c664b64 100644 --- a/src/ControllerStateDisplay.cpp +++ b/src/ControllerStateDisplay.cpp @@ -95,7 +95,8 @@ void ControllerStateDisplay::Update( float fDelta ) } } -// lua start + +/** @brief Allow Lua to have access to the ControllerStateDisplay. */ class LunaControllerStateDisplay: public Luna { public: diff --git a/src/Course.cpp b/src/Course.cpp index 2833f434ed..278112f490 100644 --- a/src/Course.cpp +++ b/src/Course.cpp @@ -88,6 +88,7 @@ int CourseEntry::GetNumModChanges() const // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the CourseEntry. */ class LunaCourseEntry: public Luna { public: @@ -1045,6 +1046,7 @@ bool Course::Matches( RString sGroup, RString sCourse ) const // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the Course. */ class LunaCourse: public Luna { public: diff --git a/src/CourseContentsList.cpp b/src/CourseContentsList.cpp index 14b332e0bc..7b03b083c2 100644 --- a/src/CourseContentsList.cpp +++ b/src/CourseContentsList.cpp @@ -145,6 +145,7 @@ void CourseContentsList::SetItemFromGameState( Actor *pActor, int iCourseEntryIn // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the CourseContentsList. */ class LunaCourseContentsList: public Luna { public: diff --git a/src/CryptManager.cpp b/src/CryptManager.cpp index 28c768c6a2..5841a103b3 100644 --- a/src/CryptManager.cpp +++ b/src/CryptManager.cpp @@ -430,6 +430,7 @@ RString CryptManager::GenerateRandomUUID() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the CryptManager. */ class LunaCryptManager: public Luna { public: diff --git a/src/DifficultyIcon.cpp b/src/DifficultyIcon.cpp index e2f8c450b5..3a7439b45d 100644 --- a/src/DifficultyIcon.cpp +++ b/src/DifficultyIcon.cpp @@ -95,6 +95,7 @@ void DifficultyIcon::SetFromDifficulty( Difficulty dc ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the DifficultyIcon. */ class LunaDifficultyIcon: public Luna { public: diff --git a/src/DifficultyList.cpp b/src/DifficultyList.cpp index 153f1beaa7..f8dfa19440 100644 --- a/src/DifficultyList.cpp +++ b/src/DifficultyList.cpp @@ -379,6 +379,7 @@ void StepsDisplayList::HandleMessage( const Message &msg ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the StepsDisplayList. */ class LunaStepsDisplayList: public Luna { public: diff --git a/src/FadingBanner.cpp b/src/FadingBanner.cpp index f11baa0421..cc1948ef2a 100644 --- a/src/FadingBanner.cpp +++ b/src/FadingBanner.cpp @@ -255,6 +255,7 @@ void FadingBanner::LoadCourseFallback() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the FadingBanner. */ class LunaFadingBanner: public Luna { public: diff --git a/src/Game.cpp b/src/Game.cpp index 036b3f2e1c..2e1c09511c 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -42,6 +42,7 @@ const Game::PerButtonInfo *Game::GetPerButtonInfo( GameButton gb ) const // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the Game. */ class LunaGame: public Luna { public: diff --git a/src/GameCommand.cpp b/src/GameCommand.cpp index b6717b8fb6..2bd5c7051a 100644 --- a/src/GameCommand.cpp +++ b/src/GameCommand.cpp @@ -855,6 +855,7 @@ bool GameCommand::IsZero() const #include "Steps.h" #include "Character.h" +/** @brief Allow Lua to have access to the GameCommand. */ class LunaGameCommand: public Luna { public: diff --git a/src/GameManager.cpp b/src/GameManager.cpp index c904915665..56a60a5a45 100644 --- a/src/GameManager.cpp +++ b/src/GameManager.cpp @@ -3103,6 +3103,7 @@ const Style* GameManager::GameAndStringToStyle( const Game *game, RString sStyle // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the GameManager. */ class LunaGameManager: public Luna { public: diff --git a/src/GameSoundManager.cpp b/src/GameSoundManager.cpp index 9034b86a34..e19cd42bd6 100644 --- a/src/GameSoundManager.cpp +++ b/src/GameSoundManager.cpp @@ -781,6 +781,7 @@ float GameSoundManager::GetPlayerBalance( PlayerNumber pn ) #include "LuaBinding.h" +/** @brief Allow Lua to have access to the GameSoundManager. */ class LunaGameSoundManager: public Luna { public: diff --git a/src/GameState.cpp b/src/GameState.cpp index 61fcc69f45..ec68e416a0 100644 --- a/src/GameState.cpp +++ b/src/GameState.cpp @@ -2174,6 +2174,7 @@ MultiPlayer GetNextEnabledMultiPlayer( MultiPlayer mp ) #include "LuaBinding.h" #include "Game.h" +/** @brief Allow Lua to have access to the GameState. */ class LunaGameState: public Luna { public: diff --git a/src/GradeDisplay.cpp b/src/GradeDisplay.cpp index 7760ca877b..2648f50844 100644 --- a/src/GradeDisplay.cpp +++ b/src/GradeDisplay.cpp @@ -36,6 +36,7 @@ void GradeDisplay::SetGrade( Grade grade ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the GradeDisplay. */ class LunaGradeDisplay: public Luna { public: diff --git a/src/GraphDisplay.cpp b/src/GraphDisplay.cpp index adf88abfa5..ced69f6e27 100644 --- a/src/GraphDisplay.cpp +++ b/src/GraphDisplay.cpp @@ -275,6 +275,7 @@ void GraphDisplay::UpdateVerts() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the GraphDisplay. */ class LunaGraphDisplay: public Luna { public: diff --git a/src/GrooveRadar.cpp b/src/GrooveRadar.cpp index 06ce8d4c9a..d9244af486 100644 --- a/src/GrooveRadar.cpp +++ b/src/GrooveRadar.cpp @@ -187,6 +187,7 @@ void GrooveRadar::GrooveRadarValueMap::DrawPrimitives() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the GrooveRadar. */ class LunaGrooveRadar: public Luna { public: diff --git a/src/HelpDisplay.cpp b/src/HelpDisplay.cpp index bef56bf06e..59d464629d 100644 --- a/src/HelpDisplay.cpp +++ b/src/HelpDisplay.cpp @@ -62,6 +62,8 @@ void HelpDisplay::Update( float fDeltaTime ) #include "LuaBinding.h" #include "FontCharAliases.h" + +/** @brief Allow Lua to have access to the HelpDisplay. */ class LunaHelpDisplay: public Luna { public: diff --git a/src/HoldJudgment.cpp b/src/HoldJudgment.cpp index fb9d99a435..ccef1e8b1c 100644 --- a/src/HoldJudgment.cpp +++ b/src/HoldJudgment.cpp @@ -95,6 +95,7 @@ void HoldJudgment::HandleMessage( const Message &msg ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the HoldJudgment. */ class LunaHoldJudgment: public Luna { public: diff --git a/src/LifeMeter.cpp b/src/LifeMeter.cpp index e542576471..be9adee28a 100644 --- a/src/LifeMeter.cpp +++ b/src/LifeMeter.cpp @@ -19,6 +19,7 @@ LifeMeter *LifeMeter::MakeLifeMeter( SongOptions::LifeType t ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the LifeMeter. */ class LunaLifeMeter: public Luna { public: diff --git a/src/LifeMeterBattery.cpp b/src/LifeMeterBattery.cpp index ce0abf7365..207eea50a9 100644 --- a/src/LifeMeterBattery.cpp +++ b/src/LifeMeterBattery.cpp @@ -240,6 +240,7 @@ void LifeMeterBattery::Update( float fDeltaTime ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the LifeMeterBattery. */ class LunaLifeMeterBattery: public Luna { public: diff --git a/src/LuaBinding.h b/src/LuaBinding.h index 0917fa108f..a56ac901bb 100644 --- a/src/LuaBinding.h +++ b/src/LuaBinding.h @@ -32,6 +32,7 @@ protected: static int PushEqual( lua_State *L ); }; +/** @brief Allow the binding of Lua to various classes. */ template class Luna: public LuaBinding { diff --git a/src/MemoryCardManager.cpp b/src/MemoryCardManager.cpp index 4573598817..bdb5a7f7ec 100644 --- a/src/MemoryCardManager.cpp +++ b/src/MemoryCardManager.cpp @@ -713,6 +713,7 @@ void MemoryCardManager::UnPauseMountingThread() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the MemoryCardManager. */ class LunaMemoryCardManager: public Luna { public: diff --git a/src/MenuTimer.cpp b/src/MenuTimer.cpp index 0a277fa766..5cf0e63017 100644 --- a/src/MenuTimer.cpp +++ b/src/MenuTimer.cpp @@ -194,6 +194,7 @@ void MenuTimer::SetText( float fSeconds ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the MenuTimer. */ class LunaMenuTimer: public Luna { public: diff --git a/src/MessageManager.cpp b/src/MessageManager.cpp index ee4dcd6e9b..5fecc2d781 100644 --- a/src/MessageManager.cpp +++ b/src/MessageManager.cpp @@ -273,6 +273,7 @@ void MessageSubscriber::UnsubscribeAll() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the MessageManager. */ class LunaMessageManager: public Luna { public: diff --git a/src/ModIconRow.cpp b/src/ModIconRow.cpp index 19e0785a10..996b0da158 100644 --- a/src/ModIconRow.cpp +++ b/src/ModIconRow.cpp @@ -176,6 +176,7 @@ void ModIconRow::SetFromGameState() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ModIconRow. */ class LunaModIconRow: public Luna { public: diff --git a/src/Model.cpp b/src/Model.cpp index f61bc45567..b285611649 100644 --- a/src/Model.cpp +++ b/src/Model.cpp @@ -769,6 +769,7 @@ bool Model::MaterialsNeedNormals() const // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the Model. */ class LunaModel: public Luna { public: diff --git a/src/NoteSkinManager.cpp b/src/NoteSkinManager.cpp index 602073e9a9..9e0ed0834f 100644 --- a/src/NoteSkinManager.cpp +++ b/src/NoteSkinManager.cpp @@ -444,6 +444,7 @@ RString NoteSkinManager::GetPathFromDirAndFile( const RString &sDir, const RStri // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the NoteSkinManager. */ class LunaNoteSkinManager: public Luna { public: diff --git a/src/PaneDisplay.cpp b/src/PaneDisplay.cpp index 88bb957b4e..cdd89c681f 100644 --- a/src/PaneDisplay.cpp +++ b/src/PaneDisplay.cpp @@ -276,6 +276,7 @@ void PaneDisplay::SetFromGameState() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the PaneDisplay. */ class LunaPaneDisplay: public Luna { public: diff --git a/src/PercentageDisplay.cpp b/src/PercentageDisplay.cpp index 66dcacc8f6..31dc11c7a0 100644 --- a/src/PercentageDisplay.cpp +++ b/src/PercentageDisplay.cpp @@ -207,6 +207,7 @@ bool PercentageDisplay::ShowDancePointsNotPercentage() const #include "LuaBinding.h" +/** @brief Allow Lua to have access to the PercentageDisplay. */ class LunaPercentageDisplay: public Luna { public: diff --git a/src/Player.cpp b/src/Player.cpp index 9e8a7c4d58..944489856d 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -3240,6 +3240,7 @@ RString Player::ApplyRandomAttack() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the Player. */ class LunaPlayer: public Luna { public: diff --git a/src/PlayerStageStats.cpp b/src/PlayerStageStats.cpp index 69a4dbe3b7..d1b0e08d4a 100644 --- a/src/PlayerStageStats.cpp +++ b/src/PlayerStageStats.cpp @@ -668,6 +668,7 @@ LuaFunction( FormatPercentScore, PlayerStageStats::FormatPercentScore( FArg(1) ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the PlayerStageStats. */ class LunaPlayerStageStats: public Luna { public: diff --git a/src/PlayerState.cpp b/src/PlayerState.cpp index 41ebdbc9b3..aa512ecbaf 100644 --- a/src/PlayerState.cpp +++ b/src/PlayerState.cpp @@ -192,6 +192,7 @@ int PlayerState::GetSumOfActiveAttackLevels() const // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the PlayerState. */ class LunaPlayerState: public Luna { public: diff --git a/src/PrefsManager.cpp b/src/PrefsManager.cpp index 2ced597a9e..3d32672c58 100644 --- a/src/PrefsManager.cpp +++ b/src/PrefsManager.cpp @@ -521,6 +521,7 @@ RString PrefsManager::GetPreferencesSection() const // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the PrefsManager. */ class LunaPrefsManager: public Luna { public: diff --git a/src/Profile.cpp b/src/Profile.cpp index 22b071a4d6..b3d48827d6 100644 --- a/src/Profile.cpp +++ b/src/Profile.cpp @@ -1937,6 +1937,7 @@ RString Profile::MakeFileNameNoExtension( RString sFileNameBeginning, int iIndex // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the Profile. */ class LunaProfile: public Luna { public: diff --git a/src/ProfileManager.cpp b/src/ProfileManager.cpp index 65db1110c7..81f1f40ff9 100644 --- a/src/ProfileManager.cpp +++ b/src/ProfileManager.cpp @@ -799,6 +799,7 @@ int ProfileManager::GetNumLocalProfiles() const // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ProfileManager. */ class LunaProfileManager: public Luna { public: diff --git a/src/RadarValues.cpp b/src/RadarValues.cpp index c87b4fe8c7..890bec2fa6 100644 --- a/src/RadarValues.cpp +++ b/src/RadarValues.cpp @@ -91,6 +91,7 @@ void RadarValues::FromString( RString sRadarValues ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the RadarValues. */ class LunaRadarValues: public Luna { public: diff --git a/src/RageDisplay.cpp b/src/RageDisplay.cpp index c622671608..14eb9a7ed5 100644 --- a/src/RageDisplay.cpp +++ b/src/RageDisplay.cpp @@ -994,6 +994,8 @@ void RageCompiledGeometry::Set( const vector &vMeshes, bool bNeedsNormal // lua start #include "LuaBinding.h" + +/** @brief Allow Lua to have access to the RageDisplay. */ class LunaRageDisplay: public Luna { public: diff --git a/src/RageFile.cpp b/src/RageFile.cpp index 89133252e8..e59057a5da 100644 --- a/src/RageFile.cpp +++ b/src/RageFile.cpp @@ -316,6 +316,7 @@ int32_t FileReading::read_32_le( RageFileBasic &f, RString &sError ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the RageFile. */ class LunaRageFile: public Luna { public: diff --git a/src/RageFileManager.cpp b/src/RageFileManager.cpp index deaa84bc2c..f1fad415d4 100644 --- a/src/RageFileManager.cpp +++ b/src/RageFileManager.cpp @@ -1036,6 +1036,7 @@ unsigned int GetHashForDirectory( const RString &sDir ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the RageFileManager. */ class LunaRageFileManager: public Luna { public: diff --git a/src/RageInput.cpp b/src/RageInput.cpp index 99c9d6eba5..fa5b29d8f9 100644 --- a/src/RageInput.cpp +++ b/src/RageInput.cpp @@ -176,6 +176,7 @@ RString RageInput::GetDisplayDevicesString() const // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the RageInput. */ class LunaRageInput: public Luna { public: diff --git a/src/RageSound.cpp b/src/RageSound.cpp index 456df5275f..fa19d74b6c 100644 --- a/src/RageSound.cpp +++ b/src/RageSound.cpp @@ -647,6 +647,7 @@ void RageSound::SetStopModeFromString( const RString &sStopMode ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the RageSound. */ class LunaRageSound: public Luna { public: diff --git a/src/RageTexture.cpp b/src/RageTexture.cpp index 5d98403747..c1eed7d324 100644 --- a/src/RageTexture.cpp +++ b/src/RageTexture.cpp @@ -68,6 +68,7 @@ const RectF *RageTexture::GetTextureCoordRect( int iFrameNo ) const // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the RageTexture. */ class LunaRageTexture: public Luna { public: diff --git a/src/RageTextureRenderTarget.cpp b/src/RageTextureRenderTarget.cpp index 188eaecbde..43881463e9 100644 --- a/src/RageTextureRenderTarget.cpp +++ b/src/RageTextureRenderTarget.cpp @@ -75,6 +75,7 @@ void RageTextureRenderTarget::FinishRenderingTo() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the RageTextureRenderTarget. */ class LunaRageTextureRenderTarget: public Luna { public: diff --git a/src/RollingNumbers.cpp b/src/RollingNumbers.cpp index 713a175b5e..c211996c56 100644 --- a/src/RollingNumbers.cpp +++ b/src/RollingNumbers.cpp @@ -99,6 +99,7 @@ void RollingNumbers::UpdateText() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the RollingNumbers. */ class LunaRollingNumbers: public Luna { public: diff --git a/src/ScoreDisplayAliveTime.cpp b/src/ScoreDisplayAliveTime.cpp index 434d093def..0f58b4b992 100644 --- a/src/ScoreDisplayAliveTime.cpp +++ b/src/ScoreDisplayAliveTime.cpp @@ -68,6 +68,7 @@ void ScoreDisplayAliveTime::UpdateNumber() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScoreDisplayAliveTime. */ class LunaScoreDisplayAliveTime: public Luna { public: diff --git a/src/ScoreDisplayCalories.cpp b/src/ScoreDisplayCalories.cpp index 808447f70a..956e289eb9 100644 --- a/src/ScoreDisplayCalories.cpp +++ b/src/ScoreDisplayCalories.cpp @@ -72,6 +72,7 @@ void ScoreDisplayCalories::UpdateNumber() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScoreDisplayCalories. */ class LunaScoreDisplayCalories: public Luna { public: diff --git a/src/Screen.cpp b/src/Screen.cpp index 2993e684d0..325b1abbb1 100644 --- a/src/Screen.cpp +++ b/src/Screen.cpp @@ -279,6 +279,7 @@ void Screen::ClearMessageQueue( const ScreenMessage SM ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the Screen. */ class LunaScreen: public Luna { public: diff --git a/src/ScreenAttract.cpp b/src/ScreenAttract.cpp index cd65b9bc3f..6cab04ab6d 100644 --- a/src/ScreenAttract.cpp +++ b/src/ScreenAttract.cpp @@ -165,6 +165,7 @@ void ScreenAttract::GoToStartScreen( RString sScreenName ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScreenAttract. */ class LunaScreenAttract: public Luna { public: diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index 300633546c..a6678f4fb2 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -4066,6 +4066,7 @@ void ScreenEdit::DoHelp() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScreenEdit. */ class LunaScreenEdit: public Luna { public: diff --git a/src/ScreenEvaluation.cpp b/src/ScreenEvaluation.cpp index ee24a8187c..55333bf14a 100644 --- a/src/ScreenEvaluation.cpp +++ b/src/ScreenEvaluation.cpp @@ -730,6 +730,7 @@ void ScreenEvaluation::HandleMenuStart() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScreenEvaluation. */ class LunaScreenEvaluation: public Luna { public: diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index a885fc37cb..8ff1bc1896 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -2838,6 +2838,7 @@ bool ScreenGameplay::LoadReplay() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScreenGameplay. */ class LunaScreenGameplay: public Luna { public: @@ -2896,6 +2897,7 @@ public: LUA_REGISTER_DERIVED_CLASS( ScreenGameplay, ScreenWithMenuElements ) +/** @brief Allow Lua to have access to the PlayerInfo. */ class LunaPlayerInfo: public Luna { public: diff --git a/src/ScreenHowToPlay.cpp b/src/ScreenHowToPlay.cpp index e2140ccc4c..44da5dd20c 100644 --- a/src/ScreenHowToPlay.cpp +++ b/src/ScreenHowToPlay.cpp @@ -301,6 +301,7 @@ void ScreenHowToPlay::HandleScreenMessage( const ScreenMessage SM ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScreenHowToPlay. */ class LunaScreenHowToPlay: public Luna { public: diff --git a/src/ScreenManager.cpp b/src/ScreenManager.cpp index 701b27d574..15dcc3bc32 100644 --- a/src/ScreenManager.cpp +++ b/src/ScreenManager.cpp @@ -866,6 +866,7 @@ void ScreenManager::PlaySharedBackgroundOffCommand() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScreenManager. */ class LunaScreenManager: public Luna { public: diff --git a/src/ScreenNameEntryTraditional.cpp b/src/ScreenNameEntryTraditional.cpp index 453d2eabac..70fdbaf493 100644 --- a/src/ScreenNameEntryTraditional.cpp +++ b/src/ScreenNameEntryTraditional.cpp @@ -238,6 +238,7 @@ bool ScreenNameEntryTraditional::Backspace( PlayerNumber pn ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScreenNameEntryTraditional. */ class LunaScreenNameEntryTraditional: public Luna { public: diff --git a/src/ScreenNetEvaluation.cpp b/src/ScreenNetEvaluation.cpp index 99199e0d8a..730aaad417 100644 --- a/src/ScreenNetEvaluation.cpp +++ b/src/ScreenNetEvaluation.cpp @@ -226,6 +226,7 @@ void ScreenNetEvaluation::UpdateStats() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScreenNetEvaluation. */ class LunaScreenNetEvaluation: public Luna { public: diff --git a/src/ScreenOptions.cpp b/src/ScreenOptions.cpp index f3f3d71511..e51ad9e232 100644 --- a/src/ScreenOptions.cpp +++ b/src/ScreenOptions.cpp @@ -1277,6 +1277,7 @@ void ScreenOptions::MenuUpDown( const InputEventPlus &input, int iDir ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScreenOptions. */ class LunaScreenOptions: public Luna { public: diff --git a/src/ScreenPlayerOptions.cpp b/src/ScreenPlayerOptions.cpp index 64fb5a52ee..1ae56fbf0d 100644 --- a/src/ScreenPlayerOptions.cpp +++ b/src/ScreenPlayerOptions.cpp @@ -150,6 +150,7 @@ void ScreenPlayerOptions::UpdateDisqualified( int row, PlayerNumber pn ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScreenPlayerOptions. */ class LunaScreenPlayerOptions: public Luna { public: diff --git a/src/ScreenProfileLoad.cpp b/src/ScreenProfileLoad.cpp index 41b89f6a0d..6f1cb87cdf 100644 --- a/src/ScreenProfileLoad.cpp +++ b/src/ScreenProfileLoad.cpp @@ -37,6 +37,7 @@ void ScreenProfileLoad::Continue() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScreenProfileLoad. */ class LunaScreenProfileLoad: public Luna { public: diff --git a/src/ScreenProfileSave.cpp b/src/ScreenProfileSave.cpp index 821a55074d..a769f96cd1 100644 --- a/src/ScreenProfileSave.cpp +++ b/src/ScreenProfileSave.cpp @@ -25,6 +25,7 @@ void ScreenProfileSave::Continue() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScreenProfileSave. */ class LunaScreenProfileSave: public Luna { public: diff --git a/src/ScreenPrompt.cpp b/src/ScreenPrompt.cpp index f963c11cd8..efe9bb72e8 100644 --- a/src/ScreenPrompt.cpp +++ b/src/ScreenPrompt.cpp @@ -251,6 +251,8 @@ void ScreenPrompt::TweenOffScreen() // lua start /* #include "LuaBinding.h" + +/** @brief Allow Lua to have access to the ScreenPrompt. class LunaScreenPrompt: public Luna { public: diff --git a/src/ScreenSelectMaster.cpp b/src/ScreenSelectMaster.cpp index 7f775ff215..dd363affa6 100644 --- a/src/ScreenSelectMaster.cpp +++ b/src/ScreenSelectMaster.cpp @@ -942,6 +942,7 @@ float ScreenSelectMaster::GetCursorY( PlayerNumber pn ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScreenSelectMaster. */ class LunaScreenSelectMaster: public Luna { public: diff --git a/src/ScreenSelectMusic.cpp b/src/ScreenSelectMusic.cpp index f28d6a0396..3fbb770efb 100644 --- a/src/ScreenSelectMusic.cpp +++ b/src/ScreenSelectMusic.cpp @@ -1856,6 +1856,7 @@ void ScreenSelectMusic::AfterMusicChange() // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScreenSelectMusic. */ class LunaScreenSelectMusic: public Luna { public: diff --git a/src/ScreenSelectProfile.cpp b/src/ScreenSelectProfile.cpp index cdf1bfd21d..db458d1b57 100644 --- a/src/ScreenSelectProfile.cpp +++ b/src/ScreenSelectProfile.cpp @@ -213,6 +213,7 @@ bool ScreenSelectProfile::Finish(){ // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the ScreenSelectProfile. */ class LunaScreenSelectProfile: public Luna { public: diff --git a/src/ScreenTextEntry.cpp b/src/ScreenTextEntry.cpp index e074d4baa0..cf351429e9 100644 --- a/src/ScreenTextEntry.cpp +++ b/src/ScreenTextEntry.cpp @@ -539,7 +539,7 @@ void ScreenTextEntry::LoadFromTextEntrySettings( const TextEntrySettings &settin BeginScreen(); } -// lua start +/** @brief Allow Lua to have access to the ScreenTextEntry. */ class LunaScreenTextEntry: public Luna { public: diff --git a/src/ScreenWithMenuElements.cpp b/src/ScreenWithMenuElements.cpp index a099df6836..cfee598c48 100644 --- a/src/ScreenWithMenuElements.cpp +++ b/src/ScreenWithMenuElements.cpp @@ -364,7 +364,7 @@ void ScreenWithMenuElementsSimple::MenuBack( const InputEventPlus &input ) // lua start #include "LuaBinding.h" - +/** @brief Allow Lua to have access to the ScreenWithMenuElements. */ class LunaScreenWithMenuElements: public Luna { public: @@ -378,6 +378,7 @@ public: LUA_REGISTER_DERIVED_CLASS( ScreenWithMenuElements, Screen ) +/** @brief Allow Lua to have access to the ScreenWithMenuElementsSimple. */ class LunaScreenWithMenuElementsSimple: public Luna { public: diff --git a/src/Song.cpp b/src/Song.cpp index 0906ee7f6d..7c648aaf8c 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -1457,6 +1457,7 @@ bool Song::IsMarathon() const // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the Song. */ class LunaSong: public Luna { public: diff --git a/src/SongManager.cpp b/src/SongManager.cpp index 7ed727cd74..10e7c2b577 100644 --- a/src/SongManager.cpp +++ b/src/SongManager.cpp @@ -1785,6 +1785,7 @@ int SongManager::GetSongRank(Song* pSong) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the SongManager. */ class LunaSongManager: public Luna { public: diff --git a/src/Sprite.cpp b/src/Sprite.cpp index eaee5cbf0c..e91aa9bfbd 100644 --- a/src/Sprite.cpp +++ b/src/Sprite.cpp @@ -1084,6 +1084,7 @@ void Sprite::AddImageCoords( float fX, float fY ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the Sprite. */ class LunaSprite: public Luna { public: diff --git a/src/StageStats.cpp b/src/StageStats.cpp index b7c5398eb4..131847e188 100644 --- a/src/StageStats.cpp +++ b/src/StageStats.cpp @@ -331,6 +331,7 @@ int StageStats::GetMinimumMissCombo() const // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the StageStats. */ class LunaStageStats: public Luna { public: diff --git a/src/StatsManager.cpp b/src/StatsManager.cpp index 4adb292214..f3cc714ba0 100644 --- a/src/StatsManager.cpp +++ b/src/StatsManager.cpp @@ -345,6 +345,7 @@ void StatsManager::GetStepsInUse( set &apInUseOut ) const // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the StatsManager. */ class LunaStatsManager: public Luna { public: diff --git a/src/StepsDisplay.cpp b/src/StepsDisplay.cpp index 40654ea342..16e4d300ff 100644 --- a/src/StepsDisplay.cpp +++ b/src/StepsDisplay.cpp @@ -267,6 +267,7 @@ void StepsDisplay::SetInternal( const SetParams ¶ms ) // lua start #include "LuaBinding.h" +/** @brief Allow Lua to have access to the StepsDisplay. */ class LunaStepsDisplay: public Luna { public: diff --git a/src/Style.cpp b/src/Style.cpp index b8a41a8dbd..b6b98f6558 100644 --- a/src/Style.cpp +++ b/src/Style.cpp @@ -114,6 +114,7 @@ RString Style::ColToButtonName( int iCol ) const // Lua bindings #include "LuaBinding.h" +/** @brief Allow Lua to have access to the Style. */ class LunaStyle: public Luna