More logging

This commit is contained in:
Adrian Hedqvist 2017-09-17 22:14:12 +02:00
parent cb7f0263d8
commit 4d7754ac77
2 changed files with 4 additions and 3 deletions

View file

@ -114,14 +114,14 @@ void init() {
void load(Renderer* rend, Input* inp) {
renderer = rend;
input = inp;
SDL_Log("Creating ascii tileset...\n");
ascii = new Tileset(renderer, "./assets/12x12.bmp", 192, 192, 12, 12);
SDL_Log("Created tileset.\n");
SDL_Log("Created ascii tileset.\n");
input->bindkey(SDLK_r, ACTION_RESET);
input->bindkey(SDLK_SPACE, ACTION_PAUSE);
input->bindkey(SDLK_RETURN, ACTION_STEP);
input->bindkey(SDLK_F1, ACTION_TOGGLE_DEBUG);
SDL_Log("Bound keybinds.\n");
SDL_Log("Keybinds bound.\n");
init();
}

View file

@ -235,6 +235,7 @@ void Renderer::ImguiNewFrame() {
ImGui_ImplSdlGL3_NewFrame(window);
}
Texture * Renderer::LoadTexture(std::string path) {
SDL_Log("Loading texture: %s\n", path);
auto it = textures.find(path);
if (it == textures.end()) {
// Texture not loaded, let's load it.