This commit is contained in:
parent
b7d08475ef
commit
c432ba1f5f
7 changed files with 65 additions and 21 deletions
|
@ -41,7 +41,7 @@ CLayerTile::~CLayerTile()
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerTile::init(VECTOR &MapPos,int Shift,int Width,int Height)
|
void CLayerTile::init(DVECTOR &MapPos,int Shift,int Width,int Height)
|
||||||
{
|
{
|
||||||
int Size=Width*Height;
|
int Size=Width*Height;
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ int Pos;
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerTile::think(VECTOR &MapPos)
|
void CLayerTile::think(DVECTOR &MapPos)
|
||||||
{
|
{
|
||||||
// Update rows and Columns :o)
|
// Update rows and Columns :o)
|
||||||
// As these are on the borders, they 'shouldnt' alter any being rendered
|
// As these are on the borders, they 'shouldnt' alter any being rendered
|
||||||
|
|
|
@ -6,18 +6,6 @@
|
||||||
#define __LAYER_TILE_H__
|
#define __LAYER_TILE_H__
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/*
|
|
||||||
struct sPrimGridElem
|
|
||||||
{
|
|
||||||
TSPRT_16 Prim;
|
|
||||||
// u16 Tile;
|
|
||||||
// u16 Flags;
|
|
||||||
sPrimGridElem *Right;
|
|
||||||
sPrimGridElem *Down;
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
struct sPrimGridElem
|
struct sPrimGridElem
|
||||||
{
|
{
|
||||||
|
@ -49,8 +37,8 @@ public:
|
||||||
{
|
{
|
||||||
TILE_WIDTH=16,
|
TILE_WIDTH=16,
|
||||||
TILE_HEIGHT=16,
|
TILE_HEIGHT=16,
|
||||||
SCREEN_TILE_WIDTH=32, // fast bits ops :o)
|
SCREEN_TILE_WIDTH=32,
|
||||||
SCREEN_TILE_HEIGHT=16, // fast bits ops :o)
|
SCREEN_TILE_HEIGHT=16,
|
||||||
SCREEN_TILE_SIZE=SCREEN_TILE_WIDTH*SCREEN_TILE_HEIGHT
|
SCREEN_TILE_SIZE=SCREEN_TILE_WIDTH*SCREEN_TILE_HEIGHT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -58,9 +46,9 @@ public:
|
||||||
CLayerTile(sLayerHdr *Hdr,sTile *TileList,sTri *TriList,sQuad *QuadList,sVtx *VtxList);
|
CLayerTile(sLayerHdr *Hdr,sTile *TileList,sTri *TriList,sQuad *QuadList,sVtx *VtxList);
|
||||||
virtual ~CLayerTile();
|
virtual ~CLayerTile();
|
||||||
|
|
||||||
virtual void init(VECTOR &MapPos,int Shift,int Width=SCREEN_TILE_WIDTH,int Height=SCREEN_TILE_HEIGHT);
|
virtual void init(DVECTOR &MapPos,int Shift,int Width=SCREEN_TILE_WIDTH,int Height=SCREEN_TILE_HEIGHT);
|
||||||
virtual void shutdown();
|
virtual void shutdown();
|
||||||
virtual void think(VECTOR &MapPos);
|
virtual void think(DVECTOR &MapPos);
|
||||||
virtual void render();
|
virtual void render();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -28,7 +28,7 @@ CLayerTile3d::~CLayerTile3d()
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerTile3d::init(VECTOR &MapPos,int Shift,int Width,int Height)
|
void CLayerTile3d::init(DVECTOR &MapPos,int Shift,int Width,int Height)
|
||||||
{
|
{
|
||||||
int Size=Width*Height;
|
int Size=Width*Height;
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ public:
|
||||||
CLayerTile3d(sLayerHdr *Hdr,sTile *TileList,sTri *TriList,sQuad *QuadList,sVtx *VtxList);
|
CLayerTile3d(sLayerHdr *Hdr,sTile *TileList,sTri *TriList,sQuad *QuadList,sVtx *VtxList);
|
||||||
~CLayerTile3d();
|
~CLayerTile3d();
|
||||||
|
|
||||||
void init(VECTOR &MapPos,int Shift,int Width,int Height);
|
void init(DVECTOR &MapPos,int Shift,int Width,int Height);
|
||||||
void shutdown();
|
void shutdown();
|
||||||
void render();
|
void render();
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ private:
|
||||||
void initLayers();
|
void initLayers();
|
||||||
|
|
||||||
sLvlHdr *LevelHdr;
|
sLvlHdr *LevelHdr;
|
||||||
VECTOR MapPos;
|
DVECTOR MapPos;
|
||||||
|
|
||||||
|
|
||||||
// Tile Layers
|
// Tile Layers
|
||||||
|
|
30
source/player/player.cpp
Normal file
30
source/player/player.cpp
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
/**************/
|
||||||
|
/*** Player ***/
|
||||||
|
/**************/
|
||||||
|
|
||||||
|
#include "system\global.h"
|
||||||
|
#include "Game\Thing.h"
|
||||||
|
#include "Player\Player.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CPlayer::init()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CPlayer::shutdown()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CPlayer::think()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CPlayer::render()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
26
source/player/player.h
Normal file
26
source/player/player.h
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
/**************/
|
||||||
|
/*** Player ***/
|
||||||
|
/**************/
|
||||||
|
|
||||||
|
#ifndef __PLAYER_H__
|
||||||
|
#define __PLAYER_H__
|
||||||
|
|
||||||
|
#include "Game/Thing.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
class CPlayer : public CThing
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CPlayer();
|
||||||
|
virtual ~CPlayer();
|
||||||
|
|
||||||
|
void init();
|
||||||
|
void shutdown();
|
||||||
|
void think();
|
||||||
|
void render();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
};
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
#endif
|
Loading…
Add table
Add a link
Reference in a new issue