Main > Software Forum

Question on editing Mame.C....

<< < (2/3) > >>

Farmboy90:

--- Quote from: electricd on January 25, 2006, 11:13:06 am ---No i didn't try it...im not really a C guy...more of a VB guy.

 if (settingsloaded || options.skip_disclaimer || ui_display_copyright(artwork_get_ui_bitmap()) == 0)

I understand this to read if settingsloaded = FALSE AND option.skip_disclaimer = FALSE then ui_display_copyright.  Is this accurate?

--- End quote ---

It is not accurate.  That line is saying that if you loaded the settings for this game (implying you played this game before and the message was already displayed) the message will not be displayed.  If settings were not loaded (first time playing this game) then check if the skip_discalimer flag is set.  If that is set then the copyright won't be displayed either.  If it is not set, then the copyright will be displayed.

Semantically it says:
if settingsloaded = TRUE OR options.skip_disclaimer = TRUE OR ui_display_copyright(...) returns 0 THEN...

It is actually coded in kind of a funny way.  A more straightforward way to do it would be to move the ui_display_copyright call to be the first line inside the if statment, and then check the two other flags against 0 instead of 1 like they are now.

electricd:
Ahh...ok then then that makes perfect sense...and since the skip_disclaimer is not available by default, it is always false, hence if the settings are not loaded it will fail the second test and show the copyright.....thanks!  I am going to try out your method and see how it works!

Farmboy90:
Yeah try adding two lines like this:

  { "skip_warnings", NULL, rc_bool, &options.skip_warnings, "0", 0, 0, NULL, "skip displaying the " GAMENOUN " warnings screen" },
  { "skip_disclaimer", NULL, rc_bool, &options.skip_discalimer, "0", 0, 0, NULL, "skip displaying the " GAMENOUN " disclaimer screen" },

electricd:
compiling....

electricd:
Ok keep in mind i am new at editing and troubleshooting C code.  Here is the error I get on compile:

src/windows/config.c:228: error: structure has no member named `skip_discalimer'

src/windows/config.c:228: error: initializer element is not constant
src/windows/config.c:228: error: (near initialization for `opts[47].dest')
src/windows/config.c:228: error: initializer element is not constant
src/windows/config.c:228: error: (near initialization for `opts[47]')
src/windows/config.c:229: error: initializer element is not constant
src/windows/config.c:229: error: (near initialization for `opts[48]')
src/windows/config.c:230: error: initializer element is not constant
src/windows/config.c:230: error: (near initialization for `opts[49]')
src/windows/config.c:231: error: initializer element is not constant
src/windows/config.c:231: error: (near initialization for `opts[50]')
src/windows/config.c:234: error: initializer element is not constant
src/windows/config.c:234: error: (near initialization for `opts[51]')
src/windows/config.c:235: error: initializer element is not constant
src/windows/config.c:235: error: (near initialization for `opts[52]')
src/windows/config.c:236: error: initializer element is not constant
src/windows/config.c:236: error: (near initialization for `opts[53]')
src/windows/config.c:237: error: initializer element is not constant
src/windows/config.c:237: error: (near initialization for `opts[54]')
src/windows/config.c:238: error: initializer element is not constant
src/windows/config.c:238: error: (near initialization for `opts[55]')
src/windows/config.c:239: error: initializer element is not constant
src/windows/config.c:239: error: (near initialization for `opts[56]')
src/windows/config.c:240: error: initializer element is not constant
src/windows/config.c:240: error: (near initialization for `opts[57]')
make: *** [obj/mame/windows/config.o] Error 1

Sounds like maybe I need to define the new options somewhere??

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version