Duke4.net Forums: What function looks for Ion Fury's game data in Eduke32? - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

What function looks for Ion Fury's game data in Eduke32?

#1

Hi,

Whenever I load pre-compiled eduke32 or even when I compile customized versions; the exec always looks for Ion Fury's game data first outside of the base directory.
This is especially annoying when I compile the Ion Fury executable or to make a custom exec with a custom name or when modifying the GNUMakeFile in the root of EDuke32 source code directory, and after the game exec is compiled, the name of the exec shows it given name alongside the game title name itself, (e.g. Duke Nukem 3D - Eduke32)


Here's my custom target in ED's source code in my modified GNUMakeFile file below:


ifeq ($(DN3D),2)
APPBASENAME := DN3D
APPNAME := Duke Nukem 3D
NETCODE := 0
POLYMER := 0
RETAIL_MENU := 0
STANDALONE := 0
USE_LIBVPX := 0
endif



Here's what the game exec reported prior to launching the Steam Edition of Ion Fury and its exec is looking for relevant game data outside of the base directory below, stock eduke does the same thing, which I want to comment this function out in the source code so it can no longer be used.
'Using T:/Program Files (x86)/SteamLibrary/steamapps/common/Ion Fury/ for game data'

Only this time it should ONLY be looking for Duke Nukem's game data in the local base directory below, instead of looking for Ion Fury's Game Data:
'C:\Users\AdamLee\Documents\dn3d\ for game data'

Does this function only used for Ion Fury and/or build engine games and how do I comment this out from source too? below:
Checksumming fury.grp... Done


How can I make sure that the game only shows like in Ion Fury's exec, rather than having two different names displayed in the title bar in the launch dialog and what do these do in the GNUMakeFile below:?

RETAIL_MENU := 0
STANDALONE := 0
RETAIL_MENU := 0
NETCODE := 0



I just had to be verbose in asking what to do in regards of what I want to do with the source code of eduke32, because [post=' my previous post']https://forums.duke4...__1#entry345752[/post] didn't get any replies when the last time I looked!
0

#2

RETAIL_MENU = 1 alters the main menu. For instance, it disables the "New Game" option while inside a game, instead displaying a "Resume Game" option instead, and it also enables the Save Setup menu not normally accessible inside Duke 3D.

STANDALONE = 1 disables every single hardcoded Duke 3D behavior and additionally disables the game autodetection. Obviously this breaks Duke 3D. The autodetection includes FURY.
Thus if you want to only disable game autodetection without breaking Duke 3D, define a new flag and add some #ifdefs into grpscan.cpp at the right places.

NETCODE relates to all multiplayer code. Setting it to 0 removes all related code from the binary. If my assumption is correct, this doesn't really have any effect other than make the resulting binary smaller, as multiplayer is currently non-functional anyways, but I would love to be corrected if this is not the case.

LIBVPX is used for displaying IVF cutscenes ingame when OpenGL mode is active, which is an alternative to ANM file cutscenes. Setting it to 0 disables said code and renders the executable unable to display said IVF cutscenes.

This post has been edited by Doom64hunter: 17 August 2020 - 02:01 AM

0

#3

Also, if you want to edit the startup menu, the data for the Windows binary is located in "./source/duke3d/rsrc" . Linux and Mac use StartGTK, the code of which is located somewhere else, I haven't actually looked into that yet.

When compiling with FURY=1, the following is set inside the GNUMakefile:
ifeq ($(FURY),1)
    ifeq ($(PLATFORM),WINDOWS)
        duke3d_rsrc := $(duke3d_root)/rsrc/fury
    endif
    duke3d_obj := $(obj)/fury
endif

Which sets the resource folder to the fury subfolder, resulting in the minimalist startup dialogue you see. Create your own subfolder and you can edit the Windows startup layout to your heart's content.
0

#4

View PostDoom64hunter, on 17 August 2020 - 02:10 AM, said:

Also, if you want to edit the startup menu, the data for the Windows binary is located in "./source/duke3d/rsrc" . Linux and Mac use StartGTK, the code of which is located somewhere else, I haven't actually looked into that yet.

When compiling with FURY=1, the following is set inside the GNUMakefile:
ifeq ($(FURY),1)
    ifeq ($(PLATFORM),WINDOWS)
        duke3d_rsrc := $(duke3d_root)/rsrc/fury
    endif
    duke3d_obj := $(obj)/fury
endif

Which sets the resource folder to the fury subfolder, resulting in the minimalist startup dialogue you see. Create your own subfolder and you can edit the Windows startup layout to your heart's content.



Thanks, I've been wondering how that all works out

This post has been edited by DukeMeister44: 17 August 2020 - 07:00 AM

0

#5

View PostDoom64hunter, on 17 August 2020 - 01:59 AM, said:


STANDALONE = 1 disables every single hardcoded Duke 3D behavior and additionally disables the game autodetection. Obviously this breaks Duke 3D. The autodetection includes FURY.
Thus if you want to only disable game autodetection without breaking Duke 3D, define a new flag and add some #ifdefs into grpscan.cpp at the right places.



I'm not entirely familiar with C/C++ at all other than reading the code blocks in the GNUMakeFile.
I know this might be a bit much, however, how do I define a new flag in the grpscan.cpp file, Could you show me an example of the flag that I am looking for since I had mentioned that I am not familiar with C/C++?
0

#6

View PostDoom64hunter, on 17 August 2020 - 01:59 AM, said:


STANDALONE = 1 disables every single hardcoded Duke 3D behavior and additionally disables the game autodetection. Obviously this breaks Duke 3D. The autodetection includes FURY.
Thus if you want to only disable game autodetection without breaking Duke 3D, define a new flag and add some #ifdefs into grpscan.cpp at the right places.



Could you give me examples of said #ifdefs i can add into grpscan.cpp?
0

#7

You might want to check out source/duke3d/src/common.cpp, that has the common paths for all the groupfiles in the directory structure Steam and GOG uses on Windows, OSX, and Linux.
1

#8

View Postcomorbidity, on 04 September 2020 - 08:53 AM, said:

You might want to check out source/duke3d/src/common.cpp, that has the common paths for all the groupfiles in the directory structure Steam and GOG uses on Windows, OSX, and Linux.



If I comment out all the steam versions in common.cpp, will this break eduke32 or will load the files as it should in the base directory without crashing or silently exit the main thread without outputting a message on my computer?
0

#9

I've never modified common.cpp but I'd have to assume that it would net the behavior you're looking for if it's commented out or "#ifdef FURY"'d appropriately. Worst thing you could do is minorly break a new binary/executable; just make a backup of the original file so you can revert, make a backup of the modified file (so you don't lose it after having to perform a git stash in the future), and have at it.
0

#10

View Postcomorbidity, on 10 September 2020 - 04:32 PM, said:

I've never modified common.cpp but I'd have to assume that it would net the behavior you're looking for if it's commented out or "#ifdef FURY"'d appropriately. Worst thing you could do is minorly break a new binary/executable; just make a backup of the original file so you can revert, make a backup of the modified file (so you don't lose it after having to perform a git stash in the future), and have at it.


Yeah, I wanted to tinker with common.cpp and find out if I can get it with only Duke Nukem 3D by cutting out the scan functionality for Ion; however leaving it so that it still looks
for duke3d's game data and nothing else and also I have the CD version of duke3d.

Naturally I thought that If I make a new Global Profile for duke3d in the GNUmakefile with the same default values as Ion Fury and similar with dialog resource files in the GNUmakefile used in Ion fury but copied and placed in a separate folder in this directory duke3d/rsrc/dn3d.

Everytime when I have compiled dn3d exec using msys2 32bit and then drag the exec to a folder containing dn3d game data, the exec crashes and reports that my copy of dn3d is corrupt and/or shows that certain things are missing, which aren't when I run the same game in DOSBox and runs perfectly, I have the report where things have gone south for me. :) ;)


So here's the changes that I made in the makefile below:

GLOBAL PROFILES:
ifeq ($(FURY),1)
    APPBASENAME := fury
    APPNAME := Ion Fury
    NETCODE := 0
    POLYMER := 0
    RETAIL_MENU := 1
    STANDALONE := 1
    USE_LIBVPX := 0
endif

ifeq ($(DN3D),2)
    APPBASENAME := DN3D
    APPNAME := Duke Nukem 3D
    NETCODE := 0
    POLYMER := 0
    RETAIL_MENU := 0
    STANDALONE := 0
    USE_LIBVPX := 0
endif


REPORT FILE:
Duke Nukem 3D r8904-0b0e9923c
Built Sep 13 2020 21:42:12, GCC 10.2.0, 32-bit
Using C:/Users/Adam Lee/Pictures/DN3DINST/ for game data
Using C:/Users/Adam Lee/AppData/Roaming/Duke Nukem 3D/ for game data
Running on Windows 8.1 (build 6.3.9600)
Initialized 1ms system timer
CPUID Vendor ID: GenuineIntel
CPU: Intel® Core™ i5-3570K CPU @ 3.40GHz
Initializing SDL 2.0.12
Searching for game data...
Warning: could not find main data file "(none)"!
Compiling: GAME.CON (99639 bytes)
Including: DEFS.CON (28893 bytes)
Including: USER.CON (36960 bytes)
USER.CON:753: warning: sound 261 already defined (hydro43.voc)
GAME.CON: In state `blimphitstate':
GAME.CON:157: warning: expected action, found define.
GAME.CON: In actor `ORGANTIC':
GAME.CON:1923: warning: found `else' with no `if'
GAME.CON: In state `pigshootenemystate':
GAME.CON:2817: warning: found `else' with no `if'
Found 4 warning(s), 0 error(s).
Compiled 49820 bytes in 48ms
Cache object array initialized with 1024 entries.
Initialized 96.0M cache
Sound kickhit.voc(#0) not found!
Sound ricochet.voc(#1) not found!
Sound bulithit.voc(#2) not found!
Sound pistol.voc(#3) not found!
Sound clipout.voc(#4) not found!
Sound clipin.voc(#5) not found!
Sound chaingun.voc(#6) not found!
Sound rpgfire.voc(#7) not found!
Sound poolbal1.voc(#8) not found!
Sound bombexpl.voc(#9) not found!
Sound catfire.voc(#10) not found!
Sound shrinker.voc(#11) not found!
Sound shrink.voc(#12) not found!
Sound pbombbnc.voc(#13) not found!
Sound bombexpl.voc(#14) not found!
Sound lsrbmbpt.voc(#15) not found!
Sound lsrbmbwn.voc(#16) not found!
Sound bombexpl.voc(#17) not found!
Sound ventbust.voc(#18) not found!
Sound glass.voc(#19) not found!
Sound glashevy.voc(#20) not found!
Sound shorted.voc(#21) not found!
Sound splash.voc(#22) not found!
Sound hlminhal.voc(#23) not found!
Sound hlmexhal.voc(#24) not found!
Sound gasp.voc(#25) not found!
Sound slirec06.voc(#26) not found!
Sound KICKHEAD.VOC(#27) not found!
Sound pissing.voc(#28) not found!
Sound GMEOVR05.VOC(#29) not found!
Sound CHEER.VOC(#30) not found!
Sound WAITIN03.voc(#33) not found!
Sound slimat.voc(#34) not found!
Sound teleport.voc(#35) not found!
Sound drink18.voc(#36) not found!
Sound damn03.voc(#37) not found!
Sound exert.voc(#38) not found!
Sound hartbeat.voc(#39) not found!
Sound wetfeet.voc(#40) not found!
Sound DMDEATH.VOC(#41) not found!
Sound land02.voc(#42) not found!
Sound ductwlk.voc(#43) not found!
Sound yes.voc(#45) not found!
Sound scuba.voc(#48) not found!
Sound jetpakon.voc(#49) not found!
Sound jetpaki.voc(#50) not found!
Sound jetpakof.voc(#51) not found!
Sound duknuk14.voc(#56) not found!
Sound chokn12.voc(#61) not found!
Sound lizspit.voc(#64) not found!
Sound shake2a.voc(#67) not found!
Sound fire09.voc(#68) not found!
Sound squish.voc(#69) not found!
Sound teleport.voc(#70) not found!
Sound gbelev01.voc(#71) not found!
Sound thsuk13a.voc(#72) not found!
Sound gbelev02.voc(#73) not found!
Sound slidoor.voc(#74) not found!
Sound subway.voc(#75) not found!
Sound switch.voc(#76) not found!
Sound fan.voc(#77) not found!
Sound groovy02.voc(#78) not found!
Sound flush.voc(#79) not found!
Sound hover.voc(#80) not found!
Sound quake.voc(#81) not found!
Sound alert.voc(#82) not found!
Sound monitor.voc(#83) not found!
Sound onboard.voc(#84) not found!
Sound reactor.voc(#85) not found!
Sound compamb.voc(#86) not found!
Sound geargrnd.voc(#87) not found!
Sound bubblamb.voc(#88) not found!
Sound machamb.voc(#89) not found!
Sound drip3.voc(#90) not found!
Sound wind54.voc(#91) not found!
Sound drip3.voc(#92) not found!
Sound steamhis.voc(#93) not found!
Sound barmusic.voc(#95) not found!
Sound bos1rm.voc(#96) not found!
Sound bos1rg.voc(#97) not found!
Sound chaingun.voc(#98) not found!
Sound bos1pn.voc(#99) not found!
Sound bos1dy.voc(#100) not found!
Sound b2atk01.voc(#101) not found!
Sound b2rec03.voc(#102) not found!
Sound b2atk02.voc(#103) not found!
Sound b2pain03.voc(#104) not found!
Sound b2die03.voc(#105) not found!
Sound teleport.voc(#106) not found!
Sound getsom1a.voc(#107) not found!
Sound b3die03g.voc(#108) not found!
Sound shotgun7.voc(#109) not found!
Sound roam06.voc(#110) not found!
Sound predrg.voc(#111) not found!
Sound gblasr01.voc(#112) not found!
Sound predpn.voc(#113) not found!
Sound preddy.voc(#114) not found!
Sound predrm.voc(#115) not found!
Sound chaingun.voc(#116) not found!
Sound predrg.voc(#117) not found!
Sound predpn.voc(#118) not found!
Sound preddy.voc(#119) not found!
Sound roam29.voc(#120) not found!
Sound pigrg.voc(#121) not found!
Sound shotgun7.voc(#122) not found!
Sound pigpn.voc(#123) not found!
Sound pigdy.voc(#124) not found!
Sound jetpaki.voc(#125) not found!
Sound pigrg.voc(#126) not found!
Sound gblasr01.voc(#127) not found!
Sound pigpn.voc(#128) not found!
Sound pigdy.voc(#129) not found!
Sound snakrm.voc(#130) not found!
Sound snakrg.voc(#131) not found!
Sound snakatA.voc(#132) not found!
Sound snakpn.voc(#133) not found!
Sound snakdy.voc(#134) not found!
Sound commrm.voc(#135) not found!
Sound commrg.voc(#136) not found!
Sound commat.voc(#137) not found!
Sound commpn.voc(#138) not found!
Sound commdy.voc(#139) not found!
Sound octarm.voc(#140) not found!
Sound octarg.voc(#141) not found!
Sound octaat1.voc(#142) not found!
Sound octapn.voc(#143) not found!
Sound octady.voc(#144) not found!
Sound turrrm.voc(#145) not found!
Sound turrrg.voc(#146) not found!
Sound turrat.voc(#147) not found!
Sound grind.voc(#148) not found!
Sound slidie03.voc(#149) not found!
Sound b3roam01.voc(#150) not found!
Sound b3pain04.voc(#151) not found!
Sound b3atk01.voc(#152) not found!
Sound b3rec03g.voc(#153) not found!
Sound rpgfire.voc(#154) not found!
Sound commsp.voc(#155) not found!
Sound thud.voc(#156) not found!
Sound snakatB.voc(#157) not found!
Sound thud.voc(#158) not found!
Sound octaat2.voc(#159) not found!
Sound octaat1.voc(#160) not found!
Sound turrpn.voc(#161) not found!
Sound turrdy.voc(#162) not found!
Sound sliroa02.voc(#163) not found!
Sound FSCRM10.voc(#164) not found!
Sound opendoor.voc(#165) not found!
Sound edoor10.voc(#166) not found!
Sound edoor11.voc(#167) not found!
Sound 2bwild.voc(#168) not found!
Sound shotgnck.voc(#169) not found!
Sound grind.voc(#170) not found!
Sound enghum.voc(#171) not found!
Sound lava06.voc(#172) not found!
Sound bubblamb.voc(#173) not found!
Sound phonbusy.voc(#174) not found!
Sound roam22.voc(#175) not found!
Sound b3atk01.voc(#176) not found!
Sound myself3a.voc(#177) not found!
Sound monolith.voc(#178) not found!
Sound hydro50.voc(#179) not found!
Sound con03.voc(#180) not found!
Sound !prison.voc(#181) not found!
Sound vpiss2.voc(#182) not found!
Sound secret.voc(#183) not found!
Sound amb81b.voc(#184) not found!
Sound roam98b.voc(#185) not found!
Sound h2orush2.voc(#186) not found!
Sound projrun.voc(#187) not found!
Sound blank.voc(#188) not found!
Sound pay02.voc(#189) not found!
Sound onlyon03.voc(#190) not found!
Sound rides09.voc(#192) not found!
Sound doomed16.voc(#193) not found!
Sound fire09.voc(#194) not found!
Sound letsrk03.voc(#195) not found!
Sound ready2a.voc(#196) not found!
Sound ripem08.voc(#197) not found!
Sound !pig.voc(#198) not found!
Sound rockin02.voc(#199) not found!
Sound pain39.voc(#200) not found!
Sound damnit04.voc(#201) not found!
Sound dance01.voc(#202) not found!
Sound damnit04.voc(#203) not found!
Sound roam58.voc(#204) not found!
Sound roam67.voc(#205) not found!
Sound cool01.voc(#206) not found!
Sound whrsit05.voc(#207) not found!
Sound COMEON02.voc(#208) not found!
Sound pain87.VOC(#209) not found!
Sound getitm19.voc(#210) not found!
Sound gasps07.voc(#211) not found!
Sound monitor.voc(#212) not found!
Sound goggle12.voc(#213) not found!
Sound damn03.voc(#214) not found!
Sound knuckle.voc(#215) not found!
Sound ahh04.voc(#216) not found!
Sound gulp01.voc(#217) not found!
Sound ahmuch03.voc(#218) not found!
Sound WPNSEL21.VOC(#219) not found!
Sound h2ogrgl2.voc(#220) not found!
Sound wansom4a.voc(#221) not found!
Sound AMESS06.voc(#222) not found!
Sound BITCHN04.voc(#223) not found!
Sound HOLYCW01.voc(#224) not found!
Sound HOLYSH02.voc(#225) not found!
Sound IMGOOD12.voc(#226) not found!
Sound PIECE02.voc(#227) not found!
Sound GOTHRT01.voc(#228) not found!
Sound needed03.voc(#229) not found!
Sound !boss.voc(#230) not found!
Sound WARAMB13.VOC(#231) not found!
Sound WARAMB21.VOC(#232) not found!
Sound WARAMB23.VOC(#233) not found!
Sound WARAMB29.VOC(#234) not found!
Sound FORCE01.VOC(#235) not found!
Sound QUAKE06.VOC(#236) not found!
Sound TERMIN01.VOC(#237) not found!
Sound BORN01.VOC(#238) not found!
Sound NOBODY01.VOC(#239) not found!
Sound CHEW05.VOC(#240) not found!
Sound MUSTDIE.voc(#241) not found!
Sound DEFEATED.VOC(#242) not found!
Sound item15.voc(#243) not found!
Sound flyby.voc(#244) not found!
Sound DSCREM04.voc(#245) not found!
Sound thud.voc(#246) not found!
Sound mice3.voc(#247) not found!
Sound bulithit.voc(#248) not found!
Sound bonus.voc(#249) not found!
Sound BOOBY04.voc(#250) not found!
Sound DIESOB03.voc(#251) not found!
Sound lookin01.voc(#252) not found!
Sound pigrm.voc(#253) not found!
Sound killme.voc(#254) not found!
Sound ENGHUM.VOC(#255) not found!
Sound hydro22.voc(#256) not found!
Sound hydro24.voc(#257) not found!
Sound hydro27.voc(#258) not found!
Sound hydro34.voc(#259) not found!
Sound hydro40.voc(#260) not found!
Sound hydro43.voc(#261) not found!
Sound vault04.voc(#262) not found!
Sound LETGOD01.VOC(#263) not found!
Sound HAIL01.VOC(#264) not found!
Sound BLOWIT01.VOC(#265) not found!
Sound EATSHT01.VOC(#266) not found!
Sound FACE01.VOC(#267) not found!
Sound INHELL01.VOC(#268) not found!
Sound SUKIT01.VOC(#269) not found!
Sound dscrem18.voc(#270) not found!
Sound pisses01.voc(#271) not found!
Sound aswtch23.voc(#272) not found!
Sound happen01.voc(#273) not found!
Sound dscrem15.voc(#274) not found!
Sound dscrem16.voc(#275) not found!
Sound dscrem17.voc(#276) not found!
Sound CTRLRM25.VOC(#277) not found!
Sound ktitx.voc(#278) not found!
Sound hlidle03.voc(#279) not found!
Sound LIZSHIT3.VOC(#280) not found!
Sound monolith.voc(#281) not found!
Sound hydro50.voc(#282) not found!
Sound slhtch01.voc(#283) not found!
Sound rip01.voc(#284) not found!
Sound jones04.voc(#285) not found!
Sound adoor1.voc(#286) not found!
Sound adoor2.voc(#287) not found!
Sound GRABBAG.VOC(#288) not found!
Sound name01.voc(#289) not found!
Sound r&r01.voc(#290) not found!
Sound lani05.voc(#291) not found!
Sound lani08.voc(#292) not found!
Sound laniduk2.voc(#293) not found!
Sound WHIPYU01.VOC(#294) not found!
Sound gunhit2.voc(#295) not found!
Sound headrip3.VOC(#296) not found!
Sound buckle.VOC(#297) not found!
Sound jetp2.VOC(#298) not found!
Sound zipper2.voc(#299) not found!
Sound news.voc(#300) not found!
Sound whistle.voc(#301) not found!
Sound 2ride06.voc(#302) not found!
Sound freeze.voc(#303) not found!
Sound pain54.voc(#304) not found!
Sound pain75.voc(#305) not found!
Sound pain93.voc(#306) not found!
Sound pain68.voc(#307) not found!
Sound wind54.voc(#308) not found!
ERROR: No palette found.


They're changes I want to make to the common.cpp file without bricking my custom build of eduke32, so what should I do next to block off the bit where it scans for Ion Fury in common.cpp?
0

#11

--- a/source/duke3d/src/common.cpp
+++ b/source/duke3d/src/common.cpp
@@ -582,10 +582,11 @@ static void Duke_AddSteamPaths(const char *basepath)
     // WWII GI - Steam
     Bsnprintf(buf, sizeof(buf), "%s/steamapps/common/World War II GI/WW2GI", basepath);
     addsearchpath_user(buf, SEARCHPATH_WW2GI);
-
+    if (FURY) {
     // Ion Fury - Steam
     Bsnprintf(buf, sizeof(buf), "%s/steamapps/common/Ion Fury", basepath);
     addsearchpath_user(buf, SEARCHPATH_FURY);
+    }
 }
 #endif
 #endif
@@ -742,7 +743,7 @@ void G_AddSearchPaths(void)
         Bstrncpy(suffix, "/WW2GI", remaining);
         addsearchpath_user(buf, SEARCHPATH_WW2GI);
     }
-
+    if (FURY) {
     // Ion Fury - Steam
     bufsize = sizeof(buf);
     if (Paths_ReadRegistryValue(R"(SOFTWARE\Microsoft\Windows\CurrentVersion\
Uninstall\Steam App 562860)", "InstallLocation", buf, &bufsize))
@@ -756,6 +757,7 @@ void G_AddSearchPaths(void)
     {
         addsearchpath_user(buf, SEARCHPATH_FURY);
     }
+    }
 #endif
 #endif
 #endif

Posted Image
(I have the Steam version of Ion Maiden installed)
0

#12

View Postcomorbidity, on 13 September 2020 - 06:10 PM, said:

--- a/source/duke3d/src/common.cpp
+++ b/source/duke3d/src/common.cpp
@@ -582,10 +582,11 @@ static void Duke_AddSteamPaths(const char *basepath)
     // WWII GI - Steam
     Bsnprintf(buf, sizeof(buf), "%s/steamapps/common/World War II GI/WW2GI", basepath);
     addsearchpath_user(buf, SEARCHPATH_WW2GI);
-
+    if (FURY) {
     // Ion Fury - Steam
     Bsnprintf(buf, sizeof(buf), "%s/steamapps/common/Ion Fury", basepath);
     addsearchpath_user(buf, SEARCHPATH_FURY);
+    }
 }
 #endif
 #endif
@@ -742,7 +743,7 @@ void G_AddSearchPaths(void)
         Bstrncpy(suffix, "/WW2GI", remaining);
         addsearchpath_user(buf, SEARCHPATH_WW2GI);
     }
-
+    if (FURY) {
     // Ion Fury - Steam
     bufsize = sizeof(buf);
     if (Paths_ReadRegistryValue(R"(SOFTWARE\Microsoft\Windows\CurrentVersion\
Uninstall\Steam App 562860)", "InstallLocation", buf, &bufsize))
@@ -756,6 +757,7 @@ void G_AddSearchPaths(void)
     {
         addsearchpath_user(buf, SEARCHPATH_FURY);
     }
+    }
 #endif
 #endif
 #endif

Posted Image
(I have the Steam version of Ion Maiden installed)


This the dialog I made for DN3D and everytime I click the start button, in this case its an OK button, the game crashes, am I doing something wrong?

Attached thumbnail(s)

  • Attached Image: DN3D_2jOxC0Kvsv.png

0

#13

Start with pristine, known good sources, get a functional build, take it from there.
0

#14

View Postcomorbidity, on 14 September 2020 - 10:03 AM, said:

Start with pristine, known good sources, get a functional build, take it from there.


Whats's Pristine?

Should I just start again because that's all I have been doing, this isn't helping me get what I need to be done, all I want to know is how do I make eduke only look for dn3d's game data and nothing else like with Ion Fury.

I feel like an idiot because of my own lack of knowledge on C/C++
0

User is offline   Hendricks266 

  • Weaponized Autism

  #15

Pristine means unmodified. Probably what you want to do is disable all GRP checksums that are scanned for other than the 1.5 Atomic GRP, and all path detection except Duke 3D paths, and then copy the Fury .rc files over the mainline ones. You disable code by surrounding it with #if 0 and #endif: struct of checksums in grpscan.cpp, and the path scanning in common.cpp. I would not recommend the "if (FURY)" way because that is not a valid semantic at that point in initialization.
0

#16

View PostHendricks266, on 14 September 2020 - 01:23 PM, said:

Pristine means unmodified. Probably what you want to do is disable all GRP checksums that are scanned for other than the 1.5 Atomic GRP, and all path detection except Duke 3D paths, and then copy the Fury .rc files over the mainline ones. You disable code by surrounding it with #if 0 and #endif: struct of checksums in grpscan.cpp, and the path scanning in common.cpp. I would not recommend the "if (FURY)" way because that is not a valid semantic at that point in initialization.


So what lines do I disable, in regards to the checksumming functions?
I need you to point out and/or give me an example of what I should do since I don't know what I am doing.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #17

diff --git a/source/duke3d/src/common.cpp b/source/duke3d/src/common.cpp
index d269f526f..08e78266e 100644
--- a/source/duke3d/src/common.cpp
+++ b/source/duke3d/src/common.cpp
@@ -571,6 +571,7 @@ static void Duke_AddSteamPaths(const char *basepath)
     addsearchpath_user(buf, SEARCHPATH_REMOVE);
 #endif
 
+#if 0
     // NAM - Steam
 #if defined EDUKE32_OSX
     Bsnprintf(buf, sizeof(buf), "%s/steamapps/common/Nam/Nam.app/Contents/Resources/Nam.boxer/C.harddisk/NAM"
, basepath);
@@ -586,6 +587,7 @@ static void Duke_AddSteamPaths(const char *basepath)
     // Ion Fury - Steam
     Bsnprintf(buf, sizeof(buf), "%s/steamapps/common/Ion Fury", basepath);
     addsearchpath_user(buf, SEARCHPATH_FURY);
+#endif
 }
 #endif
 #endif
@@ -610,10 +612,12 @@ void G_AddSearchPaths(void)
     Duke_Add_GOG_Atomic_Linux(buf);
     Paths_ParseXDGDesktopFilesFromGOG(homepath, "Duke_Nukem_3D_Atomic_Edition", Duke_Add_GOG_Atomic_Linux);
 
+#if 0
     // Ion Fury - GOG.com
     Bsnprintf(buf, sizeof(buf), "%s/GOG Games/ION Fury", homepath);
     Fury_Add_GOG_Linux(buf);
     Paths_ParseXDGDesktopFilesFromGOG(homepath, "ION_Fury", Fury_Add_GOG_Linux);
+#endif
 
     Xfree(homepath);
 
@@ -721,6 +725,7 @@ void G_AddSearchPaths(void)
         addsearchpath_user(buf, SEARCHPATH_REMOVE);
     }
 
+#if 0
     // NAM - Steam
     bufsize = sizeof(buf);
     if (Paths_ReadRegistryValue(R"(SOFTWARE\Microsoft\Windows\CurrentVersion\
Uninstall\Steam App 329650)", "InstallLocation", buf, &bufsize))
@@ -759,6 +764,7 @@ void G_AddSearchPaths(void)
 #endif
 #endif
 #endif
+#endif
 }
 
 void G_CleanupSearchPaths(void)
diff --git a/source/duke3d/src/grpscan.cpp b/source/duke3d/src/grpscan.cpp
index 0a113d530..cf41d800f 100644
--- a/source/duke3d/src/grpscan.cpp
+++ b/source/duke3d/src/grpscan.cpp
@@ -40,10 +40,13 @@ static void process_vacapp15(int32_t crcval);
 //    name                                     crc          size      flags                         dependency  scriptname     postprocessing
 static internalgrpinfo_t const internalgrpfiles[] =
 {
+#if 0
     { "Duke Nukem 3D",                         DUKE13_CRC,  26524524, GAMEFLAG_DUKE,                         0, NULL, NULL},
     { "Duke Nukem 3D (South Korean Censored)", DUKEKR_CRC,  26385383, GAMEFLAG_DUKE,                         0, NULL, NULL},
+#endif
     { "Duke Nukem 3D: Atomic Edition",         DUKE15_CRC,  44356548, GAMEFLAG_DUKE,                         0, NULL, NULL},
     { "Duke Nukem 3D: Atomic Edition (WT)",    DUKEWT_CRC,  44356548, GAMEFLAG_DUKE,                         0, NULL, NULL},
+#if 0
     { "Duke Nukem 3D: Plutonium Pak",          DUKEPP_CRC,  44348015, GAMEFLAG_DUKE,                         0, NULL, NULL},
     { "Duke Nukem 3D Shareware 0.99",          DUKE099_CRC, 9690241,  GAMEFLAG_DUKE|GAMEFLAG_DUKEBETA,       0, NULL, NULL},
     { "Duke Nukem 3D Shareware 1.0",           DUKE10_CRC,  10429258, GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE,      0, NULL, NULL},
@@ -69,6 +72,7 @@ static internalgrpinfo_t const internalgrpfiles[] =
     { "NAPALM",                                NAPALM_CRC,  44365728, GAMEFLAG_NAM|GAMEFLAG_NAPALM,          0, NULL, NULL},
     { "WWII GI",                               WW2GI_CRC,   77939508, GAMEFLAG_WW2GI,                        0, NULL, NULL},
     { "Platoon Leader",                        PLATOONL_CRC, 37852572, GAMEFLAG_WW2GI|GAMEFLAG_ADDON,        WW2GI_CRC, "PLATOONL.DEF", NULL},
+#endif
 };
 #endif
 

0

#18

Thanks for correcting me; was going to revise my post with a `#if (FURY>0)` version. Glad someone that knows the codebase lended a hand :)
0

#19

View PostHendricks266, on 14 September 2020 - 05:36 PM, said:

diff --git a/source/duke3d/src/common.cpp b/source/duke3d/src/common.cpp
index d269f526f..08e78266e 100644
--- a/source/duke3d/src/common.cpp
+++ b/source/duke3d/src/common.cpp
@@ -571,6 +571,7 @@ static void Duke_AddSteamPaths(const char *basepath)
     addsearchpath_user(buf, SEARCHPATH_REMOVE);
 #endif
 
+#if 0
     // NAM - Steam
 #if defined EDUKE32_OSX
     Bsnprintf(buf, sizeof(buf), "%s/steamapps/common/Nam/Nam.app/Contents/Resources/Nam.boxer/C.harddisk/NAM"
, basepath);
@@ -586,6 +587,7 @@ static void Duke_AddSteamPaths(const char *basepath)
     // Ion Fury - Steam
     Bsnprintf(buf, sizeof(buf), "%s/steamapps/common/Ion Fury", basepath);
     addsearchpath_user(buf, SEARCHPATH_FURY);
+#endif
 }
 #endif
 #endif
@@ -610,10 +612,12 @@ void G_AddSearchPaths(void)
     Duke_Add_GOG_Atomic_Linux(buf);
     Paths_ParseXDGDesktopFilesFromGOG(homepath, "Duke_Nukem_3D_Atomic_Edition", Duke_Add_GOG_Atomic_Linux);
 
+#if 0
     // Ion Fury - GOG.com
     Bsnprintf(buf, sizeof(buf), "%s/GOG Games/ION Fury", homepath);
     Fury_Add_GOG_Linux(buf);
     Paths_ParseXDGDesktopFilesFromGOG(homepath, "ION_Fury", Fury_Add_GOG_Linux);
+#endif
 
     Xfree(homepath);
 
@@ -721,6 +725,7 @@ void G_AddSearchPaths(void)
         addsearchpath_user(buf, SEARCHPATH_REMOVE);
     }
 
+#if 0
     // NAM - Steam
     bufsize = sizeof(buf);
     if (Paths_ReadRegistryValue(R"(SOFTWARE\Microsoft\Windows\CurrentVersion\
Uninstall\Steam App 329650)", "InstallLocation", buf, &bufsize))
@@ -759,6 +764,7 @@ void G_AddSearchPaths(void)
 #endif
 #endif
 #endif
+#endif
 }
 
 void G_CleanupSearchPaths(void)
diff --git a/source/duke3d/src/grpscan.cpp b/source/duke3d/src/grpscan.cpp
index 0a113d530..cf41d800f 100644
--- a/source/duke3d/src/grpscan.cpp
+++ b/source/duke3d/src/grpscan.cpp
@@ -40,10 +40,13 @@ static void process_vacapp15(int32_t crcval);
 //    name                                     crc          size      flags                         dependency  scriptname     postprocessing
 static internalgrpinfo_t const internalgrpfiles[] =
 {
+#if 0
     { "Duke Nukem 3D",                         DUKE13_CRC,  26524524, GAMEFLAG_DUKE,                         0, NULL, NULL},
     { "Duke Nukem 3D (South Korean Censored)", DUKEKR_CRC,  26385383, GAMEFLAG_DUKE,                         0, NULL, NULL},
+#endif
     { "Duke Nukem 3D: Atomic Edition",         DUKE15_CRC,  44356548, GAMEFLAG_DUKE,                         0, NULL, NULL},
     { "Duke Nukem 3D: Atomic Edition (WT)",    DUKEWT_CRC,  44356548, GAMEFLAG_DUKE,                         0, NULL, NULL},
+#if 0
     { "Duke Nukem 3D: Plutonium Pak",          DUKEPP_CRC,  44348015, GAMEFLAG_DUKE,                         0, NULL, NULL},
     { "Duke Nukem 3D Shareware 0.99",          DUKE099_CRC, 9690241,  GAMEFLAG_DUKE|GAMEFLAG_DUKEBETA,       0, NULL, NULL},
     { "Duke Nukem 3D Shareware 1.0",           DUKE10_CRC,  10429258, GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE,      0, NULL, NULL},
@@ -69,6 +72,7 @@ static internalgrpinfo_t const internalgrpfiles[] =
     { "NAPALM",                                NAPALM_CRC,  44365728, GAMEFLAG_NAM|GAMEFLAG_NAPALM,          0, NULL, NULL},
     { "WWII GI",                               WW2GI_CRC,   77939508, GAMEFLAG_WW2GI,                        0, NULL, NULL},
     { "Platoon Leader",                        PLATOONL_CRC, 37852572, GAMEFLAG_WW2GI|GAMEFLAG_ADDON,        WW2GI_CRC, "PLATOONL.DEF", NULL},
+#endif
 };
 #endif
 




So do I replace a block of code in common.cpp for this to work and/or add the entire thing in?
0

User is offline   Hendricks266 

  • Weaponized Autism

  #20

This is a .diff file. It is a way of displaying changes made to source code. There are lines that begin with the '+' character. You will want to add those lines to the code in the position they appear. Don't add the + though, that's just for representation in the .diff file.
0

#21

View PostHendricks266, on 16 September 2020 - 07:54 AM, said:

This is a .diff file. It is a way of displaying changes made to source code. There are lines that begin with the '+' character. You will want to add those lines to the code in the position they appear. Don't add the + though, that's just for representation in the .diff file.


msys2 should have `patch` bundled with it.

You can copy the diff contents in the codeblock to a textfile saved in the eduke32 directory and `patch -p1 < diff.file`
0

#22

View Postcomorbidity, on 16 September 2020 - 03:46 PM, said:

msys2 should have `patch` bundled with it.

You can copy the diff contents in the codeblock to a textfile saved in the eduke32 directory and `patch -p1 < diff.file`



I copied the code to Notepad++ and saved the file as Patch.diff and now do I drop the file into the root directory of eduke32 and then apply the patch with msys2?

I just want to be sure that this will work!
0

#23

I'm not intimately familiar with msys2 but however you run `make` or `pacman`, most likely from a command prompt with environment variable presets, would be the way you run `patch -p1 < Patch.diff`

The way the pathing in the file is set up would be from the top level of the eduke32 source directory.

patches can be reversed with `patch -R` in the same manner they were applied.
0

#24

View PostHendricks266, on 14 September 2020 - 05:36 PM, said:

diff --git a/source/duke3d/src/common.cpp b/source/duke3d/src/common.cpp
index d269f526f..08e78266e 100644
--- a/source/duke3d/src/common.cpp
+++ b/source/duke3d/src/common.cpp
@@ -571,6 +571,7 @@ static void Duke_AddSteamPaths(const char *basepath)
     addsearchpath_user(buf, SEARCHPATH_REMOVE);
 #endif
 
+#if 0
     // NAM - Steam
 #if defined EDUKE32_OSX
     Bsnprintf(buf, sizeof(buf), "%s/steamapps/common/Nam/Nam.app/Contents/Resources/Nam.boxer/C.harddisk/NAM"
, basepath);
@@ -586,6 +587,7 @@ static void Duke_AddSteamPaths(const char *basepath)
     // Ion Fury - Steam
     Bsnprintf(buf, sizeof(buf), "%s/steamapps/common/Ion Fury", basepath);
     addsearchpath_user(buf, SEARCHPATH_FURY);
+#endif
 }
 #endif
 #endif
@@ -610,10 +612,12 @@ void G_AddSearchPaths(void)
     Duke_Add_GOG_Atomic_Linux(buf);
     Paths_ParseXDGDesktopFilesFromGOG(homepath, "Duke_Nukem_3D_Atomic_Edition", Duke_Add_GOG_Atomic_Linux);
 
+#if 0
     // Ion Fury - GOG.com
     Bsnprintf(buf, sizeof(buf), "%s/GOG Games/ION Fury", homepath);
     Fury_Add_GOG_Linux(buf);
     Paths_ParseXDGDesktopFilesFromGOG(homepath, "ION_Fury", Fury_Add_GOG_Linux);
+#endif
 
     Xfree(homepath);
 
@@ -721,6 +725,7 @@ void G_AddSearchPaths(void)
         addsearchpath_user(buf, SEARCHPATH_REMOVE);
     }
 
+#if 0
     // NAM - Steam
     bufsize = sizeof(buf);
     if (Paths_ReadRegistryValue(R"(SOFTWARE\Microsoft\Windows\CurrentVersion\
Uninstall\Steam App 329650)", "InstallLocation", buf, &bufsize))
@@ -759,6 +764,7 @@ void G_AddSearchPaths(void)
 #endif
 #endif
 #endif
+#endif
 }
 
 void G_CleanupSearchPaths(void)
diff --git a/source/duke3d/src/grpscan.cpp b/source/duke3d/src/grpscan.cpp
index 0a113d530..cf41d800f 100644
--- a/source/duke3d/src/grpscan.cpp
+++ b/source/duke3d/src/grpscan.cpp
@@ -40,10 +40,13 @@ static void process_vacapp15(int32_t crcval);
 //    name                                     crc          size      flags                         dependency  scriptname     postprocessing
 static internalgrpinfo_t const internalgrpfiles[] =
 {
+#if 0
     { "Duke Nukem 3D",                         DUKE13_CRC,  26524524, GAMEFLAG_DUKE,                         0, NULL, NULL},
     { "Duke Nukem 3D (South Korean Censored)", DUKEKR_CRC,  26385383, GAMEFLAG_DUKE,                         0, NULL, NULL},
+#endif
     { "Duke Nukem 3D: Atomic Edition",         DUKE15_CRC,  44356548, GAMEFLAG_DUKE,                         0, NULL, NULL},
     { "Duke Nukem 3D: Atomic Edition (WT)",    DUKEWT_CRC,  44356548, GAMEFLAG_DUKE,                         0, NULL, NULL},
+#if 0
     { "Duke Nukem 3D: Plutonium Pak",          DUKEPP_CRC,  44348015, GAMEFLAG_DUKE,                         0, NULL, NULL},
     { "Duke Nukem 3D Shareware 0.99",          DUKE099_CRC, 9690241,  GAMEFLAG_DUKE|GAMEFLAG_DUKEBETA,       0, NULL, NULL},
     { "Duke Nukem 3D Shareware 1.0",           DUKE10_CRC,  10429258, GAMEFLAG_DUKE|GAMEFLAG_SHAREWARE,      0, NULL, NULL},
@@ -69,6 +72,7 @@ static internalgrpinfo_t const internalgrpfiles[] =
     { "NAPALM",                                NAPALM_CRC,  44365728, GAMEFLAG_NAM|GAMEFLAG_NAPALM,          0, NULL, NULL},
     { "WWII GI",                               WW2GI_CRC,   77939508, GAMEFLAG_WW2GI,                        0, NULL, NULL},
     { "Platoon Leader",                        PLATOONL_CRC, 37852572, GAMEFLAG_WW2GI|GAMEFLAG_ADDON,        WW2GI_CRC, "PLATOONL.DEF", NULL},
+#endif
 };
 #endif
 



Hey so has this patch worked for your copy of Duke3d and if so what build of eduke32 do you recommend?

This post has been edited by DukeMeister44: 18 September 2020 - 04:33 PM

0

#25

View PostHendricks266, on 16 September 2020 - 07:54 AM, said:

This is a .diff file. It is a way of displaying changes made to source code. There are lines that begin with the '+' character. You will want to add those lines to the code in the position they appear. Don't add the + though, that's just for representation in the .diff file.


Here's a list of things I have done thus far:

1. Applied the patch with patch -p1 < patch.diff to eduke32 source code

2. Patch command outputted a message in Msys2:
Spoiler

3. Attempted to build DN3D @ compile time with make RELEASE=0 -j4 DN3D=2 in msys2, exited with error code 1

4. Replaced an unterminated #ifndef for an #ifdef in common.cpp with Notepad++ In Windows

5. Attempted to compile again with make RELEASE=0 -j4 DN3D=2 in msys2, exited with error code 1, nothing from common.cpp yet

6. Jump to line 532 and find an unterminated #ifdef that should have an #endif at line 551 which I added back in

7. Ran the same command again and no complaints from msys2 and built 2 objects at compile time then linked them as executables, with no stated exit code. (something wrong msys2 :D )

8. Ran it again for the 4th fucking time and run as normal with everything compiled and linked with make RELEASE=1 -j4 DN3D=2 flag to debug it

9. Ran the patched exec applied for DN3D and see if launches correctly with the exec in the same directory as the game itself.

10. the exec crashed and the game didn't load the game (sorry I don't know how to debug the game properly from the msys2 command line :))

11. dn3d report log:
Spoiler


12. Changed the value in the gnumake from RETAIL_MENU := 1 to RETAIL_MENU := 0 under the ($(DN3D),2) global profile

13. ran the same command again in hopes of addressing the problem

14. Ran another test again with make RELEASE=0 -j4 DN3D=2 in msys2

15. in the gnumakefile, I changed the [font="Courier New"STANDALONE := 1[/font] to [font="Courier New"STANDALONE := 0[/font]

16. compile it, test the exec and failed to launch :(

17. another report log:
Spoiler


The game works fine in dosbox and with regular eduke32 but not my build of it is disappointing to say the least, something might be wrong with the patch! ;)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options