Skip to content

Commit

Permalink
q3mme camera support, protocol 91 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
brugal committed Aug 7, 2015
1 parent f39ea10 commit 48df2d1
Show file tree
Hide file tree
Showing 60 changed files with 3,724 additions and 1,005 deletions.
4 changes: 2 additions & 2 deletions CREDITS-wolfcam.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id software: releasing quake3 source
ioquake3
Luigi Auriemma: quake live pk3 decryption
CaNaBiS, HMage, auri: q3mme (blur code, and obviously inspiration)
CaNaBiS, HMage, auri, ent: q3mme (blur code, q3mme camera code, and obviously inspiration)
Cloud Wu: backtrace
OpenArena: some content
Cyberstorm: anim map change
Expand All @@ -19,7 +19,7 @@ Adam Pyle: technical information regarding quake live

Ed Bow: qldt
Jonathan Young: quakelive offline
Maverick and quake live developers for information regarding dm 90 protocol changes
Maverick and quake live developers for information regarding dm90 and dm91 protocol changes

Dmitry 'qrealka' Loginov: cpma pro-sound description
Ravensoft: png output from Jedi Acadmey
37 changes: 34 additions & 3 deletions FIXME
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,6 @@ WARNING ShaderForShaderNum: using default shader for 'textures/common/weapclip'
* /devmap powerup available needs to be broadcast
* spec demo doesn't show ql hud
* 44100 sound
* check CG_StartSound(NULL, MAX_GENTITIES - 1, cg_view for railgun freecam hack
* something is still calling sound/feedback/fight.wav ? 2015-07-06-demos/CTF q3wcp9 cpma
* still using red/blue flag returned?
* flag capture/return sounds (not vo) for specs?
Expand All @@ -1589,9 +1588,41 @@ WARNING ShaderForShaderNum: using default shader for 'textures/common/weapclip'
- harvester capture
- 1fctf (cap attack)

* unsigned long Width; //uint32_t Width; in tr_image_png.c
* double check di.protocol == PROTOCOL_QL is also for 73 and now 91 2015-07-28

* protocol 91: utf8, scoreboards
* WARNING: unknown general shader parameter 'nodefault' in 'models/players/hunter/harpy_f'
* dir demos/ doesn't list ql ones
* ui_shared.c DC->cursorx -- horiz scrollbars
* spline angles acceleration, initial velocities in CG_CameraUpdateInfo()
* win32 console output also store output to file

* hud support for q3mme camera
* camera: spline to interp what about roll?
* check spline angles and use previous
* camera masking like q3mme (done for q3mme types, need for others)
* check if add q3mme camera point checks for time and bypasses q3mme checks (can q3mme add cam points at same time?)
* q3mme and camera velocity and cg_drawSpeed
* q3mme camera: disable playing when new cam point added?
* why does cg_cameraRewindTime depend on cg_cameraQue ?
* camera: spline type for offsets?
* spamming errorpup in console when bad angle type is added in hud, find and test disabled spamming

bad camera point 0 viewpoint but not followed by either viewpoint pass or viewpoint

* fix angle accel for spline
* wolfcamql camera flags for other types besides q3mme ones
* wolfcamql missing linear origin interpolation from q3mme

* last todo:
- wolfcamql disable hud roll for angles spline
x - q3mme camera hud
x - maybe com_idlesleep
- maybe also write stdout.txt for console output
- q3mme camera commands (shift, smooth, etc..) for wolfcamql camera

* camera: accel initial values and camera masking flags
* check all uses of CursorX_Widescreen()
* linear angle interpolation from q3mme

---------------------------

Expand Down
35 changes: 13 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

COMPILE_PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'|sed -e 's/\//_/g')

COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/i386/)
COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/i386/ | sed -e 's/^arm.*/arm/')

ifeq ($(COMPILE_PLATFORM),sunos)
# Solaris uname and GNU uname differ
Expand Down Expand Up @@ -259,31 +259,20 @@ CGAME_LIBS = -lpthread
#############################################################################

## Defaults
LIB=lib

INSTALL=install
MKDIR=mkdir

ifneq (,$(findstring "$(COMPILE_PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))
TOOLS_CFLAGS += -DARCH_STRING=\"$(COMPILE_ARCH)\"
endif

ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))

ifeq ($(ARCH),axp)
ARCH=alpha
else
ifeq ($(ARCH),x86_64)
LIB=lib64
LDFLAGS += -m64
else
ifeq ($(ARCH),ppc64)
LIB=lib64
else
ifeq ($(ARCH),s390x)
LIB=lib64
else
ifeq ($(ARCH),aarch64)
LIB=lib64
endif
endif
endif
endif
endif

Expand All @@ -293,10 +282,10 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu")

ifdef CGAME_HARD_LINKED
BASE_CFLAGS = -p -g -rdynamic -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
-pipe -DUSE_ICON -D_FILE_OFFSET_BITS=64 -msse $(CGAME_HARD_LINKED)
-pipe -DUSE_ICON -DARCH_STRING=\\\"$(ARCH)\\\" -D_FILE_OFFSET_BITS=64 -msse $(CGAME_HARD_LINKED)
else
BASE_CFLAGS = -g -rdynamic -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
-pipe -DUSE_ICON -D_FILE_OFFSET_BITS=64 -msse
-pipe -DUSE_ICON -DARCH_STRING=\\\"$(ARCH)\\\" -D_FILE_OFFSET_BITS=64 -msse
endif

CLIENT_CFLAGS = $(SDL_CFLAGS)
Expand Down Expand Up @@ -648,9 +637,10 @@ ifdef MINGW
CLIENT_CFLAGS += -I$(SDLHDIR)/include
CLIENT_LIBS += $(LIBSDIR)/win32/libSDLmain.a \
$(LIBSDIR)/win32/libSDL.dll.a
#CLIENT_LIBS += $(LIBSDIR)/win32/libSDL.dll.a
else
CLIENT_CFLAGS += $(SDL_CFLAGS)
CLIENT_LIBS += $(SDL_LIBS)
#CLIENT_LIBS += $(SDL_LIBS)
endif

BUILD_CLIENT_SMP = 0
Expand Down Expand Up @@ -831,7 +821,7 @@ else # ifeq netbsd
#############################################################################

ifeq ($(PLATFORM),irix64)

LIB=lib
ARCH=mips

CC = c99
Expand Down Expand Up @@ -1051,8 +1041,7 @@ endef

define DO_CPP
$(echo_cmd) "CPP $<"
#$(Q)$(CPP) -Wall -m32 -o $@ -c $<
$(CPP) -Wall -m32 -o $@ -c $<
$(Q)$(CPP) -Wall -m32 -o $@ -c $<
endef

define DO_SMP_CC
Expand Down Expand Up @@ -1945,6 +1934,7 @@ Q3CGOBJHARDLINKED_ = \
$(B)/baseq3/cgame/bg_slidemove.o \
$(B)/baseq3/cgame/bg_lib.o \
$(B)/baseq3/cgame/bg_xmlparser.o \
$(B)/baseq3/cgame/cg_camera.o \
$(B)/baseq3/cgame/cg_consolecmds.o \
$(B)/baseq3/cgame/cg_draw.o \
$(B)/baseq3/cgame/cg_drawdc.o \
Expand Down Expand Up @@ -1994,6 +1984,7 @@ Q3CGOBJ_ = \
$(B)/baseq3/cgame/bg_slidemove.o \
$(B)/baseq3/cgame/bg_xmlparser.o \
$(B)/baseq3/cgame/bg_lib.o \
$(B)/baseq3/cgame/cg_camera.o \
$(B)/baseq3/cgame/cg_consolecmds.o \
$(B)/baseq3/cgame/cg_draw.o \
$(B)/baseq3/cgame/cg_drawdc.o \
Expand Down
2 changes: 1 addition & 1 deletion Makefile.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=11.0test10
VERSION=11.0test11
USE_CODEC_VORBIS=1
USE_FREETYPE=1
BUILD_MISSIONPACK=0
Expand Down
49 changes: 42 additions & 7 deletions README-wolfcam.txt
Original file line number Diff line number Diff line change
Expand Up @@ -967,15 +967,16 @@ Edit all currently selected camera points
<...> are required
[...] are optional

/ecam type <spline, interp, jump, curve>
/ecam fov <current, interp, fixed, pass> [fov value]
/ecam type <spline, interp, jump, curve, splineBezier, splineCatmullRom>
/ecam fov <current, interp, fixed, pass, spline> [fov value]
/ecam command <command to be executed when cam point is hit>
/ecam numsplines <number of spline points to use for this key point (default is 40) >
/ecam angles <interp, interpuseprevious, fixed, fixeduseprevious, viewpointinterp, viewpointfixed, viewpointpass, ent>
/ecam angles <interp, spline, interpuseprevious, fixed, fixeduseprevious, viewpointinterp, viewpointfixed, viewpointpass, ent>
the 'ent' option has additional parameter for the entity
/ecam angles ent [entity number]
/ecam offset <interp, fixed, pass> [x offset] [y offset] [z offset]
/ecam roll <interp, fixed, pass> [roll value]
/ecam flags [origin | angles | fov | time]
/ecam initialVelocity <origin, angles, xoffset, yoffset, zoffset, fov, roll> <v
alue, or 'reset' to reset to default fixed velocity>
/ecam finalVelocity <origin, angles, xoffset, yoffset, zoffset, fov, roll> <value, or 'reset' to reset to default fixed velocity>
Expand Down Expand Up @@ -1025,10 +1026,18 @@ Origin types:
jump: don't move at all towards next camera point, simply appear at the next one
spline: a 'best fitting' curve is created for all the camera points. One of the disadvantages is that you are not likely to pass through the exact origin that you selected for a particular camera point.
curve: every three points of this type define a quadratic curve. You can think of the first and last being the 'start' and 'end' points with the middle one controlling the steepness of the curve. This has the advantage over the spline type of being able to pass through exactly through the chosen origins for camera points.
splineBezier: (from q3mme, uses camera flags for masking)
splineCatmullRom: (from q3mme, uses camera flags for masking)

Angle types:
interp: linear angle interpolation, roll is treated as a separate setting
spline: (from q3mme, uses camera flags for masking), camera roll is included in this interpolation

Velocity:
//FIXME

Note that spline fov uses the final fov values (ex: go from 60 -> 120 fov) instead of offset values which q3mme uses (ex: 10 -> 30 means go from currentFov + 10 to currentFov + 30).

cvar cg_draw2d 2 for use with camera editing
default bind BACKSPACE "toggle cg_draw2d 0 1 2"

Expand All @@ -1044,7 +1053,7 @@ Velocity:

cg_cameraUpdateFreeCam transfers origin and angles to freecam state

cg_cameraDebugPath adds a model showing the camera path without updating freecam origin and angles, use r_drawworld 0 and r_fastsky 1 for a clearer view
cg_cameraDebugPath adds a model showing the camera path without updating freecam origin and angles. Use r_drawworld 0 and r_fastsky 1 for a clearer view. If both camera types are present (q3mme and wolfcamql) it will draw a model for each of them.

--------------------------------------------------------------------------

Expand All @@ -1069,6 +1078,26 @@ Velocity:

---------------------------------------------------------------------------

* q3mme camera support:
/q3mmecamera (same as q3mme /camera command)
added flags subcommand to print or set camera flag values:
/q3mmecamera flags [origin | angles | fov | time]

target sub command changed, you need to specify a target number (-1 means no target). Ex: /q3mmecamera target 9

additional commands:

/playq3mmecamera
/stopq3mmecamera
/saveq3mmecamera
/loadq3mmecamera

cg_q3mmeCameraSmoothPos is the same as mov_cameraSmoothPos in q3mme.

FIXME target (Note: target selection isn't available)

---------------------------------------------------------------------------

* cg_inheritPowerupShader for multiple power-ups (ex: quad and medkit) do/don't apply the first power-up custom shader to the second

* +chat and cg_chatHistoryLength
Expand Down Expand Up @@ -1839,7 +1868,13 @@ You can use it in order to un-grab the mouse pointer without having to bring dow

* cg_killBeep same as quake live

* fs_quakelivedir Default quake live install paths are checked in order to list demos, you can override with this cvar
* fs_quakelivedir Default quake live install paths are checked in order to list demos (steam and stand alone versions). You can override with this cvar. It should point to the directory that contains the 'baseq3' directory where demos are saved. Ex:

# steam version
wolfcamql +set fs_quakelivedir "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Quake Live\\12345678901234567"

# stand alone version
wolfcamql +set fs_quakelivedir "C:\\Users\user1\\Application Data\\LocalLow\\id Software\\quakelive\\home"

* r_dynamicLight 1 fixes square lights, 2 original q3 code (sometimes textures have light added to the wrong side), 3 testing only determine if lighting applies in one place in the source code

Expand Down Expand Up @@ -1873,8 +1908,6 @@ You can use it in order to un-grab the mouse pointer without having to bring dow

The default widescreen value in menus appears to be '2' if it's never defined in a menuDef.

Note: this type of widescreen implementation can create problems with the ingame mouse cursor. An example is selectiong a name in the scoreboard. Use cg_scoreBoardCursorAreaWideScreen to set it to the same value used for 'widescreen' in the hud menu file.

Values:

0: original code q3 (and older quake live versions), with images stretched or shrunk horizontally
Expand Down Expand Up @@ -2238,6 +2271,8 @@ automated scripting examples: playdemolist.py and recorddemolist.py

* ability to filter out reward types to disable both the announcment and the display icon: cg_rewardCapture, cg_rewardImpressive, cg_rewardExcellent, cg_rewardHumiliation, cg_rewardDefend, cg_rewardAssist, cg_rewardComboKill, cg_rewardRampage, cg_rewardMidAir, cg_rewardRevenge, cg_rewardPerforated, cg_rewardHeadshot, cg_rewardAccuracy, cg_rewardQuadGod, cg_rewardFirstFrag, cg_rewardPerfect

* windows version can echo console messages in the command prompt if --console-output is used in the command line. This will also convert ansi colors.

----------

brugal
Expand Down
Loading

1 comment on commit 48df2d1

@entdark
Copy link

@entdark entdark commented on 48df2d1 Aug 7, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so dirty x]

Please sign in to comment.