Browse files

submodule update

  • Loading branch information...
1 parent 1e0a13c commit cf77782b0898b55de8c61e63cce4cf8b58093a37 @SuperV1234 committed Apr 2, 2013
2 extlibs/SSVEntitySystem
@@ -1 +1 @@
-Subproject commit 43f95ff65fd61372522870fdbe4636a3c9e8150f
+Subproject commit 4f0183ceb1768e725d1a58e18304aae5320b2d4f
2 extlibs/SSVStart
@@ -1 +1 @@
-Subproject commit 164b4a898100af33073cd1491a4c7d23af3387f2
+Subproject commit fdc53b2058779d8a8b0b4f573c1689db7248e31d
View
6 src/SSVOpenHexagon/Core/HexagonGame.cpp
@@ -24,7 +24,7 @@ namespace hg
game.onUpdate += [&](float mFrameTime) { update(mFrameTime); };
game.onDraw += [&]{ draw(); };
-
+
using k = Keyboard::Key;
game.addInput({{k::Left}, {k::A}}, [&](float){ inputMovement = -1; });
game.addInput({{k::Right}, {k::D}}, [&](float){ inputMovement = 1; });
@@ -97,7 +97,7 @@ namespace hg
overlayCamera.setView({{getWidth() / 2.f, getHeight() / 2.f}, sf::Vector2f(getWidth(), getHeight())});
backgroundCamera.setView({{0, 0}, {getWidth() * getZoomFactor(), getHeight() * getZoomFactor()}});
backgroundCamera.setRotation(0);
-
+
// 3D Cameras cleanup
depthCameras.clear();
unsigned int depth{styleData.get3DDepth()};
@@ -128,7 +128,7 @@ namespace hg
setRotationSpeed(levelData.getRotationSpeed() + levelData.getRotationSpeedIncrement() * getSign(getRotationSpeed()));
setRotationSpeed(levelData.getRotationSpeed() * -1);
-
+
if(status.fastSpin < 0 && abs(getRotationSpeed()) > levelData.getValueFloat("rotation_speed_max"))
setRotationSpeed(levelData.getValueFloat("rotation_speed_max") * getSign(getRotationSpeed()));
View
8 src/SSVOpenHexagon/Core/MenuGame.cpp
@@ -148,7 +148,7 @@ namespace hg
window.setGameState(hexagonGame.getGame());
hexagonGame.newGame(levelDataIds[currentIndex], true, difficultyMultipliers[difficultyMultIndex % difficultyMultipliers.size()]);
}
- else if(state == s::OPTIONS) optionsMenu.executeCurrentItem();
+ else if(state == s::OPTIONS) optionsMenu.executeCurrentItem();
}, t::SINGLE);
game.addInput({{k::F1}}, [&](float) { playSound("beep.ogg"); if(state == s::PROFILES) { profileNewName = ""; state = s::PROFILE_NEW; } }, t::SINGLE);
game.addInput({{k::F2}, {k::J}}, [&](float) { playSound("beep.ogg"); if(state == s::MAIN ) { profileNewName = ""; state = s::PROFILES; } }, t::SINGLE);
@@ -209,7 +209,7 @@ namespace hg
for(unsigned int i{0}; i < recordPairs.size(); ++i)
{
- if(recordPairs[i].first != getCurrentProfile().getName()) continue;
+ if(recordPairs[i].first != getCurrentProfile().getName()) continue;
playerPosition = i + 1;
playerScore = recordPairs[i].second;
break;
@@ -226,7 +226,7 @@ namespace hg
if(recordPair.first == getCurrentProfile().getName()) result.append(" >> ");
result.append("(" + toStr(i + 1) +") " + recordPair.first + ": " + toStr(recordPair.second) + "\n");
}
- else if(static_cast<unsigned int>(playerPosition) > leaderboardRecordCount)
+ else if(static_cast<unsigned int>(playerPosition) > leaderboardRecordCount)
result.append("...(" + toStr(playerPosition) +") " + getCurrentProfile().getName() + ": " + toStr(playerScore) + "\n");
}
else break;
@@ -269,7 +269,7 @@ namespace hg
if(state == States::MAIN) { drawLevelSelection(); render(bottomBar); }
else if(state == States::PROFILE_NEW) drawProfileCreation();
else if(state == States::PROFILES) drawProfileSelection();
- else if(state == States::OPTIONS) drawOptions();
+ else if(state == States::OPTIONS) drawOptions();
render(titleBar); render(creditsBar1); render(creditsBar2); render(versionText);
if(mustTakeScreenshot) { window.getRenderWindow().capture().saveToFile("screenshot.png"); mustTakeScreenshot = false; }
View
6 src/SSVOpenHexagon/Core/main.cpp
@@ -32,7 +32,7 @@ int main(int argc, char* argv[])
log("Profiles folder does not exist, creating", "Mkdir");
mkdir("Profiles/");
}
-
+
Online::startCheckUpdates();
srand(unsigned(time(NULL)));
loadConfig(overrideIds); initAssetManager(); loadAssets();
@@ -45,9 +45,7 @@ int main(int argc, char* argv[])
}
string title{"Open Hexagon " + toStr<float>(getVersion()) + " - by vittorio romeo"};
- GameWindow window{title, getWidth(), getHeight(), getPixelMultiplier(), getFullscreen()};
- window.setStaticFrameTime(getStaticFrameTime());
- window.setStaticFrameTimeValue(getStaticFrameTimeValue());
+ GameWindow window{title, createDynamicTimer(window), getWidth(), getHeight(), getPixelMultiplier(), getFullscreen()};
window.setVsync(getVsync());
window.setMouseCursorVisible(false);
View
4 src/SSVOpenHexagon/Global/Factory.cpp
@@ -16,13 +16,13 @@ namespace hg
Entity& Factory::createWall(int mSide, float mThickness, float mSpeedMultiplier, float mAcceleration, float mMinSpeed, float mMaxSpeed)
{
- auto& result = manager.createEntity();
+ auto& result = manager.createEntity("wall");
result.createComponent<CWall>(hexagonGame, centerPos, mSide, mThickness, getSpawnDistance(), mSpeedMultiplier, mAcceleration, mMinSpeed, mMaxSpeed);
return result;
}
Entity& Factory::createPlayer()
{
- auto& result = manager.createEntity();
+ auto& result = manager.createEntity("player");
result.createComponent<CPlayer>(hexagonGame, centerPos);
result.setDrawPriority(-1);
return result;

0 comments on commit cf77782

Please sign in to comment.