Merged changes from branches/supertux-milestone2-grumbel/ to trunk/supertux/
[supertux.git] / TODO
1 Note: Controversial list of things currently broken and controversial
2 solutions for them.
3
4 Coding Standard
5 ===============
6
7 * no external libraries in src/, they go to external/
8
9 * proper separation between engine and game specific code (especially
10   sound and video handling)
11
12 * normalize #include directives (all refer to top level dir)
13
14 * use SCons instead of CMake
15
16 * make code clean: "-O2", "-g3",
17                      "-ansi",
18                      "-pedantic",
19                      "-Wall",
20                      "-Wextra",
21                      "-Wnon-virtual-dtor",
22                      "-Weffc++",
23                      "-Wconversion",
24                      "-Werror",
25                      "-Wshadow",
26                      "-Wcast-qual",
27                      "-Winit-self", # only works with >= -O1
28                      "-Wno-unused-parameter",
29
30 * do not use raw pointer, especially not for Sprite and Surface
31
32 * properly separate data members and member functions, don't mix them
33   in the same section
34
35 * write namespaces like: "namespace NameSpace {", no newline before the {
36
37 * only do one variable initialization per line, not multiple as its
38   currently often done in initialization list
39
40 * conditional includes should be indended (makes it easier to handle
41   in include optimization):
42
43 #ifdef FOOBAR
44 #  include "foobar.hpp"
45 #endif
46
47 * remove overuse of multi-inheritance 
48
49 * remove overuse of friend'ship
50
51 * maybe mark interfaces as interfaces (ISerializable or SerializableInterface)
52
53 * split files with multiple classes into multiple files with one class each
54
55
56 TODO
57 ====
58
59 * GameObject::RemoveListenerListEntry: Ughs, somebody trying to
60   implement a list class within in the GameObject?!
61
62 * replace random generator with mersene twister and/or move to external/
63
64 * check the code with Valgrind
65
66 * cleanup doxygen comments, use /** */, nothing else
67
68 * static vs anonymous namespace
69
70 * use Vector in Physics for 'a' and 'v'
71
72 * add --datadir DIR (data/) and --userdir DIR (~/.supertux/)
73
74 * make gravity a constant
75
76 * funky side effect of too much global variables: when having a
77   savegame with large or firetux and then starting that game, Tux in
78   the menu background will grow and be visible that way for a fraction
79   of a second
80
81 * write scripts for include sorting and include guard checking that
82   can be run automatically
83
84 * md5.hpp and random_generator.hpp could go to external/
85
86 * rename Vector -> Vector2f
87
88 * get rid of global SDL_Screen* screen variable
89
90 * identify all global variables and make them ugly (g_ or globals::)
91
92 * get rid of SCREEN_WIDTH/SCREEN_HEIGHT
93
94 * is version.h actually needed?
95
96 * resolution menu entry moves the wrong way around
97
98 * write scripts to automatically check for:
99
100   - all includes are relative to top level dir
101
102   - include guards are proper
103
104 * move SVN to http://code.google.com (maybe one day)
105
106 * move bugtracker to http://code.google.com (much simpler, less useless)
107
108
109 # EOF #