Prince 1 and 1/2 - a new mod

Post Reply
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Prince 1 and 1/2 - a new mod

Post by dmitrys »

Hi. My name is Dmitry. I have recently discovered SDLPOP and decided to learn how it works. Prince Of Persia was the second PC game I have ever played in the early 1990s. The first game I played was Barbarian which had horrible controls (F1-12 keys) but POP was the game that left a lasting impression for me. I liked POP2 and many improvements it made, but it the dynamic did not feel quite the same as POP1. SDLPOP, written in C, made it really easy to understand how the game engine works.

About 9 months ago I have stumbled on the "Repetition of Time" POP mod and I was amazed how much the author was able to change in the game without actually touching the game engine. This mod in addition to POP2 left me wondering how POP1 can be improved. From there I found this forum and the popot.org site. I have been anonymously lurking for a while since joining the forum required a site password and I have learned a lot about the game here.

So what started as a code playground a few months ago eventually became a full mod. I am not too creative with names so I refer to it as "Prince 1 and 1/2" or "Unofficial prince 1.5". I think the mod is original in a way that you do not have to be an expert player to complete it. Most of the levels are not that much more difficult than the original game. But rather it focuses on changes to the gameplay through custom events, potions and the story line. The boss (Vizier) became much more difficult because in POP1 it was barely more difficult than the fat guard. You do need to know some tricks to get all the potions without which it could be tricky to finish the last couple of levels. There is also a way to change several major events in the game from level 9 on that requires a trick.

The changes involve secrets rooms, more characters/guards, more interactions with the shadow, numerous new potions, additional checkpoints and more. The kid slows down and becomes less responsive with less than 3 hit points. He does not swallow potions anymore. There are numerous subtle changes to guards' logic. Kid can take/put away the sword with the Alt button before entering a sword fight. There are changes to kid's movements in certain modes that work the same way as POP2...

Some levels have not been changed much but the majority of them have either a secret or some special events. Levels in the middle and the end of the game are very different. The first couple of levels are not that different but I promise it gets more interesting as the game progresses. The secondary goal was to get rid of many behaviors that allow players to pass the game in less than 15 minutes so speed runs should be much more challenging, but you might surprise me.

I have borrowed some graphics from the popot.org and a couple of mods as well as used Falcury's positional audio. Lighting effect has been used from SDLPOP on multiple levels as well as custom level palettes. Some ideas from "Repetition of Time" and "POP2" have been used. All the credits has been given in the docs\readme.txt file. If you are the author of those mods/graphics and you are not okay with me using them, let me know.

UPDATE: I updated the attachments to fix a bug. The ZIP file is a version for Windows and the TAR.GZ file is a version for Linux. You would need to install SDL2 in linux

Code: Select all

sudo apt-get install libsdl2-image-dev
Download here:
https://www.popot.org/custom_levels.php?mod=0000232

Old versions:
Spoiler: show
Windows:
prince_one_and_half.zip
(1.57 MiB) Downloaded 137 times

Linux:
prince_one_and_half.tar.gz
(1.03 MiB) Downloaded 107 times

Older version (October 5th, 2020):
Spoiler: show
Windows:
prince_one_and_half.zip
(1.57 MiB) Downloaded 134 times

Linux:
prince_one_and_half.tar.gz
(1.03 MiB) Downloaded 118 times
Last edited by Falcury on January 4th, 2021, 3:02 pm, edited 5 times in total.
Reason: Added link to mod page on popot.org
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1782
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince 1 and 1/2 - a new mod

Post by atrueprincefanfrom18 »

From your description, I am sure you have done some wonderful MOD and I would definitely try to play this one. I was wanting to have some mod which was similar to Repetition Of Time and/or kinda different than normal mods. That's great that you used SDLPoP as engine and made a custom mod. Nice attempt!
dmitrys wrote: October 2nd, 2020, 6:04 am The secondary goal was to get rid of many behaviors that allow players to pass the game in less than 15 minutes so speed runs should be much more challenging, but you might surprise me.
I promise I will try to surprise you finding some bugs and tricks ;)
I even found some bugs in Repetition Of Time, if you see the threads from here.

P.S: Welcome to the forum, there are lot of interesting things on the forum that are being discussed, you can take part and let us know something which we don't know!

P.P.S: Have you tried my mods? Don't try my first mods, as I didn't have any idea, how to create any, still I tried my best to create those. Maybe you can try Magic Of Persia, Amogh Levelset 1, Amogh Levelset 2 and Time Is The Key. You will find those here.

Also, is it possible for you to put the source code as well? I am using Ubuntu 18.04 and I would have to compile to play it.
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: Prince 1 and 1/2 - a new mod

Post by dmitrys »

You can find the source code here. UPDATED: https://github.com/dstarosta/prince_one_and_half

You would probably need to use binary files from the original SDLPOP as my custom build process rearranged some folders around to clean things up and is using DOS 8+3 file name convention for all files. At first I tried to have the DOS version of the executable to work the same way as SDLPOP but then the modifications got way too complicated to do that.

I will definitely check out your mods.

P.S. I also found a bug in the Repetition of Time on the level where you can get through the gate next to the chomper that kills the shadow. And I do have a few intentional bugs in the mod.
Last edited by dmitrys on October 3rd, 2020, 6:33 am, edited 1 time in total.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1782
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince 1 and 1/2 - a new mod

Post by atrueprincefanfrom18 »

No problem, we don't need custom levels to run on DOSBox now, SDLPoP is fine.

Thanks for the source code. Maybe after playing it (hopefully in next few days) I will look into how you did such nice fixes.

I was just trying Level 1 and it's really brilliant. Guard detects you when you are near and turns and take actions. You can't jump through the guards (I tried but I can't really confirm). Also the guard can be on two screens as well. Nice improvements and it really gave a shock when the guard turned! I wasn't expecting that at all!

Edit: You can change GitHub forum board link to viewtopic.php?f=73&t=4606 this instead... Currently it goes to the forum and NOT the topic. It may be hard for new people to find this topic just in case new modders post new mods here.
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: Prince 1 and 1/2 - a new mod

Post by dmitrys »

You found some of the changes in guards behavior quickly. In the original game guards tried to hit jumping kid too soon. Now they wait a little more and the distance control is randomized so even if you found the perfect frame, it will not work every time. They also now feel when kid is close behind them. They also can survive 2 story falls given enough hitpoints.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1782
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince 1 and 1/2 - a new mod

Post by atrueprincefanfrom18 »

Nice! Ok, can you tell me how to compile the game? I am getting few errors:

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(&section_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
What do I have to do? I tried

Code: Select all

$ make all
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: Prince 1 and 1/2 - a new mod

Post by dmitrys »

This is the output I get in the Dev-C++ 5.11 IDE. You need SDL2, SDL2_Image and SDL2_Mixer libraries for SDLPOP to compile.

The code that throws the warnings looks like standard SDLPOP code, not the custom lines. Did you follow these instructions?
https://github.com/NagyD/SDLPoP#gnulinux

Code: Select all

Compiling project changes...
--------
- Project Filename: D:\Development\custom_prince\src\port_release.dev
- Compiler Name: TDM-GCC 4.9.2 32-bit Release

Building makefile...
--------
- Filename: D:\Development\custom_prince\src\Makefile.win
- Resource File: D:\Development\custom_prince\src\port_release_private.res

Processing makefile...
--------
- Makefile Processor: D:\Dev-Cpp\MinGW64\bin\mingw32-make.exe
- Command: mingw32-make.exe -f "D:\Development\custom_prince\src\Makefile.win" all

gcc.exe -c main.c -o main.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c seg008.c -o seg008.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c seg007.c -o seg007.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c seg009.c -o seg009.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c seg000.c -o seg000.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c seg003.c -o seg003.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c seg006.c -o seg006.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c data.c -o data.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c seg001.c -o seg001.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c seg002.c -o seg002.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c seg004.c -o seg004.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c seg005.c -o seg005.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c seqtbl.c -o seqtbl.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c replay.c -o replay.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c options.c -o options.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c lighting.c -o lighting.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c screenshot.c -o screenshot.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c menu.c -o menu.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c midi.c -o midi.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c opl3.c -o opl3.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

gcc.exe -c stb_vorbis.c -o stb_vorbis.o -I"D:/Dev-Cpp/MinGW64/include" -I"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"D:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -m32 -Wall -std=gnu99 -O2

windres.exe -i port_release_private.rc -F pe-i386 --input-format=rc -o port_release_private.res -O coff 

gcc.exe main.o seg008.o seg007.o seg009.o seg000.o seg003.o seg006.o data.o seg001.o seg002.o seg004.o seg005.o seqtbl.o replay.o options.o lighting.o screenshot.o menu.o midi.o opl3.o stb_vorbis.o port_release_private.res -o ../prince.exe -L"D:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib32" -static-libgcc -mwindows -l"mingw32" -l"SDL2main" -l"SDL2.dll" -l"SDL2_image" -l"SDL2_mixer" -m32 -s


Compilation results...
--------
- Errors: 0
- Warnings: 0
- Output Filename: D:\Development\custom_prince\prince.exe
- Output Size: 349 KiB
- Compilation Time: 14.02s

User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1782
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince 1 and 1/2 - a new mod

Post by atrueprincefanfrom18 »

Yes, as of now I can compile any SDLPoP source code using

Code: Select all

$ make all
and have all the necessary files installed. I am playing on Wine as of now, but the audio is not good, when compiled and running the ./prince and not ./prince.exe makes sure everything gets perfect.
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1782
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince 1 and 1/2 - a new mod

Post by atrueprincefanfrom18 »

Brilliant mod! I could go till Level 8, and timer ran out on Level 9... Amazing mod! After I can compile on Linux, I'll upload all the videos of it. It's just too briliant!
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: Prince 1 and 1/2 - a new mod

Post by dmitrys »

I am glad you are liking the mod.

I created another Github repo where I took the SDLPOP 1.20 codebase and only replaced *.h, *.c and POP DAT files. See if you can compile it.
https://github.com/dstarosta/prince_one_and_half
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1782
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince 1 and 1/2 - a new mod

Post by atrueprincefanfrom18 »

dmitrys wrote: October 2nd, 2020, 3:45 pm See if you can compile it.
https://github.com/dstarosta/prince_one_and_half
This works, and I am able to run the game, but I think it's always with megahit.
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: Prince 1 and 1/2 - a new mod

Post by dmitrys »

Cheats are definitely disabled on Windows when you run "prince.exe". There is a "cheats.cmd" file but that would not work in Linux.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1782
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince 1 and 1/2 - a new mod

Post by atrueprincefanfrom18 »

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(&section_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.
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: Prince 1 and 1/2 - a new mod

Post by dmitrys »

You are right. SDLPOP has data folder in lowercase. Light effects on levels 6-9 are probably not going to work without that fix.

Update: I fixed "data" and "saved" folder name casing and pushed the changes.
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1782
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Prince 1 and 1/2 - a new mod

Post by atrueprincefanfrom18 »

dmitrys wrote: October 3rd, 2020, 7:01 am Update: I fixed "data" and "saved" folder name casing and pushed the changes.
Thanks. I'm stuck at Level 12... How on earth to merge with shadow/appear tiles/move to next level?!
I'm uploading till Level 11 in next few hours and I have found a bug in Level 9, don't know if that was intentional or not.
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
Post Reply