Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 4 (modified by landauf, 16 years ago) (diff)

FAQ

TracNav(TracNav/TOC_Development)?


Where's the makefile?

We use CMake? as build system. Read the wikipage? for more information.

This Styleguide shit is a joke, right? My code just has to work!

No, you're code has to work AND be readable and understandable. Of course every piece of code can be understood somehow, but we don't want to puzzle. So, please, write your code in a common form. The styleguide? helps you on this topic.

I can't commit anything

You have to checkout? the repository via https. Http is anonymous and therefore can't be used to commit something.

What's that COUT(x) crap?

COUT(level) is a macro that works almost exactly like std::cout. The number inside the parentheses denotes the level of the output. Read this for more information.

I don't get no output in my console/logfile/shell

First you have to use COUT to send output to those devices. Then you have to ensure the maximal output level of the concerned device is ≥ the level of your output. You can configure those maximal levels in the config file.

There's a possible third problem: If your output comes too early (before the game has started) and the level of your output is > 2, it wont be displayed by default. If it's just for debuging purpose, change the value temporarily in util/OutputHandler.cc (constructor). If your output is really important for the game, use a lower level.

I have to call a function requesting a 'MultiType' but all I've got is an int/float/string/whatever

Just pass your variable to the function. MultiType? is a class accepting almost all types of variables. C++ will do an implicit conversion. That's exactly the point about the MultiType: no matter what you've got, you can call that fuing function.

I have to calculate something complicated, are there some helping functions?

Probably not, but check out Math? to be sure. If your calculation is of common interest, please put it into util/Math.h too.

I have to manipulate a string, are there some helping functions?

Maybe, check out String? to get an overview of the existing functions. If your stringmanipulation function is of common interest, please put it into util/String.h too.

I want to split a string into multiple tokens

Use SubString?.

How can I convert a string into a number?

Use Convert? or MultiType?.

How can I convert typeX into typeY?

Use Convert? or MultiType? too, it's almighty.