Thanks for the info! I'll try to get these changes implemented. That said, I don't think I'll do more work with improving or adding features to my fork. I was toying with the idea of getting proper multiplayer implemented (as in, the state of the gameplay world being in sync between all players), but I realized more and more that's pretty tricky to properly implement with how the original POP code is structured (for instance, guards being defined in two different ways makes it a bit of headache without doing major refactoring). So, I started working on my own POP engine where the code is better suited for a netcode: viewtopic.php?f=69&t=4865David wrote: ↑December 18th, 2021, 8:39 pm When compiling with Dev-C++, I get these warnings:
1. [Warning] passing argument 2 of '_wstat' from incompatible pointer type
on this line:In Dev-C++, the stat functions are defined as:Code: Select all
int result = _wstat(filename_UTF16, _Stat); //Fluffy: Replaced call to wstat() with _wstat(). Is that safe?
I see you use MSVC.Code: Select all
(in <sys/stat.h>) int __cdecl stat(const char *_Filename,struct stat *_Stat); int __cdecl wstat(const wchar_t *_Filename,struct stat *_Stat); int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat); (in <_mingw_stat64.h>) #define _wstat _wstat64i32
MSVC has no wstat(), but defines _wstat() with the same type of second argument as regular stat().
(source).
You could use something like this:2. [Warning] implicit declaration of function 'pow' [-Wimplicit-function-declaration]Code: Select all
#ifdef _MSC_VER int result = _wstat(filename_UTF16, _Stat); #else int result = wstat(filename_UTF16, _Stat); #endif
To fix this, add #include <math.h> .
3. Not a warning, but a related thing in seg000.c:I looked it up, in MSVC you need to #define _USE_MATH_DEFINES to get M_PI from math.h.Code: Select all
#include <math.h> //Fluffy: Added this since we got compile error due to missing M_PI #ifndef M_PI #define M_PI 3.14159265358979323846264f // from CRC #endif
(source)
In SDLPoP.ini these values let me play in full screen:Windows multiplies them by 1.25, because scaling is set to 125%.Code: Select all
pop_window_width = 1536 pop_window_height = 864
The result is a 1920×1080 window, which matches the desktop resolution I use.
You're the main guy behind SDL-PoP, right? Would you be interested in PRs that replace some magic numbers in the code with defines, simplifies some code, or more comments that explain what parts of the code do? The SDL-PoP code (alongside the original Apple II source code) has been an extremely good reference when writing my engine, but parts of the code are pretty hard to parse.
For instance, you've got a line like this:
Code: Select all
coll_tile_left_xpos += 14;
Code: Select all
coll_tile_left_xpos += TILE_SIZEX;