Added a doc dir, with a devel dir for our development docs.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@108 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2002-10-11 00:47:23 +00:00
parent ab7797f817
commit 16698b4bd1
3 changed files with 118 additions and 0 deletions
+112
View File
@@ -0,0 +1,112 @@
battle.c
border.c Draws the screen borders.
build.c
cleanup.c Cleanup routines for when the game is done.
clock.c Manages the game clock.
collide.c Process a collision of objects in combat.
comm.c Handles communication with aliens.
commglue.c Helper functions for communication with aliens.
confirm.c Asks for confirmation on exit.
credits.c Shows the credits after a victory.
cyborg.c Handles combat AI.
demo.c Code for demo mode and game journal.
displist.c
dummy.c
encount.c Handles what to do when a player encounters an alien.
fmv.c Handles video sequences.
galaxy.c Starmap? Hyperspace background?
gameinp.c
gameopt.c Game options menu.
gendef.c Defines functions to be called for generating star systems.
getchar.c Routines for entering characters with the joystick.
globdata.c Sets up global data, creates the main ship, and the radar.
gravity.c Maths regarding gravity in combat.
gravwell.c Handles objects that generate gravity in combat.
grpinfo.c Handles battle groups.
hyper.c Handles hyperspace movement and actions.
init.c Initialization of various game data.
intel.c Passes input of computer or player along (?)
intro.c Alternative functions for beginning and ending sequences
to those in fmv, unused. (PC version?)
ipdisp.c Something with spheres of influence?
load.c Loading a saved game.
loadship.c Loading of ship resource data.
master.c Preloading of all ships?
melee.c All supermelee menu related code.
misc.c Miscelaneous routines related to combat but not directly to
the fighting.
oscill.c Code for the oscilloscope and speech sample progress slider.
(during communication with aliens)
outfit.c Things related to outfiting the starship.
pickmele.c Ship selection in Supermelee (not in Full Game)
pickship.c Ship selection in Full Game (not in Supermelee)
plandata.c Some const data relating stars and planets.
process.c Some combat calculations.
restart.c Main menu (start new, load, supermelee).
save.c Saving of a game.
settings.c The back end of the game options.
setup.c Initialisations for key config, and loading of various
resources.
ship.c Ship movement in combat.
shipstat.c Routines for showing information about ships in combat
(name, crew, energy). (also status.c)
shipyard.c Things related to selection of your companion ships.
sis.c Drawing various game state information (ship, ship name,
captains name, hyperspace coordinates, date, melnorme credits,
landers, storage bays, crew, fuel, game menu)
starbase.c Code for the Earth starbase.
starcon.c Code for various events (Arilou portal, Kohr-Ah genocide,
Pkunk exodus, Thraddash attack Kohr-Ah, Ilwrath attack
Thraddash, Utwig+Supox attack Kohr-Ah, Mycon colonization
attempt, hyperspace ship spawned, zoqfot signal, zoqfot under
attack, Shofixti return, Spathi build shield, Arilou give
the Dnyarri to the Umgah, Yehat rebellion, Slylandro plague
worsening)
starmap.c Code to find a star by it's coordinates and compose star names.
state.c Saving and loading the temporary planet information,
like resource information.
status.c Maintain and draw some information like the captain picture,
crew, energy. (also shipstat.c)
tactrans.c Code for some additional combat events (explosions, dying,
new ship, ion trail, escape).
trans.c
utils.c Various auxiliary utils, code for pausing.
velocity.c Velocity computation routines.
weapon.c Routines for weapons fire in combat.
test.c Sound testing program. (to be deleted?)
build.h
clock.h
coderes.h
collide.h
commglue.h
demo.h
displist.h
element.h
encount.h
globdata.h
hyper.h
ifontres.h
igfxres.h
ikey_con.h
imusicre.h
intel.h
ires_ind.h
isndres.h
istrtab.h
melee.h
nameref.h
races.h
resinst.h
respkg.h
restypes.h
sis.h
sounds.h
starbase.h
starcon.h
state.h
units.h
velocity.h
weapon.h
+6
View File
@@ -0,0 +1,6 @@
Abbreviations used in the code:
IP interplanetary
NPC non-player character
SIS ???
+108
View File
@@ -0,0 +1,108 @@
SCRIPT CONVENTIONS
------------------
The .txt files in the content/comm directories are unlikely to stay in
their current form forever, as it's a rather fragile format. However,
in the the meantime, and for those who seek to edit the script files
(to conform to 3DO, PC, and/or director's cut versions).
This file will describe the format, and how it relates to the source
code in the src/sc2code/comm directory.
The .txt files
--------------
The text files should all have a set of records, optionally separated
by newlines. Each record has a header, then one or more lines of
text.
The header is a hash (#), an identifier in parentheses, and (if it's
an alien voice) a tab, then the name of the file corresponding to that
voice. Alien voices have identifiers in ALL_CAPITAL_LETTERS, while
Zelnick's lines are in_lower_case. Often one line is broken into
several parts - in these cases the full line is knitted together by
the communications code (usually inserting the name of the Captain, or
the flagship, or whatever).
A modest example:
#(HAVING_FUN_WITH_ILWRATH_2) thrad103.wav
The exploding starships! The screaming crew!
The direct hits, the cunning escapes!
These are the moments we live for!
Now we must return to the great battles!
Farewell, Great Teacher.
Zelnick's lines must be ON ONE LINE ONLY; line breaking is handled by
the communication code and anything after the first newline is
IGNORED. So don't do it while repairing his lines, and if you find
one (a lowercase id with multiple lines following it) delete the
newlines and make it all one line.
It appears that newlines may appear in the middle of speeches;
however, most of the lines by aliens have pauses represented by a
single space or tab. It seems reasonable to duplicate this.
When multiple records are used to define a single speech line (as
often happens when they say your name, for instance), only the first
line has an audio file associated with it.
Lines that do not end in a punctuation mark have a "..." added to the
end of them by the communications code - keep that in mind when
debugging the subtitles.
The .h files (src/sc2code/comm)
-------------------------------
Each race has its own directory in src/sc2code/comm, and there is a
file marked strings.h in each directory. This file defines a single
enum which should list every record identifier in the appropriate
race's .txt file over in content/comm/{race}, IN THE PRECISE ORDER
THOSE RECORDS ARE GIVEN. Due to the non-symbolic nature of C, there
is no relation whatsoever between the identifiers in the record and in
the enum (though it would be reasonably straightforward to generate
the strings.h files from the .txt files) The values of the enum are
used in the {racec}.c files in the same directory.
Types of script bugs
--------------------
Script bugs can fall into three broad categories.
- Voice/Speech mismatch. These are easy. The wrong audio file is
associated with this clip. Merely change the clip to make it fit.
If a clip is expected but is not specified, this appears to crash the
game. Example: The Zoq-Fot-Pik's "Goodbye Captain." "See ya." lines
had no clips associated with them, which both caused the game to loop
forever on those lines and misaligned all clips after that so that the
voices did not match the subtitles.
- Subtitling error. These are also easy. The voice and text more or
less match, but the phrasing is slightly different. This is also
easy. Change the text to match. If the speech is *wildly* different,
make sure that it's not a misfiled audio file. NOTE: The PC and 3DO
versions had slightly different texts, and the texts we are working
with here match neither one. The voices are to be taken as the
ultimate authority on the 3DO text.
- Communications Logic errors. Basically, this means the enum in the
appropriate strings.h was defined wrong, or, worse, was misused by the
{race}c.c file. One fixed example was the Spathi Ruling Council (Race
name: spahome), where strings.h defined *two* enums, one for the
Captain's lines, one for the Spathi. This would have horribly garbled
everything were it not for the fact that it made their initial
challenge and your responses invalid, thus causing the game to lock up
on your first visit. An example of one of these that made it into the
final game (PC version, anyway) is when the Umgah are trying to reward
you as Great Hero - the responses for the "I act purely from largesse"
and "Yep! You guys owe me BIG time" are clearly reversed. No
decision has yet been made on how to handle these (whether to
reproduce them precisely, or fix them, or only fix them in a
"director's cut" which would presumably require input from the
director) so leave them alone for now unless they crash the game. (To
my knowledge, the only truly serious error of this type was the Spathi
Homeworld, which has since been repaired.)
(Initial version: Michael Martin, 10/10/02)