From fa329514495d9b5e9c6a53217202f7a422c7bf6f Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 13 Feb 2005 03:05:19 +0000 Subject: [PATCH] cleanup --- stepmania/src/CodeDetector.h | 6 ++-- stepmania/src/FadingBanner.h | 2 +- stepmania/src/RageSoundReader_Vorbisfile.h | 32 +++++++++++----------- stepmania/src/RageTimer.cpp | 21 ++++++++++++++ stepmania/src/RageTimer.h | 22 +-------------- stepmania/src/RageTypes.h | 4 +-- stepmania/src/ScreenEndlessBreak.h | 2 +- 7 files changed, 44 insertions(+), 45 deletions(-) diff --git a/stepmania/src/CodeDetector.h b/stepmania/src/CodeDetector.h index 9edb7f02e8..103f3ea6e5 100644 --- a/stepmania/src/CodeDetector.h +++ b/stepmania/src/CodeDetector.h @@ -1,7 +1,7 @@ -/* CodeDetector Uses InputQueue to detect input of codes. */ +/* CodeDetector - Uses InputQueue to detect input of codes. */ -#ifndef CODEDETECTOR_H -#define CODEDETECTOR_H +#ifndef CODE_DETECTOR_H +#define CODE_DETECTOR_H #include "GameInput.h" diff --git a/stepmania/src/FadingBanner.h b/stepmania/src/FadingBanner.h index fcf7b206ef..935854b5ee 100644 --- a/stepmania/src/FadingBanner.h +++ b/stepmania/src/FadingBanner.h @@ -1,4 +1,4 @@ -/* FadingBanner Fades between two banners. */ +/* FadingBanner - Fades between two banners. */ #ifndef FADING_BANNER_H #define FADING_BANNER_H diff --git a/stepmania/src/RageSoundReader_Vorbisfile.h b/stepmania/src/RageSoundReader_Vorbisfile.h index e1733a5e2b..0e1a06a6db 100644 --- a/stepmania/src/RageSoundReader_Vorbisfile.h +++ b/stepmania/src/RageSoundReader_Vorbisfile.h @@ -1,35 +1,35 @@ -/* - * RageSoundReader_Vorbisfile - Read from a Vorbisfile interface - */ +/* RageSoundReader_Vorbisfile - Read from a Vorbisfile interface. */ -#ifndef RAGE_SOUND_READER_VORBISFILE -#define RAGE_SOUND_READER_VORBISFILE +#ifndef RAGE_SOUND_READER_VORBISFILE_H +#define RAGE_SOUND_READER_VORBISFILE_H #include "RageSoundReader_FileReader.h" typedef struct OggVorbis_File OggVorbis_File; -class RageSoundReader_Vorbisfile: public SoundReader_FileReader { - OggVorbis_File *vf; - bool eof; - int SetPosition(int ms, bool accurate); - bool FillBuf(); - CString filename; - int read_offset; - unsigned channels; - +class RageSoundReader_Vorbisfile: public SoundReader_FileReader +{ public: OpenResult Open(CString filename); int GetLength() const; int GetLength_Fast() const; - int SetPosition_Accurate(int ms) { return SetPosition(ms, true); } - int SetPosition_Fast(int ms) { return SetPosition(ms, false); } + int SetPosition_Accurate(int ms) { return SetPosition( ms, true ); } + int SetPosition_Fast(int ms) { return SetPosition( ms, false ); } int Read(char *buf, unsigned len); int GetSampleRate() const; unsigned GetNumChannels() const { return channels; } RageSoundReader_Vorbisfile(); ~RageSoundReader_Vorbisfile(); SoundReader *Copy() const; + +private: + OggVorbis_File *vf; + bool eof; + int SetPosition( int ms, bool accurate ); + bool FillBuf(); + CString filename; + int read_offset; + unsigned channels; }; #endif diff --git a/stepmania/src/RageTimer.cpp b/stepmania/src/RageTimer.cpp index 7d07538b9a..c829606ea5 100644 --- a/stepmania/src/RageTimer.cpp +++ b/stepmania/src/RageTimer.cpp @@ -1,3 +1,24 @@ +/* + * This can be used in two ways: as a timestamp or as a timer. + * + * As a timer, + * RageTimer Timer; + * while(1) { + * printf( "Will be approximately: %f", Timer.PeekDeltaTime()) ; + * float fDeltaTime = Timer.GetDeltaTime(); + * } + * + * or as a timestamp: + * void foo( RageTimer ×tamp ) { + * if( timestamp.IsZero() ) + * printf( "The timestamp isn't set." ); + * else + * printf( "The timestamp happened %f ago", timestamp.Ago() ); + * timestamp.Touch(); + * printf( "Near zero: %f", timestamp.Age() ); + * } + */ + #include "global.h" #include "RageTimer.h" diff --git a/stepmania/src/RageTimer.h b/stepmania/src/RageTimer.h index bace417374..81647c18da 100644 --- a/stepmania/src/RageTimer.h +++ b/stepmania/src/RageTimer.h @@ -1,28 +1,8 @@ -/* RageTimer - Timer services */ +/* RageTimer - Timer services. */ #ifndef RAGE_TIMER_H #define RAGE_TIMER_H -/* - * This can be used in two ways: as a timestamp or as a timer. - * - * As a timer, - * RageTimer Timer; - * while(1) { - * printf( "Will be approximately: %f", Timer.PeekDeltaTime()) ; - * float fDeltaTime = Timer.GetDeltaTime(); - * } - * - * or as a timestamp: - * void foo( RageTimer ×tamp ) { - * if( timestamp.IsZero() ) - * printf( "The timestamp isn't set." ); - * else - * printf( "The timestamp happened %f ago", timestamp.Ago() ); - * timestamp.Touch(); - * printf( "Near zero: %f", timestamp.Age() ); - * } - */ class RageTimer { public: diff --git a/stepmania/src/RageTypes.h b/stepmania/src/RageTypes.h index 3757d21433..b41db0ffdd 100644 --- a/stepmania/src/RageTypes.h +++ b/stepmania/src/RageTypes.h @@ -1,6 +1,4 @@ -/* - * RageTypes - vector and matrix types - */ +/* RageTypes - vector and matrix types. */ #ifndef RAGETYPES_H #define RAGETYPES_H diff --git a/stepmania/src/ScreenEndlessBreak.h b/stepmania/src/ScreenEndlessBreak.h index b6175c174d..d0f4c6c61c 100644 --- a/stepmania/src/ScreenEndlessBreak.h +++ b/stepmania/src/ScreenEndlessBreak.h @@ -1,4 +1,4 @@ -/* Class: ScreenEndlessBreak - Break periods during endless mode. */ +/* ScreenEndlessBreak - Break periods during endless mode. */ #ifndef SCREENENDLESSBREAK_H #define SCREENENDLESSBREAK_H