Updated synthesis script, moved some non-essential files around, updated license headers on all non-BUILDLIC files, added memory cache on top of texcache to improve load times, moved some duplicated keyboard handling stuff from winlayer/sdlayer to baselayer, fixed keypad / in Mapster32 tile selector, fixed bug where p->rotscrnang and p->look_ang never reset to 0, added support for reloading maphack based polymer lights after mode changes/savegame loads, other minor changes

git-svn-id: https://svn.eduke32.com/eduke32@1652 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2010-05-25 10:56:00 +00:00
parent 8ae2a7c1ac
commit ac7767986a
86 changed files with 1007 additions and 2439 deletions

View file

@ -18,20 +18,22 @@ ENETLIB=libenet.lib
ENGINELIB=engine.lib ENGINELIB=engine.lib
EDITORLIB=build.lib EDITORLIB=build.lib
# the WDK allows us to link against msvcrt.dll instead of msvcrxxx.dll
# this path should match build\Makefile.msvc
WDKROOT="C:\WinDDK\7600.16385.1"
DXROOT="C:\Program Files\Microsoft DirectX SDK (February 2010)"
!ifdef DEBUG !ifdef DEBUG
# debugging options # debugging options
flags_cl= /Od /Zi flags_cl= /Od /Zi
flags_link=/DEBUG flags_link=/DEBUG
!else !else
# release options # release options
flags_cl=/O2 /GL /arch:SSE /MP flags_cl=/O2 /GL /arch:SSE /MP /I$(WDKROOT)\inc\crt
flags_link=/RELEASE /LTCG flags_link=/RELEASE /LTCG /LIBPATH:$(WDKROOT)\lib\wxp\i386 /LIBPATH:$(WDKROOT)\lib\Crt\i386
!endif !endif
ENGINEOPTS=/DSUPERBUILD /DPOLYMOST /DUSE_OPENGL /DPOLYMER
DXROOT="C:\Program Files\Microsoft DirectX SDK (February 2010)"
ENGINEOPTS=/DSUPERBUILD /DPOLYMOST /DUSE_OPENGL /DPOLYMER # /DNEDMALLOC
CC=cl CC=cl
AS=ml AS=ml
@ -39,20 +41,23 @@ LINK=link /nologo /opt:ref
MT=mt MT=mt
CFLAGS= /MT /J /nologo $(flags_cl) \ CFLAGS= /MT /J /nologo $(flags_cl) \
/I$(INC) /I$(EINC)\msvc /I$(EINC)\ /I$(SRC)\jmact /I$(JAUDIOLIBDIR)\include /I$(ENETDIR)\include \ /I$(INC) /I$(EINC)\msvc /I$(EINC)\ /I$(SRC)\jmact /I$(JAUDIOLIBDIR)\include /I$(ENETDIR)\include \
/D "_CRT_SECURE_NO_DEPRECATE" /W2 $(ENGINEOPTS) \ /W2 $(ENGINEOPTS) \
/I$(DXROOT)\include /DRENDERTYPEWIN=1 /I$(DXROOT)\include /DRENDERTYPEWIN=1
LIBS=user32.lib gdi32.lib shell32.lib winmm.lib ws2_32.lib dxguid.lib comctl32.lib \ LIBS=user32.lib gdi32.lib shell32.lib winmm.lib ws2_32.lib dxguid.lib comctl32.lib \
/NODEFAULTLIB:glu32.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcrtd.lib vorbisfile_static.lib vorbis_static.lib ogg_static.lib dsound.lib advapi32.lib
LIBS=vorbisfile_static.lib vorbis_static.lib ogg_static.lib dsound.lib advapi32.lib $(LIBS) LIBS=/NODEFAULTLIB:glu32.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcrtd.lib /NODEFAULTLIB:libcmt.lib \
/NODEFAULTLIB:libcmtd.lib $(LIBS)
ASFLAGS=/nologo /coff /c ASFLAGS=/nologo /coff /c
EXESUFFIX=.exe EXESUFFIX=.exe
!ifdef DEBUG !ifdef DEBUG
CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS /D "_CRT_SECURE_NO_DEPRECATE"
LIBS=$(LIBS) /NODEFAULTLIB:libcmt.lib libcmtd.lib LIBS=$(LIBS) msvcrtd.lib
!else !else
LIBS=$(LIBS) /NODEFAULTLIB:libcmtd.lib libcmt.lib # comment msvcrt_winxp.obj if not using the WDK
LIBS=$(LIBS) msvcrt.lib msvcrt_winxp.obj
!endif !endif
JMACTOBJ=$(OBJ)\util_lib.$o \ JMACTOBJ=$(OBJ)\util_lib.$o \

View file

@ -1,887 +0,0 @@
// m32 script test & show-off file
// do "include a" in the console
include names.h
// flag 1: per-block (top-level, event, or state) variable
gamevar i 0 1
gamevar j 0 1
gamevar k 0 1
gamevar l 0 1
gamevar m 0 1
gamevar p 0 1
gamevar q 0 1
gamevar r 0 1
gamevar x 0 0
gamevar y 0 0
gamevar z 0 0
gamevar gi 0 0
gamevar gj 0 0
gamevar gk 0 0
gamevar dx 0 0
gamevar dy 0 0
gamevar dz 0 0
gamevar dang 0 0
gamevar tmp 0 0
gamevar cnt 0 0
gamevar davr 65536 0
gamevar dayx 65536 0
gamevar drawcol 9 0
define TQUOTE 3
definequote 0 OK
definequote 1 DAMN
definequote 2 BU:%d ABS:%d
definequote TQUOTE write on me!
definequote 4 ASPECT: VR=%d, YX=%d
definequote 5 ALPHA KEY: %d (SCANCODE: %d)
definequote 6 time: %d ms
definequote 7 door sector not an island sector!
definequote 8 door sector has no SE sprite!
//light sector x y z range r g b radi fade angle horiz mins maxs prio tile
definequote 9 light %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d
definequote 10 --PRLIGHTS--
definequote 11 --ENDPRLIGHTS--
definequote 12 RED:
definequote 13 GREEN:
definequote 14 BLUE:
definequote 15 x/yoffset: %d %d
definequote 16 (r/g/b)color: %d %d %d
definequote 17 PICNUM:
definequote 18 NUMBER KEY: %d (SCANCODE: %d)
// Corruption checker
definequote 19 PANIC!!! SECTOR OR WALL LIMIT EXCEEDED!!!
definequote 20 SECTOR[%d].WALLPTR=%d out of range: numwalls=%d!!!
definequote 21 SECTOR[%d].WALLPTR=%d inconsistent, expected %d!!!
definequote 22 SECTOR[%d]: wallptr+wallnum=%d out of range: numwalls=%d!!!
definequote 23 WALL[%d].POINT2=%d out of range: sector[%d].wallptr=%d, endwall=%d!!!
definequote 24 WALL[%d].NEXTWALL=%d out of range: numwalls=%d!!!
definequote 25 WALL[%d].NEXTSECTOR=%d out of range: numsectors=%d!!!
definequote 26 FLOAT ACCESS TEST
definequote 27 OVERRIDE POLYMER PARALLAX & SPECULAR: OFF
definequote 28 OVERRIDE POLYMER PARALLAX & SPECULAR: ON
definequote 29 PARALLAX SCALE: %f
definequote 30 PARALLAX BIAS: %f
definequote 31 SPECULAR FACTOR: %f
definequote 32 SPECULAR POWER: %f
define PRSCALE 1000
// NOTE: inline constants >=32768 are sometimes broken ATM (when loading a second time?).
// This should always work
define MAXSPECULAR 100000
gamearray ar 128
gamearray parm 8
// various tests of m32-script features
defstate tests
// array test
getarraysize ar tmp
resizearray ar 65536
getticks parm[2]
for j range 65536
set ar[j] j
set i 0
for j range 65536
add i ar[j]
getticks parm[3]
resizearray ar tmp
ife i 2147450880 quote 0 else quote 1
sub parm[3] parm[2]
qsprintf TQUOTE 6 parm[3]
quote TQUOTE
// iteration and break test
for i range 10
{
addlogvar i
ife i 5 break
}
ife i 5 quote 0 else quote 1
quote 26
set tmp pr_parallaxscale
set gi tmp set gj tmp set gk tmp
al gi al gj al gk
ftoi gi 20 ftoi gj 200 ftoi gk 2000
al gi al gj al gk
mul gk 2
itof gk 2000
ends
// prints out maphack light definitions based on SE lights in map
defstate printlights
print 10
for i allsprites, ifactor SECTOREFFECTOR, ifge .lotag 49, ifle .lotag 50
{
ife .lotag 50
{
set j 128, sub j .shade, shiftl j 1
set k j, mul k 3, div k 4
}
else
{
set j 0, set k 0
}
set l 0
ifand .cstat 2
{
ifand .cstat 512
set l 4
else
set l 2
}
qsprintf TQUOTE 9 .sectnum .x .y .z .hitag .xvel .yvel .zvel
j k .ang .extra .xoffset .yoffset l .owner
print TQUOTE
}
print 11
ends
// convenient polymer SE light manipulation with keypad keys
// when aiming at light SE (49 or 50):
// KP 4,5,6,8: angle/horiz
// KP 7,9: range
// KP+/-: radius
// KP 1,2,3: RGB color (Shift inverts)
//
// when aiming at wall or sector:
// KP/ enable/disable overrides
// when overrides are on:
// KP 4,7: parallaxscale
// KP 8,9: parallaxbias
// KP 1,2: specularfactor
// KP 3,6: specularpower
//
// Also try Shift and/or Ctrl modifiers for different increments
defstate fiddlewithlights
ife searchstat 3 nullop else
{
ifhitkey KEY_gSLASH
{
ife pr_overrideparallax 0
{
set pr_overrideparallax 1
set pr_overridespecular 1
quote 28
}
else
{
set pr_overrideparallax 0
set pr_overridespecular 0
quote 27
}
}
}
// if aiming at sector or wall
ife searchstat 3 nullop
else ifn pr_overrideparallax 0
{
// polymer override parallaxscale
set j 0 set k 0
ifhitkey KEY_KP4 set j -1
ifhitkey KEY_KP7 set j 1
ifn j 0 set k 1
ifhitkey KEY_KP8 set j -1
ifhitkey KEY_KP9 set j 1
ife k 0 ifn j 0 set k 2
ifhitkey KEY_KP1 set j -1
ifhitkey KEY_KP2 set j 1
ife k 0 ifn j 0 set k 3
ifhitkey KEY_KP3 set j -1
ifhitkey KEY_KP6 set j 1
ife k 0 ifn j 0 set k 4
ifeithershift mul j 2 else mul j 10
ifeitherctrl mul j 10
switch k
case 0: break;
case 1:
{
set k pr_parallaxscale
ftoi k PRSCALE // must convert to scaled integer, scale is 1:PRSCALE
add k j, clamp k -10000 10000
itof k PRSCALE // convert back
qsprintf TQUOTE 29 k, quote TQUOTE
set pr_parallaxscale k
break;
}
case 2:
{
set k pr_parallaxbias
ftoi k PRSCALE, add k j, clamp k -10000 10000, itof k PRSCALE
qsprintf TQUOTE 30 k, quote TQUOTE
set pr_parallaxbias k
break;
}
case 3:
{
set k pr_specularfactor
ftoi k PRSCALE, add k j, clamp k -10000 MAXSPECULAR, itof k PRSCALE
qsprintf TQUOTE 31 k, quote TQUOTE
set pr_specularfactor k
break;
}
case 4:
{
set k pr_specularpower
ftoi k PRSCALE, add k j, clamp k -10000 MAXSPECULAR, itof k PRSCALE
qsprintf TQUOTE 32 k, quote TQUOTE
set pr_specularpower k
break;
}
endswitch
}
// if aiming at an SE with lotag 49 or 50
ife searchstat 3 ife sprite[searchwall].picnum SECTOREFFECTOR
ifge sprite[searchwall].lotag 49 ifle sprite[searchwall].lotag 50
{
set i searchwall, seti i // set current sprite = targeted sprite
// horiz
ifeithershift set j 1 else set j 10
ifhitkey KEY_gUP add .extra j
else ifhitkey KEY_gKP5 sub .extra j
clamp .extra -500 500
// angle
set j 128
ifeitherctrl set j 4
ifeithershift { ifeitherctrl set j 1 else set j 32 }
ifhitkey KEY_gLEFT sub .ang j
else ifhitkey KEY_gRIGHT add .ang j
// range
ifeithershift set j 10
else ifeitherctrl set j 1000
else set j 100
ifhitkey KEY_gPGUP add .hitag j
else ifhitkey KEY_gHOME sub .hitag j
clamp .hitag 0 16000
// radius
ifeitherctrl
{
ifholdkey KEY_gMINUS add .shade 9
else ifholdkey KEY_gPLUS sub .shade 9
clamp .shade -118 117
}
// min/max shade
ifeithershift set j -1 else set j 1
ifeitherctrl
{
ifhitkey KEY_gSLASH
{
set .xoffset 0
set .yoffset 0
}
}
else
{
set k 0
ifhitkey KEY_gSLASH { add .xoffset j, set k 1 }
else ifhitkey KEY_gSTAR { add .yoffset j, set k 1 }
ife k 1
{
qsprintf TQUOTE 15 .xoffset .yoffset
quote TQUOTE
}
}
// color/picnum
ifeitheralt
{
ifhitkey KEY_gEND
{
getnumber256 .xvel 12 255
getnumber256 .yvel 13 255
getnumber256 .zvel 14 255
}
else ifhitkey KEY_gDOWN
{
getnumber256 .owner 17 -MAXTILES
}
}
else
{
ifeitherctrl set j 1 else set j 10
ifeithershift inv j
set k 0
ifhitkey KEY_gEND { add .xvel j, set k 1 }
ifhitkey KEY_gDOWN { add .yvel j, set k 1 }
ifhitkey KEY_gPGDN { add .zvel j, set k 1 }
ife k 1
{
clamp .xvel 1 255
clamp .yvel 1 255
clamp .zvel 1 255
qsprintf TQUOTE 16 .xvel .yvel .zvel
quote TQUOTE
}
}
}
ends
/*
defstate testkeyavail
for i range 27
{
ifholdkey alphakeys[i]
{
qsprintf TQUOTE 5 i alphakeys[i]
quote TQUOTE
}
}
for i range 10
{
ifholdkey numberkeys[i]
{
qsprintf TQUOTE 18 i numberkeys[i]
quote TQUOTE
}
}
ends
*/
// rotate highlighted sprites around selected (closest to mouse) sprite
// global parameter: dang
defstate rotselspr
ifg highlightcnt 0
ifge pointhighlight 16384, ifl pointhighlight 32768
{
ife dang 0 return
set p pointhighlight, and p 16383
add sprite[p].ang dang
for i selsprites, ifn i p
{
rotatepoint sprite[p].x sprite[p].y .x .y dang (x y)
add .ang dang
bsetsprite I x y .z
}
}
ends
onevent EVENT_PREKEYS2D
// state testkeyavail
set j 0
ifeitherctrl
{
ifhitkey KEY_COMMA set j -1
ifhitkey KEY_PERIOD set j 1
}
ifn j 0
{
mul j 512
set dang j
state rotselspr
}
endevent
onevent EVENT_PREKEYS3D
// state testkeyavail
state fiddlewithlights
endevent
defstate setas
set j dayx
mul j ydim mul j 8
div j xdim div j 5
setaspect davr j
ends
onevent EVENT_ENTER3DMODE
state setas
endevent
defstate cmp_by_lotag // comparator subroutine for sorting
set RETURN sprite[SV2].lotag
sub RETURN sprite[SV1].lotag
ends
onevent EVENT_DRAW2DSCREEN
ifl cursectnum 0 return
// connect LOCATORS in a sector by lines
getarraysize ar tmp
set j 0
for i spritesofsector cursectnum
{
ifge j tmp nullop else
ifactor LOCATORS
{
set ar[j] i
add j 1
}
}
set tmp j
sort ar tmp cmp_by_lotag
sub tmp 1
for i range tmp
{
set j ar[i]
set k i, add k 1, set k ar[k]
drawline16b sprite[j].x sprite[j].y sprite[k].x sprite[k].y drawcol
}
/*
set drawlinepat -1
for i allsprites
ifactor LIZTROOP
drawcircle16b sprite[i].x sprite[i].y 256 drawcol
*/
endevent
// LOCATORS auto-incrementer
onevent EVENT_INSERTSPRITE2D
set k I
set j -1
for i spritesofsector .sectnum
{
ifn i k, ifactor LOCATORS, ifg .lotag j
set j .lotag
}
ifg j -1
{
add j 1
set .lotag j
}
endevent
//////////////////// SPRITE DUPLICATORS ////////////////////
defstate transcnt
ifle cnt 0 { inv cnt, add cnt 128 }
ends
define DUP_ROT_MAGIC 123
// duplicates and rotates selected sprites around
// pivot sprite with fields
// .extra=123 (magic)
// .ang: angle delta
// .yrepeat*32: z delta (positive if pal!=0, i.e. going down)
// .shade: count (-128 to 0 -> 255 to 128)
defstate duprot
ifn searchstat 3 return
ifn sprite[searchwall].extra DUP_ROT_MAGIC return
set p searchwall // pivot sprite
set cnt sprite[p].shade, state transcnt
set sprite[p].extra -1
for i range cnt
{
for j selsprites, ifn j p
{
dupsprite j // duplicate sprite j, I becomes index of newly created sprite
set dang i, add dang 1, mul dang sprite[p].ang
rotatepoint sprite[p].x sprite[p].y .x .y dang (x y)
add .ang dang
set z i, add z 1, mul z sprite[p].yrepeat, shiftl z 5
ife sprite[p].pal 0, inv z
add z .z
bsetsprite I x y z
}
}
ends
// same as above but with tsprite[], as a kind of preview
defstate tduprot
ifn searchstat 3 return
ifn sprite[searchwall].extra DUP_ROT_MAGIC return
set p searchwall // pivot sprite
set cnt sprite[p].shade, state transcnt
for i range cnt
{
for j selsprites, ifn j p
{
set k spritesortcnt
tdupsprite j
set dang i, add dang 1, mul dang sprite[p].ang
rotatepoint sprite[p].x sprite[p].y tsprite[k].x tsprite[k].y dang (x y)
add tsprite[k].ang dang
set z i, add z 1, mul z sprite[p].yrepeat, shiftl z 5
ife sprite[p].pal 0 inv z
add z tsprite[k].z
set tsprite[k].x x
set tsprite[k].y y
set tsprite[k].z z
or tsprite[k].cstat 514
}
}
ends
define DUP_LIN_MAGIC 234
define DUP_LIN_MAGIC2 345
// duplicates and translates selected sprites in the direction between two
// reference sprites with fields
// .extra=234 (1st sprite), =345 (2nd, aimed at sprite)
// .shade: count (-128 to 0 -> 255 to 128)
defstate duplin
ifn searchstat 3 return
ifn sprite[searchwall].extra DUP_LIN_MAGIC2 return
set r searchwall // 2nd reference point
set cnt sprite[r].shade, state transcnt
set p -1 // 1st reference point
for i selsprites, ifn i r
{
ife .extra DUP_LIN_MAGIC { set p i, break }
}
ifl p 0 return
set sprite[p].extra -1
set sprite[r].extra -1
set dx sprite[r].x, sub dx sprite[p].x
set dy sprite[r].y, sub dy sprite[p].y
set dz sprite[r].z, sub dz sprite[p].z
for i range cnt
{
for j selsprites, ifn j r
{
dupsprite j
set x i, add x 1, mul x dx, add x .x
set y i, add y 1, mul y dy, add y .y
set z i, add z 1, mul z dz, add z .z
bsetsprite I x y z
}
}
ends
defstate tduplin
ifn searchstat 3 return
ifn sprite[searchwall].extra DUP_LIN_MAGIC2 return
set r searchwall // 2nd reference point
set cnt sprite[r].shade, state transcnt
set p -1 // 1st reference point
for i selsprites, ifn i r
{
ife .extra DUP_LIN_MAGIC { set p i, break }
}
ifl p 0 return
set dx sprite[r].x, sub dx sprite[p].x
set dy sprite[r].y, sub dy sprite[p].y
set dz sprite[r].z, sub dz sprite[p].z
for i range cnt
{
for j selsprites, ifn j r
{
set k spritesortcnt
tdupsprite j
set tmp i, add tmp 1, mul tmp dx
add tsprite[k].x tmp
set tmp i, add tmp 1, mul tmp dy
add tsprite[k].y tmp
set tmp i, add tmp 1, mul tmp dz
add tsprite[k].z tmp
or tsprite[k].cstat 514
// bsetsprite I x y z
}
}
ends
onevent EVENT_ANALYZESPRITES
state tduprot
state tduplin
/*
for i drawnsprites
{
set j tsprite[i].owner
switch sprite[j].picnum
case LIZTROOP spritepal 1 break
case PIGCOP spritepal 2 break
case BOSS1 spritepal 6 break
endswitch
}
*/
endevent
onevent EVENT_KEYS3D
// door sound tester
ife searchstat 0
ifholdkey KEY_SPACE
{
set k wall[searchwall].nextsector
ifl k 0 set k searchsector
ife sector[k].lotag 0 return
for i spritesofsector k
{
ifactor MUSICANDSFX
ifge .lotag 0 ifl .lotag MAXSOUNDS
{
getsoundflags .lotag m
ifand m 1 nullop else soundonce .lotag
}
}
}
// swinging doors tester -- hit space on a door wall
ife searchstat 0
ifhitkey KEY_SPACE // SE11 ST23 up:ccw
{
set k wall[searchwall].nextsector
ifl k 0 return
ifn sector[k].lotag 23 return
set tmp 0
for i loopofwall searchwall
{
ifl wall[i].nextsector 0 set tmp 1 else
ifn wall[i].nextsector k set tmp 1
}
// a weaker condition
// for i loopofwall wall[searchwall].nextwall
// {
// ifl wall[i].nextsector 0 set tmp 1 else
// ifn wall[i].nextsector searchsector set tmp 1
// }
ifn tmp 0
{
quote 7
return
}
set l -1
for i spritesofsector k
{
ifactor SECTOREFFECTOR ife sprite[i].lotag 11
{
set l i
ifn sprite[i].ang 512 ifn sprite[i].ang 1024 ifn sprite[i].ang 1536 set l -1
}
}
ifl l 0
{
quote 8
return
}
for tmp wallsofsector k
{
rotatepoint (sprite[l].x sprite[l].y) (wall[tmp].x wall[tmp].y) sprite[l].ang (i j)
dragpoint tmp i j
}
for tmp spritesofsector k
{
ifn tmp l
{
rotatepoint (sprite[l].x sprite[l].y) (sprite[tmp].x sprite[tmp].y) sprite[l].ang (i j)
bsetsprite tmp i j sprite[tmp].z
}
}
inv sprite[l].ang
}
// teleporter -- works on SE7 and SE17 (elevator)
ife searchstat 3
ifhitkey KEY_SPACE
{
ife sprite[searchwall].picnum SECTOREFFECTOR
{
set tmp 0
ife sprite[searchwall].lotag 7 set tmp 1
ife sprite[searchwall].lotag 17 set tmp 1
ife tmp 0 return
for i allsprites
{
ifn i searchwall, ifactor SECTOREFFECTOR, ife sprite[i].lotag sprite[searchwall].lotag
ife sprite[i].hitag sprite[searchwall].hitag
{
add posx sprite[i].x, sub posx sprite[searchwall].x
add posy sprite[i].y, sub posy sprite[searchwall].y
add posz sprite[i].z, sub posz sprite[searchwall].z
updatecursectnum
return
}
}
}
else ife sprite[searchwall].extra DUP_ROT_MAGIC
{
state duprot
}
else ife sprite[searchwall].extra DUP_LIN_MAGIC2
{
state duplin
}
}
ifholdkey KEY_0
// ife 0 1
{
ifeithershift sub davr 512 else add davr 512
ifl davr 32768 set davr 32768
ifg davr 256000 set davr 256000
setaspect davr yxaspect
qsprintf TQUOTE 4 davr yxaspect
quote TQUOTE
}
endevent
defstate replacestuff
for i spritesofsector searchsector
// ife sprite[i].picnum AMMO set sprite[i].picnum BATTERYAMMO
ifactor parm[0] cactor parm[1]
ends
defstate convlights // convert (0,0,0) lights to (255,255,255)-ones
for i allsprites ifactor 1 ifge .lotag 49 ifle .lotag 50 ife .xvel 0 ife .yvel 0 ife .zvel 0
{ set .xvel 255 set .yvel 255 set .zvel 255 }
ends
defstate resetallws // reset all sprites and walls to default repeat/panning
for i allsprites
{
set .xrepeat 64
set .yrepeat 64
}
for i allwalls
{
set wall[i].cstat 0
set wall[i].xpanning 0
set wall[i].ypanning 0
set wall[i].yrepeat 8
fixrepeats i
}
ends
defstate jumptosec // (tmp)
for i allsectors
{
ife i tmp
{
set j sector[i].wallptr
set posx wall[j].x
set posy wall[j].y
}
}
ends
// Map corruption checker
gamevar ewall 0 0
gamevar endwall 0 0
defstate corruptchk
ifle numsectors MAXSECTORS ifle numwalls MAXWALLS nullop else
{ quote 19 printmessage16 19 return }
set ewall 0 // expected wall index
for i allsectors
{
set k 1
ifge sector[i].wallptr 0 ifl sector[i].wallptr numwalls nullop else
{
qsprintf TQUOTE 20 i sector[i].wallptr numwalls
quote TQUOTE printmessage16 TQUOTE
set k 0
}
ifn ewall sector[i].wallptr
{
qsprintf TQUOTE 21 i sector[i].wallptr ewall
quote TQUOTE printmessage16 TQUOTE
set ewall sector[i].wallptr
}
add ewall sector[i].wallnum
set endwall sector[i].wallptr add endwall sector[i].wallnum
ifg endwall numwalls
{
qsprintf TQUOTE 22 i endwall numwalls
quote TQUOTE printmessage16 TQUOTE
set k 0
}
ifn k 0
{
for j wallsofsector i
{
ifge wall[j].point2 sector[i].wallptr ifl wall[i].point2 endwall nullop else
{
qsprintf TQUOTE 23 j wall[j].point2 i sector[i].wallptr endwall
quote TQUOTE printmessage16 TQUOTE
}
ifge wall[i].nextwall numwalls
{
qsprintf TQUOTE 24 j wall[j].nextwall numwalls
quote TQUOTE printmessage16 TQUOTE
}
ifge wall[i].nextsector numsectors
{
qsprintf TQUOTE 25 j wall[j].nextsector numsectors
quote TQUOTE printmessage16 TQUOTE
}
}
}
}
ends

View file

@ -19,7 +19,8 @@ asm=masm
ENGINELIB=engine.lib ENGINELIB=engine.lib
EDITORLIB=build.lib EDITORLIB=build.lib
# ENETROOT=$(SRC)\enet # this path should match eduke32\Makefile.msvc
WDKROOT="C:\WinDDK\7600.16385.1"
# /D these to enable certain features of the port's compile process # /D these to enable certain features of the port's compile process
# NOASM When defined, uses C instead of assembly code # NOASM When defined, uses C instead of assembly code
@ -34,20 +35,20 @@ flags_link=/DEBUG
flags_lib= flags_lib=
!else !else
# release options # release options
flags_cl=/O2 /GL /arch:SSE /MP flags_cl=/O2 /GL /arch:SSE /MP /I$(WDKROOT)\inc\crt
flags_link=/RELEASE /LTCG flags_link=/RELEASE /LTCG /LIBPATH:$(WDKROOT)\lib\Crt\i386 /LIBPATH:$(WDKROOT)\lib\wxp\i386
flags_lib=/LTCG flags_lib=/LTCG
!endif !endif
CC=cl CC=cl
AS=ml AS=ml
RC=rc RC=rc
LINK=link /opt:ref /nologo LINK=link /opt:ref /nologo
CFLAGS=$(CFLAGS) /nologo /MT /J $(flags_cl) $(TARGETOPTS) /I$(INC) # /I$(ENETROOT)\include" CFLAGS=$(CFLAGS) /nologo /MT /J $(flags_cl) $(TARGETOPTS) /I$(INC)
ASFLAGS=/nologo /coff /c ASFLAGS=/nologo /coff /c
EXESUFFIX=.exe EXESUFFIX=.exe
!ifdef DEBUG !ifdef DEBUG
CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS /D "_CRT_SECURE_NO_DEPRECATE"
!endif !endif
ENGINEOBJS= \ ENGINEOBJS= \
@ -78,8 +79,7 @@ ENGINEOBJS= \
$(OBJ)\winlayer.$o \ $(OBJ)\winlayer.$o \
$(OBJ)\polymer.$o \ $(OBJ)\polymer.$o \
$(OBJ)\mutex.$o \ $(OBJ)\mutex.$o \
$(OBJ)\rawinput.$o \ $(OBJ)\rawinput.$o
# $(OBJ)\nedmalloc.$o
EDITOROBJS=$(OBJ)\build.$o \ EDITOROBJS=$(OBJ)\build.$o \
$(OBJ)\startwin.editor.$o \ $(OBJ)\startwin.editor.$o \
@ -87,7 +87,7 @@ EDITOROBJS=$(OBJ)\build.$o \
RENDERTYPE=WIN RENDERTYPE=WIN
LIBS=$(LIBS) user32.lib gdi32.lib shell32.lib wsock32.lib comctl32.lib dxguid.lib LIBS=$(LIBS) user32.lib gdi32.lib shell32.lib wsock32.lib comctl32.lib dxguid.lib
CFLAGS=$(CFLAGS) /DRENDERTYPE$(RENDERTYPE)=1 /D "_CRT_SECURE_NO_DEPRECATE" /W2 CFLAGS=$(CFLAGS) /DRENDERTYPE$(RENDERTYPE)=1 /W2
# RULES # RULES
.SUFFIXES: .masm .SUFFIXES: .masm

View file

@ -76,7 +76,10 @@ extern char inputdevices;
#define KEYFIFOSIZ 64 #define KEYFIFOSIZ 64
extern char keystatus[256], keyfifo[KEYFIFOSIZ], keyfifoplc, keyfifoend; extern char keystatus[256], keyfifo[KEYFIFOSIZ], keyfifoplc, keyfifoend;
extern char keyasciififo[KEYFIFOSIZ], keyasciififoplc, keyasciififoend; extern char keyasciififo[KEYFIFOSIZ], keyasciififoplc, keyasciififoend;
extern char scantoasc[128]; extern char scantoasc[128], remap[256], key_names[256][24];
extern int32_t remapinit;
extern void SetKey(int32_t key, int32_t state);
// mouse // mouse
extern volatile int32_t mousex, mousey, mouseb; extern volatile int32_t mousex, mousey, mouseb;
@ -100,9 +103,10 @@ extern inline void idle(void);
extern inline void idle_waitevent(void); extern inline void idle_waitevent(void);
extern inline void idle_waitevent_timeout(uint32_t timeout); extern inline void idle_waitevent_timeout(uint32_t timeout);
typedef void (*KeyPressCallback)(int32_t,int32_t); extern void (*keypresscallback)(int32_t,int32_t);
typedef void (*MousePressCallback)(int32_t,int32_t); extern void (*mousepresscallback)(int32_t,int32_t);
typedef void (*JoyPressCallback)(int32_t,int32_t); extern void (*joypresscallback)(int32_t,int32_t);
int32_t initinput(void); int32_t initinput(void);
void uninitinput(void); void uninitinput(void);
void releaseallbuttons(void); void releaseallbuttons(void);

View file

@ -614,7 +614,6 @@ extern int32_t gltexmaxsize;
void gltexapplyprops (void); void gltexapplyprops (void);
void invalidatecache(void); void invalidatecache(void);
extern int32_t r_depthpeeling, r_peelscount;
extern int32_t r_detailmapping; extern int32_t r_detailmapping;
extern int32_t r_glowmapping; extern int32_t r_glowmapping;
extern int32_t r_vertexarrays; extern int32_t r_vertexarrays;

View file

@ -9,7 +9,7 @@
extern "C" { extern "C" {
#endif #endif
#define VERSION " 1.3.0devel" #define VERSION " 2.0.0devel"
// Build keys // Build keys
#define BK_MOVEFORWARD 0 #define BK_MOVEFORWARD 0

View file

@ -45,6 +45,7 @@ void polymost_drawrooms(void);
void polymost_glinit(void); void polymost_glinit(void);
void polymost_glreset(void); void polymost_glreset(void);
void polymost_cachesync(void);
void gltexinvalidate(int32_t dapicnum, int32_t dapalnum, int32_t dameth); void gltexinvalidate(int32_t dapicnum, int32_t dapalnum, int32_t dameth);
void gltexinvalidateall(void); void gltexinvalidateall(void);
@ -53,21 +54,12 @@ int32_t polymost_printext256(int32_t xpos, int32_t ypos, int16_t col, int16_t ba
extern float curpolygonoffset; extern float curpolygonoffset;
/*
// Depth peeling control
extern int32_t r_curpeel;
extern int32_t peelcompiling;
// Depth peeling data
extern GLuint ztexture[3];
extern GLuint *peels;
extern GLuint *peelfbos;
extern GLuint peelprogram[2];
*/
extern int32_t cachefilehandle; extern int32_t cachefilehandle;
extern FILE *cacheindexptr; extern FILE *cacheindexptr;
extern hashtable_t h_texcache; extern hashtable_t h_texcache;
extern uint8_t *memcachedata;
extern int32_t memcachesize;
extern int32_t cachepos;
struct cacheitem_t struct cacheitem_t
{ {

View file

@ -16,10 +16,6 @@ int32_t win_gethinstance(void);
void win_allowtaskswitching(int32_t onf); void win_allowtaskswitching(int32_t onf);
int32_t win_checkinstance(void); int32_t win_checkinstance(void);
extern void (*keypresscallback)(int32_t,int32_t);
extern void (*mousepresscallback)(int32_t,int32_t);
extern void (*joypresscallback)(int32_t,int32_t);
#include "baselayer.h" #include "baselayer.h"
#else #else

View file

@ -9,6 +9,29 @@
#include "polymost.h" #include "polymost.h"
// input
char inputdevices=0;
char keystatus[256], keyfifo[KEYFIFOSIZ], keyfifoplc, keyfifoend;
char keyasciififo[KEYFIFOSIZ], keyasciififoplc, keyasciififoend;
char remap[256];
int32_t remapinit=0;
char key_names[256][24];
volatile int32_t mousex=0,mousey=0,mouseb=0;
int32_t *joyaxis = NULL, joyb=0, *joyhat = NULL;
char joyisgamepad=0, joynumaxes=0, joynumbuttons=0, joynumhats=0;
int32_t joyaxespresent=0;
void(*keypresscallback)(int32_t,int32_t) = 0;
void(*mousepresscallback)(int32_t,int32_t) = 0;
void(*joypresscallback)(int32_t,int32_t) = 0;
//
// set{key|mouse|joy}presscallback() -- sets a callback which gets notified when keys are pressed
//
void setkeypresscallback(void (*callback)(int32_t, int32_t)) { keypresscallback = callback; }
void setmousepresscallback(void (*callback)(int32_t, int32_t)) { mousepresscallback = callback; }
void setjoypresscallback(void (*callback)(int32_t, int32_t)) { joypresscallback = callback; }
char scantoasc[128] = char scantoasc[128] =
{ {
0,0,'1','2','3','4','5','6','7','8','9','0','-','=',0,0, 0,0,'1','2','3','4','5','6','7','8','9','0','-','=',0,0,
@ -21,6 +44,44 @@ char scantoasc[128] =
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
}; };
void SetKey(int32_t key, int32_t state)
{
keystatus[remap[key]] = state;
if (state)
{
keyfifo[keyfifoend] = remap[key];
keyfifo[(keyfifoend+1)&(KEYFIFOSIZ-1)] = state;
keyfifoend = ((keyfifoend+2)&(KEYFIFOSIZ-1));
}
}
//
// bgetchar, bflushchars -- character-based input functions
//
char bgetchar(void)
{
if (keyasciififoplc == keyasciififoend)
return 0;
{
char c = keyasciififo[keyasciififoplc];
keyasciififoplc = ((keyasciififoplc+1)&(KEYFIFOSIZ-1));
return c;
}
}
void bflushchars(void)
{
Bmemset(&keyasciififo,0,sizeof(keyasciififo));
keyasciififoplc = keyasciififoend = 0;
}
const char *getkeyname(int32_t num)
{
return ((unsigned)num >= 256) ? NULL : key_names[num];
}
#ifdef USE_OPENGL #ifdef USE_OPENGL
struct glinfo_t glinfo = struct glinfo_t glinfo =
{ {
@ -85,8 +146,8 @@ static int32_t osdfunc_setrendermode(const osdfuncparm_t *parm)
char *modestrs[] = char *modestrs[] =
{ {
"classic software", "completely broken polygonal flat-shaded software", "classic software", "",
"polygonal textured software", "polygonal OpenGL", "great justice" "", "polygonal OpenGL", "great justice (Polymer)"
}; };
if (parm->numparms != 1) return OSDCMD_SHOWHELP; if (parm->numparms != 1) return OSDCMD_SHOWHELP;
@ -256,11 +317,9 @@ int32_t baselayer_init(void)
OSD_RegisterFunction("setrendermode","setrendermode <number>: sets the engine's rendering mode.\n" OSD_RegisterFunction("setrendermode","setrendermode <number>: sets the engine's rendering mode.\n"
"Mode numbers are:\n" "Mode numbers are:\n"
" 0 - Classic Build software\n" " 0 - Classic Build software\n"
" 1 - Polygonal flat-shaded software\n"
" 2 - Polygonal textured software\n"
#ifdef USE_OPENGL #ifdef USE_OPENGL
" 3 - Polygonal OpenGL\n" " 3 - Polygonal OpenGL\n"
" 4 - Great justice renderer\n" " 4 - Great justice renderer (Polymer)\n"
#endif #endif
, ,
osdfunc_setrendermode); osdfunc_setrendermode);

View file

@ -680,7 +680,7 @@ struct Bdirent* Breaddir(BDIR *dir)
if (fn) if (fn)
{ {
Bsprintf(fn,"%s/%s",dirr->name,dirr->info.name); Bsprintf(fn,"%s/%s",dirr->name,dirr->info.name);
if (!stat(fn, &st)) if (!Bstat(fn, &st))
{ {
dirr->info.mode = st.st_mode; dirr->info.mode = st.st_mode;
dirr->info.size = st.st_size; dirr->info.size = st.st_size;

View file

@ -6042,24 +6042,6 @@ static inline int32_t sameside(_equation* eq, _point2d* p1, _point2d* p2
return (0); return (0);
} }
/*
#ifdef USE_OPENGL
void drawpeel(int32_t peel)
{
bglBindTexture(GL_TEXTURE_RECTANGLE, peels[peel]);
bglBegin(GL_QUADS);
bglTexCoord2f(0.0f, 0.0f);
bglVertex2f(-1.0f, -1.0f);
bglTexCoord2i(xdim, 0);
bglVertex2f(1.0f, -1.0f);
bglTexCoord2i(xdim, ydim);
bglVertex2f(1.0f, 1.0f);
bglTexCoord2i(0, ydim);
bglVertex2f(-1.0f, 1.0f);
bglEnd();
}
#endif
*/
// //
// drawmasks // drawmasks
@ -6106,7 +6088,7 @@ killsprite:
} }
#ifdef USE_OPENGL #ifdef USE_OPENGL
// if ((!r_depthpeeling) || (rendmode < 3)) // if (rendmode < 3)
#endif #endif
{ {
@ -6185,7 +6167,7 @@ killsprite:
}*/ }*/
#if defined(USE_OPENGL) && defined(POLYMOST) #if defined(USE_OPENGL) && defined(POLYMOST)
// if ((!r_depthpeeling) || (rendmode < 3)) // if (rendmode < 3)
#endif #endif
{ {
#if defined(USE_OPENGL) && defined(POLYMOST) #if defined(USE_OPENGL) && defined(POLYMOST)
@ -6253,130 +6235,7 @@ killsprite:
if (totalclock >= lastcullcheck + CULL_DELAY) if (totalclock >= lastcullcheck + CULL_DELAY)
lastcullcheck = (totalclock + CULL_DELAY); lastcullcheck = (totalclock + CULL_DELAY);
#endif #endif
} /* depthpeeling */ }
#if defined(USE_OPENGL) && defined(POLYMOST)
/*
else
{
curpolygonoffset = 0;
cullcheckcnt = 0;
j = spritesortcnt;
k = maskwallcnt;
while (j > 0) drawsprite(--j);
while (k > 0) drawmaskwall(--k);
if (totalclock < lastcullcheck - CULL_DELAY)
lastcullcheck = totalclock;
if (totalclock >= lastcullcheck + CULL_DELAY)
lastcullcheck = (totalclock + CULL_DELAY);
}
*/
#endif
#if defined(USE_OPENGL) && defined(POLYMOST)
/*
if ((r_depthpeeling) && (rendmode >= 3))
{
bglPopAttrib();
bglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
bglNewList(1, GL_COMPILE);
peelcompiling = 1;
curpolygonoffset = 0;
while (spritesortcnt > 0) drawsprite(--spritesortcnt);
while (maskwallcnt > 0) drawmaskwall(--maskwallcnt);
peelcompiling = 0;
bglEndList();
bglDisable(GL_BLEND);
bglEnable(GL_ALPHA_TEST);
bglAlphaFunc(GL_GREATER, 0.0f);
bglEnable(GL_FRAGMENT_PROGRAM_ARB);
i = 0;
while (i < r_peelscount)
{
if (i > 0)
{
bglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, peelprogram[1]);
bglActiveTextureARB(GL_TEXTURE1_ARB);
bglBindTexture(GL_TEXTURE_RECTANGLE, ztexture[(i - 1) % 2]);
bglActiveTextureARB(GL_TEXTURE2_ARB);
bglBindTexture(GL_TEXTURE_RECTANGLE, ztexture[2]);
bglActiveTextureARB(GL_TEXTURE0_ARB);
}
else
{
bglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, peelprogram[0]);
bglActiveTextureARB(GL_TEXTURE1_ARB);
bglBindTexture(GL_TEXTURE_RECTANGLE, ztexture[2]);
bglActiveTextureARB(GL_TEXTURE0_ARB);
}
if (i == (r_peelscount - 1))
bglEnable(GL_BLEND);
bglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, peelfbos[i]);
bglPushAttrib(GL_VIEWPORT_BIT);
bglViewport(0, 0, xdim, ydim);
bglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
bglCallList(1);
bglPopAttrib();
bglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
i++;
}
bglDisable(GL_FRAGMENT_PROGRAM_ARB);
bglEnable(GL_BLEND);
bglDisable(GL_DEPTH_TEST);
bglColor4f(1.0f, 1.0f, 1.0f, 1.0f);
// identity for screen aligned quads
bglMatrixMode(GL_PROJECTION);
bglPushMatrix();
bglLoadIdentity();
bglMatrixMode(GL_MODELVIEW);
bglPushMatrix();
bglLoadIdentity();
bglEnable(GL_TEXTURE_RECTANGLE);
// backbuffer
drawpeel(r_peelscount);
if (r_curpeel == -1)
{
i = r_peelscount - 1;
while (i >= 0)
drawpeel(i--);
}
else
drawpeel(r_curpeel);
bglDisable(GL_TEXTURE_RECTANGLE);
bglEnable(GL_TEXTURE_2D);
// restore the polymost projection
bglMatrixMode(GL_PROJECTION);
bglPopMatrix();
bglMatrixMode(GL_MODELVIEW);
bglPopMatrix();
bglEnable(GL_DEPTH_TEST);
bglDeleteLists(1, 1);
}
*/
#endif
indrawroomsandmasks = 0; indrawroomsandmasks = 0;
enddrawing(); //}}} enddrawing(); //}}}
@ -6797,10 +6656,13 @@ int32_t loadboard(char *filename, char fromwhere, int32_t *daposx, int32_t *dapo
kclose(fil); kclose(fil);
#if defined(POLYMOST) && defined(USE_OPENGL)
Bmemset(spriteext, 0, sizeof(spriteext_t) * MAXSPRITES); Bmemset(spriteext, 0, sizeof(spriteext_t) * MAXSPRITES);
#if defined(POLYMOST) && defined(USE_OPENGL)
Bmemset(spritesmooth, 0, sizeof(spritesmooth_t) *(MAXSPRITES+MAXUNIQHUDID)); Bmemset(spritesmooth, 0, sizeof(spritesmooth_t) *(MAXSPRITES+MAXUNIQHUDID));
// polymost_cachesync();
# ifdef POLYMER # ifdef POLYMER
if (rendmode == 4) if (rendmode == 4)
polymer_loadboard(); polymer_loadboard();
@ -7316,16 +7178,27 @@ int32_t loadmaphack(char *filename)
{ NULL, -1 } { NULL, -1 }
}; };
scriptfile *script; scriptfile *script = NULL;
char *tok, *cmdtokptr; char *tok, *cmdtokptr;
int32_t i; int32_t i;
int32_t whichsprite = -1; int32_t whichsprite = -1;
static char fn[BMAX_PATH];
script = scriptfile_fromfile(filename); if (filename)
if (!script) return -1; {
memset(spriteext, 0, sizeof(spriteext_t) * MAXSPRITES);
memset(spritesmooth, 0, sizeof(spritesmooth_t) *(MAXSPRITES+MAXUNIQHUDID));
Bstrcpy(fn, filename);
script = scriptfile_fromfile(filename);
}
else if (fn[0])
script = scriptfile_fromfile(fn);
memset(spriteext, 0, sizeof(spriteext_t) * MAXSPRITES); if (!script)
memset(spritesmooth, 0, sizeof(spritesmooth_t) *(MAXSPRITES+MAXUNIQHUDID)); {
fn[0] = 0;
return -1;
}
while (1) while (1)
{ {
@ -7333,6 +7206,9 @@ int32_t loadmaphack(char *filename)
if (!tok) break; if (!tok) break;
for (i=0; legaltokens[i].text; i++) if (!Bstrcasecmp(tok,legaltokens[i].text)) break; for (i=0; legaltokens[i].text; i++) if (!Bstrcasecmp(tok,legaltokens[i].text)) break;
cmdtokptr = script->ltextptr; cmdtokptr = script->ltextptr;
if (!filename && legaltokens[i].tokenid != T_LIGHT) continue;
switch (legaltokens[i].tokenid) switch (legaltokens[i].tokenid)
{ {
case T_SPRITE: // sprite <xx> case T_SPRITE: // sprite <xx>
@ -7727,9 +7603,11 @@ int32_t setgamemode(char davidoption, int32_t daxdim, int32_t daydim, int32_t da
#endif #endif
if ((qsetmode == 200) && (videomodereset == 0) && if ((qsetmode == 200) && (videomodereset == 0) &&
(davidoption == fullscreen) && (xdim == daxdim) && (ydim == daydim) && (bpp == dabpp) (davidoption == fullscreen) && (xdim == daxdim) && (ydim == daydim) && (bpp == dabpp)
/*
#ifdef POLYMER #ifdef POLYMER
&& glrendmode != 4 && glrendmode != 4
#endif // POLYMER #endif // POLYMER
*/
) )
return(0); return(0);
@ -8060,12 +7938,6 @@ void loadtile(int16_t tilenume)
artfilplc = tilefileoffs[tilenume]+dasiz; artfilplc = tilefileoffs[tilenume]+dasiz;
} }
void checktile(int16_t tilenume)
{
if (!waloff[tilenume])
loadtile(tilenume);
}
// //
// allocatepermanenttile // allocatepermanenttile
// //
@ -11122,7 +10994,7 @@ void draw2dscreen(int32_t posxe, int32_t posye, int16_t ange, int32_t zoome, int
if (j < 0) if (j < 0)
{ {
col = 15; col = 15;
if (i == linehighlight) if (totalclock & 16) col -= (2<<2); if (i == linehighlight) col = (totalclock & 16) ? 15 : 7;
} }
else else
{ {
@ -11132,14 +11004,6 @@ void draw2dscreen(int32_t posxe, int32_t posye, int16_t ange, int32_t zoome, int
if ((i == linehighlight) || ((linehighlight >= 0) && (i == wall[linehighlight].nextwall))) if ((i == linehighlight) || ((linehighlight >= 0) && (i == wall[linehighlight].nextwall)))
if (totalclock & 16) col += (2<<2); if (totalclock & 16) col += (2<<2);
} }
if (showfirstwall && (sector[searchsector].wallptr==i||sector[searchsector].wallptr==wall[i].nextwall))
{
col = 14;
if (i == linehighlight) if (totalclock & 16) col -= (2<<2);
}
if (circlewall >= 0 && (i == circlewall || wal->nextwall == circlewall))
col = 14;
xp1 = mulscale14(wal->x-posxe,zoome); xp1 = mulscale14(wal->x-posxe,zoome);
yp1 = mulscale14(wal->y-posye,zoome); yp1 = mulscale14(wal->y-posye,zoome);
@ -11149,12 +11013,20 @@ void draw2dscreen(int32_t posxe, int32_t posye, int16_t ange, int32_t zoome, int
dx=wal->x-wall[wal->point2].x; dx=wal->x-wall[wal->point2].x;
dy=wal->y-wall[wal->point2].y; dy=wal->y-wall[wal->point2].y;
dist=dx*dx+dy*dy; dist=dx*dx+dy*dy;
if (dist>0xffffffff)
if (dist > 0xffffffff)
{ {
col=9; col=9;
if (i == linehighlight || ((linehighlight >= 0) && (i == wall[linehighlight].nextwall))) if (i == linehighlight || ((linehighlight >= 0) && (i == wall[linehighlight].nextwall)))
if (totalclock & 16) col -= (2<<2); if (totalclock & 16) col -= (2<<2);
} }
else if (showfirstwall && (sector[searchsector].wallptr == i || sector[searchsector].wallptr == wall[i].nextwall))
{
col = 14;
if (i == linehighlight) if (totalclock & 16) col -= (2<<2);
}
else if (circlewall >= 0 && (i == circlewall || wal->nextwall == circlewall))
col = 14;
if ((wal->cstat&64) > 0) if ((wal->cstat&64) > 0)
{ {
@ -11215,39 +11087,26 @@ void draw2dscreen(int32_t posxe, int32_t posye, int16_t ange, int32_t zoome, int
if (((midydim16+yp1) >= 2) && ((midydim16+yp1) <= ydim16-3)) if (((midydim16+yp1) >= 2) && ((midydim16+yp1) <= ydim16-3))
{ {
int32_t pointsize = 2; int32_t pointsize = 2;
col = 15;
if (i == pointhighlight || ((pointhighlight < MAXWALLS) && (pointhighlight >= 0) && (wall[i].x == wall[pointhighlight].x) && (wall[i].y == wall[pointhighlight].y))) if (i == pointhighlight || ((pointhighlight < MAXWALLS) && (pointhighlight >= 0) &&
(wall[i].x == wall[pointhighlight].x) && (wall[i].y == wall[pointhighlight].y)))
{ {
if (totalclock & 16) if (totalclock & 16)
{ pointsize++;
//col += (2<<2); // JBF 20040116: two braces is all this needed. man I'm a fool sometimes.
pointsize += 1;
}
} }
else if ((highlightcnt > 0) && (editstatus == 1)) else if ((highlightcnt > 0) && (editstatus == 1))
{ {
if (show2dwall[i>>3]&pow2char[i&7]) if (show2dwall[i>>3]&pow2char[i&7])
{
if (totalclock & 16) if (totalclock & 16)
{ pointsize++;
// col += (2<<2); // JBF 20040116: two braces is all this needed. man I'm a fool sometimes. }
pointsize += 1;
}
} }
tempint = ((midydim16+yp1)*bytesperline)+(halfxdim16+xp1)+frameplace; tempint = ((midydim16+yp1)*bytesperline)+(halfxdim16+xp1)+frameplace;
#if 1
do do
{ drawcircle16(halfxdim16+xp1, midydim16+yp1, pointsize--, editorcolors[15]);
/* drawline16(halfxdim16+xp1-pointsize,midydim16+yp1+pointsize,halfxdim16+xp1+pointsize,midydim16+yp1+pointsize,col); while (pointsize);
drawline16(halfxdim16+xp1+pointsize,midydim16+yp1+pointsize,halfxdim16+xp1+pointsize,midydim16+yp1-pointsize,col);
drawline16(halfxdim16+xp1+pointsize,midydim16+yp1-pointsize,halfxdim16+xp1-pointsize,midydim16+yp1-pointsize,col);
drawline16(halfxdim16+xp1-pointsize,midydim16+yp1-pointsize,halfxdim16+xp1-pointsize,midydim16+yp1+pointsize,col); */
drawcircle16(halfxdim16+xp1, midydim16+yp1, pointsize, editorcolors[col]);
}
while (pointsize--);
#else
drawcircle16(halfxdim16+xp1, midydim16+yp1, pointsize, col);
#endif
} }
} }
faketimerhandler(); faketimerhandler();

View file

@ -60,7 +60,7 @@ static uint16_t SSWAPIL(uint16_t a) { return((a>>8)+(a<<8)); }
typedef long long __int64; typedef long long __int64;
static __inline int32_t _lrotl(int32_t i, int sh) static __inline int32_t _lrotl(int32_t i, int sh)
{ return((i>>(-sh))|(i<<sh)); } { return((i>>(-sh))|(i<<sh)); }
static __inline int32_t filelength(int h) __inline int32_t filelength(int h)
{ {
struct stat st; struct stat st;
if (fstat(h,&st) < 0) return(-1); if (fstat(h,&st) < 0) return(-1);

View file

@ -556,15 +556,31 @@ int32_t mdloadskin_trytexcache(char *fn, int32_t len, int32_t pal, char effect,
texcacheindex *cacheindexptr = cacheptrs[i]; texcacheindex *cacheindexptr = cacheptrs[i];
len = cacheindexptr->len; len = cacheindexptr->len;
offset = cacheindexptr->offset; offset = cacheindexptr->offset;
// initprintf("got a match for %s offset %d\n",cachefn,offset); // initprintf("got a match for %s offset %d\n",cachefn,offset);
} }
if (len == 0) return -1; // didn't find it if (len == 0) return -1; // didn't find it
Blseek(cachefilehandle, offset, BSEEK_SET); cachepos = offset;
} }
// initprintf("Loading cached skin: %s\n", cachefn); // initprintf("Loading cached skin: %s\n", cachefn);
if (Bread(cachefilehandle, head, sizeof(texcacheheader)) < (int32_t)sizeof(texcacheheader)) goto failure; if (memcachedata && memcachesize >= (signed)(cachepos + sizeof(texcacheheader)))
{
// initprintf("using memcache!\n");
Bmemcpy(head, memcachedata + cachepos, sizeof(texcacheheader));
cachepos += sizeof(texcacheheader);
}
else
{
Blseek(cachefilehandle, cachepos, BSEEK_SET);
if (Bread(cachefilehandle, head, sizeof(texcacheheader)) < (int32_t)sizeof(texcacheheader))
{
cachepos += sizeof(texcacheheader);
goto failure;
}
cachepos += sizeof(texcacheheader);
}
if (memcmp(head->magic, TEXCACHEMAGIC, 4)) goto failure; if (memcmp(head->magic, TEXCACHEMAGIC, 4)) goto failure;
head->xdim = B_LITTLE32(head->xdim); head->xdim = B_LITTLE32(head->xdim);
@ -607,7 +623,9 @@ static int32_t mdloadskin_cached(int32_t fil, texcacheheader *head, int32_t *doa
// load the mipmaps // load the mipmaps
for (level = 0; level==0 || (pict.xdim > 1 || pict.ydim > 1); level++) for (level = 0; level==0 || (pict.xdim > 1 || pict.ydim > 1); level++)
{ {
Blseek(fil, cachepos, BSEEK_SET);
r = Bread(fil, &pict, sizeof(texcachepicture)); r = Bread(fil, &pict, sizeof(texcachepicture));
cachepos += sizeof(texcachepicture);
if (r < (int32_t)sizeof(texcachepicture)) goto failure; if (r < (int32_t)sizeof(texcachepicture)) goto failure;
pict.size = B_LITTLE32(pict.size); pict.size = B_LITTLE32(pict.size);
@ -831,7 +849,7 @@ int32_t mdloadskin(md2model_t *m, int32_t number, int32_t pal, int32_t surf)
if (ysiz == pow2long[j]) { i |= 2; } if (ysiz == pow2long[j]) { i |= 2; }
} }
cachead.flags = (i!=3) | (hasalpha ? 2 : 0); cachead.flags = (i!=3) | (hasalpha ? 2 : 0);
OSD_Printf("No cached tex for %s.\n",fn); OSD_Printf("Caching \"%s\"\n",fn);
writexcache(fn, picfillen, pal<<8, (globalnoeffect)?0:(hictinting[pal].f&HICEFFECTMASK), &cachead); writexcache(fn, picfillen, pal<<8, (globalnoeffect)?0:(hictinting[pal].f&HICEFFECTMASK), &cachead);
} }
@ -1872,14 +1890,13 @@ static int32_t md3draw(md3model_t *m, spritetype *tspr)
float al = 0.0; float al = 0.0;
if (alphahackarray[globalpicnum] != 0) if (alphahackarray[globalpicnum] != 0)
al=alphahackarray[globalpicnum]; al=alphahackarray[globalpicnum];
/*if (!peelcompiling)*/
bglEnable(GL_BLEND); bglEnable(GL_BLEND);
bglEnable(GL_ALPHA_TEST); bglEnable(GL_ALPHA_TEST);
bglAlphaFunc(GL_GREATER,al); bglAlphaFunc(GL_GREATER,al);
} }
else else
{ {
if (tspr->cstat&2/* && (!peelcompiling)*/) bglEnable(GL_BLEND); //else bglDisable(GL_BLEND); if (tspr->cstat&2) bglEnable(GL_BLEND); //else bglDisable(GL_BLEND);
} }
bglColor4f(pc[0],pc[1],pc[2],pc[3]); bglColor4f(pc[0],pc[1],pc[2],pc[3]);
//if (m->head.flags == 1337) //if (m->head.flags == 1337)
@ -1973,7 +1990,7 @@ static int32_t md3draw(md3model_t *m, spritetype *tspr)
//i = mdloadskin((md2model *)m,tile2model[Ptile2tile(tspr->picnum,lpal)].skinnum,surfi); //hack for testing multiple surfaces per MD3 //i = mdloadskin((md2model *)m,tile2model[Ptile2tile(tspr->picnum,lpal)].skinnum,surfi); //hack for testing multiple surfaces per MD3
bglBindTexture(GL_TEXTURE_2D, i); bglBindTexture(GL_TEXTURE_2D, i);
if (r_detailmapping && /*!r_depthpeeling &&*/ !(tspr->cstat&1024)) if (r_detailmapping && !(tspr->cstat&1024))
i = mdloadskin((md2model_t *)m,tile2model[Ptile2tile(tspr->picnum,lpal)].skinnum,DETAILPAL,surfi); i = mdloadskin((md2model_t *)m,tile2model[Ptile2tile(tspr->picnum,lpal)].skinnum,DETAILPAL,surfi);
else else
i = 0; i = 0;
@ -2013,7 +2030,7 @@ static int32_t md3draw(md3model_t *m, spritetype *tspr)
bglMatrixMode(GL_MODELVIEW); bglMatrixMode(GL_MODELVIEW);
} }
if (r_glowmapping && /*!r_depthpeeling &&*/ !(tspr->cstat&1024)) if (r_glowmapping && !(tspr->cstat&1024))
i = mdloadskin((md2model_t *)m,tile2model[Ptile2tile(tspr->picnum,lpal)].skinnum,GLOWPAL,surfi); i = mdloadskin((md2model_t *)m,tile2model[Ptile2tile(tspr->picnum,lpal)].skinnum,GLOWPAL,surfi);
else else
i = 0; i = 0;
@ -2055,7 +2072,7 @@ static int32_t md3draw(md3model_t *m, spritetype *tspr)
indexhandle = m->vindexes; indexhandle = m->vindexes;
//PLAG: delayed polygon-level sorted rendering //PLAG: delayed polygon-level sorted rendering
if (m->usesalpha && !(tspr->cstat & 1024)/* && !r_depthpeeling*/) if (m->usesalpha && !(tspr->cstat & 1024))
{ {
for (i=s->numtris-1; i>=0; i--) for (i=s->numtris-1; i>=0; i--)
{ {
@ -3030,7 +3047,7 @@ int32_t voxdraw(voxmodel_t *m, spritetype *tspr)
pc[2] *= (float)hictinting[globalpal].b / 255.0; pc[2] *= (float)hictinting[globalpal].b / 255.0;
if (tspr->cstat&2) { if (!(tspr->cstat&512)) pc[3] = 0.66f; else pc[3] = 0.33f; } if (tspr->cstat&2) { if (!(tspr->cstat&512)) pc[3] = 0.66f; else pc[3] = 0.33f; }
else pc[3] = 1.0; else pc[3] = 1.0;
if (tspr->cstat&2/* && (!peelcompiling)*/) bglEnable(GL_BLEND); //else bglDisable(GL_BLEND); if (tspr->cstat&2) bglEnable(GL_BLEND); //else bglDisable(GL_BLEND);
//------------ //------------
//transform to Build coords //transform to Build coords

View file

@ -1373,9 +1373,6 @@ void OSD_Draw(void)
clearbackground(osdcols,osdrowscur+1); clearbackground(osdcols,osdrowscur+1);
if (osdver[0] && osdrowscur>2)
drawosdstr(osdcols-osdverlen,osdrowscur-2,osdver,osdverlen,(sintable[(totalclock<<4)&2047]>>11),osdverpal);
for (; lines>0; lines--, row--) for (; lines>0; lines--, row--)
{ {
drawosdstr(0,row,osdtext+topoffs,osdcols,osdtextshade,osdtextpal); drawosdstr(0,row,osdtext+topoffs,osdcols,osdtextshade,osdtextpal);
@ -1397,7 +1394,13 @@ void OSD_Draw(void)
for (x=len-1; x>=0; x--) for (x=len-1; x>=0; x--)
drawosdchar(3+x+offset,osdrowscur,osdeditbuf[osdeditwinstart+x],osdeditshade<<1,osdeditpal); drawosdchar(3+x+offset,osdrowscur,osdeditbuf[osdeditwinstart+x],osdeditshade<<1,osdeditpal);
drawosdcursor(3+osdeditcursor-osdeditwinstart+offset,osdrowscur,osdflags & OSD_OVERTYPE,keytime); offset += 3+osdeditcursor-osdeditwinstart;
drawosdcursor(offset,osdrowscur,osdflags & OSD_OVERTYPE,keytime);
if (osdver[0])
drawosdstr(osdcols-osdverlen,osdrowscur - (offset >= osdcols-osdverlen),
osdver,osdverlen,(sintable[(totalclock<<4)&2047]>>11),osdverpal);
} }
enddrawing(); enddrawing();

View file

@ -747,6 +747,8 @@ void polymer_resetlights(void)
} }
lightcount = 0; lightcount = 0;
loadmaphack(NULL);
} }
void polymer_loadboard(void) void polymer_loadboard(void)

View file

@ -87,6 +87,10 @@ Low priority:
#include "cache1d.h" #include "cache1d.h"
#include "kplib.h" #include "kplib.h"
#ifndef _WIN32
extern int32_t filelength(int h); // kplib.c
#endif
extern char textfont[2048], smalltextfont[2048]; extern char textfont[2048], smalltextfont[2048];
int32_t rendmode=0; int32_t rendmode=0;
@ -241,32 +245,8 @@ void drawline2d(float x0, float y0, float x1, float y1, char col)
} }
#ifdef USE_OPENGL #ifdef USE_OPENGL
#include "md4.h" #include "md4.h"
#include "quicklz.h"
#define USELZF
#define USEKENFILTER 1
#ifdef USELZF
# include "quicklz.h"
#else
# include "lzwnew.h"
#endif
int32_t cachefilehandle = -1; // texture cache file handle
FILE *cacheindexptr = NULL;
hashtable_t h_texcache = { 1024, NULL };
char TEXCACHEFILE[BMAX_PATH] = "textures";
int32_t mdtims, omdtims;
float alphahackarray[MAXTILES];
texcacheindex *firstcacheindex = NULL;
texcacheindex *curcacheindex = NULL;
texcacheindex *cacheptrs[MAXTILES<<1];
int32_t numcacheentries = 0;
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
//TEXTURE MANAGEMENT: treats same texture with different .PAL as a separate texture. This makes the //TEXTURE MANAGEMENT: treats same texture with different .PAL as a separate texture. This makes the
@ -292,6 +272,25 @@ int32_t numcacheentries = 0;
struct pthtyp_t *ofb; // only fullbright struct pthtyp_t *ofb; // only fullbright
} pthtyp;*/ } pthtyp;*/
int32_t cachefilehandle = -1; // texture cache file handle
FILE *cacheindexptr = NULL;
uint8_t *memcachedata = NULL;
int32_t memcachesize = -1;
int32_t cachepos = 0;
hashtable_t h_texcache = { 1024, NULL };
char TEXCACHEFILE[BMAX_PATH] = "textures";
int32_t mdtims, omdtims;
float alphahackarray[MAXTILES];
texcacheindex *firstcacheindex = NULL;
texcacheindex *curcacheindex = NULL;
texcacheindex *cacheptrs[MAXTILES<<1];
int32_t numcacheentries = 0;
#define GLTEXCACHEADSIZ 8192 #define GLTEXCACHEADSIZ 8192
pthtyp *gltexcachead[GLTEXCACHEADSIZ]; pthtyp *gltexcachead[GLTEXCACHEADSIZ];
@ -551,6 +550,21 @@ float glox1, gloy1, glox2, gloy2;
//Use this for both initialization and uninitialization of OpenGL. //Use this for both initialization and uninitialization of OpenGL.
static int32_t gltexcacnum = -1; static int32_t gltexcacnum = -1;
extern void freevbos(void); extern void freevbos(void);
void polymost_cachesync(void)
{
if (memcachedata && cachefilehandle != -1 && filelength(cachefilehandle) > memcachesize)
{
size_t len = filelength(cachefilehandle);
initprintf("Syncing memcache to texcache\n");
memcachedata = (uint8_t *)Brealloc(memcachedata, len);
Blseek(cachefilehandle, memcachesize, BSEEK_SET);
Bread(cachefilehandle, memcachedata + memcachesize, len - memcachesize);
memcachesize = len;
}
}
void polymost_glreset() void polymost_glreset()
{ {
int32_t i; int32_t i;
@ -602,17 +616,19 @@ void polymost_glreset()
memset(gltexcachead,0,sizeof(gltexcachead)); memset(gltexcachead,0,sizeof(gltexcachead));
glox1 = -1; glox1 = -1;
if (cachefilehandle != -1) /*
{ if (cachefilehandle != -1)
Bclose(cachefilehandle); {
cachefilehandle = -1; Bclose(cachefilehandle);
} cachefilehandle = -1;
}
if (cacheindexptr) if (cacheindexptr)
{ {
Bfclose(cacheindexptr); Bfclose(cacheindexptr);
cacheindexptr = NULL; cacheindexptr = NULL;
} }
*/
for (i = numcacheentries-1; i >= 0; i--) for (i = numcacheentries-1; i >= 0; i--)
if (cacheptrs[i]) if (cacheptrs[i])
@ -625,9 +641,11 @@ void polymost_glreset()
cacheptrs[ii] = NULL; cacheptrs[ii] = NULL;
} }
Bfree(cacheptrs[i]); Bfree(cacheptrs[i]);
cacheptrs[i] = NULL; cacheptrs[i] = NULL;
} }
polymost_cachesync();
} }
// one-time initialization of OpenGL for polymost // one-time initialization of OpenGL for polymost
@ -685,7 +703,7 @@ void polymost_glinit()
bglEnableClientState(GL_VERTEX_ARRAY); bglEnableClientState(GL_VERTEX_ARRAY);
bglEnableClientState(GL_TEXTURE_COORD_ARRAY); bglEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (cachefilehandle > -1) if (cachefilehandle != -1)
{ {
Bclose(cachefilehandle); Bclose(cachefilehandle);
cachefilehandle = -1; cachefilehandle = -1;
@ -697,6 +715,13 @@ void polymost_glinit()
cacheindexptr = NULL; cacheindexptr = NULL;
} }
if (memcachedata)
{
Bfree(memcachedata);
memcachedata = NULL;
memcachesize = -1;
}
for (i = numcacheentries-1; i >= 0; i--) for (i = numcacheentries-1; i >= 0; i--)
if (cacheptrs[i]) if (cacheptrs[i])
{ {
@ -748,6 +773,24 @@ void polymost_glinit()
return; return;
} }
memcachesize = filelength(cachefilehandle);
if (memcachesize > 0)
memcachedata = (uint8_t *)Brealloc(memcachedata, memcachesize);
if (!memcachedata)
{
initprintf("Failed allocating %d bytes for memcache\n", memcachesize);
memcachesize = -1;
}
if (memcachesize > 0 && Bread(cachefilehandle, memcachedata, memcachesize) != memcachesize)
{
initprintf("Failed reading texcache into memcache!\n");
Bfree(memcachedata);
memcachesize = -1;
}
i = 0; i = 0;
curcacheindex = firstcacheindex; curcacheindex = firstcacheindex;
@ -770,6 +813,7 @@ void invalidatecache(void)
r_downsizevar = r_downsize; // update the cvar representation when the menu changes r_downsize r_downsizevar = r_downsize; // update the cvar representation when the menu changes r_downsize
polymost_glreset(); polymost_glreset();
if (cachefilehandle != -1) if (cachefilehandle != -1)
{ {
Bclose(cachefilehandle); Bclose(cachefilehandle);
@ -782,6 +826,13 @@ void invalidatecache(void)
cacheindexptr = NULL; cacheindexptr = NULL;
} }
if (memcachedata)
{
Bfree(memcachedata);
memcachedata = NULL;
memcachesize = -1;
}
for (i = numcacheentries-1; i >= 0; i--) for (i = numcacheentries-1; i >= 0; i--)
if (cacheptrs[i]) if (cacheptrs[i])
{ {
@ -1285,16 +1336,28 @@ int32_t trytexcache(char *fn, int32_t len, int32_t dameth, char effect, texcache
} }
else return -1; // didn't find it else return -1; // didn't find it
if (Blseek(cachefilehandle, offset, BSEEK_SET) == -1) cachepos = offset;
{
OSD_Printf("Cache seek error: %s\n",strerror(errno));
return -1;
}
} }
// initprintf("Loading cached tex: %s\n", cachefn); // initprintf("Loading cached tex: %s\n", cachefn);
if (Bread(cachefilehandle, head, sizeof(texcacheheader)) < (int32_t)sizeof(texcacheheader)) goto failure; if (memcachedata && memcachesize >= (signed)(cachepos + sizeof(texcacheheader)))
{
// initprintf("using memcache!\n");
Bmemcpy(head, memcachedata + cachepos, sizeof(texcacheheader));
cachepos += sizeof(texcacheheader);
}
else
{
Blseek(cachefilehandle, cachepos, BSEEK_SET);
if (Bread(cachefilehandle, head, sizeof(texcacheheader)) < (int32_t)sizeof(texcacheheader))
{
cachepos += sizeof(texcacheheader);
goto failure;
}
cachepos += sizeof(texcacheheader);
}
if (Bmemcmp(head->magic, TEXCACHEMAGIC, 4)) goto failure; if (Bmemcmp(head->magic, TEXCACHEMAGIC, 4)) goto failure;
head->xdim = B_LITTLE32(head->xdim); head->xdim = B_LITTLE32(head->xdim);
head->ydim = B_LITTLE32(head->ydim); head->ydim = B_LITTLE32(head->ydim);
@ -1358,7 +1421,7 @@ void writexcache(char *fn, int32_t len, int32_t dameth, char effect, texcachehea
Blseek(cachefilehandle, 0, BSEEK_END); Blseek(cachefilehandle, 0, BSEEK_END);
offset = Blseek(cachefilehandle, 0, BSEEK_CUR); offset = Blseek(cachefilehandle, 0, BSEEK_CUR);
OSD_Printf("Caching %s, offset 0x%x\n", cachefn, offset); // OSD_Printf("Caching %s, offset 0x%x\n", cachefn, offset);
Bmemcpy(head->magic, TEXCACHEMAGIC, 4); // sizes are set by caller Bmemcpy(head->magic, TEXCACHEMAGIC, 4); // sizes are set by caller
@ -1380,7 +1443,7 @@ void writexcache(char *fn, int32_t len, int32_t dameth, char effect, texcachehea
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_INTERNAL_FORMAT, (GLint *)&gi); bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_INTERNAL_FORMAT, (GLint *)&gi);
if (bglGetError() != GL_NO_ERROR) goto failure; if (bglGetError() != GL_NO_ERROR) goto failure;
#ifdef __APPLE__ #ifdef __APPLE__
if(pr_ati_textureformat_one && gi == 1 ) gi = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT; if (pr_ati_textureformat_one && gi == 1) gi = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
#endif #endif
pict.format = B_LITTLE32(gi); pict.format = B_LITTLE32(gi);
bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_WIDTH, (GLint *)&gi); bglGetTexLevelParameteriv(GL_TEXTURE_2D, level, GL_TEXTURE_WIDTH, (GLint *)&gi);
@ -1494,8 +1557,19 @@ int32_t gloadtile_cached(int32_t fil, texcacheheader *head, int32_t *doalloc, pt
// load the mipmaps // load the mipmaps
for (level = 0; level==0 || (pict.xdim > 1 || pict.ydim > 1); level++) for (level = 0; level==0 || (pict.xdim > 1 || pict.ydim > 1); level++)
{ {
r = Bread(fil, &pict, sizeof(texcachepicture)); if (memcachedata && memcachesize >= (signed)(cachepos + sizeof(texcachepicture)))
if (r < (int32_t)sizeof(texcachepicture)) goto failure; {
// initprintf("using memcache!\n");
Bmemcpy(&pict, memcachedata + cachepos, sizeof(texcachepicture));
cachepos += sizeof(texcachepicture);
}
else
{
Blseek(fil, cachepos, BSEEK_SET);
r = Bread(fil, &pict, sizeof(texcachepicture));
cachepos += sizeof(texcachepicture);
if (r < (int32_t)sizeof(texcachepicture)) goto failure;
}
pict.size = B_LITTLE32(pict.size); pict.size = B_LITTLE32(pict.size);
pict.format = B_LITTLE32(pict.format); pict.format = B_LITTLE32(pict.format);
@ -1802,7 +1876,7 @@ int32_t gloadtile_hi(int32_t dapic,int32_t dapalnum, int32_t facen, hicreplctyp
if (ysiz == pow2long[j]) { x |= 2; } if (ysiz == pow2long[j]) { x |= 2; }
} }
cachead.flags = (x!=3) | (hasalpha != 255 ? 2 : 0) | (hicr->flags & 16?8:0); // handle nocompress cachead.flags = (x!=3) | (hasalpha != 255 ? 2 : 0) | (hicr->flags & 16?8:0); // handle nocompress
OSD_Printf("No cached tex for tile %d pal %d.\n",dapic,dapalnum); OSD_Printf("Caching \"%s\"\n", fn);
writexcache(fn, picfillen+(dapalnum<<8), dameth, effect, &cachead); writexcache(fn, picfillen+(dapalnum<<8), dameth, effect, &cachead);
} }
@ -3558,12 +3632,13 @@ static void polymost_drawalls(int32_t bunch)
oy = -vv[0]/vv[1]; oy = -vv[0]/vv[1];
if ((oy < cy0) && (oy < cy1)) domost(x1,oy,x0,oy); if ((oy < cy0) && (oy < cy1)) domost(x1,oy,x0,oy);
else if ((oy < cy0) != (oy < cy1)) else if ((oy < cy0) != (oy < cy1))
{ /* cy1 cy0 {
// / \ /* cy1 cy0
//oy---------- oy--------- // / \
// / \ //oy---------- oy---------
// cy0 cy1 // / \
*/ // cy0 cy1
*/
ox = (oy-cy0)*(x1-x0)/(cy1-cy0) + x0; ox = (oy-cy0)*(x1-x0)/(cy1-cy0) + x0;
if (oy < cy0) { domost(ox,oy,x0,oy); domost(x1,cy1,ox,oy); } if (oy < cy0) { domost(ox,oy,x0,oy); domost(x1,cy1,ox,oy); }
else { domost(ox,oy,x0,cy0); domost(x1,oy,ox,oy); } else { domost(ox,oy,x0,cy0); domost(x1,oy,ox,oy); }
@ -5970,10 +6045,14 @@ void polymost_initosdfuncs(void)
{ "r_multisample","r_multisample: sets the number of samples used for antialiasing (0 = off)",(void *)&r_glowmapping, CVAR_BOOL, 0, 1 } { "r_multisample","r_multisample: sets the number of samples used for antialiasing (0 = off)",(void *)&r_glowmapping, CVAR_BOOL, 0, 1 }
{ "r_nvmultisamplehint","r_nvmultisamplehint: enable/disable Nvidia multisampling hinting",(void *)&glnvmultisamplehint, CVAR_BOOL, 0, 1 } { "r_nvmultisamplehint","r_nvmultisamplehint: enable/disable Nvidia multisampling hinting",(void *)&glnvmultisamplehint, CVAR_BOOL, 0, 1 }
*/ */
{ "r_parallaxskyclamping","r_parallaxskyclamping: enable/disable parallaxed floor/ceiling sky texture clamping", {
(void *)&r_parallaxskyclamping, CVAR_BOOL, 0, 1 }, "r_parallaxskyclamping","r_parallaxskyclamping: enable/disable parallaxed floor/ceiling sky texture clamping",
{ "r_parallaxskypanning","r_parallaxskypanning: enable/disable parallaxed floor/ceiling panning when drawing a parallaxed sky", (void *)&r_parallaxskyclamping, CVAR_BOOL, 0, 1
(void *)&r_parallaxskypanning, CVAR_BOOL, 0, 1 }, },
{
"r_parallaxskypanning","r_parallaxskypanning: enable/disable parallaxed floor/ceiling panning when drawing a parallaxed sky",
(void *)&r_parallaxskypanning, CVAR_BOOL, 0, 1
},
{ "r_polygonmode","r_polygonmode: debugging feature",(void *)&glpolygonmode, CVAR_INT | CVAR_NOSAVE, 0, 3 }, { "r_polygonmode","r_polygonmode: debugging feature",(void *)&glpolygonmode, CVAR_INT | CVAR_NOSAVE, 0, 3 },
{ "r_redbluemode","r_redbluemode: enable/disable experimental OpenGL red-blue glasses mode",(void *)&glredbluemode, CVAR_BOOL, 0, 1 }, { "r_redbluemode","r_redbluemode: enable/disable experimental OpenGL red-blue glasses mode",(void *)&glredbluemode, CVAR_BOOL, 0, 1 },
{ "r_shadescale","r_shadescale: multiplier for lighting",(void *)&shadescale, CVAR_FLOAT, 0, 10 }, { "r_shadescale","r_shadescale: multiplier for lighting",(void *)&shadescale, CVAR_FLOAT, 0, 10 },
@ -6029,7 +6108,7 @@ void polymost_initosdfuncs(void)
continue; continue;
OSD_RegisterFunction(cvars_polymost[i].name, cvars_polymost[i].helpstr, OSD_RegisterFunction(cvars_polymost[i].name, cvars_polymost[i].helpstr,
cvars_polymost[i].type & CVAR_FUNCPTR ? osdcmd_cvar_set_polymost : osdcmd_cvar_set); cvars_polymost[i].type & CVAR_FUNCPTR ? osdcmd_cvar_set_polymost : osdcmd_cvar_set);
} }
} }
@ -6129,164 +6208,107 @@ Description of Ken's filter to improve LZW compression of DXT1 format by ~15%: (
*/ */
#if defined(POLYMOST) && defined(USE_OPENGL) #if defined(POLYMOST) && defined(USE_OPENGL)
int32_t dxtfilter(int32_t fil, texcachepicture *pict, char *pic, void *midbuf, char *packbuf, uint32_t miplen) int32_t dxtfilter(int32_t fil, texcachepicture *pict, char *pic, void *midbuf, char *packbuf, uint32_t miplen)
{ {
void *writebuf; void *writebuf;
#if (USEKENFILTER == 0) uint32_t j, k, offs, stride, cleng;
uint32_t cleng,j; char *cptr;
if (glusetexcache == 2)
{ if ((pict->format == B_LITTLE32(GL_COMPRESSED_RGB_S3TC_DXT1_EXT)) ||
#ifdef USELZF (pict->format == B_LITTLE32(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT))) { offs = 0; stride = 8; }
cleng = qlz_compress(pic, packbuf, miplen, state_compress); else if ((pict->format == B_LITTLE32(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT)) ||
if (cleng == 0 || cleng > j-1) (pict->format == B_LITTLE32(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT))) { offs = 8; stride = 16; }
{ else { offs = 0; stride = 8; }
// failed to compress
cleng = miplen; if (stride == 16) //If DXT3...
writebuf = pic; {
} //alpha_4x4
else writebuf = packbuf; cptr = midbuf;
#else for (k=0; k<8; k++) *cptr++ = pic[k];
cleng = lzwcompress(pic,miplen,packbuf); for (j=stride; (unsigned)j<miplen; j+=stride)
writebuf = packbuf; for (k=0; k<8; k++) *cptr++ = pic[j+k];
#endif if (glusetexcache == 2)
} {
else j = (miplen/stride)<<3;
{ cleng = qlz_compress(midbuf,packbuf,j,state_compress);
cleng = miplen; if (cleng == 0 || cleng > j-1)
writebuf = pic; {
} cleng = j;
if (cleng < 0) return -1; j = B_LITTLE32(cleng); writebuf = midbuf;
if (Bwrite(fil, &j, sizeof(uint32_t)) != sizeof(uint32_t)) return -1; }
if (Bwrite(fil, writebuf, cleng) != cleng) return -1; else writebuf = packbuf;
#else }
uint32_t j, k, offs, stride, cleng; else
char *cptr; {
cleng = (miplen/stride)<<3;
if ((pict->format == B_LITTLE32(GL_COMPRESSED_RGB_S3TC_DXT1_EXT)) || writebuf = midbuf;
(pict->format == B_LITTLE32(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT))) { offs = 0; stride = 8; } }
else if ((pict->format == B_LITTLE32(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT)) || j = B_LITTLE32(cleng);
(pict->format == B_LITTLE32(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT))) { offs = 8; stride = 16; } Bwrite(fil,&j,sizeof(j));
else { offs = 0; stride = 8; } Bwrite(fil,writebuf,cleng);
}
if (stride == 16) //If DXT3...
{ //rgb0,rgb1
//alpha_4x4 cptr = midbuf;
cptr = midbuf; for (k=0; k<=2; k+=2)
for (k=0; k<8; k++) *cptr++ = pic[k]; for (j=0; (unsigned)j<miplen; j+=stride)
for (j=stride; (unsigned)j<miplen; j+=stride) { *(int16_t *)cptr = hicosub(*(int16_t *)(&pic[offs+j+k])); cptr += 2; }
for (k=0; k<8; k++) *cptr++ = pic[j+k]; if (glusetexcache == 2)
if (glusetexcache == 2) {
{ j = (miplen/stride)<<2;
#ifdef USELZF cleng = qlz_compress(midbuf,packbuf,j,state_compress);
j = (miplen/stride)<<3; if (cleng == 0 || cleng > j-1)
cleng = qlz_compress(midbuf,packbuf,j,state_compress); {
if (cleng == 0 || cleng > j-1) cleng = j;
{ writebuf = midbuf;
cleng = j; }
writebuf = midbuf; else writebuf = packbuf;
} }
else writebuf = packbuf; else
#else {
cleng = lzwcompress(midbuf,(miplen/stride)*8,packbuf); cleng = (miplen/stride)<<2;
writebuf = packbuf; writebuf = midbuf;
#endif }
} j = B_LITTLE32(cleng);
else Bwrite(fil,&j,sizeof(j));
{ Bwrite(fil,writebuf,cleng);
cleng = (miplen/stride)<<3;
writebuf = midbuf; //index_4x4
} cptr = midbuf;
j = B_LITTLE32(cleng); for (j=0; (unsigned)j<miplen; j+=stride)
Bwrite(fil,&j,sizeof(j)); {
Bwrite(fil,writebuf,cleng); char *c2 = &pic[j+offs+4];
} cptr[0] = ((c2[0]>>0)&3) + (((c2[1]>>0)&3)<<2) + (((c2[2]>>0)&3)<<4) + (((c2[3]>>0)&3)<<6);
cptr[1] = ((c2[0]>>2)&3) + (((c2[1]>>2)&3)<<2) + (((c2[2]>>2)&3)<<4) + (((c2[3]>>2)&3)<<6);
//rgb0,rgb1 cptr[2] = ((c2[0]>>4)&3) + (((c2[1]>>4)&3)<<2) + (((c2[2]>>4)&3)<<4) + (((c2[3]>>4)&3)<<6);
cptr = midbuf; cptr[3] = ((c2[0]>>6)&3) + (((c2[1]>>6)&3)<<2) + (((c2[2]>>6)&3)<<4) + (((c2[3]>>6)&3)<<6);
for (k=0; k<=2; k+=2) cptr += 4;
for (j=0; (unsigned)j<miplen; j+=stride) }
{ *(int16_t *)cptr = hicosub(*(int16_t *)(&pic[offs+j+k])); cptr += 2; } if (glusetexcache == 2)
if (glusetexcache == 2) {
{ j = (miplen/stride)<<2;
#ifdef USELZF cleng = qlz_compress(midbuf,packbuf,j,state_compress);
j = (miplen/stride)<<2; if (cleng == 0 || cleng > j-1)
cleng = qlz_compress(midbuf,packbuf,j,state_compress); {
if (cleng == 0 || cleng > j-1) cleng = j;
{ writebuf = midbuf;
cleng = j; }
writebuf = midbuf; else writebuf = packbuf;
} }
else writebuf = packbuf; else
#else {
cleng = lzwcompress(midbuf,(miplen/stride)*4,packbuf); cleng = (miplen/stride)<<2;
writebuf = packbuf; writebuf = midbuf;
#endif }
} j = B_LITTLE32(cleng);
else Bwrite(fil,&j,sizeof(j));
{ Bwrite(fil,writebuf,cleng);
cleng = (miplen/stride)<<2; return 0;
writebuf = midbuf; }
}
j = B_LITTLE32(cleng);
Bwrite(fil,&j,sizeof(j));
Bwrite(fil,writebuf,cleng);
//index_4x4
cptr = midbuf;
for (j=0; (unsigned)j<miplen; j+=stride)
{
char *c2 = &pic[j+offs+4];
cptr[0] = ((c2[0]>>0)&3) + (((c2[1]>>0)&3)<<2) + (((c2[2]>>0)&3)<<4) + (((c2[3]>>0)&3)<<6);
cptr[1] = ((c2[0]>>2)&3) + (((c2[1]>>2)&3)<<2) + (((c2[2]>>2)&3)<<4) + (((c2[3]>>2)&3)<<6);
cptr[2] = ((c2[0]>>4)&3) + (((c2[1]>>4)&3)<<2) + (((c2[2]>>4)&3)<<4) + (((c2[3]>>4)&3)<<6);
cptr[3] = ((c2[0]>>6)&3) + (((c2[1]>>6)&3)<<2) + (((c2[2]>>6)&3)<<4) + (((c2[3]>>6)&3)<<6);
cptr += 4;
}
if (glusetexcache == 2)
{
#ifdef USELZF
j = (miplen/stride)<<2;
cleng = qlz_compress(midbuf,packbuf,j,state_compress);
if (cleng == 0 || cleng > j-1)
{
cleng = j;
writebuf = midbuf;
}
else writebuf = packbuf;
#else
cleng = lzwcompress(midbuf,(miplen/stride)*4,packbuf);
writebuf = packbuf;
#endif
}
else
{
cleng = (miplen/stride)<<2;
writebuf = midbuf;
}
j = B_LITTLE32(cleng);
Bwrite(fil,&j,sizeof(j));
Bwrite(fil,writebuf,cleng);
#endif
return 0;
}
int32_t dedxtfilter(int32_t fil, texcachepicture *pict, char *pic, void *midbuf, char *packbuf, int32_t ispacked) int32_t dedxtfilter(int32_t fil, texcachepicture *pict, char *pic, void *midbuf, char *packbuf, int32_t ispacked)
{ {
void *inbuf; void *inbuf;
#if (USEKENFILTER == 0)
uint32_t cleng;
if (Bread(fil, &cleng, sizeof(uint32_t)) != sizeof(uint32_t)) return -1; cleng = B_LITTLE32(cleng);
#ifdef USELZF
if (ispacked && cleng < pict->size) inbuf = packbuf; else inbuf = pic;
if (Bread(fil, inbuf, cleng) != cleng) return -1;
if (ispacked && cleng < pict->size)
if (qlz_decompress(packbuf, pic, state_decompress) == 0) return -1;
#else
if (ispacked) inbuf = packbuf; else inbuf = pic;
if (Bread(fil, inbuf, cleng) != cleng) return -1;
if (ispacked && lzwuncompress(packbuf, cleng, pic, pict->size) != pict->size) return -1;
#endif
#else
int32_t j, k, offs, stride, cleng; int32_t j, k, offs, stride, cleng;
char *cptr; char *cptr;
@ -6301,17 +6323,48 @@ int32_t dedxtfilter(int32_t fil, texcachepicture *pict, char *pic, void *midbuf,
if (stride == 16) //If DXT3... if (stride == 16) //If DXT3...
{ {
//alpha_4x4 //alpha_4x4
if (Bread(fil,&cleng,4) < 4) return -1; cleng = B_LITTLE32(cleng); if (memcachedata && memcachesize >= (signed)(cachepos + sizeof(int32_t)))
{
cleng = *(int32_t *)(memcachedata + cachepos);
cachepos += sizeof(int32_t);
}
else
{
Blseek(fil, cachepos, BSEEK_SET);
cachepos += sizeof(int32_t);
if (Bread(fil,&cleng,sizeof(int32_t)) < (signed)sizeof(int32_t)) return -1;
cleng = B_LITTLE32(cleng);
}
j = (pict->size/stride)*8; j = (pict->size/stride)*8;
#ifdef USELZF
if (ispacked && cleng < j) inbuf = packbuf; else inbuf = midbuf; if (ispacked && cleng < j) inbuf = packbuf; else inbuf = midbuf;
if (Bread(fil,inbuf,cleng) < cleng) return -1;
if (ispacked && cleng < j) if (memcachedata && memcachesize >= (signed)(cachepos + cleng))
if (qlz_decompress(packbuf,midbuf,state_decompress) == 0) return -1; {
#else if (ispacked && cleng < j)
if (Bread(fil,inbuf,cleng) < cleng) return -1; {
if (ispacked && lzwuncompress(packbuf,cleng,midbuf,j) != j) return -1; if (qlz_decompress((const char *)memcachedata + cachepos,midbuf,state_decompress) == 0)
#endif {
cachepos += cleng;
return -1;
}
}
else Bmemcpy(inbuf, memcachedata + cachepos, cleng);
cachepos += cleng;
}
else
{
Blseek(fil, cachepos, BSEEK_SET);
cachepos += cleng;
if (Bread(fil,inbuf,cleng) < cleng) return -1;
if (ispacked && cleng < j)
if (qlz_decompress(packbuf,midbuf,state_decompress) == 0) return -1;
}
cptr = midbuf; cptr = midbuf;
for (k=0; k<8; k++) pic[k] = *cptr++; for (k=0; k<8; k++) pic[k] = *cptr++;
for (j=stride; j<pict->size; j+=stride) for (j=stride; j<pict->size; j+=stride)
@ -6319,37 +6372,97 @@ int32_t dedxtfilter(int32_t fil, texcachepicture *pict, char *pic, void *midbuf,
} }
//rgb0,rgb1 //rgb0,rgb1
if (Bread(fil,&cleng,4) < 4) return -1; cleng = B_LITTLE32(cleng); if (memcachedata && memcachesize >= (signed)(cachepos + sizeof(int32_t)))
{
cleng = *(int32_t *)(memcachedata + cachepos);
cachepos += sizeof(int32_t);
}
else
{
Blseek(fil, cachepos, BSEEK_SET);
cachepos += sizeof(int32_t);
if (Bread(fil,&cleng,sizeof(int32_t)) < (signed)sizeof(int32_t)) return -1;
cleng = B_LITTLE32(cleng);
}
j = (pict->size/stride)*4; j = (pict->size/stride)*4;
#ifdef USELZF
if (ispacked && cleng < j) inbuf = packbuf; else inbuf = midbuf; if (ispacked && cleng < j) inbuf = packbuf; else inbuf = midbuf;
if (Bread(fil,inbuf,cleng) < cleng) return -1;
if (ispacked && cleng < j) if (memcachedata && memcachesize >= (signed)(cachepos + cleng))
if (qlz_decompress(packbuf,midbuf,state_decompress) == 0) return -1; {
#else if (ispacked && cleng < j)
if (Bread(fil,inbuf,cleng) < cleng) return -1; {
if (ispacked && lzwuncompress(packbuf,cleng,midbuf,j) != j) return -1; if (qlz_decompress((const char *)memcachedata + cachepos,midbuf,state_decompress) == 0)
#endif {
cachepos += cleng;
return -1;
}
}
else Bmemcpy(inbuf, memcachedata + cachepos, cleng);
cachepos += cleng;
}
else
{
Blseek(fil, cachepos, BSEEK_SET);
cachepos += cleng;
if (Bread(fil,inbuf,cleng) < cleng) return -1;
if (ispacked && cleng < j)
if (qlz_decompress(packbuf,midbuf,state_decompress) == 0) return -1;
}
cptr = midbuf; cptr = midbuf;
for (k=0; k<=2; k+=2) for (k=0; k<=2; k+=2)
{
for (j=0; j<pict->size; j+=stride) for (j=0; j<pict->size; j+=stride)
{ {
*(int16_t *)(&pic[offs+j+k]) = hicoadd(*(int16_t *)cptr); *(int16_t *)(&pic[offs+j+k]) = hicoadd(*(int16_t *)cptr);
cptr += 2; cptr += 2;
} }
}
//index_4x4: //index_4x4:
if (Bread(fil,&cleng,4) < 4) return -1; cleng = B_LITTLE32(cleng); if (memcachedata && memcachesize >= (signed)(cachepos + sizeof(int32_t)))
{
cleng = *(int32_t *)(memcachedata + cachepos);
cachepos += sizeof(int32_t);
}
else
{
Blseek(fil, cachepos, BSEEK_SET);
cachepos += sizeof(int32_t);
if (Bread(fil,&cleng,sizeof(int32_t)) < (signed)sizeof(int32_t)) return -1;
cleng = B_LITTLE32(cleng);
}
j = (pict->size/stride)*4; j = (pict->size/stride)*4;
#ifdef USELZF
if (ispacked && cleng < j) inbuf = packbuf; else inbuf = midbuf; if (ispacked && cleng < j) inbuf = packbuf; else inbuf = midbuf;
if (Bread(fil,inbuf,cleng) < cleng) return -1;
if (ispacked && cleng < j) if (memcachedata && memcachesize >= (signed)(cachepos + cleng))
if (qlz_decompress(packbuf,midbuf,state_decompress) == 0) return -1; {
#else if (ispacked && cleng < j)
if (Bread(fil,inbuf,cleng) < cleng) return -1; {
if (ispacked && lzwuncompress(packbuf,cleng,midbuf,j) != j) return -1; if (qlz_decompress((const char *)memcachedata + cachepos,midbuf,state_decompress) == 0)
#endif {
cachepos += cleng;
return -1;
}
}
else Bmemcpy(inbuf, memcachedata + cachepos, cleng);
cachepos += cleng;
}
else
{
Blseek(fil, cachepos, BSEEK_SET);
cachepos += cleng;
if (Bread(fil,inbuf,cleng) < cleng) return -1;
if (ispacked && cleng < j)
if (qlz_decompress(packbuf,midbuf,state_decompress) == 0) return -1;
}
cptr = midbuf; cptr = midbuf;
for (j=0; j<pict->size; j+=stride) for (j=0; j<pict->size; j+=stride)
{ {
@ -6359,7 +6472,6 @@ int32_t dedxtfilter(int32_t fil, texcachepicture *pict, char *pic, void *midbuf,
pic[j+offs+7] = ((cptr[0]>>6)&3) + (((cptr[1]>>6)&3)<<2) + (((cptr[2]>>6)&3)<<4) + (((cptr[3]>>6)&3)<<6); pic[j+offs+7] = ((cptr[0]>>6)&3) + (((cptr[1]>>6)&3)<<2) + (((cptr[2]>>6)&3)<<4) + (((cptr[3]>>6)&3)<<6);
cptr += 4; cptr += 4;
} }
#endif
return 0; return 0;
} }
#endif #endif

View file

@ -108,6 +108,11 @@ static inline void RI_ProcessKeyboard(const RAWKEYBOARD* rkbd)
case VK_NUMPAD6: case VK_NUMPAD6:
if (rkbd->Flags & RI_KEY_E0) VKey = VK_RIGHT, key = sc_RightArrow; if (rkbd->Flags & RI_KEY_E0) VKey = VK_RIGHT, key = sc_RightArrow;
else VKey = VK_NUMPAD6, key = sc_kpad_6; break; else VKey = VK_NUMPAD6, key = sc_kpad_6; break;
case VK_DIVIDE:
// if (rkbd->Flags & RI_KEY_E0) key = sc_Slash;
// else
key = sc_kpad_Slash;
break;
case VK_INSERT: case VK_INSERT:
key = sc_Insert; break; key = sc_Insert; break;
case VK_HOME: case VK_HOME:

View file

@ -73,23 +73,6 @@ char nogl=0;
#endif #endif
int32_t vsync=0; int32_t vsync=0;
// input
char inputdevices=0;
char keystatus[256], keyfifo[KEYFIFOSIZ], keyfifoplc, keyfifoend;
char keyasciififo[KEYFIFOSIZ], keyasciififoplc, keyasciififoend;
char remap[256];
int32_t remapinit=0;
static char key_names[256][24];
volatile int32_t mousex=0,mousey=0,mouseb=0;
int32_t *joyaxis = NULL, joyb=0, *joyhat = NULL;
char joyisgamepad=0, joynumaxes=0, joynumbuttons=0, joynumhats=0;
int32_t joyaxespresent=0;
void(*keypresscallback)(int32_t,int32_t) = 0;
void(*mousepresscallback)(int32_t,int32_t) = 0;
void(*joypresscallback)(int32_t,int32_t) = 0;
#if (SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION < 3) #if (SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION < 3)
static char keytranslation[SDLK_LAST]; static char keytranslation[SDLK_LAST];
#else #else
@ -502,11 +485,6 @@ void uninitinput(void)
} }
} }
const char *getkeyname(int32_t num)
{
return ((unsigned)num >= 256) ? NULL : key_names[num];
}
const char *getjoyname(int32_t what, int32_t num) const char *getjoyname(int32_t what, int32_t num)
{ {
static char tmp[64]; static char tmp[64];
@ -533,33 +511,6 @@ const char *getjoyname(int32_t what, int32_t num)
} }
} }
//
// bgetchar, bflushchars -- character-based input functions
//
char bgetchar(void)
{
if (keyasciififoplc == keyasciififoend)
return 0;
{
char c = keyasciififo[keyasciififoplc];
keyasciififoplc = ((keyasciififoplc+1)&(KEYFIFOSIZ-1));
return c;
}
}
void bflushchars(void)
{
keyasciififoplc = keyasciififoend = 0;
}
//
// set{key|mouse|joy}presscallback() -- sets a callback which gets notified when keys are pressed
//
void setkeypresscallback(void(*callback)(int32_t, int32_t)) { keypresscallback = callback; }
void setmousepresscallback(void(*callback)(int32_t, int32_t)) { mousepresscallback = callback; }
void setjoypresscallback(void(*callback)(int32_t, int32_t)) { joypresscallback = callback; }
// //
// initmouse() -- init mouse input // initmouse() -- init mouse input
@ -1417,16 +1368,14 @@ void showframe(int32_t w)
bglEnable(GL_BLEND); bglEnable(GL_BLEND);
bglColor4ub(palfadergb.r, palfadergb.g, palfadergb.b, palfadedelta); bglColor4ub(palfadergb.r, palfadergb.g, palfadergb.b, palfadedelta);
bglBegin(GL_QUADS); bglBegin(GL_TRIANGLES);
bglVertex2i(-1, -1); bglVertex2f(-2.5f, 1.f);
bglVertex2i(1, -1); bglVertex2f(2.5f, 1.f);
bglVertex2i(1, 1); bglVertex2f(.0f, -2.5f);
bglVertex2i(-1, 1);
bglEnd(); bglEnd();
bglDisable(GL_BLEND); bglDisable(GL_BLEND);
bglMatrixMode(GL_MODELVIEW);
bglPopMatrix(); bglPopMatrix();
bglMatrixMode(GL_PROJECTION); bglMatrixMode(GL_PROJECTION);
bglPopMatrix(); bglPopMatrix();
@ -1549,18 +1498,6 @@ static SDL_Surface * loadappicon(void)
// returns !0 if there was an important event worth checking (like quitting) // returns !0 if there was an important event worth checking (like quitting)
// //
static inline void SetKey(int32_t key, int32_t state)
{
keystatus[remap[key]] = state;
if (state)
{
keyfifo[keyfifoend] = remap[key];
keyfifo[(keyfifoend+1)&(KEYFIFOSIZ-1)] = state;
keyfifoend = ((keyfifoend+2)&(KEYFIFOSIZ-1));
}
}
int32_t handleevents(void) int32_t handleevents(void)
{ {
int32_t code, rv=0, j; int32_t code, rv=0, j;

View file

@ -1,14 +1,5 @@
// Windows DIB/DirectDraw interface layer // Windows DIB/DirectDraw interface layer for the Build Engine
// for the Build Engine // Originally by Jonathon Fowler (jonof@edgenetwk.com)
// by Jonathon Fowler (jonof@edgenetwk.com)
//
// This is all very ugly.
//
// Written for DirectX 6.0
#ifndef _WIN32
#error winlayer.c is for Windows only.
#endif
#define DIRECTINPUT_VERSION 0x0700 #define DIRECTINPUT_VERSION 0x0700
#define DIRECTDRAW_VERSION 0x0600 #define DIRECTDRAW_VERSION 0x0600
@ -24,7 +15,6 @@
#include "dxdidf.h" // comment this out if c_dfDI* is being reported as multiply defined #include "dxdidf.h" // comment this out if c_dfDI* is being reported as multiply defined
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h>
#include <signal.h> #include <signal.h>
#include <stdarg.h> #include <stdarg.h>
@ -99,48 +89,50 @@ static BOOL CreateAppWindow(int32_t modenum);
static void DestroyAppWindow(void); static void DestroyAppWindow(void);
// video // video
static int32_t desktopxdim=0,desktopydim=0,desktopbpp=0,modesetusing=-1; static int32_t desktopxdim=0;
int32_t xres=-1, yres=-1, fullscreen=0, bpp=0, bytesperline=0, imageSize=0; static int32_t desktopydim=0;
intptr_t frameplace=0; static int32_t desktopbpp=0;
int32_t lockcount=0; static int32_t modesetusing=-1;
static int32_t curvidmode = -1; static int32_t curvidmode = -1;
static int32_t customxdim = 640, customydim = 480, custombpp = 8, customfs = 0; static int32_t customxdim = 640;
static int32_t customydim = 480;
static int32_t custombpp = 8;
static int32_t customfs = 0;
static uint32_t modeschecked=0; static uint32_t modeschecked=0;
uint32_t maxrefreshfreq=60; int32_t xres=-1;
char modechange=1, repaintneeded=0; int32_t yres=-1;
char offscreenrendering=0; int32_t fullscreen=0;
int32_t bpp=0;
int32_t bytesperline=0;
int32_t imageSize=0;
int32_t lockcount=0;
int32_t glcolourdepth=32; int32_t glcolourdepth=32;
int32_t vsync=0;
uint32_t maxrefreshfreq=60;
intptr_t frameplace=0;
char modechange=1;
char repaintneeded=0;
char offscreenrendering=0;
char videomodereset = 0; char videomodereset = 0;
char silentvideomodeswitch = 0; char silentvideomodeswitch = 0;
int32_t vsync=0;
// input and events
char inputdevices=0;
char quitevent=0, appactive=1, realfs=0, regrabmouse=0;
volatile int32_t mousex=0, mousey=0, mouseb=0;
uint32_t mousewheel[2] = { 0,0 };
int32_t *joyaxis = NULL, joyb=0, *joyhat = NULL; // input and events
char joyisgamepad=0, joynumaxes=0, joynumbuttons=0, joynumhats=0; char quitevent=0;
char appactive=1;
char realfs=0;
char regrabmouse=0;
uint32_t mousewheel[2] = { 0,0 };
static char taskswitching=1; static char taskswitching=1;
char keystatus[256], keyfifo[KEYFIFOSIZ], keyfifoplc, keyfifoend;
char keyasciififo[KEYFIFOSIZ], keyasciififoplc, keyasciififoend;
char remap[256];
int32_t remapinit=0;
static char key_names[256][24];
static OSVERSIONINFOEX osv; static OSVERSIONINFOEX osv;
#ifdef NEDMALLOC #ifdef NEDMALLOC
extern int32_t largepagesavailable; extern int32_t largepagesavailable;
#else #else
static HMODULE nedhandle = NULL; static HMODULE nedhandle = NULL;
#endif #endif
void (*keypresscallback)(int32_t,int32_t) = 0;
void (*mousepresscallback)(int32_t,int32_t) = 0;
void (*joypresscallback)(int32_t,int32_t) = 0;
//------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------
// DINPUT (JOYSTICK) // DINPUT (JOYSTICK)
@ -244,6 +236,8 @@ int32_t wm_msgbox(char *name, char *fmt, ...)
MessageBox(hWindow,buf,name,MB_OK|MB_TASKMODAL); MessageBox(hWindow,buf,name,MB_OK|MB_TASKMODAL);
return 0; return 0;
} }
int32_t wm_ynbox(char *name, char *fmt, ...) int32_t wm_ynbox(char *name, char *fmt, ...)
{ {
char buf[2048]; char buf[2048];
@ -360,7 +354,7 @@ int32_t WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, in
ReleaseDC(NULL, hdc); ReleaseDC(NULL, hdc);
if (r < 8) if (r < 8)
{ {
MessageBox(0, "This application requires a desktop colour depth of 256-colours or more.", MessageBox(0, "This application requires a desktop color depth of 256-colors or better.",
apptitle, MB_OK|MB_ICONSTOP); apptitle, MB_OK|MB_ICONSTOP);
return -1; return -1;
} }
@ -646,7 +640,7 @@ void uninitsystem(void)
#endif #endif
#ifndef NEDMALLOC #ifndef NEDMALLOC
if (nedhandle) FreeLibrary(nedhandle), nedhandle = NULL; // if (nedhandle) FreeLibrary(nedhandle), nedhandle = NULL;
#endif #endif
} }
@ -749,19 +743,6 @@ int32_t handleevents(void)
} }
// I don't see any pressing need to store the key-up events yet
inline void SetKey(int32_t key, int32_t state)
{
keystatus[remap[key]] = state;
if (state)
{
keyfifo[keyfifoend] = remap[key];
keyfifo[(keyfifoend+1)&(KEYFIFOSIZ-1)] = state;
keyfifoend = ((keyfifoend+2)&(KEYFIFOSIZ-1));
}
}
// //
// initinput() -- init input system // initinput() -- init input system
// //
@ -812,33 +793,6 @@ void uninitinput(void)
} }
//
// bgetchar, bflushchars -- character-based input functions
//
char bgetchar(void)
{
char c;
if (keyasciififoplc == keyasciififoend) return 0;
c = keyasciififo[keyasciififoplc];
keyasciififoplc = ((keyasciififoplc+1)&(KEYFIFOSIZ-1));
//OSD_Printf("bgetchar %d, %d-%d\n",c,keyasciififoplc,keyasciififoend);
return c;
}
void bflushchars(void)
{
Bmemset(&keyasciififo,0,sizeof(keyasciififo));
keyasciififoplc = keyasciififoend = 0;
}
//
// set{key|mouse|joy}presscallback() -- sets a callback which gets notified when keys are pressed
//
void setkeypresscallback(void (*callback)(int32_t, int32_t)) { keypresscallback = callback; }
void setmousepresscallback(void (*callback)(int32_t, int32_t)) { mousepresscallback = callback; }
void setjoypresscallback(void (*callback)(int32_t, int32_t)) { joypresscallback = callback; }
inline void idle_waitevent_timeout(uint32_t timeout) inline void idle_waitevent_timeout(uint32_t timeout)
{ {
// timeout becomes a completion deadline // timeout becomes a completion deadline
@ -1257,11 +1211,6 @@ static void GetKeyNames(void)
} }
} }
const char *getkeyname(int32_t num)
{
return ((unsigned)num >= 256) ? NULL : key_names[num];
}
const char *getjoyname(int32_t what, int32_t num) const char *getjoyname(int32_t what, int32_t num)
{ {
switch (what) switch (what)
@ -2042,16 +1991,14 @@ void showframe(int32_t w)
bglEnable(GL_BLEND); bglEnable(GL_BLEND);
bglColor4ub(palfadergb.r, palfadergb.g, palfadergb.b, palfadedelta); bglColor4ub(palfadergb.r, palfadergb.g, palfadergb.b, palfadedelta);
bglBegin(GL_QUADS); bglBegin(GL_TRIANGLES);
bglVertex2i(-1, -1); bglVertex2f(-2.5f, 1.f);
bglVertex2i(1, -1); bglVertex2f(2.5f, 1.f);
bglVertex2i(1, 1); bglVertex2f(.0f, -2.5f);
bglVertex2i(-1, 1);
bglEnd(); bglEnd();
bglDisable(GL_BLEND); bglDisable(GL_BLEND);
bglMatrixMode(GL_MODELVIEW);
bglPopMatrix(); bglPopMatrix();
bglMatrixMode(GL_PROJECTION); bglMatrixMode(GL_PROJECTION);
bglPopMatrix(); bglPopMatrix();

View file

@ -1,69 +0,0 @@
// Duke Nukem 3D Sample Defs file
//
// For an explanation of the contents of this file, read releasenotes.html
// in the section titled "DEF-file Language"
include DEFS.CON
// These entries define Hightile tints
// definetint <pal> <r> <g> <b> <effects>
definetint 1 110 110 255 1
definetint 2 255 110 80 1
definetint 4 0 0 0 0
definetint 6 192 255 138 3
definetint 7 228 200 172 0
definetint 8 180 255 200 0
// This entry defines a texture replacement
// definetexture <tilenum> <pal> 0 0 -1 -1 <filename>
//definetexture FEMPIC7 0 0 0 -1 -1 "textures/rikaa.png"
// These entries demonstrate replacing the Pig Cop character with a model
// Editart tile indices:
// walk 2000-2019
// pump 2025-2027
// stand 2030-2034
// shoot 2035-2037
// dive 2040-2044
// dived 2045-2049
// dshoot 2050-2052
// hit 2055
// die 2056-2059
// dead 2060
// definemodel <filename> <scale> <shadeoffs>
// defineskin <palette> <filename>
// definemodelanim <startframe> <endframe> <fps> <flags>
// definemodelframe <framename> <starttile> <endtile>
definemodel "models/pigcop.md2" 1.30 0
definemodelskin 0 "models/pigcop.jpg"
definemodelanim "walk0" "walk13" 20 0
definemodelframe "walk0" 2000 2019
definemodelanim "pump0" "pump2" 10 1
definemodelframe "pump0" 2025 2027
definemodelframe "stand" 2030 2034
definemodelanim "shoot0" "shoot2" 10 1
definemodelframe "shoot0" 2035 2037
definemodelanim "dive0" "dive3" 8 1
definemodelframe "dive0" 2040 2044
definemodelframe "dive3" 2045 2049
definemodelanim "dshoot0" "dshoot2" 10 1
definemodelframe "dshoot0" 2050 2052
definemodelframe "die0" 2055 2055
definemodelanim "die1" "dead" 13 1
definemodelframe "die1" 2056 2059
definemodelframe "dead" 2060 2060
// These entries demonstrate voxel replacements
// definevoxel <filename>
// definevoxeltiles <starttile> <endtile>
//definevoxel "voxels/barstool.kvx"
//definevoxeltiles 1006 1006

View file

@ -257,6 +257,10 @@
<ClCompile Include="source\enet\src\unix.c" /> <ClCompile Include="source\enet\src\unix.c" />
<ClCompile Include="source\enet\src\win32.c" /> <ClCompile Include="source\enet\src\win32.c" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="build\Makefile.msvc" />
<None Include="Makefile.msvc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>

View file

@ -600,4 +600,12 @@
<Filter>build\source</Filter> <Filter>build\source</Filter>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="Makefile.msvc">
<Filter>eduke32</Filter>
</None>
<None Include="build\Makefile.msvc">
<Filter>build</Filter>
</None>
</ItemGroup>
</Project> </Project>

View file

@ -1,389 +0,0 @@
// include this file at the top of your game.con or eduke.con
// Game Events
// SYNTAX:
//
// onevent <eventid>
// {
// ... actions
// }
// endevent
// Internal event IDs
/*
enum events {
EVENT_INIT,
EVENT_ENTERLEVEL,
EVENT_RESETWEAPONS,
EVENT_RESETINVENTORY,
EVENT_HOLSTER,
EVENT_LOOKLEFT,
EVENT_LOOKRIGHT,
EVENT_SOARUP,
EVENT_SOARDOWN,
EVENT_CROUCH,
EVENT_JUMP,
EVENT_RETURNTOCENTER,
EVENT_LOOKUP,
EVENT_LOOKDOWN,
EVENT_AIMUP,
EVENT_FIRE,
EVENT_CHANGEWEAPON,
EVENT_GETSHOTRANGE,
EVENT_GETAUTOAIMANGLE,
EVENT_GETLOADTILE,
EVENT_CHEATGETSTEROIDS,
EVENT_CHEATGETHEAT,
EVENT_CHEATGETBOOT,
EVENT_CHEATGETSHIELD,
EVENT_CHEATGETSCUBA,
EVENT_CHEATGETHOLODUKE,
EVENT_CHEATGETJETPACK,
EVENT_CHEATGETFIRSTAID,
EVENT_QUICKKICK,
EVENT_INVENTORY,
EVENT_USENIGHTVISION,
EVENT_USESTEROIDS,
EVENT_INVENTORYLEFT,
EVENT_INVENTORYRIGHT,
EVENT_HOLODUKEON,
EVENT_HOLODUKEOFF,
EVENT_USEMEDKIT,
EVENT_USEJETPACK,
EVENT_TURNAROUND,
EVENT_DISPLAYWEAPON,
EVENT_FIREWEAPON,
EVENT_SELECTWEAPON,
EVENT_MOVEFORWARD,
EVENT_MOVEBACKWARD,
EVENT_TURNLEFT,
EVENT_TURNRIGHT,
EVENT_STRAFELEFT,
EVENT_STRAFERIGHT,
EVENT_WEAPKEY1,
EVENT_WEAPKEY2,
EVENT_WEAPKEY3,
EVENT_WEAPKEY4,
EVENT_WEAPKEY5,
EVENT_WEAPKEY6,
EVENT_WEAPKEY7,
EVENT_WEAPKEY8,
EVENT_WEAPKEY9,
EVENT_WEAPKEY10,
EVENT_DRAWWEAPON,
EVENT_DISPLAYCROSSHAIR,
EVENT_DISPLAYREST,
EVENT_RESETPLAYER,
EVENT_INCURDAMAGE,
EVENT_AIMDOWN,
EVENT_GAME,
EVENT_PREVIOUSWEAPON,
EVENT_NEXTWEAPON,
EVENT_SWIMUP,
EVENT_SWIMDOWN,
EVENT_GETMENUTILE,
EVENT_SPAWN,
EVENT_LOGO,
EVENT_EGS,
EVENT_DOFIRE,
EVENT_PRESSEDFIRE,
EVENT_USE,
EVENT_PROCESSINPUT
};
*/
// Internal projectile stuff
/*
enum projectilelabels {
PROJ_WORKSLIKE,
PROJ_SPAWNS,
PROJ_SXREPEAT,
PROJ_SYREPEAT,
PROJ_SOUND,
PROJ_ISOUND,
PROJ_VEL,
PROJ_EXTRA,
PROJ_DECAL,
PROJ_TRAIL,
PROJ_TXREPEAT,
PROJ_TYREPEAT,
PROJ_TOFFSET,
PROJ_TNUM,
PROJ_DROP,
PROJ_CSTAT,
PROJ_CLIPDIST,
PROJ_SHADE,
PROJ_XREPEAT,
PROJ_YREPEAT,
PROJ_PAL,
PROJ_EXTRA_RAND,
PROJ_HITRADIUS,
PROJ_VEL_MULT,
PROJ_OFFSET,
PROJ_BOUNCES,
PROJ_BSOUND,
PROJ_RANGE
};
*/
// Variable definition Flags
#define GAMEVAR_FLAG_GLOBAL 0 // global variable (default)
#define GAMEVAR_FLAG_PERPLAYER 1 // per-player variable
#define GAMEVAR_FLAG_PERACTOR 2 // per-actor variable
// Weapon Flags
// 1 Holstering Clears Clip
// 2 Glows
// 4 Automatic
// 8 Fire Every other frame
// 16 Fire Every third frame
// 32 Random restart on automatic
// 64 Use Ammo per burst
// 128 Is a Bomb trigger
// 256 Using does NOT cause player to become 'visible'
// 512 Use 'throws' the 'shoots' item
// 1024 Check weapon availability at 'reload' time
// 2048 player should stop jumping
// 0 Spawn Type 1 (pistol shells)
// 4096 Spawn Type 2 (Shotgun shells)
// 8192 Spawn Type 3 (CHAINGUN shells)
// 16384 Semi-automatic
// 32768 Pistol reload sound hack
// 65536 Cycle kickback_pic back to 1 if fire is held down, else set to 0
// TRIPBOMB_CONTROL
// 1 Tripwire. Trip Bomb works with tripwire.
// 2 On timer. Trip Bomb works on timer
// PIPEBOMB_CONTROL
// 1 Detonator. Pipe Bomb works with detonator.
// 2 On timer. Pipe Bomb works on timer
gamevar WEAPON0_WORKSLIKE 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_RELOAD 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_FIREDELAY 7 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_TOTALTIME 14 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_FLAGS 292 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_SHOOTS 2521 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_SPAWNTIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_SPAWN 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_SHOTSPERBURST 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_WORKSLIKE 1 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_CLIP 12 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_RELOAD 27 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_FIREDELAY 2 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_TOTALTIME 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_FLAGS 32768 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_SHOOTS 2595 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_SPAWNTIME 2 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_SPAWN 2533 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_SHOTSPERBURST 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_FIRESOUND 3 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_WORKSLIKE 2 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_RELOAD 13 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_FIREDELAY 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_TOTALTIME 30 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_FLAGS 1024 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_SHOOTS 2613 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_SPAWNTIME 24 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_SPAWN 2535 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_SHOTSPERBURST 7 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_FIRESOUND 109 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_SOUND2TIME 15 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_SOUND2SOUND 169 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_WORKSLIKE 3 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_RELOAD 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_FIREDELAY 3 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_TOTALTIME 12 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_HOLDDELAY 3 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_FLAGS 73812 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_SHOOTS 2536 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_SPAWNTIME 1 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_SPAWN 2533 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_SHOTSPERBURST 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_FIRESOUND 6 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_WORKSLIKE 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_RELOAD 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_FIREDELAY 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_TOTALTIME 20 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_FLAGS 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_SHOOTS 2605 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_SPAWNTIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_SPAWN 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_SHOTSPERBURST 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_WORKSLIKE 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_RELOAD 30 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_FIREDELAY 6 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_TOTALTIME 19 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_HOLDDELAY 12 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_FLAGS 512 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_SHOOTS 26 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_SPAWNTIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_SPAWN 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_SHOTSPERBURST 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_WORKSLIKE 6 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_RELOAD 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_FIREDELAY 10 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_TOTALTIME 12 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_FLAGS 2 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_SHOOTS 2556 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_SPAWNTIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_SPAWN 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_SHOTSPERBURST 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_INITIALSOUND 11 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_WORKSLIKE 7 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_RELOAD 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_FIREDELAY 3 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_TOTALTIME 6 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_HOLDDELAY 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_FLAGS 72 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_SHOOTS 2605 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_SPAWNTIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_SPAWN 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_SHOTSPERBURST 2 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_INITIALSOUND 10 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_WORKSLIKE 8 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_RELOAD 16 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_FIREDELAY 3 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_TOTALTIME 16 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_HOLDDELAY 7 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_FLAGS 3072 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_SHOOTS 2563 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_SPAWNTIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_SPAWN 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_SHOTSPERBURST 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_WORKSLIKE 9 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_RELOAD 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_FIREDELAY 3 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_TOTALTIME 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_FLAGS 65536 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_SHOOTS 1641 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_SPAWNTIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_SPAWN 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_SHOTSPERBURST 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_INITIALSOUND 10 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_FIRESOUND 10 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_WORKSLIKE 10 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_RELOAD 10 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_FIREDELAY 2 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_TOTALTIME 10 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_FLAGS 384 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_SHOOTS 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_SPAWNTIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_SPAWN 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_SHOTSPERBURST 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_WORKSLIKE 11 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_RELOAD 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_FIREDELAY 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_TOTALTIME 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_FLAGS 2 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_SHOOTS 2448 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_SPAWNTIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_SPAWN 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_SHOTSPERBURST 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_FIRESOUND 388 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar GRENADE_LIFETIME 120 GAMEVAR_FLAG_PERPLAYER
gamevar GRENADE_LIFETIME_VAR 30 GAMEVAR_FLAG_PERPLAYER
gamevar STICKYBOMB_LIFETIME 120 GAMEVAR_FLAG_PERPLAYER
gamevar STICKYBOMB_LIFETIME_VAR 30 GAMEVAR_FLAG_PERPLAYER
gamevar TRIPBOMB_CONTROL 1 GAMEVAR_FLAG_PERPLAYER // set value to 2 for timed bomb
gamevar PIPEBOMB_CONTROL 1 GAMEVAR_FLAG_PERPLAYER // set value to 2 for grenade behavior

Binary file not shown.

View file

@ -1,9 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 1996, 2003 - 3D Realms Entertainment
Copyright (C) 2004, 2005 - Richard Gobeille (EDuke32 functionality)
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2
@ -21,6 +19,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#include "duke3d.h" #include "duke3d.h"
#include "gamedef.h" #include "gamedef.h"
#include "compat.h" #include "compat.h"
@ -8118,6 +8117,7 @@ void G_MoveWorld(void)
G_AddGameLight(0, i, ((s->yrepeat*tilesizy[s->picnum])<<1), 128 * s->yrepeat, 255+(95<<8),PR_LIGHT_PRIO_LOW_GAME); G_AddGameLight(0, i, ((s->yrepeat*tilesizy[s->picnum])<<1), 128 * s->yrepeat, 255+(95<<8),PR_LIGHT_PRIO_LOW_GAME);
break; break;
case SHOTSPARK1__STATIC: case SHOTSPARK1__STATIC:
if (actor[i].t_data[2] == 0) // check for first frame of action
{ {
int32_t x = ((sintable[(s->ang+512)&2047])>>7); int32_t x = ((sintable[(s->ang+512)&2047])>>7);
int32_t y = ((sintable[(s->ang)&2047])>>7); int32_t y = ((sintable[(s->ang)&2047])>>7);
@ -8126,6 +8126,7 @@ void G_MoveWorld(void)
s->y -= y; s->y -= y;
G_AddGameLight(0, i, ((s->yrepeat*tilesizy[s->picnum])<<1), 16 * s->yrepeat, 255+(95<<8),PR_LIGHT_PRIO_LOW_GAME); G_AddGameLight(0, i, ((s->yrepeat*tilesizy[s->picnum])<<1), 16 * s->yrepeat, 255+(95<<8),PR_LIGHT_PRIO_LOW_GAME);
actor[i].lightcount = 1;
s->x += x; s->x += x;
s->y += y; s->y += y;
@ -8149,7 +8150,8 @@ void G_MoveWorld(void)
{ {
int32_t x, y; int32_t x, y;
if ((s->cstat & 32768) || A_CheckSpriteFlags(i, SPRITE_NOLIGHT) || !inside(s->x+((sintable[(s->ang+512)&2047])>>9), s->y+((sintable[(s->ang)&2047])>>9), s->sectnum)) if ((s->cstat & 32768) || A_CheckSpriteFlags(i, SPRITE_NOLIGHT) ||
!inside(s->x+((sintable[(s->ang+512)&2047])>>9), s->y+((sintable[(s->ang)&2047])>>9), s->sectnum))
{ {
if (actor[i].lightptr != NULL) if (actor[i].lightptr != NULL)
{ {

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,9 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2
@ -53,7 +52,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <shellapi.h> #include <shellapi.h>
#endif #endif
#define BUILDDATE " 20090616" #define BUILDDATE " 20100521"
static int32_t floor_over_floor; static int32_t floor_over_floor;
@ -3087,7 +3086,7 @@ static int32_t OnGotoTile(int32_t iTile)
if (handleevents()) if (handleevents())
quitevent = 0; quitevent = 0;
idle(); idle_waitevent();
ch = bgetchar(); ch = bgetchar();
@ -3172,7 +3171,7 @@ static int32_t OnSelectTile(int32_t iTile)
if (handleevents()) if (handleevents())
quitevent = 0; quitevent = 0;
idle(); idle_waitevent();
// //
// Display the description strings for each available tile group // Display the description strings for each available tile group

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2
@ -674,7 +672,7 @@ int32_t CONFIG_ReadSetup(void)
struct stat st; struct stat st;
SCRIPT_GetString(ud.config.scripthandle, "Setup","ModDir",&g_modDir[0]); SCRIPT_GetString(ud.config.scripthandle, "Setup","ModDir",&g_modDir[0]);
if (stat(g_modDir, &st)) if (Bstat(g_modDir, &st))
{ {
if ((st.st_mode & S_IFDIR) != S_IFDIR) if ((st.st_mode & S_IFDIR) != S_IFDIR)
{ {

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2
@ -198,7 +196,7 @@ uint32_t g_frameDelay = 0;
extern char forcegl; extern char forcegl;
#endif #endif
void M32RunScript(const char *s) {}; // needed for linking since it's referenced from build/src/osd.c void M32RunScript(const char *s) { UNREFERENCED_PARAMETER(s); }; // needed for linking since it's referenced from build/src/osd.c
int32_t kopen4loadfrommod(char *filename, char searchfirst) int32_t kopen4loadfrommod(char *filename, char searchfirst)
{ {
@ -5100,9 +5098,9 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
} }
else else
{ {
tiltcs = xres/240; tiltcs = 2;
tiltcx = xres; tiltcx = 640;
tiltcy = yres; tiltcy = 400;
} }
walock[TILE_TILT] = 255; walock[TILE_TILT] = 255;
@ -11397,7 +11395,7 @@ void app_main(int32_t argc,const char **argv)
else dir[0] = '\0'; else dir[0] = '\0';
Bsprintf(tempbuf,"%stexcache",dir); Bsprintf(tempbuf,"%stexcache",dir);
if (stat(tempbuf, &st) >= 0) if (Bstat(tempbuf, &st) >= 0)
{ {
if ((st.st_mode & S_IFDIR) == S_IFDIR) if ((st.st_mode & S_IFDIR) == S_IFDIR)
{ {

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2
@ -5229,7 +5227,7 @@ repeatcase:
int32_t glrm = glrendmode; int32_t glrm = glrendmode;
#endif #endif
if (stat(g_modDir, &st) < 0) if (Bstat(g_modDir, &st) < 0)
{ {
if (errno == ENOENT) // path doesn't exist if (errno == ENOENT) // path doesn't exist
{ {

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2
@ -21,6 +19,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
#include "duke3d.h" #include "duke3d.h"
#include "gamedef.h" #include "gamedef.h"

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2
@ -21,6 +19,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#include "duke3d.h" #include "duke3d.h"
const char *s_buildDate = "20100514"; const char *s_buildDate = "20100514";

View file

@ -1,3 +1,25 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2010 EDuke32 developers and contributors
This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//-------------------------------------------------------------------------
#include "compat.h" #include "compat.h"
#include "baselayer.h" #include "baselayer.h"

View file

@ -1,3 +1,25 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2010 EDuke32 developers and contributors
This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//-------------------------------------------------------------------------
#ifndef __grpscan_h__ #ifndef __grpscan_h__
#define __grpscan_h__ #define __grpscan_h__

View file

@ -1,26 +1,22 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1997, 2005 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
This file is part of Shadow Warrior version 1.2 This file is part of EDuke32.
Shadow Warrior is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation; either version 2 as published by the Free Software Foundation.
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1997 - Frank Maddin and Jim Norwood
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,3 +1,25 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2010 EDuke32 developers and contributors
This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//-------------------------------------------------------------------------
// Macros, some from SW source // Macros, some from SW source
#define GTFLAGS(x) (GametypeFlags[ud.coop] & x) #define GTFLAGS(x) (GametypeFlags[ud.coop] & x)

View file

@ -1,8 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 2004, 2007 - EDuke32 developers Copyright (C) 2010 EDuke32 developers and contributors
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2
@ -2961,7 +2959,7 @@ cheat_for_port_credits:
int32_t osdmode = OSD_GetTextMode(); int32_t osdmode = OSD_GetTextMode();
if (x==io) osdmode = !osdmode; if (x==io) osdmode = !osdmode;
modval(0,1,(int32_t *)&osdmode,1,probey==io); modval(0,1,(int32_t *)&osdmode,1,probey==io);
mgametextpal(d,yy, osdmode? "Monochrome" : "Sprites", MENUHIGHLIGHT(io), 0); mgametextpal(d,yy, osdmode? "Basic" : "Sprites", MENUHIGHLIGHT(io), 0);
if (OSD_GetTextMode() != osdmode) if (OSD_GetTextMode() != osdmode)
OSD_SetTextMode(osdmode); OSD_SetTextMode(osdmode);
break; break;

View file

@ -1,10 +1,12 @@
//-------------------------------------------------------------------------
/* /*
Copyright (C) 1994-1995 Apogee Software, Ltd. Copyright (C) 2010 EDuke32 developers and contributors
This program is free software; you can redistribute it and/or This file is part of EDuke32.
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 EDuke32 is free software; you can redistribute it and/or
of the License, or (at your option) any later version. modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -15,9 +17,9 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
*/ */
//-------------------------------------------------------------------------
/********************************************************************** /**********************************************************************
module: MIDI.C module: MIDI.C

View file

@ -31,10 +31,10 @@ BEGIN
CONTROL "&Always show this window at startup", IDCALWAYSSHOW, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 118, 116, 140, 8 CONTROL "&Always show this window at startup", IDCALWAYSSHOW, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 118, 116, 140, 8
END END
#define FILEVER 1,2,9,9 #define FILEVER 1,9,9,9
#define PRODUCTVER 1,2,9,9 #define PRODUCTVER 1,9,9,9
#define STRFILEVER "1.3.0devel\0" #define STRFILEVER "2.0.0devel\0"
#define STRPRODUCTVER "1.3.0devel\0" #define STRPRODUCTVER "2.0.0devel\0"
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION FILEVER FILEVERSION FILEVER
@ -56,7 +56,7 @@ BEGIN
VALUE "FileDescription", "Mapster32" VALUE "FileDescription", "Mapster32"
VALUE "FileVersion", STRFILEVER VALUE "FileVersion", STRFILEVER
VALUE "InternalName", "Mapster32" VALUE "InternalName", "Mapster32"
VALUE "LegalCopyright", "Copyright © 1996, 2003 3D Realms Entertainment, 2009 EDuke32 Developers" VALUE "LegalCopyright", "Copyright © 2010 EDuke32 Developers, 1996, 2003 3D Realms Entertainment"
VALUE "LegalTrademarks", "Duke Nukem® is a Registered Trademark of Apogee Software, Ltd." VALUE "LegalTrademarks", "Duke Nukem® is a Registered Trademark of Apogee Software, Ltd."
VALUE "OriginalFilename", "mapster32.exe" VALUE "OriginalFilename", "mapster32.exe"
VALUE "ProductName", "Mapster32" VALUE "ProductName", "Mapster32"

View file

@ -64,7 +64,7 @@ BEGIN
VALUE "FileDescription", "EDuke32" VALUE "FileDescription", "EDuke32"
VALUE "FileVersion", STRFILEVER VALUE "FileVersion", STRFILEVER
VALUE "InternalName", "EDuke32" VALUE "InternalName", "EDuke32"
VALUE "LegalCopyright", "Copyright © 1996, 2003 3D Realms Entertainment, 2009 EDuke32 Developers" VALUE "LegalCopyright", "Copyright © 2010 EDuke32 Developers, 1996, 2003 3D Realms Entertainment"
VALUE "LegalTrademarks", "Duke Nukem® is a Registered Trademark of Apogee Software, Ltd." VALUE "LegalTrademarks", "Duke Nukem® is a Registered Trademark of Apogee Software, Ltd."
VALUE "OriginalFilename", "eduke32.exe" VALUE "OriginalFilename", "eduke32.exe"
VALUE "ProductName", "EDuke32" VALUE "ProductName", "EDuke32"

View file

@ -1,10 +1,12 @@
//-------------------------------------------------------------------------
/* /*
Copyright (C) 1994-1995 Apogee Software, Ltd. Copyright (C) 2010 EDuke32 developers and contributors
This program is free software; you can redistribute it and/or This file is part of EDuke32.
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 EDuke32 is free software; you can redistribute it and/or
of the License, or (at your option) any later version. modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -15,9 +17,9 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
*/ */
//-------------------------------------------------------------------------
/********************************************************************** /**********************************************************************
module: MPU401.C module: MPU401.C

View file

@ -1,10 +1,12 @@
//-------------------------------------------------------------------------
/* /*
Copyright (C) 1994-1995 Apogee Software, Ltd. Copyright (C) 2010 EDuke32 developers and contributors
This program is free software; you can redistribute it and/or This file is part of EDuke32.
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 EDuke32 is free software; you can redistribute it and/or
of the License, or (at your option) any later version. modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -15,9 +17,9 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
*/ */
//-------------------------------------------------------------------------
/********************************************************************** /**********************************************************************
module: MUSIC.C module: MUSIC.C

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2
@ -1290,7 +1288,9 @@ static int32_t osdcmd_cvar_set_game(const osdfuncparm_t *parm)
} }
else if (!Bstrcasecmp(parm->name, "r_ambientlight")) else if (!Bstrcasecmp(parm->name, "r_ambientlight"))
{ {
r_ambientlightrecip = 1.f/r_ambientlight; if (r_ambientlight == 0)
r_ambientlightrecip = 256.f;
else r_ambientlightrecip = 1.f/r_ambientlight;
return r; return r;
} }

View file

@ -1,3 +1,25 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2010 EDuke32 developers and contributors
This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//-------------------------------------------------------------------------
#ifndef __osdcmds_h__ #ifndef __osdcmds_h__
#define __osdcmds_h__ #define __osdcmds_h__

View file

@ -1,3 +1,25 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2010 EDuke32 developers and contributors
This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//-------------------------------------------------------------------------
#include "duke3d.h" #include "duke3d.h"
#include "build.h" #include "build.h"
#include "namesdyn.h" #include "namesdyn.h"

View file

@ -1,3 +1,25 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2010 EDuke32 developers and contributors
This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//-------------------------------------------------------------------------
void GAME_drawosdchar(int32_t x, int32_t y, char ch, int32_t shade, int32_t pal); void GAME_drawosdchar(int32_t x, int32_t y, char ch, int32_t shade, int32_t pal);
void GAME_drawosdstr(int32_t x, int32_t y, char *ch, int32_t len, int32_t shade, int32_t pal); void GAME_drawosdstr(int32_t x, int32_t y, char *ch, int32_t len, int32_t shade, int32_t pal);
void GAME_drawosdcursor(int32_t x, int32_t y, int32_t type, int32_t lastkeypress); void GAME_drawosdcursor(int32_t x, int32_t y, int32_t type, int32_t lastkeypress);

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2
@ -22,8 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// Savage Baggage Masters
#include "duke3d.h" #include "duke3d.h"
#include "osd.h" #include "osd.h"
#include "gamedef.h" #include "gamedef.h"
@ -4443,7 +4439,7 @@ int32_t P_DoFist(DukePlayer_t *p)
if (p->buttonpalette && ud.from_bonus == 0) if (p->buttonpalette && ud.from_bonus == 0)
{ {
ud.from_bonus = ud.level_number+1; ud.from_bonus = ud.level_number+1;
if (ud.secretlevel > 0 && ud.secretlevel < MAXLEVELS) if (ud.secretlevel > 0 && ud.secretlevel <= MAXLEVELS)
ud.level_number = ud.secretlevel-1; ud.level_number = ud.secretlevel-1;
ud.m_level_number = ud.level_number; ud.m_level_number = ud.level_number;
} }
@ -4702,10 +4698,16 @@ void P_ProcessInput(int32_t snum)
return; return;
} }
p->rotscrnang -= ((p->rotscrnang>>1) + (p->rotscrnang != 0)); p->rotscrnang -= (p->rotscrnang>>1);
if (p->rotscrnang && !(p->rotscrnang>>1))
p->rotscrnang -= ksgn(p->rotscrnang);
p->look_ang -= (p->look_ang>>2); p->look_ang -= (p->look_ang>>2);
if (p->look_ang && !(p->look_ang>>2))
p->look_ang -= ksgn(p->look_ang);
if (TEST_SYNC_KEY(sb_snum, SK_LOOK_LEFT)) if (TEST_SYNC_KEY(sb_snum, SK_LOOK_LEFT))
{ {
// look_left // look_left

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2
@ -220,6 +218,31 @@ int32_t G_LoadPlayer(int32_t spot)
if (kdfread(&ud.level_number,sizeof(ud.level_number),1,fil) != 1) goto corrupt; if (kdfread(&ud.level_number,sizeof(ud.level_number),1,fil) != 1) goto corrupt;
if (kdfread(&ud.player_skill,sizeof(ud.player_skill),1,fil) != 1) goto corrupt; if (kdfread(&ud.player_skill,sizeof(ud.player_skill),1,fil) != 1) goto corrupt;
if (kdfread(&boardfilename[0],BMAX_PATH,1,fil) != 1) goto corrupt; if (kdfread(&boardfilename[0],BMAX_PATH,1,fil) != 1) goto corrupt;
currentboardfilename[0] = 0;
if (boardfilename[0])
strcpy(currentboardfilename, boardfilename);
else if (MapInfo[(ud.volume_number * MAXLEVELS) + ud.level_number].filename)
strcpy(currentboardfilename, MapInfo[(ud.volume_number * MAXLEVELS) + ud.level_number].filename);
if (currentboardfilename[0])
{
char *p;
p = Bstrrchr(currentboardfilename,'.');
if (!p) strcat(currentboardfilename,".mhk");
else
{
p[1]='m';
p[2]='h';
p[3]='k';
p[4]=0;
}
loadmaphack(currentboardfilename);
}
Bmemcpy(&currentboardfilename[0],&boardfilename[0],BMAX_PATH); Bmemcpy(&currentboardfilename[0],&boardfilename[0],BMAX_PATH);
ud.m_level_number = ud.level_number; ud.m_level_number = ud.level_number;
@ -593,11 +616,11 @@ int32_t G_LoadPlayer(int32_t spot)
int32_t i = 0; int32_t i = 0;
polymer_loadboard(); polymer_loadboard();
while (i < MAXSPRITES) while (i < MAXSPRITES)
{ {
if (actor[i].lightptr) if (actor[i].lightptr)
{ {
polymer_deletelight(actor[i].lightId);
actor[i].lightptr = NULL; actor[i].lightptr = NULL;
actor[i].lightId = -1; actor[i].lightId = -1;
} }

View file

@ -1,10 +1,12 @@
//-------------------------------------------------------------------------
/* /*
Copyright (C) 2003-2004 Ryan C. Gordon. and James Bentler Copyright (C) 2010 EDuke32 developers and contributors
This program is free software; you can redistribute it and/or This file is part of EDuke32.
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 EDuke32 is free software; you can redistribute it and/or
of the License, or (at your option) any later version. modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -15,11 +17,9 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Originally written by Ryan C. Gordon. (icculus@clutteredmind.org)
Adapted to work with JonoF's port by James Bentler (bentler@cs.umn.edu)
*/ */
//-------------------------------------------------------------------------
/* /*
* A reimplementation of Jim Dose's FX_MAN routines, using SDL_mixer 1.2. * A reimplementation of Jim Dose's FX_MAN routines, using SDL_mixer 1.2.
* Whee. FX_MAN is also known as the "Apogee Sound System", or "ASS" for * Whee. FX_MAN is also known as the "Apogee Sound System", or "ASS" for

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,10 +1,8 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
Copyright (C) 2004, 2007 - EDuke32 developers
This file is part of EDuke32 This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2 modify it under the terms of the GNU General Public License version 2

View file

@ -1,3 +1,25 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2010 EDuke32 developers and contributors
This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//-------------------------------------------------------------------------
#ifndef __sounds_mapster32_h__ #ifndef __sounds_mapster32_h__
#define __sounds_mapster32_h__ #define __sounds_mapster32_h__

View file

@ -1,3 +1,25 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2010 EDuke32 developers and contributors
This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//-------------------------------------------------------------------------
#if defined(LINKED_GTK) #if defined(LINKED_GTK)
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixdata.h> #include <gdk-pixbuf/gdk-pixdata.h>

View file

@ -1,3 +1,25 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2010 EDuke32 developers and contributors
This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//-------------------------------------------------------------------------
#ifndef RENDERTYPEWIN #ifndef RENDERTYPEWIN
#error Only for Windows #error Only for Windows
#endif #endif

View file

@ -1,3 +1,25 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 2010 EDuke32 developers and contributors
This file is part of EDuke32.
EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//-------------------------------------------------------------------------
// resource ids // resource ids
#define WIN_STARTWIN 1000 #define WIN_STARTWIN 1000
#define WIN_STARTWINPAGE_CONFIG 2000 #define WIN_STARTWINPAGE_CONFIG 2000

View file

@ -1,12 +1,12 @@
//-------------------------------------------------------------------------
/* /*
Duke Nukem Copyright (C) 1996, 2003 3D Realms Entertainment Copyright (C) 2010 EDuke32 developers and contributors
This file is part of Duke Nukem 3D version 1.5 - Atomic Edition This file is part of EDuke32.
Duke Nukem 3D is free software; you can redistribute it and/or EDuke32 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License modify it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation; either version 2 as published by the Free Software Foundation.
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -17,8 +17,6 @@ See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Windows-specific hooks for JonoF's Duke3D port.
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

View file

@ -1,219 +0,0 @@
// Mapster32 tile grouping configuration file
// Press T on the tile selection screen to access the tileset selection menu
#include "names.h"
tilegroup "Player"
{
hotkey "P"
// Colors are the colors for Blocking OFF and Blocking ON.
colors 2 2
tiles
{
APLAYER
}
}
tilegroup "Actors"
{
hotkey "A"
colors 31 31
tiles
{
LIZTROOP LIZTROOPRUNNING LIZTROOPSTAYPUT LIZTROOPSHOOT LIZTROOPJETPACK
LIZTROOPONTOILET LIZTROOPJUSTSIT LIZTROOPDUCKING
PIGCOP PIGCOPSTAYPUT PIGCOPDIVE
LIZMAN LIZMANSTAYPUT LIZMANSPITTING LIZMANFEEDING LIZMANJUMP
COMMANDER COMMANDERSTAYPUT
OCTABRAIN OCTABRAINSTAYPUT
ORGANTIC
DRONE
NEWBEAST NEWBEASTSTAYPUT NEWBEASTHANG NEWBEASTJUMP
EGG GREENSLIME ROTATEGUN RECON TANK BOUNCEMINE
FLOORFLAME
// FEMS
FEM1 FEM2 FEM3 FEM4 FEM5 FEM6 FEM7 FEM8 FEM9 FEM10 NAKED1
// Lil' critters
SHARK
// BIG critters
BOSS1 BOSS1STAYPUT BOSS1SHOOT BOSS1LOB
BOSS2
BOSS3
BOSS4 BOSS4STAYPUT
}
}
tilegroup "Doors"
{
hotkey "D"
tiles
{
DOORTILE1 DOORTILE2 DOORTILE3 DOORTILE4 DOORTILE5
DOORTILE6 DOORTILE7 DOORTILE8 DOORTILE9 DOORTILE10
312 313 314 345
DOORTILE22 DOORTILE18 DOORTILE19 DOORTILE20
450 455 457 458 459 469 470 477
DOORTILE14
719 735 771
DOORTILE16
843 858 883
DOORTILE15 DOORTILE21
1173
DOORTILE11 DOORTILE12
353 355
// Related items
DOORSHOCK ACCESSCARD
}
}
tilegroup "Effectors"
{
hotkey "E"
tilerange 1 10
colors 15 15
}
tilegroup "Switches"
{
hotkey "S"
tiles
{
ACCESSSWITCH ACCESSSWITCH2 ACCESSCARD SLOTDOOR LIGHTSWITCH SPACEDOORSWITCH SPACELIGHTSWITCH
FRANKENSTINESWITCH MULTISWITCH
DIPSWITCH DIPSWITCH2 DIPSWITCH3 TECHSWITCH
LIGHTSWITCH2 713 // LIGHTSWITCH2+1
POWERSWITCH1 LOCKSWITCH1 POWERSWITCH2 HANDSWITCH PULLSWITCH
ALIENSWITCH HANDPRINTSWITCH NUKEBUTTON
TARGET
4083 4954 // Busted switches (Atomic)
}
}
tilegroup "Items"
{
hotkey "I"
colors 24 24
tiles
{
// Ammo
AMMO SHOTGUNAMMO BATTERYAMMO RPGAMMO HEAVYHBOMB FREEZEAMMO GROWAMMO CRYSTALAMMO
DEVISTATORAMMO HBOMBAMMO
// Items (healthetc)
COLA SIXPAK FIRSTAID SHIELD STEROIDS AIRTANK JETPACK HEATSENSOR ACCESSCARD
BOOTS ATOMICHEALTH HOLODUKE
// Weapons
FIRSTGUNSPRITE CHAINGUNSPRITE RPGSPRITE FREEZESPRITE SHRINKERSPRITE
TRIPBOMBSPRITE SHOTGUNSPRITE DEVISTATORSPRITE
}
}
tilegroup "Respawn triggers"
{
hotkey "R"
tiles
{
CANWITHSOMETHING CANWITHSOMETHING2 CANWITHSOMETHING3 CANWITHSOMETHING4
// FEMS
FEM1 FEM2 FEM3 FEM4 FEM5 FEM6 FEM7 FEM8 FEM9 FEM10 NAKED1
}
}
tilegroup "Exploding stuff"
{
hotkey "X"
tiles
{
CRACK1 CRACK2 CRACK3 CRACK4
FIREEXT SEENINE OOZFILTER
EXPLODINGBARREL EXPLODINGBARREL2 FIREBARREL GUNPOWDERBARREL
REACTOR2SPARK BOLT1 SIDEBOLT1
CEILINGSTEAM
FIREVASE 2066 BURNING FIRE BURNING2 FIRE2
}
}
tilegroup "Letters and numbers"
{
hotkey "L"
tilerange 2822 2915
tilerange 2929 3022
tilerange 3072 3135
tilerange 3162 3165
tilerange 640 649
tilerange 2472 2481
}
// Alphabet configuration for text entry tool in 3D mode
// (press Ctrl-T on a wall-aligned letter)
// 32 alphabets max.
alphabet // blue font
{
maprange 33 126 STARTALPHANUM
offseta "^" 0 2
offseta "qQ;" 0 -1
}
alphabet
{
maprange 33 126 MINIFONT
maprangea "a" "z" 3104
// offset "\\" 0 3 doesn't work
offset 92 0 3
offseta "qQ" 0 -1
offseta ":" 0 1
offseta "'\"" 0 3
}
alphabet // red font
{
maprangea "0" "9" 2930
maprangea "A" "Z" BIGALPHANUM
maprangea "a" "z" BIGALPHANUM
mapa "-" 2929
mapa ".,!?;:/%" 3002
mapa "'" 3022
}
alphabet // silver font
{
maprangea "0" "9" 2992
maprangea "A" "Z" 2966
maprangea "a" "z" 2966
}
alphabet // yellow numbers 3x5
{
maprangea "0" "9" THREEBYFIVE
mapa ":/" 3020
offseta ":" 0 1
}
alphabet // silver numbers
{
maprangea "1" "9" W_NUMBERS
mapa "0" 649
}
alphabet
{
maprangea "0" "9" DIGITALNUM
}