Refactoring the universe generation code.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3334 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
Meep-Eep
2009-11-21 21:04:45 +00:00
parent 7d3e5b3511
commit 76d4261313
77 changed files with 6520 additions and 5236 deletions
+27
View File
@@ -1,3 +1,30 @@
Note: this file (still) describes the way in which various things were
generated in the original source. It is still useful, but there are some
changes:
- all of this functionality used to be handled through a single function,
either the function returned by GenerateIP(), or GenerateRandomIP().
Now, there is a structure GenerateFunctions, which contains a function
for each of the type of generation. See generate.h.
- most functions don't use the global variables pSolarSysState, pOrbitalDesc,
and pPlanetDesc anymore. Instead, where these are needed, they are passed
along through a parameter.
Files related to this system:
- planets/generate.h
Defines GenerateFunctions.
- planets/generate/gendefault.c
Default generation functions for when no specific one is specified.
- planets/generate/gen*.c
Specific generation functions.
- gendef.c
Glue code.
This file should eventually be updated to reflect the new system.
See the file 'orggenerate' for a description on how the system originally
worked.
============================================================================
The various universe related game data is generated through a call
to a solar system dependant generation function.
This function is of type PLAN_GEN_FUNC, which is a typedef to