Sfoglia il codice sorgente

Fix various compilation issues.

legacy
Sam Hocevar 4 anni fa
parent
commit
eaa304291d
3 ha cambiato i file con 9 aggiunte e 7 eliminazioni
  1. +1
    -1
      lol-core
  2. +4
    -4
      src/base/log.cpp
  3. +4
    -2
      src/scene.cpp

+ 1
- 1
lol-core

@@ -1 +1 @@
Subproject commit 93ad6b7ab16307cfc7aded27a6260746511ec899
Subproject commit dead6fe3bfef4dc13f3ac73e135f2e955748abc7

+ 4
- 4
src/base/log.cpp Vedi File

@@ -110,18 +110,18 @@ void msg::helper(message_type type, char const *fmt, va_list ap)
};

# if defined _WIN32
std::string buf = std::string(prefix[(int)type]) + ": " + vformat(fmt, ap);
std::string buf = std::string(prefix[int(type)]) + ": " + vformat(fmt, ap);

std::vector<WCHAR> widechar;
widechar.resize(buf.length() + 1);
MultiByteToWideChar(CP_UTF8, 0, buf.c_str(), (int)buf.length() + 1, widechar.data(), widechar.size());
MultiByteToWideChar(CP_UTF8, 0, buf.c_str(), int(buf.length()) + 1, widechar.data(), int(widechar.size()));
OutputDebugStringW(widechar.data());
# elif defined __EMSCRIPTEN__
fprintf(stdout, "%s: ", prefix[(int)type]);
fprintf(stdout, "%s: ", prefix[int(type)]);
vfprintf(stdout, fmt, ap);
fflush(stdout);
# else
fprintf(stderr, "%s: ", prefix[(int)type]);
fprintf(stderr, "%s: ", prefix[int(type)]);
vfprintf(stderr, fmt, ap);
# endif
#endif


+ 4
- 2
src/scene.cpp Vedi File

@@ -14,6 +14,8 @@
#include <lol/engine-internal.h>

#include <map>
#include <vector>
#include <array>
#include <cstdlib>

#if defined(_WIN32)
@@ -261,7 +263,7 @@ void Scene::Reset()
{
for (size_t idx = 0; idx < m_prim_renderers[key].size(); ++idx)
if (m_prim_renderers[key][idx]->m_fire_and_forget)
ReleasePrimitiveRenderer(idx--, key);
ReleasePrimitiveRenderer(int(idx--), key);
}

m_tile_api.m_bufs.clear();
@@ -675,7 +677,7 @@ void Scene::render_tiles() // XXX: rename to Blit()
m_tile_api.m_vdecl->SetStream(vb2, attr_tex);

/* Draw arrays */
m_tile_api.m_vdecl->DrawElements(MeshPrimitive::Triangles, 0, (n - i) * 6);
m_tile_api.m_vdecl->DrawElements(MeshPrimitive::Triangles, 0, int(n - i) * 6);
m_tile_api.m_vdecl->Unbind();
tiles[i].m_tileset->Unbind();
}


Caricamento…
Annulla
Salva