You are viewing the NetWars Project

The entrance (WinMain) to the application is in NetWars.cpp. It is currently utilizing DirectX, D3DX, XInput (360 controller), Box2D and eventually Enet for networking.

Last Updated 5/30/08

B2DWrapper.cpp
B2DWrapper.h
Engine.cpp
Engine.h
GameBorder.cpp
GameBorder.h
LinkedList.h
NetWars.cpp
NetWars.h
SceneObject.cpp
SceneObject.h
Shield.cpp
Shield.h
SimpleWindow.cpp
SimpleWindow.h
SpaceShip.cpp
SpaceShip.h
UserInput.cpp
UserInput.h

Zips :
The zip file contains the exe and the dll's needed to run the application.

NetWars.zip


Syntax Highlighting by: SyntaxHighlighter
//-----------------------------------------------------------------------------
// SceneObject Declaration
//-----------------------------------------------------------------------------
#ifndef SCENEOBJECT_H
#define SCENEOBJECT_H

#pragma once

#define D3DFVF_SIMPLEVERTEX (D3DFVF_XYZ) 
//|D3DFVF_DIFFUSE|D3DFVF_SPECULAR)

struct simplevertex {
    FLOAT x, y, z;
};

class SceneObject{
public:
	SceneObject( );
	SceneObject( float x, float y );
	~SceneObject();

	void AddForce( b2Vec2 dir, float strength );
	void SetForce( D3DXVECTOR3 dir, float strength );
	void SetForceDir( D3DXVECTOR3 dir );
	void Update( );
	virtual void Rotate( float angle );
	virtual void Move( float x, float y );
	void Initialize( float x, float y );
	void CreateVertexBuffer( simplevertex vertices[], int numberOfVerticies );
	float GetX();
	float GetY();
	D3DXVECTOR3 GetForceDir();
	float GetForceStrength();

	virtual void SetUpPhysics( float x, float y );
	
	bool Render();

protected:
	IDirect3DVertexBuffer9 * m_vertexBuffer;
	int m_numberOfVerticies;
	char * m_objectType;

	/// A pointer to Box2D object that represents this object.
	b2Body * m_Body;
	///  A boolean flag if the object is represented by a box2D body.
	bool m_physicalBody;


	D3DXMATRIX m_matWorld;
	D3DXMATRIX m_matTranslation;
	D3DXMATRIX m_matRotation;
private: 

	D3DXVECTOR3 m_forceDirection;
	float m_forceAngle;
	float m_forceStrength;
	bool m_forceUpdated;
	
};


#endif