diff --git a/Code/Game/DanBiasGame/DanBiasGame.vcxproj b/Code/Game/DanBiasGame/DanBiasGame.vcxproj
index f1cbf970..01a92481 100644
--- a/Code/Game/DanBiasGame/DanBiasGame.vcxproj
+++ b/Code/Game/DanBiasGame/DanBiasGame.vcxproj
@@ -204,6 +204,7 @@
+
@@ -217,6 +218,7 @@
+
diff --git a/Code/Game/DanBiasGame/DanBiasGame_Impl.cpp b/Code/Game/DanBiasGame/DanBiasGame_Impl.cpp
index 21fb0823..06f200bf 100644
--- a/Code/Game/DanBiasGame/DanBiasGame_Impl.cpp
+++ b/Code/Game/DanBiasGame/DanBiasGame_Impl.cpp
@@ -6,6 +6,7 @@
#include "GameClientState\GameState.h"
#include "GameClientState\LobbyState.h"
#include "GameClientState\LoginState.h"
+#include "GameClientState\LanMenuState.h"
#include
#include "NetworkClient.h"
#include
diff --git a/Code/Game/DanBiasGame/GameClientState/GameState.cpp b/Code/Game/DanBiasGame/GameClientState/GameState.cpp
index ee069919..43b25ba7 100644
--- a/Code/Game/DanBiasGame/GameClientState/GameState.cpp
+++ b/Code/Game/DanBiasGame/GameClientState/GameState.cpp
@@ -81,12 +81,8 @@ bool GameState::LoadModels(std::wstring mapFile)
Oyster::Math3D::Float4x4 translate;
C_Object* obj;
translate = Oyster::Math3D::TranslationMatrix(Oyster::Math::Float3(0,0,0));
- Oyster::Math3D::Float4x4 scale = Oyster::Math3D::Float4x4::identity;
- scale.v[0].x = 8;
- scale.v[1].y = 8;
- scale.v[2].z = 8;
- modelData.world = scale; //modelData.world * translate
- modelData.modelPath = L"..\\Content\\Models\\ball.dan";
+ modelData.world = translate ;//modelData.world * translate
+ modelData.modelPath = L"world_earth.dan";
modelData.id = 0;
obj = new C_Player();
@@ -95,7 +91,7 @@ bool GameState::LoadModels(std::wstring mapFile)
// add box model
modelData.world = Oyster::Math3D::Float4x4::identity;
- translate = Oyster::Math3D::TranslationMatrix(Oyster::Math::Float3(-5,15,0));
+ translate = Oyster::Math3D::TranslationMatrix(Oyster::Math::Float3(4,320,0));
modelData.world = modelData.world * translate;
modelData.modelPath = L"..\\Content\\Models\\box.dan";
modelData.id = 1;
@@ -107,7 +103,7 @@ bool GameState::LoadModels(std::wstring mapFile)
// add player model
modelData.world = Oyster::Math3D::Float4x4::identity;
- translate = Oyster::Math3D::TranslationMatrix(Oyster::Math::Float3(0, 15, 0));
+ translate = Oyster::Math3D::TranslationMatrix(Oyster::Math::Float3(0, 320, 0));
modelData.world = modelData.world * translate;
modelData.visible = true;
@@ -124,14 +120,14 @@ bool GameState::LoadModels(std::wstring mapFile)
}
bool GameState::InitCamera(Oyster::Math::Float3 startPos)
{
- Oyster::Math::Float3 dir = Oyster::Math::Float3(0,0,-1);
+ Oyster::Math::Float3 dir = Oyster::Math::Float3(0,0,1);
Oyster::Math::Float3 up =Oyster::Math::Float3(0,1,0);
Oyster::Math::Float3 pos = Oyster::Math::Float3(0, 0, 20);
camera->LookAt(pos, dir, up);
camera->SetLens(3.14f/2, 1024/768, 1, 1000);
- privData->proj = Oyster::Math3D::ProjectionMatrix_Perspective(Oyster::Math::pi/2,1024.0f/768.0f,.1f,1000);
+ privData->proj = Oyster::Math3D::ProjectionMatrix_Perspective(Oyster::Math::pi/4,1024.0f/768.0f,.1f,1000);
//privData->proj = Oyster::Math3D::ProjectionMatrix_Orthographic(1024, 768, 1, 1000);
Oyster::Graphics::API::SetProjection(privData->proj);
camera->UpdateViewMatrix();
@@ -350,7 +346,7 @@ void GameState::Protocol( ObjPos* pos )
//camera->setLook((Oyster::Math::Float3(world[8], world[9], world[10])));
if(i == 2) // playerobj
{
- camera->SetPosition(Oyster::Math::Float3(world[12], world[13], world[14]));
+ camera->SetPosition(Oyster::Math::Float3(world[12], world[13]+2.2f, world[14]-1));
camera->UpdateViewMatrix();
}
}
diff --git a/Code/Game/DanBiasGame/GameClientState/LanMenuState.cpp b/Code/Game/DanBiasGame/GameClientState/LanMenuState.cpp
new file mode 100644
index 00000000..fdb02fa9
--- /dev/null
+++ b/Code/Game/DanBiasGame/GameClientState/LanMenuState.cpp
@@ -0,0 +1,164 @@
+#include "LanMenuState.h"
+
+#include "C_obj/C_Player.h"
+#include "C_obj/C_StaticObj.h"
+#include "C_obj/C_DynamicObj.h"
+#include "DllInterfaces/GFXAPI.h"
+
+#include
+
+using namespace DanBias::Client;
+
+struct LanMenuState::myData
+{
+ myData(){}
+ Oyster::Math3D::Float4x4 view;
+ Oyster::Math3D::Float4x4 proj;
+ C_Object* object[2];
+ int modelCount;
+ // UI object
+ // game client*
+}privData;
+
+LanMenuState::LanMenuState()
+{
+
+}
+
+LanMenuState::~LanMenuState()
+{
+
+}
+
+bool LanMenuState::Init(Oyster::Network::NetworkClient* nwClient)
+{
+ privData = new myData();
+ this->nwClient = nwClient;
+ // load models
+ LoadModels(L"UImodels.txt");
+ InitCamera(Oyster::Math::Float3(0,0,5.4f));
+
+ return true;
+}
+
+bool LanMenuState::LoadModels(std::wstring file)
+{
+ Oyster::Graphics::Definitions::Pointlight plight;
+ plight.Pos = Oyster::Math::Float3(-2,3,0);
+ plight.Color = Oyster::Math::Float3(0,1,0);
+ plight.Radius = 10;
+ plight.Bright = 1;
+ Oyster::Graphics::API::AddLight(plight);
+ // open file
+ // read file
+ // init models
+ privData->modelCount = 2;
+
+ ModelInitData modelData;
+
+ modelData.world = Oyster::Math3D::Float4x4::identity;
+ modelData.visible = true;
+ modelData.modelPath = L"..\\Content\\Models\\box_2.dan";
+ // load models
+ privData->object[0] = new C_StaticObj();
+ privData->object[0]->Init(modelData);
+
+ Oyster::Math3D::Float4x4 translate = Oyster::Math3D::TranslationMatrix(Oyster::Math::Float3(-2,-2,-2));
+ modelData.world = modelData.world * translate;
+
+ privData->object[1] = new C_DynamicObj();
+ privData->object[1]->Init(modelData);
+ return true;
+}
+
+bool LanMenuState::InitCamera(Oyster::Math::Float3 startPos)
+{
+ privData->proj = Oyster::Math3D::ProjectionMatrix_Perspective(Oyster::Math::pi/2,1024.0f/768.0f,.1f,1000);
+ //privData->proj = Oyster::Math3D::ProjectionMatrix_Orthographic(1024, 768, 1, 1000);
+ Oyster::Graphics::API::SetProjection(privData->proj);
+
+ privData->view = Oyster::Math3D::OrientationMatrix_LookAtDirection(Oyster::Math::Float3(0,0,-1),Oyster::Math::Float3(0,1,0),startPos);
+ privData->view = Oyster::Math3D::InverseOrientationMatrix(privData->view);
+ return true;
+}
+
+GameClientState::ClientState LanMenuState::Update(float deltaTime, InputClass* KeyInput)
+{
+ // create game
+ if( KeyInput->IsKeyPressed(DIK_C))
+ {
+ DanBias::GameServerAPI::ServerInitDesc desc;
+
+ DanBias::GameServerAPI::ServerInitiate(desc);
+ DanBias::GameServerAPI::ServerStart();
+ // my ip
+ nwClient->Connect(15151, "127.0.0.1");
+
+ if (!nwClient->IsConnected())
+ {
+ // failed to connect
+ return ClientState_Same;
+ }
+ return ClientState_Lobby;
+ }
+ // join game
+ if( KeyInput->IsKeyPressed(DIK_J))
+ {
+ // game ip
+ nwClient->Connect(15151, "194.47.150.56");
+
+ if (!nwClient->IsConnected())
+ {
+ // failed to connect
+ return ClientState_Same;
+ }
+ return ClientState_Lobby;
+ }
+ return ClientState_Same;
+}
+
+bool LanMenuState::Render()
+{
+ Oyster::Graphics::API::SetView(privData->view);
+ Oyster::Graphics::API::SetProjection( privData->proj);
+
+
+ Oyster::Graphics::API::NewFrame();
+ // render objects
+ for (int i = 0; i < privData->modelCount; i++)
+ {
+ privData->object[i]->Render();
+ }
+
+ // render effects
+
+ // render lights
+
+ Oyster::Graphics::API::EndFrame();
+ return true;
+}
+
+bool LanMenuState::Release()
+{
+ for (int i = 0; i < privData->modelCount; i++)
+ {
+ privData->object[i]->Release();
+ delete privData->object[i];
+ privData->object[i] = NULL;
+ }
+
+ delete privData;
+ privData = NULL;
+
+ return true;
+}
+
+void LanMenuState::Protocol(ProtocolStruct* protocolStruct)
+{
+ if((PlayerName*)protocolStruct)
+ PlayerJoinProtocol((PlayerName*)protocolStruct);
+}
+void LanMenuState::PlayerJoinProtocol(PlayerName* name)
+{
+
+}
\ No newline at end of file
diff --git a/Code/Game/DanBiasGame/GameClientState/LanMenuState.h b/Code/Game/DanBiasGame/GameClientState/LanMenuState.h
new file mode 100644
index 00000000..5182c80c
--- /dev/null
+++ b/Code/Game/DanBiasGame/GameClientState/LanMenuState.h
@@ -0,0 +1,37 @@
+#ifndef LAN_MENU_STATE_H
+#define LAN_MENU_STATE_H
+
+#include "GameClientState.h"
+#include "OysterMath.h"
+
+namespace DanBias
+{
+ namespace Client
+ {
+ class LanMenuState : public GameClientState
+ {
+ public:
+ LanMenuState();
+ virtual ~LanMenuState();
+
+ virtual bool Init(Oyster::Network::NetworkClient* nwClient);
+ virtual ClientState Update(float deltaTime, InputClass* KeyInput);
+
+ bool LoadModels(std::wstring file);
+ bool InitCamera(Oyster::Math::Float3 startPos);
+
+ virtual bool Render();
+ virtual bool Release();
+ virtual void Protocol(ProtocolStruct* protocolStruct);
+
+ void PlayerJoinProtocol(PlayerName* name);
+
+ private:
+ Oyster::Network::NetworkClient* nwClient;
+ struct myData;
+ myData* privData;
+ };
+ }
+}
+
+#endif
\ No newline at end of file
diff --git a/Code/Game/GameLogic/CollisionManager.cpp b/Code/Game/GameLogic/CollisionManager.cpp
index 116c9082..27aa6db6 100644
--- a/Code/Game/GameLogic/CollisionManager.cpp
+++ b/Code/Game/GameLogic/CollisionManager.cpp
@@ -81,8 +81,18 @@ using namespace GameLogic;
void AttatchmentMassDriver::ForcePushAction(Oyster::Physics::ICustomBody *obj, void *args)
{
- Oyster::Math::Float3 pushForce = Oyster::Math::Float4(1,0,0) * (1);
+ Oyster::Math::Float3 pushForce = Oyster::Math::Float4(1,0,0) * (500);
Oyster::Physics::ICustomBody::State state;
+ Object *realObj = (Object*)obj->GetCustomTag();
+ if(realObj->GetObjectType() == OBJECT_TYPE_BOX)
+ {
+ state = obj->GetState();
+ state.SetOrientation(Oyster::Math::Float3(1,0.5,1),Oyster::Math::Float3(1,0.5,1));
+ obj->SetState(state);
+ }
+
+ if(realObj->GetObjectType() == OBJECT_TYPE_PLAYER || realObj->GetObjectType() == OBJECT_TYPE_WORLD)
+ return;
state = obj->GetState();
state.ApplyLinearImpulse(pushForce);
obj->SetState(state);
diff --git a/Code/Game/GameLogic/Game.cpp b/Code/Game/GameLogic/Game.cpp
index 12ca7237..d9973821 100644
--- a/Code/Game/GameLogic/Game.cpp
+++ b/Code/Game/GameLogic/Game.cpp
@@ -129,6 +129,7 @@ bool Game::NewFrame()
}
gameInstance.onMoveFnc(this->level);
+
return true;
}
diff --git a/Code/Game/GameLogic/Game_PlayerData.cpp b/Code/Game/GameLogic/Game_PlayerData.cpp
index f2ae7c19..18f57212 100644
--- a/Code/Game/GameLogic/Game_PlayerData.cpp
+++ b/Code/Game/GameLogic/Game_PlayerData.cpp
@@ -7,9 +7,9 @@ Game::PlayerData::PlayerData()
{
//set some stats that are appropriate to a player
Oyster::Physics::API::SimpleBodyDescription sbDesc;
- sbDesc.centerPosition = Oyster::Math::Float3(0,165,0);
+ sbDesc.centerPosition = Oyster::Math::Float3(0,320,0);
sbDesc.size = Oyster::Math::Float3(4,7,4);
-
+ sbDesc.mass = 10;
//create rigid body
Oyster::Physics::ICustomBody *rigidBody = Oyster::Physics::API::Instance().CreateRigidBody(sbDesc).Release();
diff --git a/Code/Game/GameLogic/Level.cpp b/Code/Game/GameLogic/Level.cpp
index f631979d..c0b0685b 100644
--- a/Code/Game/GameLogic/Level.cpp
+++ b/Code/Game/GameLogic/Level.cpp
@@ -25,7 +25,7 @@ void Level::InitiateLevel(float radius)
API::SphericalBodyDescription sbDesc;
sbDesc.centerPosition = Oyster::Math::Float4(0,0,0,1);
sbDesc.ignoreGravity = true;
- sbDesc.radius = 150;
+ sbDesc.radius = 300;
sbDesc.mass = 10e12f;
ICustomBody* rigidBody = API::Instance().CreateRigidBody(sbDesc).Release();
@@ -39,9 +39,9 @@ void Level::InitiateLevel(float radius)
rigidBody->SetCustomTag(levelObj);
- // add box
+ // add box
API::SimpleBodyDescription sbDesc_TestBox;
- sbDesc_TestBox.centerPosition = Oyster::Math::Float4(-5,15,0,0);
+ sbDesc_TestBox.centerPosition = Oyster::Math::Float4(4,320,0,0);
sbDesc_TestBox.ignoreGravity = false;
sbDesc_TestBox.mass = 10;
sbDesc_TestBox.size = Oyster::Math::Float4(0.5f,0.5f,0.5f,0);
@@ -52,14 +52,14 @@ void Level::InitiateLevel(float radius)
testBox = new DynamicObject(rigidBody_TestBox, OBJECT_TYPE::OBJECT_TYPE_BOX);
rigidBody_TestBox->SetCustomTag(testBox);
rigidBody_TestBox->GetState(state);
- state.ApplyLinearImpulse(Oyster::Math::Float3(0,0,4));
+ state.ApplyLinearImpulse(Oyster::Math::Float3(0,20,0));
rigidBody_TestBox->SetState(state);
// add gravitation
API::Gravity gravityWell;
gravityWell.gravityType = API::Gravity::GravityType_Well;
- gravityWell.well.mass = 10e16f;
+ gravityWell.well.mass = 1e15f;
gravityWell.well.position = Oyster::Math::Float4(0,0,0,1);
API::Instance().AddGravity(gravityWell);
}
diff --git a/Code/Game/GameLogic/Player.cpp b/Code/Game/GameLogic/Player.cpp
index 45ae8f65..ea36b284 100644
--- a/Code/Game/GameLogic/Player.cpp
+++ b/Code/Game/GameLogic/Player.cpp
@@ -86,24 +86,24 @@ void Player::Move(const PLAYER_MOVEMENT &movement)
void Player::MoveForward()
{
- setState.ApplyLinearImpulse(this->lookDir * (20 * this->gameInstance->GetFrameTime()));
+ setState.ApplyLinearImpulse(this->lookDir * (2000 * this->gameInstance->GetFrameTime()));
}
void Player::MoveBackwards()
{
- setState.ApplyLinearImpulse(-this->lookDir * 20 * this->gameInstance->GetFrameTime());
+ setState.ApplyLinearImpulse(-this->lookDir * 2000 * this->gameInstance->GetFrameTime());
}
void Player::MoveRight()
{
//Do cross product with forward vector and negative gravity vector
Oyster::Math::Float3 r = (-rigidBody->GetGravityNormal()).Cross((Oyster::Math::Float3)this->lookDir);
- setState.ApplyLinearImpulse(r * 20 * this->gameInstance->GetFrameTime());
+ setState.ApplyLinearImpulse(r * 2000 * this->gameInstance->GetFrameTime());
}
void Player::MoveLeft()
{
//Do cross product with forward vector and negative gravity vector
Oyster::Math::Float3 r = -(-rigidBody->GetGravityNormal()).Cross((Oyster::Math::Float3)this->lookDir); //Still get zero
- setState.ApplyLinearImpulse(-r * 20 * this->gameInstance->GetFrameTime());
+ setState.ApplyLinearImpulse(-r * 2000 * this->gameInstance->GetFrameTime());
}
void Player::UseWeapon(const WEAPON_FIRE &usage)
@@ -123,7 +123,7 @@ void Player::Rotate(const Oyster::Math3D::Float3 lookDir)
{
this->lookDir = lookDir;
- Oyster::Math::Float4 up(0,1,0,0);//-setState.GetGravityNormal();
+ Oyster::Math::Float4 up = -setState.GetGravityNormal();
Oyster::Math::Float4 pos = setState.GetCenterPosition();
Oyster::Math::Float4x4 world = Oyster::Math3D::OrientationMatrix_LookAtDirection(lookDir, up.xyz, pos.xyz);
// cant set rotation
diff --git a/Code/Network/NetworkAPI/NetworkClient.cpp b/Code/Network/NetworkAPI/NetworkClient.cpp
index 8e8c28fa..717a2946 100644
--- a/Code/Network/NetworkAPI/NetworkClient.cpp
+++ b/Code/Network/NetworkAPI/NetworkClient.cpp
@@ -16,11 +16,15 @@
#include "../../Misc/Utilities.h"
#include "../../Misc/Thread/IThreadObject.h"
#include "../../Misc/Thread/OysterThread.h"
+#include "../../Misc/Packing/Packing.h"
+
+#include
using namespace Oyster::Network;
using namespace Oyster::Thread;
using namespace Utility::DynamicMemory;
using namespace Utility::Container;
+using namespace std;
/*************************************
PrivateData
@@ -35,11 +39,12 @@ struct NetworkClient::PrivateData : public IThreadObject
Translator translator;
OysterThread thread;
+ OysterByte recieveBuffer;
//Message queue for sending and recieving
ThreadSafeQueue sendQueue;
ThreadSafeQueue> recieveQueue;
-
+
//ID
static unsigned int currID;
const unsigned int ID;
@@ -66,7 +71,7 @@ struct NetworkClient::PrivateData : public IThreadObject
bool DoWork() override
{
if(!this->connection.IsConnected()) return false;
-
+
Send();
Recv();
@@ -82,6 +87,7 @@ struct NetworkClient::PrivateData : public IThreadObject
CustomNetProtocol p = this->sendQueue.Pop();
this->translator.Pack(temp, p);
errorCode = this->connection.Send(temp);
+
if(errorCode != 0)
{
CEA parg;
@@ -103,9 +109,13 @@ struct NetworkClient::PrivateData : public IThreadObject
if(errorCode == 0 && temp.GetSize())
{
+ HandleRecievedData(temp);
+
+
+ /* Replaced with EmptyOutbufferedQueue() and HandleRecievedData(OysterByte)
CustomNetProtocol protocol;
bool ok = this->translator.Unpack(protocol, temp);
-
+
//Check if the protocol was unpacked correctly
if(ok)
{
@@ -114,7 +124,8 @@ struct NetworkClient::PrivateData : public IThreadObject
parg.data.protocol = protocol;
NetEvent e = { this->parent, parg };
this->recieveQueue.Push(e);
- }
+ }*/
+
}
//else
//{
@@ -127,6 +138,76 @@ struct NetworkClient::PrivateData : public IThreadObject
return errorCode;
}
+
+ void HandleRecievedData(OysterByte& data)
+ {
+ //Loop through all packages that was recieved and add them to the queue.
+ unsigned int size = 0;
+
+ Oyster::Network::OysterByte msg;
+
+ //If there is part of a message in the buffer.
+ if(recieveBuffer.GetSize() > 0)
+ {
+ //cout << "the buffer size: " << recvBuffer.GetSize() < size)
+ {
+ msg = recieveBuffer;
+ recieveBuffer.Clear();
+ size -= msg.GetSize();
+ msg.AppendPartOfArray(data, 0, size);
+ UnpackMessageAndAddToQueue(msg);
+ }
+ else if(temp + data.GetSize() == size)
+ {
+ msg = recieveBuffer;
+ recieveBuffer.Clear();
+ size -= msg.GetSize();
+ msg += data;
+ UnpackMessageAndAddToQueue(msg);
+ return;
+ }
+ else
+ {
+ recieveBuffer += data;
+ size = data.GetSize();
+ return;
+ }
+ }
+
+ for(unsigned int i = size; i < data.GetSize(); i += size)
+ {
+ size = Oyster::Packing::Unpacki(&data.GetByteArray()[i]);
+ if(i+size > data.GetSize())
+ {
+ //Add it to the recvBuffer instead.
+ recieveBuffer.AppendPartOfArray(data, i, data.GetSize());
+ break;
+ }
+ msg.Clear();
+ msg.AppendPartOfArray(data, i, i+size);
+ UnpackMessageAndAddToQueue(msg);
+ }
+ }
+
+ void UnpackMessageAndAddToQueue(OysterByte& msg)
+ {
+ CustomNetProtocol protocol;
+ bool ok = this->translator.Unpack(protocol, msg);
+
+ //Check if the protocol was unpacked correctly
+ if(ok)
+ {
+ CEA parg;
+ parg.type = CEA::EventType_ProtocolRecieved;
+ parg.data.protocol = protocol;
+ NetEvent e = { this->parent, parg };
+ this->recieveQueue.Push(e);
+ }
+ }
};
unsigned int NetworkClient::PrivateData::currID = 0;
diff --git a/Code/Network/NetworkDependencies/OysterByte.cpp b/Code/Network/NetworkDependencies/OysterByte.cpp
index ac6923a2..7f64a30d 100644
--- a/Code/Network/NetworkDependencies/OysterByte.cpp
+++ b/Code/Network/NetworkDependencies/OysterByte.cpp
@@ -48,7 +48,7 @@ void OysterByte::Resize(unsigned int cap)
}
}
-int OysterByte::GetSize()
+unsigned int OysterByte::GetSize()
{
return size;
}
@@ -60,7 +60,7 @@ unsigned char* OysterByte::GetByteArray()
void OysterByte::AddSize(unsigned int size)
{
- int newCapacity = this->size + size;
+ unsigned int newCapacity = this->size + size;
if(newCapacity >= capacity)
{
@@ -81,6 +81,32 @@ void OysterByte::SetSize(unsigned int size)
this->size = size;
}
+void OysterByte::AppendPartOfArray(OysterByte& source, unsigned int startIndex, unsigned int endIndex)
+{
+ if(startIndex < 0 && startIndex >= endIndex)
+ return;
+ if(endIndex > source.size)
+ return;
+
+ unsigned int totalSize = endIndex - startIndex;
+ totalSize += size;
+
+ //Make sure the new data can fit in the array.
+ if(totalSize > capacity)
+ {
+ IncreaseCapacity(totalSize);
+ }
+
+ //Copy over new data.
+ for(unsigned int i = size; i < totalSize; i++)
+ {
+ byteArray[i] = source.byteArray[startIndex++];
+ }
+
+ //Set the new size
+ size = totalSize;
+}
+
OysterByte& OysterByte::operator =(const OysterByte& obj)
{
delete[] this->byteArray;
diff --git a/Code/Network/NetworkDependencies/OysterByte.h b/Code/Network/NetworkDependencies/OysterByte.h
index 4f6f4557..a3c0dfaf 100644
--- a/Code/Network/NetworkDependencies/OysterByte.h
+++ b/Code/Network/NetworkDependencies/OysterByte.h
@@ -25,7 +25,7 @@ namespace Oyster
//Resizes the array with, it does not keep anything in it.
void Resize(unsigned int cap);
- int GetSize();
+ unsigned int GetSize();
unsigned char* GetByteArray();
void AddSize(unsigned int size);
@@ -34,6 +34,9 @@ namespace Oyster
//Only sets the private variable 'size'
void SetSize(unsigned int size);
+ //Copies over a part of the addFrom array and adds it to the end of this array.
+ void AppendPartOfArray(OysterByte& source, unsigned int startIndex, unsigned int endIndex);
+
OysterByte& operator =(const OysterByte& obj);
operator char*();
diff --git a/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/LightPass.hlsl b/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/LightPass.hlsl
index 98b2887e..1efb94c6 100644
--- a/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/LightPass.hlsl
+++ b/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/LightPass.hlsl
@@ -27,7 +27,9 @@ void main( uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID )
Shaded.Specular += light.Specular;
}
- Diffuse[DTid.xy] = float4(Shaded.Diffuse * DiffuseGlow[DTid.xy].xyz,1);
+ //Diffuse[DTid.xy] = float4(Shaded.Diffuse * DiffuseGlow[DTid.xy].xyz,1);
+ Diffuse[DTid.xy] = float4(DiffuseGlow[DTid.xy].xyz,1);
+
Specular[DTid.xy] = float4(Shaded.Specular, 1);
diff --git a/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/PostPass.hlsl b/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/PostPass.hlsl
index 2aaf2051..3e03dfcd 100644
--- a/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/PostPass.hlsl
+++ b/Code/OysterGraphics/Shader/HLSL/Deffered Shaders/PostPass.hlsl
@@ -8,5 +8,7 @@ RWTexture2D Output;
void main( uint3 DTid : SV_DispatchThreadID )
{
Output[DTid.xy] = Diffuse[DTid.xy] + Specular[DTid.xy] + Diffuse[DTid.xy] * Ambient[DTid.xy/4].w;// + float4(Ambient[DTid.xy/4].xyz,1); GLOW
+ //Output[DTid.xy] = Diffuse[DTid.xy] + Diffuse[DTid.xy] * Ambient[DTid.xy/4].w;// + float4(Ambient[DTid.xy/4].xyz,1); GLOW
+
//Output[DTid.xy] = Diffuse[DTid.xy];
}
\ No newline at end of file