Worldgen testing
This commit is contained in:
parent
d4c3fdca39
commit
360614e231
@ -1,5 +1,5 @@
|
||||
# depslib dependency file v1.0
|
||||
1667335610 source:c:\development\xtreemminer\main.cpp
|
||||
1667337375 source:c:\development\xtreemminer\main.cpp
|
||||
<stdlib.h>
|
||||
<GL/glut.h>
|
||||
"Utilities.h"
|
||||
@ -113,3 +113,11 @@
|
||||
1667294728 /home/kacperks/projects/XtreemNodes/include/FastNoiseLite.h
|
||||
<cmath>
|
||||
|
||||
1667351497 source:c:\development\xtreemminer\gui.cpp
|
||||
"GUI.h"
|
||||
|
||||
1667336637 c:\development\xtreemminer\include\gui.h
|
||||
"Base.h"
|
||||
<SFML/Main.hpp>
|
||||
<SFML/Graphics.hpp>
|
||||
|
||||
|
14
main.cpp
14
main.cpp
@ -108,33 +108,33 @@ void updateTimer(int time)
|
||||
|
||||
if(sf::Keyboard::isKeyPressed(sf::Keyboard::LShift))
|
||||
{
|
||||
playerY -= .8;
|
||||
playerY += .8;
|
||||
}
|
||||
|
||||
else if(sf::Keyboard::isKeyPressed(sf::Keyboard::Space))
|
||||
{
|
||||
playerY += .8;
|
||||
playerY -= .8;
|
||||
}
|
||||
|
||||
// Rotation
|
||||
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Left))
|
||||
{
|
||||
playerRotY -= .8;
|
||||
playerRotY -= 1.8;
|
||||
}
|
||||
|
||||
else if(sf::Keyboard::isKeyPressed(sf::Keyboard::Right))
|
||||
{
|
||||
playerRotY += .8;
|
||||
playerRotY += 1.8;
|
||||
}
|
||||
|
||||
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Up))
|
||||
{
|
||||
playerRotX -= .8;
|
||||
playerRotX -= 1.8;
|
||||
}
|
||||
|
||||
else if(sf::Keyboard::isKeyPressed(sf::Keyboard::Down))
|
||||
{
|
||||
playerRotX += .8;
|
||||
playerRotX += 1.8;
|
||||
}
|
||||
|
||||
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Escape))
|
||||
@ -187,7 +187,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
float cX = (float)x + (16 * bx);
|
||||
float cZ = (float)z + (16 * bz);
|
||||
for(int y = 0; y < 48 * abs(perlin.GetNoise(cX, cZ)) + (cellular.GetNoise(cX, cZ)) + 3; y++)
|
||||
for(int y = 0; y < 48 * abs(perlin.GetNoise(cX, cZ)) / 2 + abs(cellular.GetNoise(cX, cZ)) * 2 + abs(os.GetNoise(cX, cZ)) * 4 + 10; y++)
|
||||
{
|
||||
blockManager.mapBlocks[bx][bz].addNode(y > 20 ? 1 : 2, 0, x, y, z);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user