glife: Initial style cleanup
This commit is contained in:
parent
3c94b5cb05
commit
8bc51bee4c
@ -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"
|
||||
|
||||
|
||||
// ------------------------------------------------------
|
||||
|
@ -42,4 +42,5 @@ public:
|
||||
void MessageReceived( BMessage* );
|
||||
};
|
||||
|
||||
|
||||
#endif /* _GLIFE_GLIFECONFIG_H */
|
||||
|
@ -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 )
|
||||
|
@ -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 */
|
||||
|
@ -4,6 +4,7 @@
|
||||
*
|
||||
* Authors:
|
||||
* Aaron Hill <serac@hillvisions.com>
|
||||
* Alexander von Gluck <kallisti5@unixzen.com>
|
||||
*/
|
||||
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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 )
|
||||
|
@ -33,4 +33,5 @@ private:
|
||||
int32 m_iStep;
|
||||
};
|
||||
|
||||
|
||||
#endif /* _GLIFE_GLIFEVIEW_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user