Remove console output

This commit is contained in:
Vladislav Khorev 2018-07-14 16:53:59 +05:00
parent 7d411110a6
commit 4e35c0e218
6 changed files with 53 additions and 87 deletions

View File

@ -4,7 +4,7 @@
JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_Init(JNIEnv * env, jobject obj, jint width, jint height) JNIEXPORT void JNICALL Java_fishrungames_doublehitballs_JniWrapper_Init(JNIEnv * env, jobject obj, jint width, jint height)
{ {
JniInitApp<TMyApplication>(width, height, 480.f, 320.f); JniInitApp<TMyApplication>(width, height, width, height);
} }

4
game/creditscode.cpp Normal file → Executable file
View File

@ -45,7 +45,6 @@ void TGameCredits::Update(size_t dt)
{ {
if (State == CONST_STATE_APPEARING) if (State == CONST_STATE_APPEARING)
{ {
*SE::Console << "TGameCredits::Update - CONST_STATE_APPEARING";
StateTimer += dt; StateTimer += dt;
if (StateTimer >= CONST_APPEAR_TIME) if (StateTimer >= CONST_APPEAR_TIME)
{ {
@ -66,18 +65,15 @@ void TGameCredits::Update(size_t dt)
void TGameCredits::OnTapDown(Vector2f p) void TGameCredits::OnTapDown(Vector2f p)
{ {
*SE::Console << "TGameCredits::OnTapDown";
Application->GoFromCreditsToMenu(); Application->GoFromCreditsToMenu();
} }
void TGameCredits::StartAppear() void TGameCredits::StartAppear()
{ {
*SE::Console << "TGameCredits::StartAppear";
State = CONST_STATE_APPEARING; State = CONST_STATE_APPEARING;
} }
void TGameCredits::StartDisappear() void TGameCredits::StartDisappear()
{ {
*SE::Console << "TGameCredits::StartDisappear";
State = CONST_STATE_DISAPPEARING; State = CONST_STATE_DISAPPEARING;
} }

View File

@ -97,7 +97,7 @@ void GalaxyMenu::UpdateGalaxyMenu(float s_width, float s_height, size_t dt) {
/*..Galaxies geometry..*/ /*..Galaxies geometry..*/
for (int i = 0; i < galaxies.size(); i++) { for (int i = 0; i < galaxies.size(); i++) {
*SE::Console << "galaxy_" + std::to_string(i);
Eigen::Vector2f tex_size = textureSizeNormalize( Eigen::Vector2f tex_size = textureSizeNormalize(
Eigen::Vector2f( Eigen::Vector2f(
((float)SE::ResourceManager->TexList.GetTextureOriginalWidth("galaxy_" + std::to_string(i))), ((float)SE::ResourceManager->TexList.GetTextureOriginalWidth("galaxy_" + std::to_string(i))),
@ -112,12 +112,11 @@ void GalaxyMenu::UpdateGalaxyMenu(float s_width, float s_height, size_t dt) {
(tex_size(1)*galaxies[i].scale)*menuScale (tex_size(1)*galaxies[i].scale)*menuScale
) )
)); ));
*SE::Console << "dimensions: " << std::to_string(((tex_size(0)*galaxies[i].scale)*menuScale)) << " " << std::to_string(((tex_size(1)*galaxies[i].scale)*menuScale));
/*..Stars geometry..*/ /*..Stars geometry..*/
std::vector<std::pair<Eigen::Vector2f, Eigen::Vector2f>> star_params; std::vector<std::pair<Eigen::Vector2f, Eigen::Vector2f>> star_params;
for (int j = 0; j < galaxies[i].Stars.size(); j++) { for (int j = 0; j < galaxies[i].Stars.size(); j++) {
*SE::Console << "star_" + std::to_string(i) + "_" + std::to_string(j);
tex_size = textureSizeNormalize( tex_size = textureSizeNormalize(
Eigen::Vector2f( Eigen::Vector2f(
((float)SE::ResourceManager->TexList.GetTextureWidth("star_" + std::to_string(i) + "_" + std::to_string(j))), ((float)SE::ResourceManager->TexList.GetTextureWidth("star_" + std::to_string(i) + "_" + std::to_string(j))),
@ -267,11 +266,7 @@ Eigen::Vector2f GalaxyMenu::textureSizeNormalize(Eigen::Vector2f texVec, int t_t
y_dim = val_clamp(texVec(1), Ymin, Ymax); y_dim = val_clamp(texVec(1), Ymin, Ymax);
x_dim = y_dim * tex_ratio; x_dim = y_dim * tex_ratio;
} }
*SE::Console << "==============";
*SE::Console << std::to_string(texVec(0));
*SE::Console << std::to_string(texVec(1));
*SE::Console << "if value 0.0000 - must be textures not inited at main_code.cpp or texture-name is wrong";
*SE::Console << "--------------";
return Eigen::Vector2f(x_dim, y_dim); return Eigen::Vector2f(x_dim, y_dim);
} }
@ -485,8 +480,7 @@ void GalaxyMenu::tapUp(Eigen::Vector2f pos) {
void GalaxyMenu::tapMove(Eigen::Vector2f shift) { void GalaxyMenu::tapMove(Eigen::Vector2f shift) {
if (timer_active) { if (timer_active) {
//*SE::Console << "shift = " + std::to_string(shift(0)) + " " + std::to_string(shift(1)); // mt issue
//currentTapShift = shift; // shift need to be fixed
totalTapShift += shift; totalTapShift += shift;
} }
} }

View File

@ -89,7 +89,7 @@ void TBrick::SetInvisible()
void TBrick::TryDrawAppear(int ipos, int jpos) void TBrick::TryDrawAppear(int ipos, int jpos)
{ {
*SE::Console << "TBrick::TryDrawAppear";
Vector2f centerPos = GetPosFrom(ipos, jpos); Vector2f centerPos = GetPosFrom(ipos, jpos);
float LEVEL_VIEWPORT_WIDTH = Application->GetGameLevelScreenWidth(); float LEVEL_VIEWPORT_WIDTH = Application->GetGameLevelScreenWidth();
float LEVEL_VIEWPORT_HEIGHT = Application->GetGameLevelScreenHeight(); float LEVEL_VIEWPORT_HEIGHT = Application->GetGameLevelScreenHeight();
@ -132,7 +132,7 @@ void TBrick::Update(size_t dt)
{ {
if (State == CONST_BRICKSTATE_DISAPPEAR) if (State == CONST_BRICKSTATE_DISAPPEAR)
{ {
*SE::Console << "TBrick::Update - CONST_BRICKSTATE_DISAPPEAR";
StateTimer -= dt; StateTimer -= dt;
if (StateTimer < 0.f) if (StateTimer < 0.f)
{ {
@ -143,7 +143,6 @@ void TBrick::Update(size_t dt)
if (State == CONST_BRICKSTATE_APPEAR) if (State == CONST_BRICKSTATE_APPEAR)
{ {
*SE::Console << "TBrick::Update - CONST_BRICKSTATE_APPEAR";
StateTimer -= dt; StateTimer -= dt;
if (StateTimer < 0.f) if (StateTimer < 0.f)
{ {
@ -155,13 +154,12 @@ void TBrick::Update(size_t dt)
Vector4f TBrick::GetColor() Vector4f TBrick::GetColor()
{ {
*SE::Console << "TBrick::GetColor";
return Color; return Color;
} }
Vector2f TBrick::GetPosFrom(int ipos, int jpos) Vector2f TBrick::GetPosFrom(int ipos, int jpos)
{ {
*SE::Console << "TBrick::GetPosFrom";
float LEVEL_VIEWPORT_WIDTH = Application->GetGameLevelScreenWidth(); float LEVEL_VIEWPORT_WIDTH = Application->GetGameLevelScreenWidth();
float LEVEL_VIEWPORT_HEIGHT = Application->GetGameLevelScreenHeight(); float LEVEL_VIEWPORT_HEIGHT = Application->GetGameLevelScreenHeight();
@ -174,7 +172,7 @@ Vector2f TBrick::GetPosFrom(int ipos, int jpos)
void TBrick::Disappear() void TBrick::Disappear()
{ {
*SE::Console << "TBrick::Disappear";
StateTimer = CONST_BRICK_DISAPPEAR_TIME; StateTimer = CONST_BRICK_DISAPPEAR_TIME;
State = CONST_BRICKSTATE_DISAPPEAR; State = CONST_BRICKSTATE_DISAPPEAR;
} }
@ -183,19 +181,16 @@ void TBrick::Hit()
{ {
if (Locked == 0) if (Locked == 0)
{ {
*SE::Console << "TBrick::Hit == 0";
Disappear(); Disappear();
} }
else else
{ {
*SE::Console << "TBrick::Hit else";
Locked--; Locked--;
} }
} }
void TBrick::Appear(Vector4f color, int locked) void TBrick::Appear(Vector4f color, int locked)
{ {
*SE::Console << "TBrick::Appear";
StateTimer = CONST_BRICK_APPEAR_TIME; StateTimer = CONST_BRICK_APPEAR_TIME;
State = CONST_BRICKSTATE_APPEAR; State = CONST_BRICKSTATE_APPEAR;
Color = color; Color = color;
@ -205,19 +200,18 @@ void TBrick::Appear(Vector4f color, int locked)
void TBrick::Appear() void TBrick::Appear()
{ {
*SE::Console << "TBrick::Appear";
Appear(Color, InitialLocked); Appear(Color, InitialLocked);
} }
int TBrick::GetLocked() int TBrick::GetLocked()
{ {
*SE::Console << "TBrick::GetLocked";
return Locked; return Locked;
} }
bool TBrick::CanReact() bool TBrick::CanReact()
{ {
*SE::Console << "TBrick::CanReact";
return (State == CONST_BRICKSTATE_VISIBLE) || (State == CONST_BRICKSTATE_APPEAR); return (State == CONST_BRICKSTATE_VISIBLE) || (State == CONST_BRICKSTATE_APPEAR);
} }
@ -250,20 +244,20 @@ TBonusFalling::TBonusFalling(Vector2f pos)
Vector2f TBonusFalling::GetPos() Vector2f TBonusFalling::GetPos()
{ {
*SE::Console << "TBrick::GetPos";
return Pos; return Pos;
} }
int TBonusFalling::GetType() int TBonusFalling::GetType()
{ {
*SE::Console << "TBonusFalling::GetType";
return BonusType; return BonusType;
} }
void TBonusFalling::Draw() void TBonusFalling::Draw()
{ {
*SE::Console << "TBonusFalling::Draw";
Vector2f BonusHalfSize = Vector2f(16.f, 16.f); Vector2f BonusHalfSize = Vector2f(16.f, 16.f);
float transparency = min_t(Lifetime/CONST_BONUS_APPEAR_TIME , 1.f); float transparency = min_t(Lifetime/CONST_BONUS_APPEAR_TIME , 1.f);
@ -279,7 +273,7 @@ void TBonusFalling::Draw()
void TBonusFalling::Update(size_t dt) void TBonusFalling::Update(size_t dt)
{ {
*SE::Console << "TBonusFalling::Update";
Lifetime += dt; Lifetime += dt;
Pos(1) -= dt * CONST_BONUS_FALL_SPEED / 1000.f; Pos(1) -= dt * CONST_BONUS_FALL_SPEED / 1000.f;
} }
@ -304,26 +298,23 @@ TBall::TBall(Vector2f pos, Vector2f velocity, Vector4f color)
Vector2f TBall::GetPos() Vector2f TBall::GetPos()
{ {
*SE::Console << "TBall::GetPos";
return Pos; return Pos;
} }
Vector2f TBall::GetVelocityVector() Vector2f TBall::GetVelocityVector()
{ {
*SE::Console << "TBall::GetVelocityVector";
return Velocity; return Velocity;
} }
void TBall::Go() void TBall::Go()
{ {
*SE::Console << "TBall::Go";
// Velocity = Normalize(Vector2f(2.f, 1.f)); // Velocity = Normalize(Vector2f(2.f, 1.f));
Velocity = Vector2f(2.f, 1.f).normalized(); Velocity = Vector2f(2.f, 1.f).normalized();
} }
void TBall::ReflectToLeft() void TBall::ReflectToLeft()
{ {
*SE::Console << "TBall::ReflectToLeft";
Application->hitSpark("left",Pos); Application->hitSpark("left",Pos);
@ -335,7 +326,6 @@ void TBall::ReflectToLeft()
void TBall::ReflectToRight() void TBall::ReflectToRight()
{ {
*SE::Console << "TBall::ReflectToRight";
Application->hitSpark("right", Pos); Application->hitSpark("right", Pos);
@ -347,7 +337,6 @@ void TBall::ReflectToRight()
void TBall::ReflectToUp() void TBall::ReflectToUp()
{ {
*SE::Console << "TBall::ReflectToUp";
Application->hitSpark("up", Pos); Application->hitSpark("up", Pos);
@ -359,7 +348,6 @@ void TBall::ReflectToUp()
void TBall::ReflectToDown() void TBall::ReflectToDown()
{ {
*SE::Console << "TBall::ReflectToDown";
Application->hitSpark("down", Pos); Application->hitSpark("down", Pos);
@ -372,7 +360,7 @@ void TBall::ReflectToDown()
//function for reflector surface. //function for reflector surface.
float ReflectorPlaneFunction(float shift) float ReflectorPlaneFunction(float shift)
{ {
*SE::Console << "ReflectorPlaneFunction(float shift)";
/* _______ /* _______
/ \ / \
| | | |
@ -401,7 +389,7 @@ float ReflectorPlaneFunction(float shift)
void TBall::TryReflectOnReflector(Vector2f refPos) void TBall::TryReflectOnReflector(Vector2f refPos)
{ {
*SE::Console << "TBall::TryReflectOnReflector(Vector2f refPos)";
float LEVEL_VIEWPORT_HEIGHT = Application->GetGameLevelScreenHeight(); float LEVEL_VIEWPORT_HEIGHT = Application->GetGameLevelScreenHeight();
const float reflectionShiftY = 13.f; const float reflectionShiftY = 13.f;
const float reflectionMaxHeight = CONST_REFLECTOR_HEIGHT*LEVEL_VIEWPORT_HEIGHT/480.f; const float reflectionMaxHeight = CONST_REFLECTOR_HEIGHT*LEVEL_VIEWPORT_HEIGHT/480.f;
@ -435,7 +423,7 @@ void TBall::TryReflectOnReflector(Vector2f refPos)
void TBall::Update(size_t dt) void TBall::Update(size_t dt)
{ {
*SE::Console << "TBall::Update(size_t dt)";
Pos += Velocity * (CONST_BALL_VELOCITY * dt / 1000.f); Pos += Velocity * (CONST_BALL_VELOCITY * dt / 1000.f);
TalePos.push_back(Pos); TalePos.push_back(Pos);
@ -453,7 +441,7 @@ void TBall::Update(size_t dt)
TGameLevel::TGameLevel() TGameLevel::TGameLevel()
{ {
*SE::Console << "TGameLevel::TGameLevel";
BkgTexture = "bkg"; BkgTexture = "bkg";
RenderBufferReady = false; RenderBufferReady = false;
@ -479,7 +467,7 @@ TGameLevel::~TGameLevel()
void TGameLevel::ReloadBlockInstansingList() void TGameLevel::ReloadBlockInstansingList()
{ {
*SE::Console << "TGameLevel::ReloadBlockInstansingList";
float LEVEL_VIEWPORT_WIDTH = Application->GetGameLevelScreenWidth(); float LEVEL_VIEWPORT_WIDTH = Application->GetGameLevelScreenWidth();
float LEVEL_VIEWPORT_HEIGHT = Application->GetGameLevelScreenHeight(); float LEVEL_VIEWPORT_HEIGHT = Application->GetGameLevelScreenHeight();
std::map<int, std::string> ConstTextureBlockMap = boost::assign::map_list_of (0,CONST_BLOCK_TEXTURE1) (1,CONST_BLOCK_TEXTURE2) (2,CONST_BLOCK_TEXTURE3); std::map<int, std::string> ConstTextureBlockMap = boost::assign::map_list_of (0,CONST_BLOCK_TEXTURE1) (1,CONST_BLOCK_TEXTURE2) (2,CONST_BLOCK_TEXTURE3);
@ -532,7 +520,7 @@ void TGameLevel::ReloadBlockInstansingList()
Vector2f TGameLevel::GetBlock(const Vector2f& pos) Vector2f TGameLevel::GetBlock(const Vector2f& pos)
{ {
*SE::Console << "TGameLevel::GetBlock";
float LEVEL_VIEWPORT_WIDTH = Application->GetGameLevelScreenWidth(); float LEVEL_VIEWPORT_WIDTH = Application->GetGameLevelScreenWidth();
float LEVEL_VIEWPORT_HEIGHT = Application->GetGameLevelScreenHeight(); float LEVEL_VIEWPORT_HEIGHT = Application->GetGameLevelScreenHeight();
int x = static_cast<int>((pos(0) - CONST_BRICK_SHIFT_X*(LEVEL_VIEWPORT_WIDTH /480.f) - ((Renderer->GetScreenWidth() - LEVEL_VIEWPORT_WIDTH)*0.5f)) / (CONST_BRICK_WIDTH*(LEVEL_VIEWPORT_WIDTH /480.f))); int x = static_cast<int>((pos(0) - CONST_BRICK_SHIFT_X*(LEVEL_VIEWPORT_WIDTH /480.f) - ((Renderer->GetScreenWidth() - LEVEL_VIEWPORT_WIDTH)*0.5f)) / (CONST_BRICK_WIDTH*(LEVEL_VIEWPORT_WIDTH /480.f)));
@ -557,7 +545,7 @@ Vector2f TGameLevel::GetBlock(const Vector2f& pos)
bool TGameLevel::TapInBackBtnArea(const Vector2f& pos) bool TGameLevel::TapInBackBtnArea(const Vector2f& pos)
{ {
*SE::Console << "TGameLevel::TapInBackBtnArea";
const float yRatio = Application->GetGameLevelScreenHeight() / 320.f; const float yRatio = Application->GetGameLevelScreenHeight() / 320.f;
const float backBtnWidth = CONST_BACK_BTN_WIDTH*Application->GetGameLevelScreenWidth()/480.f; const float backBtnWidth = CONST_BACK_BTN_WIDTH*Application->GetGameLevelScreenWidth()/480.f;
const float backBtnHeight = CONST_BACK_BTN_HEIGHT*yRatio; const float backBtnHeight = CONST_BACK_BTN_HEIGHT*yRatio;
@ -566,7 +554,7 @@ bool TGameLevel::TapInBackBtnArea(const Vector2f& pos)
void TGameLevel::SetFinishFreeze() void TGameLevel::SetFinishFreeze()
{ {
*SE::Console << "TGameLevel::SetFinishFreeze";
StateTimer = CONST_FINISH_FREEZE_TIME; // Firework timeline timer StateTimer = CONST_FINISH_FREEZE_TIME; // Firework timeline timer
LevelState = CONST_LEVELSTATE_FINISH_FREEZE; LevelState = CONST_LEVELSTATE_FINISH_FREEZE;
@ -575,7 +563,7 @@ void TGameLevel::SetFinishFreeze()
void TGameLevel::SetFinished() void TGameLevel::SetFinished()
{ {
*SE::Console << "TGameLevel::SetFinished";
StateTimer = CONST_FINISHING_TIME; StateTimer = CONST_FINISHING_TIME;
LevelState = CONST_LEVELSTATE_FINISHED; LevelState = CONST_LEVELSTATE_FINISHED;
@ -585,7 +573,7 @@ void TGameLevel::SetFinished()
Vector4f TGameLevel::ParseColor(const std::string& s) Vector4f TGameLevel::ParseColor(const std::string& s)
{ {
*SE::Console << "TGameLevel::ParseColor";
Vector4f r; Vector4f r;
std::string ss(s); std::string ss(s);
@ -616,7 +604,7 @@ Vector4f TGameLevel::ParseColor(const std::string& s)
void TGameLevel::ReloadLevel() void TGameLevel::ReloadLevel()
{ {
*SE::Console << "TGameLevel::ReloadLevel";
size_t byteCount; size_t byteCount;
boost::shared_array<char> file = CreateMemFromFile<char>(LevelFileName, byteCount); boost::shared_array<char> file = CreateMemFromFile<char>(LevelFileName, byteCount);
std::string fileString(&file[0]); std::string fileString(&file[0]);
@ -687,7 +675,6 @@ void TGameLevel::setBackground(const std::string& textureName)
void TGameLevel::FillWithFile(const std::string& filename) void TGameLevel::FillWithFile(const std::string& filename)
{ {
*SE::Console << "TGameLevel::FillWithFile";
levelName = GetFileNameWithoutExt(filename); levelName = GetFileNameWithoutExt(filename);
@ -697,7 +684,7 @@ void TGameLevel::FillWithFile(const std::string& filename)
void TGameLevel::SetStandBy() void TGameLevel::SetStandBy()
{ {
*SE::Console << "TGameLevel::SetStandBy";
ReloadLevel(); ReloadLevel();
InitLevel(); InitLevel();
LevelState = CONST_LEVELSTATE_STANDBY; LevelState = CONST_LEVELSTATE_STANDBY;
@ -705,7 +692,7 @@ void TGameLevel::SetStandBy()
void TGameLevel::SetLoading() void TGameLevel::SetLoading()
{ {
*SE::Console << "TGameLevel::SetLoading";
InitLevel(); InitLevel();
StateTimer = CONST_TIMER_LOADING; StateTimer = CONST_TIMER_LOADING;
LevelState = CONST_LEVELSTATE_LOADING; LevelState = CONST_LEVELSTATE_LOADING;
@ -713,7 +700,7 @@ void TGameLevel::SetLoading()
void TGameLevel::InitLevel() void TGameLevel::InitLevel()
{ {
*SE::Console << "TGameLevel::InitLevel";
float LEVEL_VIEWPORT_WIDTH = Application->GetGameLevelScreenWidth(); float LEVEL_VIEWPORT_WIDTH = Application->GetGameLevelScreenWidth();
float LEVEL_VIEWPORT_HEIGHT = Application->GetGameLevelScreenHeight(); float LEVEL_VIEWPORT_HEIGHT = Application->GetGameLevelScreenHeight();
ReflectorPos = Vector2f(Renderer->GetScreenWidth()*0.5f, 16* LEVEL_VIEWPORT_HEIGHT/320.f + 13 * LEVEL_VIEWPORT_HEIGHT / 320.f); ReflectorPos = Vector2f(Renderer->GetScreenWidth()*0.5f, 16* LEVEL_VIEWPORT_HEIGHT/320.f + 13 * LEVEL_VIEWPORT_HEIGHT / 320.f);
@ -740,7 +727,6 @@ void TGameLevel::InitLevel()
bool TGameLevel::IsLoaded() bool TGameLevel::IsLoaded()
{ {
*SE::Console << "TGameLevel::IsLoaded" ;
return (LevelState == CONST_LEVELSTATE_STANDBY); return (LevelState == CONST_LEVELSTATE_STANDBY);
} }
@ -785,7 +771,6 @@ void TGameLevel::DrawSnapshot(const std::string& assignedSnapshotFrameBuffer)
void TGameLevel::Draw() void TGameLevel::Draw()
{ {
*SE::Console << "TGameLevel::Draw";
// Scaling math // Scaling math
float tSW = Application->GetGameLevelScreenWidth(); // Screen Width float tSW = Application->GetGameLevelScreenWidth(); // Screen Width
@ -1001,7 +986,7 @@ void TGameLevel::Draw()
void TGameLevel::DrawPauseButtons() //continue from void TGameLevel::DrawPauseButtons() //continue from
{ {
*SE::Console << "TGameLevel::DrawPauseButtons";
glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_SLIDE_UP_BTN_TEXTURE]); glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_SLIDE_UP_BTN_TEXTURE]);
Renderer->DrawRect(Vector2f(-128.f, -64.f)+CONST_SLIDE_UP_POS, Vector2f(128.f, 64.f)+CONST_SLIDE_UP_POS); Renderer->DrawRect(Vector2f(-128.f, -64.f)+CONST_SLIDE_UP_POS, Vector2f(128.f, 64.f)+CONST_SLIDE_UP_POS);
@ -1012,7 +997,7 @@ void TGameLevel::DrawPauseButtons() //continue from
void TGameLevel::DrawBallInstancingList() void TGameLevel::DrawBallInstancingList()
{ {
*SE::Console << "TGameLevel::DrawBallInstancingList";
RenderUniform1f("Transparency", 1.f); RenderUniform1f("Transparency", 1.f);
RenderUniform4fv("BrickColor", BallColor.data()); RenderUniform4fv("BrickColor", BallColor.data());
@ -1031,7 +1016,7 @@ void TGameLevel::DrawBallInstancingList()
void TGameLevel::DrawBuffer() void TGameLevel::DrawBuffer()
{ {
*SE::Console << "TGameLevel::DrawBuffer";
Renderer->PushShader("FrameShader"); Renderer->PushShader("FrameShader");
float brightness; float brightness;
if (CONST_LEVELSTATE_GO_TO_PAUSE) if (CONST_LEVELSTATE_GO_TO_PAUSE)
@ -1063,7 +1048,7 @@ void TGameLevel::DrawBuffer()
void TGameLevel::SetPause() void TGameLevel::SetPause()
{ {
*SE::Console << "TGameLevel::SetPause";
OutScaleVelocity = 0.f; OutScaleVelocity = 0.f;
OutScale = 1.f; OutScale = 1.f;
RenderBufferReady = false; RenderBufferReady = false;
@ -1074,7 +1059,7 @@ void TGameLevel::SetPause()
void TGameLevel::ReleasePause() void TGameLevel::ReleasePause()
{ {
*SE::Console << "TGameLevel::ReleasePause";
RenderBufferReady = false; RenderBufferReady = false;
if (PrevLevelStateIsStandby) if (PrevLevelStateIsStandby)
@ -1091,14 +1076,13 @@ void TGameLevel::ReleasePause()
bool TGameLevel::IsPaused() bool TGameLevel::IsPaused()
{ {
*SE::Console << "TGameLevel::IsPaused";
return ((LevelState == CONST_LEVELSTATE_PAUSE) || (LevelState == CONST_LEVELSTATE_GO_TO_PAUSE) || (LevelState == CONST_LEVELSTATE_FINISHED)); return ((LevelState == CONST_LEVELSTATE_PAUSE) || (LevelState == CONST_LEVELSTATE_GO_TO_PAUSE) || (LevelState == CONST_LEVELSTATE_FINISHED));
} }
void TGameLevel::Update(size_t dt) void TGameLevel::Update(size_t dt)
{ {
*SE::Console << "TGameLevel::Update";
*SE::Console << "before_upd LEVEL_STATE::== " << tostr(LevelState);
if (LevelState == CONST_LEVELSTATE_NODRAW) if (LevelState == CONST_LEVELSTATE_NODRAW)
{ {
return; return;
@ -1280,14 +1264,14 @@ void TGameLevel::Update(size_t dt)
{ {
SetStandBy(); SetStandBy();
} }
*SE::Console << "after_upd LEVEL_STATE::== " << tostr(LevelState);
} }
void TGameLevel::ReloadBallInstancingList() void TGameLevel::ReloadBallInstancingList()
{ {
*SE::Console << "TGameLevel::ReloadBallInstancingList";
//Changing this function? Don't forget to change next one! //Changing this function? Don't forget to change next one!
BallInstancingList.BallAndGlowList.clear(); BallInstancingList.BallAndGlowList.clear();
@ -1388,7 +1372,7 @@ void TGameLevel::ReloadBallInstancingList()
void TGameLevel::RefreshBallInstancingList() void TGameLevel::RefreshBallInstancingList()
{ {
*SE::Console << "TGameLevel::RefreshBallInstancingList";
//Changing this function? Don't forget to change previous one! //Changing this function? Don't forget to change previous one!
/* /*
Vector3f p1; Vector3f p1;
@ -1487,7 +1471,7 @@ void TGameLevel::RefreshBallInstancingList()
void TGameLevel::UpdateBallList(size_t dt) void TGameLevel::UpdateBallList(size_t dt)
{ {
*SE::Console << "TGameLevel::UpdateBallList";
std::list<TBall>::iterator iBall; std::list<TBall>::iterator iBall;
float LEVEL_VIEWOPRT_WIDTH = Application->GetGameLevelScreenWidth(); float LEVEL_VIEWOPRT_WIDTH = Application->GetGameLevelScreenWidth();
@ -1653,7 +1637,7 @@ void TGameLevel::UpdateBallList(size_t dt)
void TGameLevel::MultiplyBalls(Vector2f pos, Vector2f velocity) void TGameLevel::MultiplyBalls(Vector2f pos, Vector2f velocity)
{ {
*SE::Console << "TGameLevel::MultiplyBalls";
//mat2 r; //mat2 r;
Matrix2f r; Matrix2f r;
Vector2f v; Vector2f v;
@ -1680,7 +1664,7 @@ void TGameLevel::MultiplyBalls(Vector2f pos, Vector2f velocity)
void TGameLevel::OnTapDown(Vector2f pos) void TGameLevel::OnTapDown(Vector2f pos)
{ {
*SE::Console << "TGameLevel::OnTapDown";
if (LevelState == CONST_LEVELSTATE_STANDBY) if (LevelState == CONST_LEVELSTATE_STANDBY)
{ {
if (TapInBackBtnArea(pos)) if (TapInBackBtnArea(pos))
@ -1720,12 +1704,12 @@ void TGameLevel::OnTapDown(Vector2f pos)
void TGameLevel::OnTapUp(Vector2f pos) void TGameLevel::OnTapUp(Vector2f pos)
{ {
*SE::Console << "TGameLevel::OnTapUp";
} }
void TGameLevel::OnFling(Vector2f slideSpeed) void TGameLevel::OnFling(Vector2f slideSpeed)
{ {
*SE::Console << "TBrick::TryDrawAppear";
if (LevelState == CONST_LEVELSTATE_PAUSE) if (LevelState == CONST_LEVELSTATE_PAUSE)
{ {
OutScaleVelocity = slideSpeed(1)/320.f; OutScaleVelocity = slideSpeed(1)/320.f;
@ -1734,7 +1718,7 @@ void TGameLevel::OnFling(Vector2f slideSpeed)
void TGameLevel::OnScroll(Vector2f shift) void TGameLevel::OnScroll(Vector2f shift)
{ {
*SE::Console << "TGameLevel::OnScroll";
const float CONST_SCROLL_SCALE = 1.1f; const float CONST_SCROLL_SCALE = 1.1f;
if (LevelState == CONST_LEVELSTATE_PLAYING || LevelState == CONST_LEVELSTATE_STANDBY) if (LevelState == CONST_LEVELSTATE_PLAYING || LevelState == CONST_LEVELSTATE_STANDBY)
{ {
@ -1752,7 +1736,7 @@ void TGameLevel::OnScroll(Vector2f shift)
void TGameLevel::TryGoToMenu() void TGameLevel::TryGoToMenu()
{ {
*SE::Console << "TGameLevel::TryGoToMenu";
if (OutScale < 0.5f) if (OutScale < 0.5f)
{ {
OutScale = 0.5f; OutScale = 0.5f;

View File

@ -72,7 +72,9 @@ void TMyApplication::InnerInit()
ST::PathToResources = "assets/"; ST::PathToResources = "assets/";
#endif #endif
#ifdef TARGET_ANDROID
ST::PathToResources = ""; ST::PathToResources = "";
#endif
if (Console != NULL) if (Console != NULL)
{ {
@ -421,7 +423,6 @@ void TMyApplication::InnerUpdate(size_t dt)
if (GameState == CONST_GAMESTATE_PRELOADING) if (GameState == CONST_GAMESTATE_PRELOADING)
{ {
*SE::Console << "1CONST_GAMESTATE_PRELOADING";
StateTimer += dt/1000.f; StateTimer += dt/1000.f;
if (StateTimer >= 1.f) if (StateTimer >= 1.f)
{ {
@ -432,7 +433,6 @@ void TMyApplication::InnerUpdate(size_t dt)
} }
else if (GameState == CONST_GAMESTATE_LOADING) else if (GameState == CONST_GAMESTATE_LOADING)
{ {
*SE::Console << "2CONST_GAMESTATE_LOADING";
StateTimer += dt/1000.f; StateTimer += dt/1000.f;
if (StateTimer >= 1.f) if (StateTimer >= 1.f)
{ {
@ -441,7 +441,6 @@ void TMyApplication::InnerUpdate(size_t dt)
if (TextureNamesToLoad.size() != 0) if (TextureNamesToLoad.size() != 0)
{ {
*SE::Console << "LOADING: " + TextureNamesToLoad.begin()->first;
ResourceManager->TexList.AddTexture(TextureNamesToLoad.begin()->first, TextureNamesToLoad.begin()->second); ResourceManager->TexList.AddTexture(TextureNamesToLoad.begin()->first, TextureNamesToLoad.begin()->second);
TextureNamesToLoad.erase(TextureNamesToLoad.begin()); TextureNamesToLoad.erase(TextureNamesToLoad.begin());
@ -472,7 +471,6 @@ void TMyApplication::InnerUpdate(size_t dt)
} }
else if (GameState == CONST_GAMESTATE_LEVEL) else if (GameState == CONST_GAMESTATE_LEVEL)
{ {
*SE::Console << "3CONST_GAMESTATE_LEVEL";
GameLevel->Update(dt); GameLevel->Update(dt);
EffectsUpdate(dt); EffectsUpdate(dt);
} }
@ -484,7 +482,6 @@ void TMyApplication::InnerUpdate(size_t dt)
} }
else if (GameState == CONST_GAMESTATE_FROM_MENU_TO_LEVEL) else if (GameState == CONST_GAMESTATE_FROM_MENU_TO_LEVEL)
{ {
*SE::Console << "5CONST_GAMESTATE_FROM_MENU_TO_LEVEL";
GameLevel->Update(dt); GameLevel->Update(dt);
if (GameLevel->IsLoaded()) if (GameLevel->IsLoaded())
{ {
@ -498,7 +495,6 @@ void TMyApplication::InnerUpdate(size_t dt)
} }
else if (GameState == CONST_GAMESTATE_FROM_MENU_TO_CREDITS) else if (GameState == CONST_GAMESTATE_FROM_MENU_TO_CREDITS)
{ {
*SE::Console << "6CONST_GAMESTATE_FROM_MENU_TO_CREDITS";
Menu.Update(dt); Menu.Update(dt);
GameCredits.Update(dt); GameCredits.Update(dt);
StateTimer -= dt; StateTimer -= dt;
@ -512,7 +508,6 @@ void TMyApplication::InnerUpdate(size_t dt)
} }
else if (GameState == CONST_GAMESTATE_CREDITS) else if (GameState == CONST_GAMESTATE_CREDITS)
{ {
//*SE::Console << "7CONST_GAMESTATE_CREDITS";
GameCredits.Update(dt); GameCredits.Update(dt);
} }
else if (GameState == CONST_GAMESTATE_FROM_CREDITS_TO_MENU) else if (GameState == CONST_GAMESTATE_FROM_CREDITS_TO_MENU)
@ -646,7 +641,7 @@ void TMyApplication::InnerOnMouseMove(TMouseState& mouseState) {
void TMyApplication::EffectsInit() { void TMyApplication::EffectsInit() {
boost::property_tree::ptree JSONsource; boost::property_tree::ptree JSONsource;
boost::property_tree::ptree JSONconfig = SE::ReadJsonFile("config.json"); boost::property_tree::ptree JSONconfig = SE::ReadJsonFile(ST::PathToResources + "config.json");
std::string effectJSON; std::string effectJSON;
// LEFT // LEFT

9
game/menucode.cpp Normal file → Executable file
View File

@ -156,7 +156,7 @@ void TGameMenu::Update(size_t dt)
void TGameMenu::OnTapDown(Vector2f pos) void TGameMenu::OnTapDown(Vector2f pos)
{ {
*SE::Console << "TGameMenu::OnTapDown";
#ifndef GALAX_MENU_UPDATE #ifndef GALAX_MENU_UPDATE
HoldToTap = true; HoldToTap = true;
@ -193,7 +193,7 @@ void TGameMenu::OnTapDown(Vector2f pos)
void TGameMenu::OnTapUp(Vector2f pos) void TGameMenu::OnTapUp(Vector2f pos)
{ {
*SE::Console << "TGameMenu::OnTapUp";
#ifndef GALAX_MENU_UPDATE #ifndef GALAX_MENU_UPDATE
HoldToTap = false; HoldToTap = false;
@ -214,7 +214,7 @@ void TGameMenu::OnTapUpAfterMove(Vector2f pos)
void TGameMenu::OnFling(Vector2f slideSpeed) void TGameMenu::OnFling(Vector2f slideSpeed)
{ {
*SE::Console << "TGameMenu::OnFling";
#ifndef GALAX_MENU_UPDATE #ifndef GALAX_MENU_UPDATE
HoldToTap = false; HoldToTap = false;
MenuSpeed = slideSpeed(0); MenuSpeed = slideSpeed(0);
@ -230,7 +230,6 @@ void TGameMenu::OnScroll(Vector2f shift)
void TGameMenu::OpenNextLevel() void TGameMenu::OpenNextLevel()
{ {
*SE::Console << "TGameMenu::OpenNextLevel";
#ifndef GALAX_MENU_UPDATE #ifndef GALAX_MENU_UPDATE
if (MenuItemCount < 12) if (MenuItemCount < 12)
{ {
@ -241,12 +240,10 @@ void TGameMenu::OpenNextLevel()
int TGameMenu::GetMenuItemCount() int TGameMenu::GetMenuItemCount()
{ {
*SE::Console << "TGameMenu::GetMenuItemCount";
return MenuItemCount; return MenuItemCount;
} }
void TGameMenu::SetMenuItemCount(int menuItemCount) void TGameMenu::SetMenuItemCount(int menuItemCount)
{ {
*SE::Console << "TGameMenu::SetMenuItemCount";
MenuItemCount = menuItemCount; MenuItemCount = menuItemCount;
} }