Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_sample - use bogo settings (Read 1533 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.