fix goal build error and a few c++ warnings (#1044)

This commit is contained in:
water111 2022-01-02 16:10:09 -05:00 committed by GitHub
parent b13a0ee755
commit 6e4b34be0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 17 deletions

View File

@ -5,7 +5,7 @@
// if you want to filter to only some object names.
// it will make the decompiler much faster.
"allowed_objects": [],
"banned_objects": [],
"banned_objects": ["collide-mesh"],
////////////////////////////
// CODE ANALYSIS OPTIONS

View File

@ -107,7 +107,7 @@ GameTextResult process_game_text(ObjectFileData& data, GameTextVersion version)
auto string_start = (text_label.offset / 4) - 1;
// 8 for type tag and length fields, 1 for null char.
for (int j = 0, m = align16(8 + 1 + (int)text.length()) / 4;
j < m && string_start + j < read_words.size(); j++) {
j < m && string_start + j < (int)read_words.size(); j++) {
read_words.at(string_start + j)++;
}
}

View File

@ -1074,9 +1074,9 @@ void DirectRenderer::PrimitiveBuffer::push(const math::Vector<u8, 4>& rgba,
const math::Vector<float, 3>& st) {
auto& v = vertices[vert_count];
v.rgba = rgba;
v.xyz[0] = (float)vert[0] / UINT32_MAX;
v.xyz[1] = (float)vert[1] / UINT32_MAX;
v.xyz[2] = (float)vert[2] / UINT32_MAX;
v.xyz[0] = (float)vert[0] / (float)UINT32_MAX;
v.xyz[1] = (float)vert[1] / (float)UINT32_MAX;
v.xyz[2] = (float)vert[2] / (float)UINT32_MAX;
v.stq = st;
vert_count++;
}

View File

@ -29,7 +29,6 @@ void GLAPIENTRY opengl_error_callback(GLenum source,
const GLchar* message,
const void* /*userParam*/) {
if (severity == GL_DEBUG_SEVERITY_NOTIFICATION) {
// On some drivers this prints on every single texture upload, which is too much spam
lg::debug("OpenGL notification 0x{:X} S{:X} T{:X}: {}", id, source, type, message);
} else if (severity == GL_DEBUG_SEVERITY_LOW) {
lg::info("[{}] OpenGL message 0x{:X} S{:X} T{:X}: {}", g_current_render, id, source, type,
@ -338,8 +337,8 @@ void OpenGLRenderer::finish_screenshot(const std::string& output_name,
}
// set alpha. For some reason, image viewers do weird stuff with alpha.
for (auto& x : buffer) {
x |= 0xff000000;
for (auto& px : buffer) {
px |= 0xff000000;
}
file_util::write_rgba_png(output_name, buffer.data(), width, height);
}

View File

@ -47,7 +47,7 @@ void blend_sky_fast(u8 intensity, u8* out, const u8* in, u32 size) {
SkyBlendStats SkyBlendCPU::do_sky_blends(DmaFollower& dma,
SharedRenderState* render_state,
ScopedProfilerNode& prof) {
ScopedProfilerNode& /*prof*/) {
SkyBlendStats stats;
Timer sky_timer;

View File

@ -1013,13 +1013,15 @@
(copy-vis-files "MAI")
(goal-src-sequence
"levels/"
:deps ;; no idea what these depend on, make it depend on the whole engine
("out/obj/default-menu.o"
;;"out/obj/darkcave-obs.o"
)
"maincave/cavecrystal-light.gc"
"darkcave/darkcave-obs.gc"
"maincave/maincave-obs.gc"
"maincave/maincave-part.gc"
"maincave/spiderwebs.gc"
@ -1053,13 +1055,6 @@
"maincave-vis"
)
; (goal-src-sequence
; "levels/"
; :deps ;; no idea what these depend on, make it depend on the whole engine
; ("out/obj/default-menu.o" "out/obj/cavecrystal-light.o")
; "darkcave/darkcave-obs.gc"
; )
;;;;;;;;;;;;;;;;;;;;;
;; snow mountain