Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions songs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ STD_REVERB = 0

$(MID_BUILDDIR)/%.o: $(MID_SUBDIR)/%.s
@echo "$(AS) <flags> -I sound -o $@ $<"
dos2unix $<

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol, so yeah this needs to be set if you are on windows?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep,
from tools/preproc/asm_file.cpp

i tried updating it but it randomly segfaults so this is the solution im using to work around that

// Asserts that the rest of the line is empty and moves to the next one.
void AsmFile::ExpectEmptyRestOfLine()
{
    SkipWhitespace();

    if (m_buffer[m_pos] == 0)
    {
        if (m_pos >= m_size)
            RaiseWarning("file doesn't end with newline");
        else
            RaiseError("unexpected null character");
    }
    else if (m_buffer[m_pos] == '\n')
    {
        m_pos++;
        m_lineStart = m_pos;
        m_lineNum++;
    }
    else if (m_buffer[m_pos] == '\r')
    {
        RaiseError("only Unix-style LF newlines are supported");
    }
    else
    {
        RaiseError("junk at end of line");
    }
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the workaround at all.
Either the code gets proper CRLF support or not, but dos2unix is an additional dependency that we don't need.

@$(PREPROC) $< "" | $(CPP) $(CPPFLAGS) - | $(AS) $(ASFLAGS) -o $@ -

$(MID_SUBDIR)/mus_intro.s: %.s: %.mid
Expand Down
2 changes: 1 addition & 1 deletion src/platform/pret_sdl/sdl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <xinput.h>
#endif

#include <SDL.h>
#include <SDL2/SDL.h>

@freshollie freshollie Jan 14, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SDL can be included the normal way if you make the includes use the correct directory for the flags.

Where is your SDL library located to make this work? It is using pkg-config sdl2?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant to set it to wip just because i knew i did this while working on it, but forgot to check the box


#include "global.h"
#include "core.h"
Expand Down
2 changes: 1 addition & 1 deletion tools/_shared/arena_alloc/ArenaAlloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static void memArenaExpand(MemArena *arena, s32 numNewArenas);
// you'll be left with a downcast signed 32 bit value, even in 64bit mode
// Behaviour in: VS Compiler v14.34.31937.0
u64 GetGigabytes(u64 num) {
Comment thread
bitten2up marked this conversation as resolved.
Outdated
return num*1024*1024*1024;
return num*1024*1024;
}

static void *memArenaVirtualAlloc(void* baseAddress, size_t size) {
Expand Down
5 changes: 1 addition & 4 deletions tools/entity_positions/epos.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#if defined(__unix__) || defined(__unix) || \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this can be removed, but what was the reason for it @JaceCear?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would assume msvc

there is defines checking for it, but i would assume we arent compiling the tools in visual studio anyways

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like BriBaSA doesn't like it if it's not there?
1d0c7df

IMO keeping VS compat in turn means theoretical (and in this case practical) independence from GCC, which is a good thing.
I do prefer building with Visual Studio because it outputs proper PDBs, unlike the tool I use to convert GCC's debug info output.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like BriBaSA doesn't like it if it's not there? 1d0c7df

IMO keeping VS compat in turn means theoretical (and in this case practical) independence from GCC, which is a good thing. I do prefer building with Visual Studio because it outputs proper PDBs, unlike the tool I use to convert GCC's debug info output.

ok would !MSVC be a better choice then

(defined(__APPLE__) && defined(__MACH__))
#include <assert.h>
#endif

#include <stdbool.h>
#include <stdio.h>
Expand Down Expand Up @@ -117,4 +114,4 @@ int main(int argc, char **argv)
}

return 0;
}
}