glife: Initial style cleanup

This commit is contained in:
Alexander von Gluck IV 2012-04-06 20:04:26 -05:00
parent 3c94b5cb05
commit 8bc51bee4c
8 changed files with 20 additions and 3 deletions

View File

@ -7,13 +7,14 @@
*/
#include "GLifeConfig.h"
#include <stdio.h>
#include <Slider.h>
#include <StringView.h>
#include <View.h>
#include "GLifeState.h"
#include "GLifeConfig.h"
// ------------------------------------------------------

View File

@ -42,4 +42,5 @@ public:
void MessageReceived( BMessage* );
};
#endif /* _GLIFE_GLIFECONFIG_H */

View File

@ -7,12 +7,12 @@
*/
#include "GLifeGrid.h"
#include <math.h>
#include <stdlib.h>
#include <SupportDefs.h>
#include "GLifeGrid.h"
// ------------------------------------------------------
// GLifeGrid Class Neighbors Definition
@ -28,6 +28,7 @@ inline int32 GLifeGrid::Neighbors( int32 iRow, int32 iColumn )
( Occupied( iRow + 1, iColumn + 1 ) ? 1 : 0 );
}
// ------------------------------------------------------
// GLifeGrid Class Constructor Definition
GLifeGrid::GLifeGrid( int32 iWidth, int32 iHeight )
@ -46,6 +47,7 @@ GLifeGrid::GLifeGrid( int32 iWidth, int32 iHeight )
}
}
// ------------------------------------------------------
// GLifeGrid Class Destructor Definition
GLifeGrid::~GLifeGrid( void )
@ -53,6 +55,7 @@ GLifeGrid::~GLifeGrid( void )
delete m_pbGrid;
}
// ------------------------------------------------------
// GLifeGrid Class Generation Definition
void GLifeGrid::Generation( void )
@ -75,6 +78,7 @@ void GLifeGrid::Generation( void )
m_pbGrid = pbTemp;
}
// ------------------------------------------------------
// GLifeGrid Class Occupied Definition
bool GLifeGrid::Occupied( int32 iRow, int32 iColumn )

View File

@ -9,6 +9,9 @@
#define _GLIFE_GLIFEGRID_H
#include <OS.h>
// GLifeGrid Class Declaration
class GLifeGrid
{
@ -29,4 +32,5 @@ public:
bool Occupied( int32, int32 );
};
#endif /* _GLIFE_GLIFEGRID_H */

View File

@ -4,6 +4,7 @@
*
* Authors:
* Aaron Hill <serac@hillvisions.com>
* Alexander von Gluck <kallisti5@unixzen.com>
*/

View File

@ -14,6 +14,7 @@ const int32 c_iDefGridWidth = 60;
const int32 c_iDefGridHeight = 40;
const int32 c_iDefBorder = 0;
// GLifeState Class Declaration & Definition
class GLifeState
{

View File

@ -50,6 +50,7 @@ GLifeView::GLifeView(BRect rect, const char* name, ulong resizingMode,
UnlockGL();
}
// ------------------------------------------------------
// GLifeView Class Destructor Definition
GLifeView::~GLifeView( void )
@ -57,6 +58,7 @@ GLifeView::~GLifeView( void )
delete m_pglgGrid;
}
// ------------------------------------------------------
// GLifeView Class AttachedToWindow Definition
void GLifeView::AttachedToWindow( void )
@ -66,6 +68,7 @@ void GLifeView::AttachedToWindow( void )
UnlockGL();
}
// ------------------------------------------------------
// GLifeView Class Draw Definition
void GLifeView::Draw(BRect updateRect)
@ -164,6 +167,7 @@ void GLifeView::Draw(BRect updateRect)
glPopMatrix();
}
// ------------------------------------------------------
// GLifeView Class Advance Definition
void GLifeView::Advance( void )

View File

@ -33,4 +33,5 @@ private:
int32 m_iStep;
};
#endif /* _GLIFE_GLIFEVIEW_H */