removed debug code

This commit is contained in:
Emil Kabirov 2018-11-30 13:19:55 +05:00
parent 3248d72416
commit cee9693119
3 changed files with 1 additions and 68 deletions

View File

@ -872,8 +872,6 @@ void TGameLevel::InnerDraw(int screenWidth, int screenHeight, int matrixWidth, i
Renderer->PushMatrix();
Renderer->LoadIdentity();
CheckGlError();
if (LevelState == CONST_LEVELSTATE_LOADING)
{
@ -960,16 +958,11 @@ void TGameLevel::InnerDraw(int screenWidth, int screenHeight, int matrixWidth, i
}
// :::::::::::
// *SE::Console << BkgTexture;
// *SE::Console << std::to_string(ResourceManager->TexList[BkgTexture]);
glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[BkgTexture]);
//Renderer->DrawRect(Vector2f(xlOffset, ylOffset), Vector2f(xlOffset+tSW, ylOffset+tSH),Vector2f(0.f, 0.f), Vector2f(1.f, 1.f));
Renderer->DrawRect(Vector2f(bkgSWO, bkgSHO), Vector2f(bkgSWO + bkgSW, bkgSHO + bkgSH), Vector2f(0.f, 0.f), Vector2f(1.f, 1.f));
//Renderer->DrawRect(Vector2f(0,0), Vector2f(100,100), Vector2f(0.f, 0.f), Vector2f(1.f, 1.f));
CheckGlError();
std::list<TBall>::iterator iBall;
@ -994,25 +987,17 @@ void TGameLevel::InnerDraw(int screenWidth, int screenHeight, int matrixWidth, i
Renderer->PushShader("BrickShader");
GetConsole() << "PUSHED BRICK SHADER";
CheckGlError();
for (int i = 0; i < CONST_BRICKMATRIX_WIDTH; i++)
{
for (int j = 0; j < CONST_BRICKMATRIX_HEIGHT; j++)
{
BlockMatrix[i][j].TryDrawAppear(i, j, screenWidth); //Draws only appearing/disappearing blocks
CheckGlError();
}
}
RenderUniform1f("Transparency", 1.f);
CheckGlError();
//Vector2f outlineShift = Vector2f(((screenWidth - Application->GetGameLevelScreenWidth())*0.5f), 0.f);
Renderer->PushMatrix();
Renderer->TranslateMatrix(Vector3f(offset[0], offset[1], 0));
@ -1031,22 +1016,13 @@ void TGameLevel::InnerDraw(int screenWidth, int screenHeight, int matrixWidth, i
color(2) = c;
}
RenderUniform4fv("BrickColor", color.data());
CheckGlError();
glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[colorBlockIterator->first.second]);
CheckGlError();
Renderer->DrawTriangleList(colorBlockIterator->second);
CheckGlError();
}
DrawBallInstancingList(blackAndWhite);
CheckGlError();
Renderer->PopMatrix();
@ -1055,14 +1031,10 @@ void TGameLevel::InnerDraw(int screenWidth, int screenHeight, int matrixWidth, i
for (iBonus = BonusFallingList.begin(); iBonus != BonusFallingList.end(); ++iBonus)
{
iBonus->Draw();
CheckGlError();
}
Application->EffectsDraw();
CheckGlError();
Renderer->PopShader();
//float LEVEL_VIEWPORT_WIDTH = Application->GetGameLevelScreenWidth();
@ -1075,29 +1047,21 @@ void TGameLevel::InnerDraw(int screenWidth, int screenHeight, int matrixWidth, i
Renderer->DrawRect(Vector2f(-xRW * 0.5f, -yRH * 0.5f) + matrixSize + offset,
Vector2f(xRW*0.5f, yRH*0.5f) + matrixSize + offset, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f));
CheckGlError();
const Vector2f wallUpPos1(xlOffset, tSH-ylOffset-uWTW);
const Vector2f wallUpPos2(tSW + xlOffset, tSH-ylOffset);
glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_WALL_UP_TEXTURE]);
Renderer->DrawRect(wallUpPos1, wallUpPos2, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f));
CheckGlError();
const Vector2f wallLeftPos1(xlOffset, lrFBO+ylOffset);
const Vector2f wallLeftPos2(lWTW + xlOffset, tSH-ylOffset-(uWTW*0.68f));
glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_WALL_LEFT_TEXTURE]);
Renderer->DrawRect(wallLeftPos1, wallLeftPos2, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f));
CheckGlError();
const Vector2f wallRightPos1(tSW+xlOffset-rWTW, lrFBO+ylOffset);
const Vector2f wallRightPos2(tSW + xlOffset, tSH-ylOffset-(uWTW*0.68f));
glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_WALL_RIGHT_TEXTURE]);
Renderer->DrawRect(wallRightPos1, wallRightPos2, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f));
CheckGlError();
if (BonusFloorTimer>0.f)
{
@ -1111,8 +1075,6 @@ void TGameLevel::InnerDraw(int screenWidth, int screenHeight, int matrixWidth, i
Renderer->DrawRect(wallBonusPos1, wallBonusPos2, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f));
}
CheckGlError();
if (!pause && LevelState != CONST_LEVELSTATE_SNAPSHOTTING)
@ -1127,8 +1089,6 @@ void TGameLevel::InnerDraw(int screenWidth, int screenHeight, int matrixWidth, i
drawOutline(screenWidth, screenHeight);
CheckGlError();
if (pause && !renderBufferReady)
{

View File

@ -469,8 +469,6 @@ void TMyApplication::LoadResources()
ResourceManager->FontManager.AddFont("droid_sans14", "droid_sans14_font_bitmap.png", "droid_sans14_font_charmap.txt");
ResourceManager->FontManager.PushFont("droid_sans14");
GetConsole() << "LOAD GAME";
}
void TMyApplication::TryLoadSavedGame()
@ -540,12 +538,8 @@ void TMyApplication::InnerUpdate(size_t dt)
return;
}
GetConsole() << "INNER UPDATE";
LoadUserProgress();
GetConsole() << "LOAD SHADERS";
ResourceManager->ShaderManager.AddShader("HoverableButtonShader", "shaders/gui_transparent.vertex", "shaders/hoverable-button.fragment");
ResourceManager->ShaderManager.AddShader("BlackAndWhiteShader", "shaders/gui_transparent_blackandwhite.vertex", "shaders/gui_transparent_blackandwhite.fragment");
ResourceManager->ShaderManager.AddShader("ColorShader", "shaders/color-shader.vertex", "shaders/color-shader.fragment");
@ -553,27 +547,19 @@ void TMyApplication::InnerUpdate(size_t dt)
ResourceManager->ShaderManager.AddShader("BrickShader", "shaders/brickshader_vertex.txt", "shaders/brickshader_fragment.txt");
ResourceManager->ShaderManager.AddShader(ParticleEffect::PARTICLE_SHADER, "shaders/particle-shader.vertex", "shaders/particle-shader.fragment");
GetConsole() << "ADD FRAMEBUFFER";
ResourceManager->FrameManager.AddFrameRenderBuffer("LevelBuffer", 256, 256);
//OnDrawSignal.connect(boost::bind(&TGameLoading::Draw, boost::ref(GameLoading)));
Inited = true;
Application->SetGameLevelScreenScale();
//GameLevel.SetLevelScale();
GetConsole() << "INIT EFFECTS";
EffectsInit();
// ------- UI -------
GetConsole() << "LOAD JSON UI";
gamePauseMenuUi = SE::ReadJsonFile(ST::PathToResources + "gui_game_pause_menu.json");
galaxyMenuUi = SE::ReadJsonFile(ST::PathToResources + "gui_main_menu.json");
GetConsole() << "INIT MENU";
// TESTS of menu
if (Menu.GalaxMenu.InitGalaxyMenu("levels/galaxy_ptree.json")) {
std::cout << "ok" << std::endl;
@ -582,16 +568,10 @@ void TMyApplication::InnerUpdate(size_t dt)
std::cout << "menu error" << std::endl;
}
GetConsole() << "RENDER SNAPSHOTS";
RenderLevelSnapshots();
GetConsole() << "LOAD RESOURCES";
LoadResources();
GameState = CONST_GAMESTATE_LOADING;
GetConsole() << "PRELOADING END";
}
else if (GameState == CONST_GAMESTATE_LOADING)
{
@ -601,8 +581,6 @@ void TMyApplication::InnerUpdate(size_t dt)
StateTimer -= 1.f;
}
GetConsole() << "BEFORE LOADING TEXTURES";
if (TextureNamesToLoad.size() != 0)
{
ResourceManager->TexList.AddTexture(TextureNamesToLoad.begin()->first, TextureNamesToLoad.begin()->second);
@ -707,7 +685,6 @@ void TMyApplication::InnerUpdate(size_t dt)
});
pauseBackground->onMoveSignal.connect([this](Vector2f, Vector2f shift, int) {
SE::GetConsole() << std::to_string(shift.norm());
if (shift.norm() > 15)
{
GameLevel->TryGoToMenu();

View File

@ -10,9 +10,7 @@ import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.util.Log;
import android.view.GestureDetector;
import android.view.KeyEvent;
import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.MotionEvent;
//Deprecated
@ -29,8 +27,6 @@ public class GL2JNIActivity extends Activity
@Override
protected void onCreate(Bundle icicle)
{
Log.d("DEBUG", "START ACTIVITY");
super.onCreate(icicle);
instance = this;