FreeBSD Bugzilla – Attachment 191798 Details for
Bug 226910
games/sdlpop: update to 1.18.1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
sdlpop.patch (text/plain), 6.25 KB, created by
Piotr Kubaj
on 2018-03-25 08:45:29 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Piotr Kubaj
Created:
2018-03-25 08:45:29 UTC
Size:
6.25 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 465490) >+++ Makefile (working copy) >@@ -3,7 +3,7 @@ > > PORTNAME= sdlpop > DISTVERSIONPREFIX= v >-DISTVERSION= 1.17 >+DISTVERSION= 1.18.1 > CATEGORIES= games > > MAINTAINER= pkubaj@anongoth.pl >Index: distinfo >=================================================================== >--- distinfo (revision 465490) >+++ distinfo (working copy) >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1509967343 >-SHA256 (NagyD-SDLPoP-v1.17_GH0.tar.gz) = aa4b254ab80b889a6db491b41c4f83467124d932cc0836e5979fa73b6c49a94d >-SIZE (NagyD-SDLPoP-v1.17_GH0.tar.gz) = 3713129 >+TIMESTAMP = 1521967106 >+SHA256 (NagyD-SDLPoP-v1.18.1_GH0.tar.gz) = 8032c47fad4b73021d636ead510bbc1ab5106cff77103e331ad0f32a49a13946 >+SIZE (NagyD-SDLPoP-v1.18.1_GH0.tar.gz) = 614791 >Index: files/patch-seg009.c >=================================================================== >--- files/patch-seg009.c (revision 465490) >+++ files/patch-seg009.c (working copy) >@@ -1,6 +1,6 @@ >---- seg009.c.orig 2017-02-05 07:38:56 UTC >+--- seg009.c.orig 2018-03-17 16:33:14 UTC > +++ seg009.c >-@@ -152,7 +152,7 @@ static FILE* open_dat_from_root_or_data_dir(const char >+@@ -192,7 +192,7 @@ static FILE* open_dat_from_root_or_data_ > // if failed, try if the DAT file can be opened in the data/ directory, instead of the main folder > if (fp == NULL) { > char data_path[POP_MAX_PATH]; >@@ -7,45 +7,45 @@ > - snprintf(data_path, sizeof(data_path), "data/%s", filename); > + snprintf(data_path, sizeof(data_path), "%%DATADIR%%/%s", filename); > >- // verify that this is a regular file and not a directory (otherwise, don't open) >- struct stat path_stat; >-@@ -1644,7 +1644,7 @@ const int max_sound_id = 58; >+ if (!file_exists(data_path)) { >+ find_exe_dir(); >+@@ -1755,7 +1755,7 @@ const int max_sound_id = 58; > char** sound_names = NULL; > > void load_sound_names() { >-- const char* names_path = "data/music/names.txt"; >-+ const char* names_path = "%%DATADIR%%/music/names.txt"; >+- const char* names_path = locate_file("data/music/names.txt"); >++ const char* names_path = locate_file("%%DATADIR%%/music/names.txt"); > if (sound_names != NULL) return; > FILE* fp = fopen(names_path,"rt"); > if (fp==NULL) return; >-@@ -1692,7 +1692,7 @@ sound_buffer_type* load_sound(int index) { >- const char* ext=exts[i]; >- struct stat info; >- >-- snprintf(filename, sizeof(filename), "data/music/%s.%s", sound_name(index), ext); >-+ snprintf(filename, sizeof(filename), "%%DATADIR%%/music/%s.%s", sound_name(index), ext); >- // Skip nonexistent files: >- if (stat(filename, &info)) >- continue; >-@@ -1933,7 +1933,7 @@ int __pascal far check_sound_playing() { >- // seg009:38ED >- void __pascal far set_gr_mode(byte grmode) { >+@@ -1805,7 +1805,7 @@ sound_buffer_type* load_sound(int index) >+ fp = fopen(filename, "rb"); >+ } >+ if (fp == NULL && !skip_normal_data_files) { >+- snprintf(filename, sizeof(filename), "data/music/%s.ogg", sound_name(index)); >++ snprintf(filename, sizeof(filename), "%%DATADIR%%/music/%s.ogg", sound_name(index)); >+ fp = fopen(locate_file(filename), "rb"); >+ } >+ if (fp == NULL) { >+@@ -2108,7 +2108,7 @@ void __pascal far set_gr_mode(byte grmod >+ SDL_SetHint(SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING, "1"); >+ #endif > if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_NOPARACHUTE | >-- SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC ) != 0) { >-+ SDL_INIT_GAMECONTROLLER) != 0) { >+- SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC ) != 0) { >++ SDL_INIT_GAMECONTROLLER) != 0) { > sdlperror("SDL_Init"); > quit(1); > } >-@@ -1957,7 +1957,7 @@ void __pascal far set_gr_mode(byte grmode) { >- pop_window_width, pop_window_height, flags); >- renderer_ = SDL_CreateRenderer(window_, -1 , SDL_RENDERER_ACCELERATED ); >+@@ -2147,7 +2147,7 @@ void __pascal far set_gr_mode(byte grmod >+ #endif >+ } > >-- SDL_Surface* icon = IMG_Load("data/icon.png"); >-+ SDL_Surface* icon = IMG_Load("%%DATADIR%%/icon.png"); >+- SDL_Surface* icon = IMG_Load(locate_file("data/icon.png")); >++ SDL_Surface* icon = IMG_Load(locate_file("%%DATADIR%%/icon.png")); > if (icon == NULL) { > sdlperror("Could not load icon"); > } else { >-@@ -2109,7 +2109,7 @@ void load_from_opendats_metadata(int resource_id, cons >+@@ -2364,7 +2364,7 @@ void load_from_opendats_metadata(int res > if (len >= 5 && filename_no_ext[len-4] == '.') { > filename_no_ext[len-4] = '\0'; // terminate, so ".DAT" is deleted from the filename > } >@@ -53,4 +53,4 @@ > + snprintf(image_filename,sizeof(image_filename),"%%DATADIR%%/%s/res%d.%s",filename_no_ext, resource_id, extension); > if (!use_custom_levelset) { > //printf("loading (binary) %s",image_filename); >- fp = fopen(image_filename, "rb"); >+ fp = fopen(locate_file(image_filename), "rb"); >Index: pkg-plist >=================================================================== >--- pkg-plist (revision 465490) >+++ pkg-plist (working copy) >@@ -369,6 +369,9 @@ > %%DATADIR%%/LEVELS/res2013.bin > %%DATADIR%%/LEVELS/res2014.bin > %%DATADIR%%/LEVELS/res2015.bin >+%%DATADIR%%/MIDISND1.DAT >+%%DATADIR%%/MIDISND2.DAT >+%%DATADIR%%/PRINCE/res1.bin > %%DATADIR%%/PRINCE/res10.bin > %%DATADIR%%/PRINCE/res150.pal > %%DATADIR%%/PRINCE/res151.png >@@ -1046,26 +1049,5 @@ > %%DATADIR%%/levels-test/05-stacked-gates > %%DATADIR%%/levels-test/07-jump > %%DATADIR%%/levels-test/12-shadow >-%%DATADIR%%/music/cutscene_before_2_4_6_12.ogg >-%%DATADIR%%/music/cutscene_before_8_9.ogg >-%%DATADIR%%/music/cutscene_not_much_time_left.ogg >-%%DATADIR%%/music/embrace.ogg >-%%DATADIR%%/music/end_level_4_and_killed_by_shadow.ogg >-%%DATADIR%%/music/fight_death.ogg >-%%DATADIR%%/music/find_mirror_and_find_shadow.ogg >-%%DATADIR%%/music/floating.ogg >-%%DATADIR%%/music/guard_death_and_obtaining_the_sword.ogg >-%%DATADIR%%/music/intro_theme.ogg >-%%DATADIR%%/music/killed_Jaffar.ogg >-%%DATADIR%%/music/life_potion.ogg >-%%DATADIR%%/music/meet_Jaffar.ogg >+%%DATADIR%%/light.png > %%DATADIR%%/music/names.txt >-%%DATADIR%%/music/out_of_time.ogg >-%%DATADIR%%/music/potion.ogg >-%%DATADIR%%/music/regular_death.ogg >-%%DATADIR%%/music/story_1_absence.ogg >-%%DATADIR%%/music/story_2_princess.ogg >-%%DATADIR%%/music/story_3_Jaffar_enters.ogg >-%%DATADIR%%/music/story_4_Jaffar_leaves.ogg >-%%DATADIR%%/music/story_5_level_end_and_merge_with_shadow.ogg >-%%DATADIR%%/music/won.ogg
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 226910
: 191798