dmitrys wrote: ↑October 3rd, 2020, 6:36 am
Cheats are definitely disabled on Windows when you run "prince.exe". There is a "cheats.cmd" file but that would not work in Linux.
No, I'm extremely sorry, it's not megahit, all good.
However there are some warning errors with replay.c and screenshot.c. Maybe because you have changed the save path or something like that.
But anyway, now I can record and upload videos.
The output after compilation:
Code: Select all
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c main.c
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c data.c
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c seg000.c
In file included from /usr/include/unistd.h:1172:0,
from common.h:38,
from seg000.c:21:
In function ‘read’,
inlined from ‘load_game’ at seg000.c:2549:6:
/usr/include/x86_64-linux-gnu/bits/unistd.h:42:9: warning: call to ‘__read_chk_warn’ declared with attribute warning: read called with bigger length than size of the destination buffer
return __read_chk_warn (__fd, __buf, __nbytes, __bos0 (__buf));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c seg001.c
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c seg002.c
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c seg003.c
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c seg004.c
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c seg005.c
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c seg006.c
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c seg007.c
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c seg008.c
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c seg009.c
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c seqtbl.c
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c replay.c
replay.c: In function ‘read_replay_header’:
replay.c:89:2: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(magic, 3, 1, fp);
^~~~~~~~~~~~~~~~~~~~~~
replay.c:98:2: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&class, sizeof(class), 1, fp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
replay.c:110:2: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(header->levelset_name, sizeof(char), len_read, fp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
replay.c:115:2: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(header->implementation_name, sizeof(char), len_read, fp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
replay.c: In function ‘load_replay’:
replay.c:893:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&savestate_size, sizeof(savestate_size), 1, replay_fp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
replay.c:894:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(savestate_buffer, savestate_size, 1, replay_fp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
replay.c:899:4: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(§ion_size, sizeof(section_size), 1, replay_fp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
replay.c:900:4: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(replay_options_sections[i].replay_data, section_size, 1, replay_fp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
replay.c:905:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&start_level, sizeof(start_level), 1, replay_fp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
replay.c:906:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&saved_random_seed, sizeof(saved_random_seed), 1, replay_fp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
replay.c:907:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&num_replay_ticks, sizeof(num_replay_ticks), 1, replay_fp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
replay.c:908:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(moves, num_replay_ticks, 1, replay_fp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c options.c
options.c: In function ‘ini_load’:
options.c:68:3: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
fscanf(f, " ;%*[^\n]");
^~~~~~~~~~~~~~~~~~~~~~
options.c:69:3: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
fscanf(f, " \n");
^~~~~~~~~~~~~~~~
options.c: In function ‘load_dos_exe_modifications’:
options.c:645:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(exe_memory, (size_t) info.st_size, 1, fp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c lighting.c
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c screenshot.c
screenshot.c: In function ‘draw_extras’:
screenshot.c:459:40: warning: ‘%d’ directive output may be truncated writing between 1 and 5 bytes into a region of size 4 [-Wformat-truncation=]
snprintf(room_num, sizeof(room_num), "%d", drawn_room);
^~
screenshot.c:459:39: note: directive argument in the range [0, 65535]
snprintf(room_num, sizeof(room_num), "%d", drawn_room);
^~~~
In file included from /usr/include/stdio.h:862:0,
from common.h:29,
from screenshot.c:21:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 2 and 6 bytes into a destination of size 4
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c menu.c
menu.c: In function ‘calculate_exe_crc’:
menu.c:2060:5: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(buffer, 1, (size_t)size, exe_file);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c midi.c
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c opl3.c
gcc -D_REENTRANT -I/usr/include/SDL2 -Wall -std=gnu99 -O2 -c stb_vorbis.c
gcc main.o data.o seg000.o seg001.o seg002.o seg003.o seg004.o seg005.o seg006.o seg007.o seg008.o seg009.o seqtbl.o replay.o options.o lighting.o screenshot.o menu.o midi.o opl3.o stb_vorbis.o -o ../prince -lSDL2_image -lSDL2 -lm
Also, I think you need to change the lowercase folder names to uppercase, such as data to DATA. On Linux, data and DATA are not the same. I'm sure you need to change that because I saw this message:
Code: Select all
Could not load icon: Couldn't open ./icon.png
Can't load sprites from resource 1000.
IMG_Load (lighting_mask): Couldn't open ./DATA/LIGHT.DAT
when I started first level.