Fixed some warnings, set -Wall, -Wextra
This commit is contained in:
@@ -3,9 +3,7 @@
|
||||
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
#ifndef std::string
|
||||
#include <string>
|
||||
#endif
|
||||
class Player;
|
||||
|
||||
#define REGION_SIZE_BIT 5
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#ifndef FILES_FILES_H_
|
||||
#define FILES_FILES_H_
|
||||
|
||||
#ifndef std::string
|
||||
#include <string>
|
||||
#endif
|
||||
|
||||
extern bool write_binary_file(std::string filename, const char* data, size_t size);
|
||||
extern unsigned int append_binary_file(std::string filename, const char* data, size_t size);
|
||||
|
||||
@@ -162,7 +162,7 @@ void mainloop(Level* level, Assets* assets) {
|
||||
for (int i = 0; i < freeLoaders; i++)
|
||||
level->chunksController->loadVisible(world->wfile);
|
||||
|
||||
worldRenderer.draw(world, camera, occlusion);
|
||||
worldRenderer.draw(camera, occlusion);
|
||||
hud.draw(level, assets);
|
||||
if (level->player->debug) {
|
||||
hud.drawDebug(level, assets, fps, occlusion);
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
#include "Level.h"
|
||||
#include "../lighting/Lighting.h"
|
||||
#include "../voxels/Chunks.h"
|
||||
#include "../voxels/ChunksController.h"
|
||||
#include "../player_control.h"
|
||||
#include "../physics/PhysicsSolver.h"
|
||||
#include "../objects/Player.h"
|
||||
|
||||
Level::Level(World* world, Player* player, Chunks* chunks, PhysicsSolver* physics) :
|
||||
world(world),
|
||||
|
||||
@@ -73,7 +73,7 @@ bool WorldRenderer::drawChunk(size_t index, Camera* camera, Shader* shader, bool
|
||||
}
|
||||
|
||||
|
||||
void WorldRenderer::draw(World* world, Camera* camera, bool occlusion){
|
||||
void WorldRenderer::draw(Camera* camera, bool occlusion){
|
||||
Chunks* chunks = level->chunks;
|
||||
|
||||
vec4 skyColor(0.7f, 0.81f, 1.0f, 1.0f);
|
||||
|
||||
+1
-4
@@ -4,10 +4,7 @@
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <GL/glew.h>
|
||||
|
||||
#ifndef std::string
|
||||
#include <string>
|
||||
#endif
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/ext.hpp>
|
||||
@@ -37,7 +34,7 @@ public:
|
||||
WorldRenderer(Level* level, Assets* assets);
|
||||
~WorldRenderer();
|
||||
|
||||
void draw(World* world, Camera* camera, bool occlusion);
|
||||
void draw(Camera* camera, bool occlusion);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user