idlib 代码 文件夹 包括 以下 部分
geogery
idLib contains stateless support classes and concrete types. Some classes
do have static variables, but such variables are initialized once and
read-only after initialization (they do not maintain a modifiable state).
idLib 包含无状态支持 类 和 具体 类型。
一些类有静态变量,但这样的 变量 初始化 一次 和 初始化 后只读 (不保持可修改状态)。
The interface pointers idSys, idCommon, idCVarSystem and idFileSystem
should be set before using idLib. The pointers stored here should not
be used by any part of the engine except for idLib.
接口 指针 idSys, idCommon, idCVarSystem 和 idFileSystem 在使用idLib之前应该设置。
存储 在这里 的 指针不 应该 可以 被 引擎 的 任何 部分 使用,除了idLib。
几何
idPatch
idSurface
idWinding
idBrush
容器类
包括了这个
哈希表
向量,
链表
树
winding2d
trace_model
surface
数学类
向量
四元数
角度
矩阵等等的处理了者也
quet
plane
平面部分定义 ,函数,主要用于这个碰撞检测部分的处理
(有待补充)
simd1,simd2,simd4,simd5
3dNow!指令等等
随机数的处理
lcp
bv
ode
complex
对于包围盒的处理了
bound
frustum平截头体的处理了
box的碰撞了
sphere
mapfile地图文件的处理了者也
这个还要分析q3的brush (其实很多还是继承了Quake3等等以前的很多,包括从doom1代码很多逐步的变化,演化而来.........)
idmapEntity
// filename does not require an extension
// normally this will use a .reg file instead of a .map file if it exists,
// which is what the game and dmap want, but the editor will want to always
// load a .map file
对于文件的crc的检查了者也
对于文件的时间的检查了
base64基于64位的处理了者也
thread线程的处理
,parser,
timer时间管理器的处理
token
str
bitmsg
lexer词法器的处理了者也
系统的处理
// System
#include "sys/sys_assert.h"
#include "sys/sys_threading.h"
内存管理类的处理
// memory management and arrays
#include "Heap.h"
#include "containers/Sort.h"
#include "containers/List.h"
数学的处理了
// math
#include "math/Simd.h"
#include "math/Math.h"
#include "math/Random.h"
#include "math/Complex.h"
#include "math/Vector.h"
#include "math/VecX.h"
#include "math/VectorI.h"
#include "math/Matrix.h"
#include "math/MatX.h"
#include "math/Angles.h"
#include "math/Quat.h"
#include "math/Rotation.h"
#include "math/Plane.h"
#include "math/Pluecker.h"
#include "math/Polynomial.h"
#include "math/Extrapolate.h"
#include "math/Interpolate.h"
#include "math/Curve.h"
#include "math/Ode.h"
#include "math/Lcp.h"
包围盒的处理
// bounding volumes
#include "bv/Sphere.h"
#include "bv/Bounds.h"
#include "bv/Box.h"
几何的处理了
// geometry
#include "geometry/RenderMatrix.h"
#include "geometry/JointTransform.h"
#include "geometry/DrawVert.h"
#include "geometry/Winding.h"
#include "geometry/Winding2D.h"
#include "geometry/Surface.h"
#include "geometry/Surface_Patch.h"
#include "geometry/Surface_Polytope.h"
#include "geometry/Surface_SweptSpline.h"
#include "geometry/TraceModel.h"
文本处理了
// text manipulation 文本处理
#include "Str.h"
#include "StrStatic.h"
#include "Token.h"
#include "Lexer.h"
#include "Parser.h"
#include "Base64.h"
#include "CmdArgs.h"
容器类的处理了
// containers
#include "containers/Array.h"
#include "containers/BTree.h"
#include "containers/BinSearch.h"
#include "containers/HashIndex.h"
#include "containers/HashTable.h"
#include "containers/StaticList.h"
#include "containers/LinkList.h"
#include "containers/Hierarchy.h"
#include "containers/Queue.h"
#include "containers/Stack.h"
#include "containers/StrList.h"
#include "containers/StrPool.h"
#include "containers/VectorSet.h"
#include "containers/PlaneSet.h"
哈希类的处理了
// hashing
#include "hashing/CRC32.h"
#include "hashing/MD4.h"
#include "hashing/MD5.h"
// misc
#include "Dict.h"
#include "LangDict.h"
#include "DataQueue.h"
#include "BitMsg.h"
#include "MapFile.h"
#include "Timer.h"
#include "Thread.h"
#include "Swap.h"
#include "Callback.h"
#include "ParallelJobList.h"
预编译部分的处理了者也
#include "sys/sys_defines.h"
#include "sys/sys_builddefines.h"
#include "sys/sys_includes.h"
#include "sys/sys_assert.h"
#include "sys/sys_types.h"
#include "sys/sys_intrinsics.h"
#include "sys/sys_threading.h"
//-----------------------------------------------------
#define ID_TIME_T int64 // Signed because -1 means "File not found" and we don't want that to compare > than any other time
// non-portable system services
#include "../sys/sys_public.h"
id lib部分
// id lib
#include "../idlib/Lib.h"
#include "sys/sys_filesystem.h"
框架
// framework
#include "../framework/BuildVersion.h"
#include "../framework/Licensee.h"
#include "../framework/CmdSystem.h"
#include "../framework/CVarSystem.h"
#include "../framework/Common.h"
#include "../framework/File.h"
#include "../framework/File_Manifest.h"
#include "../framework/File_SaveGame.h"
#include "../framework/File_Resource.h"
#include "../framework/FileSystem.h"
#include "../framework/UsercmdGen.h"
#include "../framework/Serializer.h"
#include "../framework/PlayerProfile.h"
// decls
#include "../framework/TokenParser.h"
#include "../framework/DeclManager.h"
#include "../framework/DeclTable.h"
#include "../framework/DeclSkin.h"
#include "../framework/DeclEntityDef.h"
#include "../framework/DeclFX.h"
#include "../framework/DeclParticle.h"
#include "../framework/DeclAF.h"
#include "../framework/DeclPDA.h"
对于对于声音和其他的系统的处理了
// We have expression parsing and evaluation code in multiple places:
// materials, sound shaders, and guis. We should unify them.
const int MAX_EXPRESSION_OPS = 4096;
const int MAX_EXPRESSION_REGISTERS = 4096;
渲染器
// renderer
#include "../renderer/OpenGL/qgl.h"
#include "../renderer/Cinematic.h"
#include "../renderer/Material.h"
#include "../renderer/BufferObject.h"
#include "../renderer/VertexCache.h"
#include "../renderer/Model.h"
#include "../renderer/ModelManager.h"
#include "../renderer/RenderSystem.h"
#include "../renderer/RenderWorld.h"
// sound engine
#include "../sound/sound.h"
ui系统
// user interfaces
#include "../ui/ListGUI.h"
#include "../ui/UserInterface.h"
#include "../swf/SWF.h"
碰撞检测
// collision detection system
#include "../cm/CollisionModel.h"
aas管理系统
// AAS files and manager
#include "../aas/AASFile.h"
#include "../aas/AASFileManager.h"
游戏逻辑系统
// game
#include "../d3xp/Game.h"
网路系统
// Session / Network
#include "../sys/LightweightCompression.h"
#include "../sys/Snapshot.h"
#include "../sys/PacketProcessor.h"
#include "../sys/SnapshotProcessor.h"
#include "../sys/sys_savegame.h"
#include "../sys/sys_session_savegames.h"
#include "../sys/sys_profile.h"
#include "../sys/sys_localuser.h"
#include "../sys/sys_signin.h"
#include "../sys/sys_stats_misc.h"
#include "../sys/sys_stats.h"
#include "../sys/sys_session.h"
#include "../sys/sys_achievements.h"
//-----------------------------------------------------
#ifndef _D3SDK
#ifdef GAME_DLL
#include "../d3xp/Game_local.h"
#else
#include "../framework/DemoChecksum.h"
// framework
#include "../framework/Compressor.h"
#include "../framework/EventLoop.h"
#include "../framework/KeyInput.h"
#include "../framework/EditField.h"
#include "../framework/DebugGraph.h"
#include "../framework/Console.h"
#include "../framework/DemoFile.h"
#include "../framework/Common_dialog.h"
#endif /* !GAME_DLL */
#endif /* !_D3SDK */
//-----------------------------------------------------
#undef min
#undef max
#include <algorithm> // for min / max / swap