Skip to main content
Topic: foo_sample - use bogo settings (Read 542 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_sample - use bogo settings

I've been looking through the SDK and noticed that in foo_sample's preferences.cpp there are some bogo settings.

Let's say I wanted to have it so that the Test command in mainmenu.cpp prints out:

"This is a sample menu command. Bogo 1 is currently 1337."

What would be the simplest way of accomplishing this?

Re: foo_sample - use bogo settings

Reply #1
Ok, I solved it. The simplest way to gain access to those bogo settings is:

- Put the bogo GUIDs in "guid.h"
- Put your extern declarations in "globals.h" and include that in mainmenu.cpp
- In preferences.cpp, change the cfg_uint declarations so that they aren't static

That last step especially was tripping me up. The fact that they were declared as static was resulting in unresolved external symbol errors and causing the build to fail.

SimplePortal 1.0.0 RC1 © 2008-2020