JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2.03k stars 615 forks source link

Is <OpenJK dir>/ui/menudef.h used at all? #225

Closed B-Keeper closed 11 years ago

B-Keeper commented 11 years ago

Not a bug, just a question, but what is the exact purpose of the menudef.h in the 'ui' dir outside of the 'code' dir? Since there's a ui/menudef.h inside the main source dir, I decided to remove the "external" one and see if I can build OpenJK. And it built just fine.

The commit message of the said file ("Copied missing file from xbox dump.") makes it even more interesting, since as far as I know, the XBox version had been uploaded by mistake, and should contain no code that is necessary to build the PC version of the game.

So, what does that header do?

Razish commented 11 years ago

That header is loaded at runtime for the .menu preprocessor

Try putting #define MY_TRUE 1 in there, and using MY_TRUE in a .menu file =] It's also used in gamecode, so the defines will be shared between code and menu. This makes it easier to add menu items like type ITEM_TYPE_BUTTON instead of e.g. type 7

eezstreet commented 11 years ago

You need it to be included with the assets in order for it to load names such as ITEM_TYPE_BUTTON et al correctly.

Sent from my Windows Phone


From: B-Keepermailto:notifications@github.com Sent: ‎5/‎9/‎2013 8:46 PM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Subject: [OpenJK] Is /ui/menudef.h used at all? (#225)

Not a bug, just a question, but what is the exact purpose of the menudef.h in the 'ui' dir outside of the 'code' dir? Since there's a ui/menudef.h inside the main source dir, I decided to remove the "external" one and see if I can build OpenJK. And it built just fine.

The commit message of the said file ("Copied missing file from xbox dump.") makes it even more interesting, since as far as I know, the XBox version had been uploaded by mistake, and should contain no code that is necessary to build the PC version of the game.

So, what does that header do?


Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/225

B-Keeper commented 11 years ago

If it's loaded at runtime, how come it's not present in the game assets? I've checked all the PK3s of both JO and JA, neither of them had it.

And why is a separate one needed instead of using the one in code/ui?

xycaleth commented 11 years ago

Look harder ;) In JKA, it's in assets1.pk3: ui/jamp/menudef.h. For JK2, it's in assets1.pk3: ui/jk2mp/menudef.h

eezstreet commented 11 years ago

It IS the one in the repo, just moved.

Sent from my Windows Phone


From: B-Keepermailto:notifications@github.com Sent: ‎5/‎10/‎2013 6:05 AM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Cc: eezstreetmailto:eezstreet@live.com Subject: Re: [OpenJK] Is /ui/menudef.h used at all? (#225)

If it's loaded at runtime, how come it's not present in the game assets? I've checked all the PK3s of both JO and JA, neither of them had it.

And why is a separate one needed instead of using the one in code/ui?


Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/225#issuecomment-17712900

B-Keeper commented 11 years ago

@xycaleth : I see, so it's for MP only. They are indeed there, I just completely ignored that dir since I'm generally only interested in SP.

@eezstreet : Okay then, so it's "just there". :)

eezstreet commented 11 years ago

Is used in Sp too

Sent from my Windows Phone


From: B-Keepermailto:notifications@github.com Sent: ‎5/‎10/‎2013 8:06 AM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Cc: eezstreetmailto:eezstreet@live.com Subject: Re: [OpenJK] Is /ui/menudef.h used at all? (#225)

@xycaleth : I see, so it's for MP only. They are indeed there, I just completely ignored that dir since I'm generally only interested in SP.

@eezstreet : Okay then, so it's "just there". :)


Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/225#issuecomment-17716746