doc-entities.txt and minor cleanup
This commit is contained in:
parent
168818b9b0
commit
f00fe06b14
@ -1,24 +1,17 @@
|
|||||||
EX=reflex2q3
|
EX=reflex2q3
|
||||||
CC=g++
|
CC=g++
|
||||||
CFLAGS=-std=c++11 -I"./includes" -I"./includes/Catch/single_include" -I"./includes/cxxopts/include" -I"/usr/include/eigen3"
|
CFLAGS=-std=c++11 -I"./includes" -I"./includes/Catch/single_include" -I"./includes/cxxopts/include" -I"/usr/include/eigen3"
|
||||||
TESTEX=test/test-parser
|
TESTEX=test/catch
|
||||||
UNITEX=test/catch
|
|
||||||
|
|
||||||
all: main unittest
|
all: main test
|
||||||
|
|
||||||
main: planes.o brushdef.o oopless-parser.o EntityConverter.o
|
main: planes.o brushdef.o oopless-parser.o EntityConverter.o
|
||||||
$(CC) $^ main.cpp $(CFLAGS) -o $(EX) 2>error8.log
|
$(CC) $^ main.cpp $(CFLAGS) -o $(EX) 2>error8.log
|
||||||
|
|
||||||
test: planes.o brushdef.o oopless-parser.o test-parser.o
|
test: EntityConverter.o catch.o
|
||||||
$(CC) $^ $(CFLAGS) -o $(TESTEX)
|
$(CC) $^ $(CFLAGS) -o $(TESTEX)
|
||||||
|
|
||||||
unittest: EntityConverter.o catch.o
|
|
||||||
$(CC) $^ $(CFLAGS) -o $(UNITEX)
|
|
||||||
mv test/catch ../.git/hooks/pre-commit
|
mv test/catch ../.git/hooks/pre-commit
|
||||||
|
|
||||||
test-parser.o: test/test-parser.cpp
|
|
||||||
$(CC) -c $^ $(CFLAGS)
|
|
||||||
|
|
||||||
catch.o: test/catch.cpp
|
catch.o: test/catch.cpp
|
||||||
$(CC) -c $^ $(CFLAGS)
|
$(CC) -c $^ $(CFLAGS)
|
||||||
|
|
||||||
|
@ -510,7 +510,7 @@ EntityConverter::convertTarget(const std::vector<std::string> &lines) const
|
|||||||
if ( haveName) {
|
if ( haveName) {
|
||||||
auto targetIter = targetMap_.find(targetName);
|
auto targetIter = targetMap_.find(targetName);
|
||||||
if ( targetIter == targetMap_.end() ) {
|
if ( targetIter == targetMap_.end() ) {
|
||||||
std::cerr << makeErrorMessage("End-game camera Target is not a supported feature in id Tech games. This entity will not be converted", lines);
|
std::cerr << makeErrorMessage("End-game camera Target is not a supported feature in id Tech games. Skipping", lines);
|
||||||
|
|
||||||
std::vector<std::string> empty;
|
std::vector<std::string> empty;
|
||||||
return empty;
|
return empty;
|
||||||
@ -792,7 +792,7 @@ EntityConverter::makeErrorMessage(const std::string message,
|
|||||||
const std::vector<std::string> entity) const
|
const std::vector<std::string> entity) const
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << std::endl << message << std::endl;
|
ss << std::endl << message << ":" << std::endl;
|
||||||
|
|
||||||
std::vector<std::string>::const_iterator it;
|
std::vector<std::string>::const_iterator it;
|
||||||
for ( it=entity.begin(); it!=entity.end(); ++it ) {
|
for ( it=entity.begin(); it!=entity.end(); ++it ) {
|
||||||
|
174
docs/doc-entities.txt
Normal file
174
docs/doc-entities.txt
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
|
||||||
|
Differences between Reflex and id Tech entities
|
||||||
|
|
||||||
|
Reflex uses a right-handed coordinate system and id Tech uses a left-handed
|
||||||
|
system so many positions and angles must take this into account when being
|
||||||
|
converted.
|
||||||
|
|
||||||
|
|
||||||
|
Position of Players and Pickups are stored differently in Reflex. Player
|
||||||
|
positions are stored at a players feet, while in id Tech, at the center of
|
||||||
|
the character. Converting from Reflex requires the vertical component of
|
||||||
|
position to be offset by 32 units. Similarly, pickups must be offset by
|
||||||
|
two units.
|
||||||
|
|
||||||
|
|
||||||
|
Entity attributes are often implicit; i.e. if an attribute is required but
|
||||||
|
unspecified, a default is used.
|
||||||
|
-All game modes are enabled by default and attributes are used to
|
||||||
|
disable undesired modes or to set 2v2.
|
||||||
|
-Entities without a position are implicitly at the origin.
|
||||||
|
-PointLights without a color default to white.
|
||||||
|
|
||||||
|
|
||||||
|
Attributes set in a WorldSpawn are used by all the entities it contains.
|
||||||
|
-WorldSpawns often group PlayerSpawns by game mode
|
||||||
|
|
||||||
|
|
||||||
|
Angles
|
||||||
|
-Can be stored as a Vector3, since rotation about any axis is possible
|
||||||
|
-Keyword angle is also supported (rotation about the vertical axis)
|
||||||
|
|
||||||
|
|
||||||
|
Race Entities
|
||||||
|
-Unlike id Tech games, is limited by not having checkpoint brushes.
|
||||||
|
-CTS only
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reflex entity types and all known attributes
|
||||||
|
|
||||||
|
* is used to denote unsupported attributes and entity types
|
||||||
|
** For parsing purposes, is handled differently than other entities
|
||||||
|
|
||||||
|
**WorldSpawn
|
||||||
|
*String32 targetGameOverCamera
|
||||||
|
*Float timeOfDay
|
||||||
|
*Float skyAngle
|
||||||
|
*UInt8 playersMin
|
||||||
|
*UInt8 playersMax
|
||||||
|
Bool8 modeFFA
|
||||||
|
Bool8 modeTDM
|
||||||
|
Bool8 modeCTF
|
||||||
|
Bool8 mode1v1
|
||||||
|
Bool8 modeRace
|
||||||
|
Bool8 mode2v2
|
||||||
|
|
||||||
|
Pickup
|
||||||
|
(pickupType Required)
|
||||||
|
Vector3 position
|
||||||
|
Vector3 angles
|
||||||
|
UInt8 pickupType - See list of pickup IDs in this document
|
||||||
|
|
||||||
|
PlayerSpawn
|
||||||
|
Vector3 position
|
||||||
|
Vector3 angles
|
||||||
|
Vector3 angle
|
||||||
|
bool8 teamA
|
||||||
|
bool8 teamB
|
||||||
|
Bool8 modeFFA
|
||||||
|
Bool8 modeTDM
|
||||||
|
Bool8 modeCTF
|
||||||
|
Bool8 mode1v1
|
||||||
|
Bool8 modeRace
|
||||||
|
*Bool8 mode2v2
|
||||||
|
|
||||||
|
JumpPad
|
||||||
|
String32 target
|
||||||
|
brush
|
||||||
|
|
||||||
|
Teleporter
|
||||||
|
String32 target
|
||||||
|
brush
|
||||||
|
|
||||||
|
|
||||||
|
Target
|
||||||
|
(name Required)
|
||||||
|
Vector3 position
|
||||||
|
Vector3 angles
|
||||||
|
Vector3 angle
|
||||||
|
String32 name
|
||||||
|
|
||||||
|
RaceStart
|
||||||
|
brush
|
||||||
|
|
||||||
|
RaceFinish
|
||||||
|
brush
|
||||||
|
|
||||||
|
PointLight
|
||||||
|
Vector3 position
|
||||||
|
ColourXRGB32 color - ARGB, alpha channel always full for PointLights
|
||||||
|
Float nearAttenuation
|
||||||
|
Float farAttenuation
|
||||||
|
|
||||||
|
*Prefab
|
||||||
|
Vector3 position
|
||||||
|
String64 prefabName
|
||||||
|
|
||||||
|
*CameraPath
|
||||||
|
(No direct id Tech equivalent)
|
||||||
|
UInt8 posLerp
|
||||||
|
Uint8angleLerp
|
||||||
|
|
||||||
|
*Effect
|
||||||
|
Vector3 position
|
||||||
|
Vector3 angles
|
||||||
|
String64 effectName
|
||||||
|
String256 material0Name
|
||||||
|
ColourARGB32 material0Albedo
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Pickup IDs (of pickups suitable for conversion)
|
||||||
|
|
||||||
|
Burst Gun (spawn weapon)
|
||||||
|
This entity will not have a pickupType field.
|
||||||
|
|
||||||
|
Weapons
|
||||||
|
If the player doesn't have the weapon, then s/he will acquire it.
|
||||||
|
If it is present, the player gains some ammo respective to the gun.
|
||||||
|
pickupType 1 = Shotgun
|
||||||
|
pickupType 2 = Grenade Launcher
|
||||||
|
pickupType 3 = Plasma Rifle
|
||||||
|
pickupType 4 = Rocket Launcher
|
||||||
|
pickupType 5 = Ion Cannon
|
||||||
|
pickupType 6 = Bolt Rifle
|
||||||
|
|
||||||
|
Ammo
|
||||||
|
Ammunition for weapons gained on pickup.
|
||||||
|
pickupType 20 = Burst Gun Ammo
|
||||||
|
pickupType 21 = Shotgun Ammo
|
||||||
|
pickupType 22 = Grenade launcher Ammo
|
||||||
|
pickupType 23 = Plasma Rifle Ammo
|
||||||
|
pickupType 24 = Rocket Launcher Ammo
|
||||||
|
pickupType 25 = Ion Cannon Ammo
|
||||||
|
pickupType 26 = Bolt Rifle Ammo
|
||||||
|
|
||||||
|
Power Up
|
||||||
|
A temporary buff granted to the player.
|
||||||
|
pickupType 60 = Carnage (increases a player's outgoing damage)
|
||||||
|
pickupType 62 = Resist (decreases a player's incoming damage)
|
||||||
|
|
||||||
|
Flags
|
||||||
|
For use in Capture the Flag
|
||||||
|
pickupType 70 = Team Alpha Flag (red team)
|
||||||
|
pickupType 71 = Team Zeta Flag (blue team)
|
||||||
|
|
||||||
|
Health
|
||||||
|
Restores the player's hitpoints.
|
||||||
|
pickupType 40 = Small health
|
||||||
|
pickupType 41 = Medium health
|
||||||
|
pickupType 42 = large health
|
||||||
|
pickupType 43 = Mega Health
|
||||||
|
|
||||||
|
Armor
|
||||||
|
Restores the player's armor.
|
||||||
|
Reflex has a tiered Armor system.
|
||||||
|
Green absorbs the least damage, and Red absorbs the most.
|
||||||
|
pickupType 50 = Armor shard
|
||||||
|
pickupType 51 = Green Armor
|
||||||
|
pickupType 52 = Yellow Armor
|
||||||
|
pickupType 53 = Red Armor
|
||||||
|
|
@ -13,7 +13,7 @@ Features, and Responsibilities of the Program: For Mappers
|
|||||||
|
|
||||||
During the conversion process, face related data (texture & color) are
|
During the conversion process, face related data (texture & color) are
|
||||||
preserved. This is both because of the differences between engines and the
|
preserved. This is both because of the differences between engines and the
|
||||||
numerous games built in idTech engines. Meaning the map converter does not
|
numerous games built in idTech engines. That is, the map converter does not
|
||||||
attempt to retexture the map with generic idTech engine equivalents or
|
attempt to retexture the map with generic idTech engine equivalents or
|
||||||
per-game equivalents. It is the individual mappers' responsibility to
|
per-game equivalents. It is the individual mappers' responsibility to
|
||||||
appropriately adapt the map for the target game. Some of the following
|
appropriately adapt the map for the target game. Some of the following
|
||||||
|
Loading…
Reference in New Issue
Block a user