forked from gildor2/Quake2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fast.txt
82 lines (82 loc) · 4.21 KB
/
fast.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
MAP PATCH:
- .bsp.add => .patch
- change in RequestNextDownload() too
- allow to load .patch w/o .bsp (patch will specify, which .bsp file to load)
- this will allow single map with few texture or entity sets
- this will require loading patch before map
- can implement "dummy" .bsp file: something like "soft link" in unix
- downloading: will require one additional step to download "link" (and then bsp and patch)
- load patch before processing map entstring, remember, what to patch and what to add, then
process entstring and apply patch data
- patch features:
- add entity (already implemented)
- patch <filter>
{
<body>
}
- in <body> should:
- add fields
- replace fields (when field absent - add it; so, no "add" requirement?)
- delete fields
- delete <filter> -- delete entity (should keep numbers of other ents for easier modification later?)
- <filter> is:
- <number> -- entity number
- '"field" = "mask"' -- all entities, containing field with value matched mask
* may be used as "classname=worldspawn" or "origin=x y z" etc
- replace textures (new texture/shader + original texture size)
- modify texture flags (add envmap, transparency, autoflares etc)
- inline shaders (templates):
shader <name-or-mask>
{
<body>
}
- better effect, when implement preprocessor support (requires '#define'!)
- this will require to use our parser instead of COM_Parse() (word parser -> line parser)
- can post-include special file, which will do work, implemented as C++ code now:
- delete all light entities
- replace/delete some Kingpin entities
- can pre-include file with macros for easier adding:
- flares
- surface flags: envmap, autoflare
- fogging (patch worldspawn entity)
* this will allow us to modify patch script specs with reimplementation of macros to keep compatibility
- these include files may be overridden in mods (use game-based name to include), mod can use following file:
... <code> ...
#include "/baseq2/includes/entpatch.h"
... <code> ...
! write .spec file for patch system
- format
- filenames
=============
- EF_BFG, some other - TRANSLUCENT -> shader (cl_ents.cpp)
? aminMap with cross-blending (for sprites) -- combiners?
? animMapOnce (check UberEngine function)
- bfg beams: try to find entity, which is damaged, and lerp beam dst to it (beam src should be lerped too)
- sprite system:
- pos
- rotate
- scale
- alpha
- shader.globalTime -- force to use vp.time; shader.absoluteTime -- use ent.time instead of (vp.time-ent.time) (useful for sprites)
=============
- correct autoflare center -- can get texture coords of surface, and compute, when it's center
- should check, whether coords inside current triangle strip or not
- SURF_LIGHT: can specify for some textures, which have large wall + small lamp pic, where lamp is placed (its texcoords) and
which percent of whole surface its area
- gl_state.haveFullscreen3d -- change (may be, remove var)
=============
- cmd.cpp -> Commands.cpp (Core) & cbuf.cpp (qcommon)
- SplitCmdline == TokenizeString, diff is 1. delim = '-', 2. delim = ';' (or ' ' ??!)
- MacroExpand(), cmd_debug, CL_ForwardToServer() -> cbuf code; should parse comments in cfg files here
too (remove them after FS_LoadFile(cfgfile) !?)
- DeltaEntity():
- for new protocol try plib-like (dcc32) delta func; display compression ratio (may use old-style delta and
measure compression for new-style for testing); best place for testing - client (here can test demos too)
- can create DeltaCompress() and DeltaDecompress() functions for plib-style compression
- if upgrade compression, should parse demos with
a) original protocol b)ext protocol, but old-style delta
c) ext protocol and new-style delta; may be, change EXT_PROTOCOL_ID too (add version number)
- Q2 menu system: have a LOTS of menu items with callbacks == direct linking to cvar: on Init() reads value
from cvar, on Modify() write value back to cvar; uses cvar->Clamp() on init
! can add text field, and flags QMF_CVAR -- will init menu item from cvar, update
cvar when item changed (for slider - should specify base + scale)