Removing doom demo (will become part of a dedicated demo-projects-repo)
This commit is contained in:
parent
d4f43afcd2
commit
96789916e3
131 changed files with 0 additions and 316827 deletions
112
demos/3rdparty/doom/DOOMLIC.TXT
vendored
112
demos/3rdparty/doom/DOOMLIC.TXT
vendored
|
@ -1,112 +0,0 @@
|
|||
|
||||
|
||||
LIMITED USE SOFTWARE LICENSE AGREEMENT
|
||||
|
||||
This Limited Use Software License Agreement (the "Agreement")
|
||||
is a legal agreement between you, the end-user, and Id Software, Inc.
|
||||
("ID"). By downloading or purchasing the software material, which
|
||||
includes source code (the "Source Code"), artwork data, music and
|
||||
software tools (collectively, the "Software"), you are agreeing to
|
||||
be bound by the terms of this Agreement. If you do not agree to the
|
||||
terms of this Agreement, promptly destroy the Software you may have
|
||||
downloaded or copied.
|
||||
|
||||
ID SOFTWARE LICENSE
|
||||
|
||||
1. Grant of License. ID grants to you the right to use the
|
||||
Software. You have no ownership or proprietary rights in or to the
|
||||
Software, or the Trademark. For purposes of this section, "use" means
|
||||
loading the Software into RAM, as well as installation on a hard disk
|
||||
or other storage device. The Software, together with any archive copy
|
||||
thereof, shall be destroyed when no longer used in accordance with
|
||||
this Agreement, or when the right to use the Software is terminated.
|
||||
You agree that the Software will not be shipped, transferred or
|
||||
exported into any country in violation of the U.S. Export
|
||||
Administration Act (or any other law governing such matters) and that
|
||||
you will not utilize, in any other manner, the Software in violation
|
||||
of any applicable law.
|
||||
|
||||
2. Permitted Uses. For educational purposes only, you, the
|
||||
end-user, may use portions of the Source Code, such as particular
|
||||
routines, to develop your own software, but may not duplicate the
|
||||
Source Code, except as noted in paragraph 4. The limited right
|
||||
referenced in the preceding sentence is hereinafter referred to as
|
||||
"Educational Use." By so exercising the Educational Use right you
|
||||
shall not obtain any ownership, copyright, proprietary or other
|
||||
interest in or to the Source Code, or any portion of the Source
|
||||
Code. You may dispose of your own software in your sole discretion.
|
||||
With the exception of the Educational Use right, you may not
|
||||
otherwise use the Software, or an portion of the Software, which
|
||||
includes the Source Code, for commercial gain.
|
||||
|
||||
3. Prohibited Uses: Under no circumstances shall you, the
|
||||
end-user, be permitted, allowed or authorized to commercially exploit
|
||||
the Software. Neither you nor anyone at your direction shall do any
|
||||
of the following acts with regard to the Software, or any portion
|
||||
thereof:
|
||||
|
||||
Rent;
|
||||
|
||||
Sell;
|
||||
|
||||
Lease;
|
||||
|
||||
Offer on a pay-per-play basis;
|
||||
|
||||
Distribute for money or any other consideration; or
|
||||
|
||||
In any other manner and through any medium whatsoever
|
||||
commercially exploit or use for any commercial purpose.
|
||||
|
||||
Notwithstanding the foregoing prohibitions, you may commercially
|
||||
exploit the software you develop by exercising the Educational Use
|
||||
right, referenced in paragraph 2. hereinabove.
|
||||
|
||||
4. Copyright. The Software and all copyrights related thereto
|
||||
(including all characters and other images generated by the Software
|
||||
or depicted in the Software) are owned by ID and is protected by
|
||||
United States copyright laws and international treaty provisions.
|
||||
Id shall retain exclusive ownership and copyright in and to the
|
||||
Software and all portions of the Software and you shall have no
|
||||
ownership or other proprietary interest in such materials. You must
|
||||
treat the Software like any other copyrighted material. You may not
|
||||
otherwise reproduce, copy or disclose to others, in whole or in any
|
||||
part, the Software. You may not copy the written materials
|
||||
accompanying the Software. You agree to use your best efforts to
|
||||
see that any user of the Software licensed hereunder complies with
|
||||
this Agreement.
|
||||
|
||||
5. NO WARRANTIES. ID DISCLAIMS ALL WARRANTIES, BOTH EXPRESS
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT
|
||||
TO THE SOFTWARE. THIS LIMITED WARRANTY GIVES YOU SPECIFIC LEGAL
|
||||
RIGHTS. YOU MAY HAVE OTHER RIGHTS WHICH VARY FROM JURISDICTION TO
|
||||
JURISDICTION. ID DOES NOT WARRANT THAT THE OPERATION OF THE SOFTWARE
|
||||
WILL BE UNINTERRUPTED, ERROR FREE OR MEET YOUR SPECIFIC REQUIREMENTS.
|
||||
THE WARRANTY SET FORTH ABOVE IS IN LIEU OF ALL OTHER EXPRESS
|
||||
WARRANTIES WHETHER ORAL OR WRITTEN. THE AGENTS, EMPLOYEES,
|
||||
DISTRIBUTORS, AND DEALERS OF ID ARE NOT AUTHORIZED TO MAKE
|
||||
MODIFICATIONS TO THIS WARRANTY, OR ADDITIONAL WARRANTIES ON BEHALF
|
||||
OF ID.
|
||||
|
||||
Exclusive Remedies. The Software is being offered to you
|
||||
free of any charge. You agree that you have no remedy against ID, its
|
||||
affiliates, contractors, suppliers, and agents for loss or damage
|
||||
caused by any defect or failure in the Software regardless of the form
|
||||
of action, whether in contract, tort, includinegligence, strict
|
||||
liability or otherwise, with regard to the Software. This Agreement
|
||||
shall be construed in accordance with and governed by the laws of the
|
||||
State of Texas. Copyright and other proprietary matters will be
|
||||
governed by United States laws and international treaties. IN ANY
|
||||
CASE, ID SHALL NOT BE LIABLE FOR LOSS OF DATA, LOSS OF PROFITS, LOST
|
||||
SAVINGS, SPECIAL, INCIDENTAL, CONSEQUENTIAL, INDIRECT OR OTHER
|
||||
SIMILAR DAMAGES ARISING FROM BREACH OF WARRANTY, BREACH OF CONTRACT,
|
||||
NEGLIGENCE, OR OTHER LEGAL THEORY EVEN IF ID OR ITS AGENT HAS BEEN
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY
|
||||
OTHER PARTY. Some jurisdictions do not allow the exclusion or
|
||||
limitation of incidental or consequential damages, so the above
|
||||
limitation or exclusion may not apply to you.
|
||||
|
||||
|
||||
|
||||
|
221
demos/3rdparty/doom/FILES2
vendored
221
demos/3rdparty/doom/FILES2
vendored
|
@ -1,221 +0,0 @@
|
|||
ChangeLog
|
||||
FILES
|
||||
FILES2
|
||||
Makefile
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
Global and misc. stuff
|
||||
-----------------------------------------------------------------------
|
||||
doomdata.h - external data definitions (WAD file structure)
|
||||
doomdef.h - internal data definitions (game structs)
|
||||
dstrings.h - printed strings for translation, english
|
||||
d_french.h - printed strings for translation
|
||||
|
||||
info.h
|
||||
info.c - LUT's for Thing TAB, Frame TAB,
|
||||
generated by multigen utility
|
||||
dutils.h
|
||||
dutils.c - Dave's utilities
|
||||
including doubly-linked lists & simple state machines.
|
||||
Used in WI, ST, AM, and d_main.c
|
||||
|
||||
------------------------------------------------------------------------
|
||||
DOOM game loop and top level stuff
|
||||
------------------------------------------------------------------------
|
||||
g_game.c - Game loop functions, event handling etc.
|
||||
|
||||
boolean G_CheckDemoStatus (void);
|
||||
void G_ReadDemoTiccmd (ticcmd_t *cmd);
|
||||
void G_WriteDemoTiccmd (ticcmd_t *cmd);
|
||||
void G_PlayerReborn (int player);
|
||||
void G_InitNew (skill_t skill, int episode, int map);
|
||||
|
||||
void G_DoReborn (int playernum);
|
||||
|
||||
void G_DoLoadLevel (void);
|
||||
void G_DoNewGame (void);
|
||||
void G_DoLoadGame (void);
|
||||
void G_DoPlayDemo (void);
|
||||
void G_DoCompleted (void);
|
||||
void G_DoVictory (void);
|
||||
void G_DoWorldDone (void);
|
||||
void G_DoSaveGame (void);
|
||||
|
||||
d_main.c - event handling, D_DoomMain() and other functions
|
||||
NOT int main()
|
||||
|
||||
d_net.c - high level networking protocol code
|
||||
|
||||
------------------------------------------------------------------
|
||||
I Interfaces, system specifics
|
||||
------------------------------------------------------------------
|
||||
i_main.c - main(), calls D_DoomMain().
|
||||
i_svgalib.c - Linux SVGAlib code, including main(),
|
||||
replaces i_main.c
|
||||
|
||||
i_x.c - X11 with SHM code, use with i_main.c
|
||||
i_dga.c - X11 DGA code, use with i_main.c
|
||||
i_unix.c - fixed point, networking, and display stuff for UNIX
|
||||
|
||||
i_ibm.c - IBM DOS VGA graphics and key/mouse/joystick,
|
||||
use with i_main.c
|
||||
i_pcnet.c - IPX networking, DOS
|
||||
|
||||
fpfunc.S - fixed point assembly and (currently) duplicate of
|
||||
tmap.S - texture mapping assembly (currently unused)
|
||||
|
||||
------------------------------------------------------------------
|
||||
AM AutoMap
|
||||
------------------------------------------------------------------
|
||||
am_data.h - vector graphics for the automap
|
||||
|
||||
am_map.h
|
||||
am_map.c - automap code
|
||||
|
||||
------------------------------------------------------------------
|
||||
HU Heads Up
|
||||
------------------------------------------------------------------
|
||||
hu_lib.h
|
||||
hu_lib.c - heads-up text and input code
|
||||
|
||||
hu_stuff.h
|
||||
hu_stuff.c - Heads-up displays
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
M Menu
|
||||
-------------------------------------------------------------------
|
||||
m_menu.c - DOOM options code and leaving messages
|
||||
|
||||
m_misc.c - misc. HUD text display, input checks, and
|
||||
random table, file I/O
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
P Play???
|
||||
-------------------------------------------------------------------
|
||||
p_local.h - header for all play modules
|
||||
|
||||
p_spec.h - specials, lighting, doors, plats, texture animation
|
||||
p_spec.c - specials, texture animation
|
||||
|
||||
p_doors.c - door code
|
||||
p_plats.c - platform raising/lowering code
|
||||
p_ceilng.c - active (e.g. crushing) ceilings
|
||||
p_floor.c - active (e.g. raising) floors
|
||||
p_lights.c - dynamic (e.g. flickering) lighting
|
||||
p_switch.c - button switches and animation
|
||||
|
||||
p_enemy.c - enemy AI and animation
|
||||
p_inter.c - object/object interaction?
|
||||
p_map.c - movement objects, handling of collisions
|
||||
p_maputl.c - distance, position etc. utilities for movement
|
||||
p_mobj.c - mobile objects handling, spawn etc.
|
||||
p_user.c - more movement, bobbing etc.
|
||||
|
||||
p_telept.c - teleportation code
|
||||
|
||||
p_sight.c - LOS checks, REJECT
|
||||
|
||||
|
||||
p_pspr.c - weapon overlays, bobbing, raising, sprite tables,
|
||||
firing, ammo bookkeeping
|
||||
|
||||
p_setup.c - load map from WAF file, setup code
|
||||
|
||||
|
||||
p_tick.c - savegame function (archive/unarchive),
|
||||
thinker list handling, allocation,
|
||||
game tick execution (updates)
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
R Rendering
|
||||
-------------------------------------------------------------------
|
||||
r_local.h - header for all rendering modules,
|
||||
internal map data structure definitions
|
||||
|
||||
r_bsp.c - BSP seg's clipping
|
||||
|
||||
r_data.c - texture column caching, patch assembly,
|
||||
flats, colormaps, sprites,
|
||||
lookup by name
|
||||
|
||||
r_draw.c - access to framebuffer API, drawing C functions
|
||||
|
||||
|
||||
r_main.c - geometry functions, trigonometry lookups,
|
||||
R_RenderPlayerView
|
||||
|
||||
r_plane.c - floor/ceiling visplanes, sky
|
||||
|
||||
r_segs.c - drawing segs, marking hslices for floors/ceilings
|
||||
|
||||
r_things.c - sprite and sprite frame/rotation handling, drawing
|
||||
|
||||
|
||||
tables.c - trigonometry lookup tables, static
|
||||
|
||||
v_video.c - gamma correction lookup, patch drawing to rectangle
|
||||
|
||||
-------------------------------------------------------------------
|
||||
S Sound
|
||||
-------------------------------------------------------------------
|
||||
s_sound.c - more sound and music handling
|
||||
|
||||
soundst.h - sound and music data structures
|
||||
sounds.h
|
||||
sounds.c - sound and music lump LUT's (manually maintained)
|
||||
|
||||
sndserver.h
|
||||
sndserver.c - (Irix) sndserver code
|
||||
|
||||
irix.h
|
||||
irix.c - SGI Irix sound/sndserver support code
|
||||
|
||||
linux.c - Linux voxware sound/sndserver support code,
|
||||
replaces irix.c, uses irix.h
|
||||
sun.c - SUN replacement for irix.c
|
||||
|
||||
|
||||
i_sound.h
|
||||
i_sound.c - DOS DMX music and sound interface
|
||||
|
||||
-------------------------------------------------------------------
|
||||
ST STatus bar
|
||||
-------------------------------------------------------------------
|
||||
st_lib.h
|
||||
st_lib.c - status bar widget code
|
||||
|
||||
st_stuff.c
|
||||
st_stuff.h - status bar code
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
W Wad file I/O
|
||||
-------------------------------------------------------------------
|
||||
w_wad.c - lump based functions
|
||||
wadread.h
|
||||
wadread.c - lump I/O, get SFX
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WI WIn / level end screens
|
||||
-------------------------------------------------------------------
|
||||
wi_data.h - lookups for intermission screens, patch positions
|
||||
|
||||
wi_stuff.h
|
||||
wi_stuff.c - intermission animation patchwork
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Z Zone memory allocation
|
||||
-------------------------------------------------------------------
|
||||
z_zone.c
|
||||
|
||||
-------------------------------------------------------------------
|
||||
F Final screen animation
|
||||
-------------------------------------------------------------------
|
||||
f_finale.c - DOOM mission end screens? (bunny)
|
||||
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
283
demos/3rdparty/doom/README.asm
vendored
283
demos/3rdparty/doom/README.asm
vendored
|
@ -1,283 +0,0 @@
|
|||
|
||||
README - DOOM assembly code
|
||||
|
||||
Okay, I add the DOS assembly module for the historically
|
||||
inclined here (may rec.games.programmer suffer). If anyone
|
||||
feels the urge to port these to GNU GCC; either inline or
|
||||
as separate modules including Makefile support, be my guest.
|
||||
|
||||
Module tmap.S includes the inner loops for texture mapping,
|
||||
the interesting one being the floor/ceiling span rendering.
|
||||
|
||||
There was another module in the source dump, fpfunc.S, that
|
||||
had both texture mapping and fixed point functions. It
|
||||
contained implementations both for i386 and M68k. For
|
||||
brevity, I include only the i386 fixed point stuff below.
|
||||
|
||||
//====================================================
|
||||
// tmap.S as of January 10th, 1997
|
||||
|
||||
//================
|
||||
//
|
||||
// R_DrawColumn
|
||||
//
|
||||
//================
|
||||
|
||||
.data
|
||||
loopcount .long 0
|
||||
pixelcount .long 0
|
||||
|
||||
.text
|
||||
|
||||
.align 16
|
||||
.globl _R_DrawColumn
|
||||
_R_DrawColumn:
|
||||
|
||||
pushad
|
||||
|
||||
movl ebp,[_dc_yl]
|
||||
movl ebx,ebp
|
||||
movl edi,[_ylookup+ebx*4]
|
||||
movl ebx,[_dc_x]
|
||||
addl edi,[_columnofs + ebx*4]
|
||||
|
||||
movl eax,[_dc_yh]
|
||||
incl eax
|
||||
subl eax,ebp // pixel count
|
||||
movl [pixelcount],eax // save for final pixel
|
||||
js done // nothing to scale
|
||||
shrl eax,1 // double pixel count
|
||||
movl [loopcount],eax
|
||||
|
||||
movl ecx,[_dc_iscale]
|
||||
|
||||
movl eax,[_centery]
|
||||
subl eax,ebp
|
||||
imull ecx
|
||||
movl ebp,[_dc_texturemid]
|
||||
subl ebp,eax
|
||||
shll ebp,9 // 7 significant bits, 25 frac
|
||||
|
||||
movl esi,[_dc_source]
|
||||
|
||||
|
||||
movl ebx,[_dc_iscale]
|
||||
shll ebx,9
|
||||
movl eax,OFFSET patch1+2 // convice tasm to modify code...
|
||||
movl [eax],ebx
|
||||
movl eax,OFFSET patch2+2 // convice tasm to modify code...
|
||||
movl [eax],ebx
|
||||
|
||||
// eax aligned colormap
|
||||
// ebx aligned colormap
|
||||
// ecx,edx scratch
|
||||
// esi virtual source
|
||||
// edi moving destination pointer
|
||||
// ebp frac
|
||||
|
||||
movl ecx,ebp // begin calculating first pixel
|
||||
addl ebp,ebx // advance frac pointer
|
||||
shrl ecx,25 // finish calculation for first pixel
|
||||
movl edx,ebp // begin calculating second pixel
|
||||
addl ebp,ebx // advance frac pointer
|
||||
shrl edx,25 // finish calculation for second pixel
|
||||
movl eax,[_dc_colormap]
|
||||
movl ebx,eax
|
||||
movb al,[esi+ecx] // get first pixel
|
||||
movb bl,[esi+edx] // get second pixel
|
||||
movb al,[eax] // color translate first pixel
|
||||
movb bl,[ebx] // color translate second pixel
|
||||
|
||||
testl [pixelcount],0fffffffeh
|
||||
jnz doubleloop // at least two pixels to map
|
||||
jmp checklast
|
||||
|
||||
.align 16
|
||||
doubleloop:
|
||||
movl ecx,ebp // begin calculating third pixel
|
||||
patch1:
|
||||
addl ebp,12345678h // advance frac pointer
|
||||
movb [edi],al // write first pixel
|
||||
shrl ecx,25 // finish calculation for third pixel
|
||||
movl edx,ebp // begin calculating fourth pixel
|
||||
patch2:
|
||||
addl ebp,12345678h // advance frac pointer
|
||||
movl [edi+SCREENWIDTH],bl // write second pixel
|
||||
shrl edx,25 // finish calculation for fourth pixel
|
||||
movb al,[esi+ecx] // get third pixel
|
||||
addl edi,SCREENWIDTH*2 // advance to third pixel destination
|
||||
movb bl,[esi+edx] // get fourth pixel
|
||||
decl [loopcount] // done with loop?
|
||||
movb al,[eax] // color translate third pixel
|
||||
movb bl,[ebx] // color translate fourth pixel
|
||||
jnz doubleloop
|
||||
|
||||
// check for final pixel
|
||||
checklast:
|
||||
testl [pixelcount],1
|
||||
jz done
|
||||
movb [edi],al // write final pixel
|
||||
|
||||
done:
|
||||
popad
|
||||
ret
|
||||
|
||||
|
||||
|
||||
//================
|
||||
//
|
||||
// R_DrawSpan
|
||||
//
|
||||
// Horizontal texture mapping
|
||||
//
|
||||
//================
|
||||
|
||||
|
||||
.align 16
|
||||
.globl _R_DrawSpan
|
||||
_R_DrawSpan:
|
||||
pushad
|
||||
|
||||
//
|
||||
// find loop count
|
||||
//
|
||||
movl eax,[_ds_x2]
|
||||
incl eax
|
||||
subl eax,[_ds_x1] // pixel count
|
||||
movl [pixelcount],eax // save for final pixel
|
||||
js hdone // nothing to scale
|
||||
shrl eax,1 // double pixel count
|
||||
movl [loopcount],eax
|
||||
|
||||
//
|
||||
// build composite position
|
||||
//
|
||||
movl ebp,[_ds_xfrac]
|
||||
shll ebp,10
|
||||
andl ebp,0ffff0000h
|
||||
movl eax,[_ds_yfrac]
|
||||
shrl eax,6
|
||||
andl eax,0ffffh
|
||||
orl ebp,eax
|
||||
|
||||
movl esi,[_ds_source]
|
||||
|
||||
//
|
||||
// calculate screen dest
|
||||
//
|
||||
movl edi,[_ds_y]
|
||||
movl edi,[_ylookup+edi*4]
|
||||
movl eax,[_ds_x1]
|
||||
addl edi,[_columnofs+eax*4]
|
||||
|
||||
//
|
||||
// build composite step
|
||||
//
|
||||
movl ebx,[_ds_xstep]
|
||||
shll ebx,10
|
||||
andl ebx,0ffff0000h
|
||||
movl eax,[_ds_ystep]
|
||||
shrl eax,6
|
||||
andl eax,0ffffh
|
||||
orl ebx,eax
|
||||
|
||||
movl eax,OFFSET hpatch1+2 // convice tasm to modify code...
|
||||
movl [eax],ebx
|
||||
movl eax,OFFSET hpatch2+2 // convice tasm to modify code...
|
||||
movl [eax],ebx
|
||||
|
||||
// eax aligned colormap
|
||||
// ebx aligned colormap
|
||||
// ecx,edx scratch
|
||||
// esi virtual source
|
||||
// edi moving destination pointer
|
||||
// ebp frac
|
||||
|
||||
shldl ecx,ebp,22 // begin calculating third pixel (y units)
|
||||
shldl ecx,ebp,6 // begin calculating third pixel (x units)
|
||||
addl ebp,ebx // advance frac pointer
|
||||
andl ecx,4095 // finish calculation for third pixel
|
||||
shldl edx,ebp,22 // begin calculating fourth pixel (y units)
|
||||
shldl edx,ebp,6 // begin calculating fourth pixel (x units)
|
||||
addl ebp,ebx // advance frac pointer
|
||||
andl edx,4095 // finish calculation for fourth pixel
|
||||
movl eax,[_ds_colormap]
|
||||
movl ebx,eax
|
||||
movb al,[esi+ecx] // get first pixel
|
||||
movb bl,[esi+edx] // get second pixel
|
||||
movb al,[eax] // color translate first pixel
|
||||
movb bl,[ebx] // color translate second pixel
|
||||
|
||||
testl [pixelcount],0fffffffeh
|
||||
jnz hdoubleloop // at least two pixels to map
|
||||
jmp hchecklast
|
||||
|
||||
|
||||
.align 16
|
||||
hdoubleloop:
|
||||
shldl ecx,ebp,22 // begin calculating third pixel (y units)
|
||||
shldl ecx,ebp,6 // begin calculating third pixel (x units)
|
||||
hpatch1:
|
||||
addl ebp,12345678h // advance frac pointer
|
||||
movb [edi],al // write first pixel
|
||||
andl ecx,4095 // finish calculation for third pixel
|
||||
shldl edx,ebp,22 // begin calculating fourth pixel (y units)
|
||||
shldl edx,ebp,6 // begin calculating fourth pixel (x units)
|
||||
hpatch2:
|
||||
addl ebp,12345678h // advance frac pointer
|
||||
movb [edi+1],bl // write second pixel
|
||||
andl edx,4095 // finish calculation for fourth pixel
|
||||
movb al,[esi+ecx] // get third pixel
|
||||
addl edi,2 // advance to third pixel destination
|
||||
movb bl,[esi+edx] // get fourth pixel
|
||||
decl [loopcount] // done with loop?
|
||||
movb al,[eax] // color translate third pixel
|
||||
movb bl,[ebx] // color translate fourth pixel
|
||||
jnz hdoubleloop
|
||||
|
||||
// check for final pixel
|
||||
hchecklast:
|
||||
testl [pixelcount],1
|
||||
jz hdone
|
||||
movb [edi],al // write final pixel
|
||||
|
||||
hdone:
|
||||
popad
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
//====================================================
|
||||
// fpfunc.S as of January 10th, 1997 (parts)
|
||||
|
||||
#ifdef i386
|
||||
|
||||
.text
|
||||
.align 4
|
||||
.globl _FixedMul
|
||||
_FixedMul:
|
||||
pushl %ebp
|
||||
movl %esp,%ebp
|
||||
movl 8(%ebp),%eax
|
||||
imull 12(%ebp)
|
||||
shrdl $16,%edx,%eax
|
||||
popl %ebp
|
||||
ret
|
||||
|
||||
|
||||
.align 4
|
||||
.globl _FixedDiv2
|
||||
_FixedDiv2:
|
||||
pushl %ebp
|
||||
movl %esp,%ebp
|
||||
movl 8(%ebp),%eax
|
||||
cdq
|
||||
shldl $16,%eax,%edx
|
||||
sall $16,%eax
|
||||
idivl 12(%ebp)
|
||||
popl %ebp
|
||||
ret
|
||||
|
||||
#endif
|
||||
|
23
demos/3rdparty/doom/README.txt
vendored
23
demos/3rdparty/doom/README.txt
vendored
|
@ -1,23 +0,0 @@
|
|||
This port of DOOM is based on the original license - the free for educational use only version.
|
||||
|
||||
See DOOMLIC.TXT for the real license.
|
||||
|
||||
This port display a fix sized window of 320 x 200 on your display (it tries to put the display in landscape mode first).
|
||||
|
||||
There is no sound currently until the GAUDOUT module is written.
|
||||
There is no network support currently.
|
||||
|
||||
User input is not the best for actually playing yet. Requires Touch or Mouse.
|
||||
|
||||
The supplied DOOM1.WAD is the shareware version.
|
||||
Currently this has been converted into doom1_wad.h for inclusion into the source code (rather than using file IO).
|
||||
Note that this file is 4M in size so it will take 4Mbytes of Flash to store just the WAD file.
|
||||
|
||||
THe RAM requirements are also fairly high with 313K just for the screen image buffers.
|
||||
|
||||
This port uses the uGFX streaming interface for high speed access to the video driver.
|
||||
|
||||
There are probably a number of C runtime dependancies that shouldn't be there that will get removed
|
||||
as the port is improved.
|
||||
|
||||
Currently tested running under the Win32 uGFX port.
|
1349
demos/3rdparty/doom/am_map.c
vendored
1349
demos/3rdparty/doom/am_map.c
vendored
File diff suppressed because it is too large
Load diff
52
demos/3rdparty/doom/am_map.h
vendored
52
demos/3rdparty/doom/am_map.h
vendored
|
@ -1,52 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// AutoMap module.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef __AMMAP_H__
|
||||
#define __AMMAP_H__
|
||||
|
||||
// Used by ST StatusBar stuff.
|
||||
#define AM_MSGHEADER (('a'<<24)+('m'<<16))
|
||||
#define AM_MSGENTERED (AM_MSGHEADER | ('e'<<8))
|
||||
#define AM_MSGEXITED (AM_MSGHEADER | ('x'<<8))
|
||||
|
||||
|
||||
// Called by main loop.
|
||||
boolean AM_Responder (event_t* ev);
|
||||
|
||||
// Called by main loop.
|
||||
void AM_Ticker (void);
|
||||
|
||||
// Called by main loop,
|
||||
// called instead of view drawer if automap active.
|
||||
void AM_Drawer (void);
|
||||
|
||||
// Called to force the automap to quit
|
||||
// if the level is completed while it is up.
|
||||
void AM_Stop (void);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
701
demos/3rdparty/doom/d_englsh.h
vendored
701
demos/3rdparty/doom/d_englsh.h
vendored
|
@ -1,701 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Printed strings for translation.
|
||||
// English language support (default).
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef __D_ENGLSH__
|
||||
#define __D_ENGLSH__
|
||||
|
||||
//
|
||||
// Printed strings for translation
|
||||
//
|
||||
|
||||
//
|
||||
// D_Main.C
|
||||
//
|
||||
#define D_DEVSTR "Development mode ON.\n"
|
||||
#define D_CDROM "CD-ROM Version: default.cfg from c:\\doomdata\n"
|
||||
|
||||
//
|
||||
// M_Menu.C
|
||||
//
|
||||
#define PRESSKEY "press a key."
|
||||
#define PRESSYN "press y or n."
|
||||
#define QUITMSG "are you sure you want to\nquit this great game?"
|
||||
#define LOADNET "you can't do load while in a net game!\n\n"PRESSKEY
|
||||
#define QLOADNET "you can't quickload during a netgame!\n\n"PRESSKEY
|
||||
#define QSAVESPOT "you haven't picked a quicksave slot yet!\n\n"PRESSKEY
|
||||
#define SAVEDEAD "you can't save if you aren't playing!\n\n"PRESSKEY
|
||||
#define QSPROMPT "quicksave over your game named\n\n'%s'?\n\n"PRESSYN
|
||||
#define QLPROMPT "do you want to quickload the game named\n\n'%s'?\n\n"PRESSYN
|
||||
|
||||
#define NEWGAME \
|
||||
"you can't start a new game\n"\
|
||||
"while in a network game.\n\n"PRESSKEY
|
||||
|
||||
#define NIGHTMARE \
|
||||
"are you sure? this skill level\n"\
|
||||
"isn't even remotely fair.\n\n"PRESSYN
|
||||
|
||||
#define SWSTRING \
|
||||
"this is the shareware version of doom.\n\n"\
|
||||
"you need to order the entire trilogy.\n\n"PRESSKEY
|
||||
|
||||
#define MSGOFF "Messages OFF"
|
||||
#define MSGON "Messages ON"
|
||||
#define NETEND "you can't end a netgame!\n\n"PRESSKEY
|
||||
#define ENDGAME "are you sure you want to end the game?\n\n"PRESSYN
|
||||
|
||||
#define DOSY "(press y to quit)"
|
||||
|
||||
#define DETAILHI "High detail"
|
||||
#define DETAILLO "Low detail"
|
||||
#define GAMMALVL0 "Gamma correction OFF"
|
||||
#define GAMMALVL1 "Gamma correction level 1"
|
||||
#define GAMMALVL2 "Gamma correction level 2"
|
||||
#define GAMMALVL3 "Gamma correction level 3"
|
||||
#define GAMMALVL4 "Gamma correction level 4"
|
||||
#define EMPTYSTRING "empty slot"
|
||||
|
||||
//
|
||||
// P_inter.C
|
||||
//
|
||||
#define GOTARMOR "Picked up the armor."
|
||||
#define GOTMEGA "Picked up the MegaArmor!"
|
||||
#define GOTHTHBONUS "Picked up a health bonus."
|
||||
#define GOTARMBONUS "Picked up an armor bonus."
|
||||
#define GOTSTIM "Picked up a stimpack."
|
||||
#define GOTMEDINEED "Picked up a medikit that you REALLY need!"
|
||||
#define GOTMEDIKIT "Picked up a medikit."
|
||||
#define GOTSUPER "Supercharge!"
|
||||
|
||||
#define GOTBLUECARD "Picked up a blue keycard."
|
||||
#define GOTYELWCARD "Picked up a yellow keycard."
|
||||
#define GOTREDCARD "Picked up a red keycard."
|
||||
#define GOTBLUESKUL "Picked up a blue skull key."
|
||||
#define GOTYELWSKUL "Picked up a yellow skull key."
|
||||
#define GOTREDSKULL "Picked up a red skull key."
|
||||
|
||||
#define GOTINVUL "Invulnerability!"
|
||||
#define GOTBERSERK "Berserk!"
|
||||
#define GOTINVIS "Partial Invisibility"
|
||||
#define GOTSUIT "Radiation Shielding Suit"
|
||||
#define GOTMAP "Computer Area Map"
|
||||
#define GOTVISOR "Light Amplification Visor"
|
||||
#define GOTMSPHERE "MegaSphere!"
|
||||
|
||||
#define GOTCLIP "Picked up a clip."
|
||||
#define GOTCLIPBOX "Picked up a box of bullets."
|
||||
#define GOTROCKET "Picked up a rocket."
|
||||
#define GOTROCKBOX "Picked up a box of rockets."
|
||||
#define GOTCELL "Picked up an energy cell."
|
||||
#define GOTCELLBOX "Picked up an energy cell pack."
|
||||
#define GOTSHELLS "Picked up 4 shotgun shells."
|
||||
#define GOTSHELLBOX "Picked up a box of shotgun shells."
|
||||
#define GOTBACKPACK "Picked up a backpack full of ammo!"
|
||||
|
||||
#define GOTBFG9000 "You got the BFG9000! Oh, yes."
|
||||
#define GOTCHAINGUN "You got the chaingun!"
|
||||
#define GOTCHAINSAW "A chainsaw! Find some meat!"
|
||||
#define GOTLAUNCHER "You got the rocket launcher!"
|
||||
#define GOTPLASMA "You got the plasma gun!"
|
||||
#define GOTSHOTGUN "You got the shotgun!"
|
||||
#define GOTSHOTGUN2 "You got the super shotgun!"
|
||||
|
||||
//
|
||||
// P_Doors.C
|
||||
//
|
||||
#define PD_BLUEO "You need a blue key to activate this object"
|
||||
#define PD_REDO "You need a red key to activate this object"
|
||||
#define PD_YELLOWO "You need a yellow key to activate this object"
|
||||
#define PD_BLUEK "You need a blue key to open this door"
|
||||
#define PD_REDK "You need a red key to open this door"
|
||||
#define PD_YELLOWK "You need a yellow key to open this door"
|
||||
|
||||
//
|
||||
// G_game.C
|
||||
//
|
||||
#define GGSAVED "game saved."
|
||||
|
||||
//
|
||||
// HU_stuff.C
|
||||
//
|
||||
#define HUSTR_MSGU "[Message unsent]"
|
||||
|
||||
#define HUSTR_E1M1 "E1M1: Hangar"
|
||||
#define HUSTR_E1M2 "E1M2: Nuclear Plant"
|
||||
#define HUSTR_E1M3 "E1M3: Toxin Refinery"
|
||||
#define HUSTR_E1M4 "E1M4: Command Control"
|
||||
#define HUSTR_E1M5 "E1M5: Phobos Lab"
|
||||
#define HUSTR_E1M6 "E1M6: Central Processing"
|
||||
#define HUSTR_E1M7 "E1M7: Computer Station"
|
||||
#define HUSTR_E1M8 "E1M8: Phobos Anomaly"
|
||||
#define HUSTR_E1M9 "E1M9: Military Base"
|
||||
|
||||
#define HUSTR_E2M1 "E2M1: Deimos Anomaly"
|
||||
#define HUSTR_E2M2 "E2M2: Containment Area"
|
||||
#define HUSTR_E2M3 "E2M3: Refinery"
|
||||
#define HUSTR_E2M4 "E2M4: Deimos Lab"
|
||||
#define HUSTR_E2M5 "E2M5: Command Center"
|
||||
#define HUSTR_E2M6 "E2M6: Halls of the Damned"
|
||||
#define HUSTR_E2M7 "E2M7: Spawning Vats"
|
||||
#define HUSTR_E2M8 "E2M8: Tower of Babel"
|
||||
#define HUSTR_E2M9 "E2M9: Fortress of Mystery"
|
||||
|
||||
#define HUSTR_E3M1 "E3M1: Hell Keep"
|
||||
#define HUSTR_E3M2 "E3M2: Slough of Despair"
|
||||
#define HUSTR_E3M3 "E3M3: Pandemonium"
|
||||
#define HUSTR_E3M4 "E3M4: House of Pain"
|
||||
#define HUSTR_E3M5 "E3M5: Unholy Cathedral"
|
||||
#define HUSTR_E3M6 "E3M6: Mt. Erebus"
|
||||
#define HUSTR_E3M7 "E3M7: Limbo"
|
||||
#define HUSTR_E3M8 "E3M8: Dis"
|
||||
#define HUSTR_E3M9 "E3M9: Warrens"
|
||||
|
||||
#define HUSTR_E4M1 "E4M1: Hell Beneath"
|
||||
#define HUSTR_E4M2 "E4M2: Perfect Hatred"
|
||||
#define HUSTR_E4M3 "E4M3: Sever The Wicked"
|
||||
#define HUSTR_E4M4 "E4M4: Unruly Evil"
|
||||
#define HUSTR_E4M5 "E4M5: They Will Repent"
|
||||
#define HUSTR_E4M6 "E4M6: Against Thee Wickedly"
|
||||
#define HUSTR_E4M7 "E4M7: And Hell Followed"
|
||||
#define HUSTR_E4M8 "E4M8: Unto The Cruel"
|
||||
#define HUSTR_E4M9 "E4M9: Fear"
|
||||
|
||||
#define HUSTR_1 "level 1: entryway"
|
||||
#define HUSTR_2 "level 2: underhalls"
|
||||
#define HUSTR_3 "level 3: the gantlet"
|
||||
#define HUSTR_4 "level 4: the focus"
|
||||
#define HUSTR_5 "level 5: the waste tunnels"
|
||||
#define HUSTR_6 "level 6: the crusher"
|
||||
#define HUSTR_7 "level 7: dead simple"
|
||||
#define HUSTR_8 "level 8: tricks and traps"
|
||||
#define HUSTR_9 "level 9: the pit"
|
||||
#define HUSTR_10 "level 10: refueling base"
|
||||
#define HUSTR_11 "level 11: 'o' of destruction!"
|
||||
|
||||
#define HUSTR_12 "level 12: the factory"
|
||||
#define HUSTR_13 "level 13: downtown"
|
||||
#define HUSTR_14 "level 14: the inmost dens"
|
||||
#define HUSTR_15 "level 15: industrial zone"
|
||||
#define HUSTR_16 "level 16: suburbs"
|
||||
#define HUSTR_17 "level 17: tenements"
|
||||
#define HUSTR_18 "level 18: the courtyard"
|
||||
#define HUSTR_19 "level 19: the citadel"
|
||||
#define HUSTR_20 "level 20: gotcha!"
|
||||
|
||||
#define HUSTR_21 "level 21: nirvana"
|
||||
#define HUSTR_22 "level 22: the catacombs"
|
||||
#define HUSTR_23 "level 23: barrels o' fun"
|
||||
#define HUSTR_24 "level 24: the chasm"
|
||||
#define HUSTR_25 "level 25: bloodfalls"
|
||||
#define HUSTR_26 "level 26: the abandoned mines"
|
||||
#define HUSTR_27 "level 27: monster condo"
|
||||
#define HUSTR_28 "level 28: the spirit world"
|
||||
#define HUSTR_29 "level 29: the living end"
|
||||
#define HUSTR_30 "level 30: icon of sin"
|
||||
|
||||
#define HUSTR_31 "level 31: wolfenstein"
|
||||
#define HUSTR_32 "level 32: grosse"
|
||||
|
||||
#define PHUSTR_1 "level 1: congo"
|
||||
#define PHUSTR_2 "level 2: well of souls"
|
||||
#define PHUSTR_3 "level 3: aztec"
|
||||
#define PHUSTR_4 "level 4: caged"
|
||||
#define PHUSTR_5 "level 5: ghost town"
|
||||
#define PHUSTR_6 "level 6: baron's lair"
|
||||
#define PHUSTR_7 "level 7: caughtyard"
|
||||
#define PHUSTR_8 "level 8: realm"
|
||||
#define PHUSTR_9 "level 9: abattoire"
|
||||
#define PHUSTR_10 "level 10: onslaught"
|
||||
#define PHUSTR_11 "level 11: hunted"
|
||||
|
||||
#define PHUSTR_12 "level 12: speed"
|
||||
#define PHUSTR_13 "level 13: the crypt"
|
||||
#define PHUSTR_14 "level 14: genesis"
|
||||
#define PHUSTR_15 "level 15: the twilight"
|
||||
#define PHUSTR_16 "level 16: the omen"
|
||||
#define PHUSTR_17 "level 17: compound"
|
||||
#define PHUSTR_18 "level 18: neurosphere"
|
||||
#define PHUSTR_19 "level 19: nme"
|
||||
#define PHUSTR_20 "level 20: the death domain"
|
||||
|
||||
#define PHUSTR_21 "level 21: slayer"
|
||||
#define PHUSTR_22 "level 22: impossible mission"
|
||||
#define PHUSTR_23 "level 23: tombstone"
|
||||
#define PHUSTR_24 "level 24: the final frontier"
|
||||
#define PHUSTR_25 "level 25: the temple of darkness"
|
||||
#define PHUSTR_26 "level 26: bunker"
|
||||
#define PHUSTR_27 "level 27: anti-christ"
|
||||
#define PHUSTR_28 "level 28: the sewers"
|
||||
#define PHUSTR_29 "level 29: odyssey of noises"
|
||||
#define PHUSTR_30 "level 30: the gateway of hell"
|
||||
|
||||
#define PHUSTR_31 "level 31: cyberden"
|
||||
#define PHUSTR_32 "level 32: go 2 it"
|
||||
|
||||
#define THUSTR_1 "level 1: system control"
|
||||
#define THUSTR_2 "level 2: human bbq"
|
||||
#define THUSTR_3 "level 3: power control"
|
||||
#define THUSTR_4 "level 4: wormhole"
|
||||
#define THUSTR_5 "level 5: hanger"
|
||||
#define THUSTR_6 "level 6: open season"
|
||||
#define THUSTR_7 "level 7: prison"
|
||||
#define THUSTR_8 "level 8: metal"
|
||||
#define THUSTR_9 "level 9: stronghold"
|
||||
#define THUSTR_10 "level 10: redemption"
|
||||
#define THUSTR_11 "level 11: storage facility"
|
||||
|
||||
#define THUSTR_12 "level 12: crater"
|
||||
#define THUSTR_13 "level 13: nukage processing"
|
||||
#define THUSTR_14 "level 14: steel works"
|
||||
#define THUSTR_15 "level 15: dead zone"
|
||||
#define THUSTR_16 "level 16: deepest reaches"
|
||||
#define THUSTR_17 "level 17: processing area"
|
||||
#define THUSTR_18 "level 18: mill"
|
||||
#define THUSTR_19 "level 19: shipping/respawning"
|
||||
#define THUSTR_20 "level 20: central processing"
|
||||
|
||||
#define THUSTR_21 "level 21: administration center"
|
||||
#define THUSTR_22 "level 22: habitat"
|
||||
#define THUSTR_23 "level 23: lunar mining project"
|
||||
#define THUSTR_24 "level 24: quarry"
|
||||
#define THUSTR_25 "level 25: baron's den"
|
||||
#define THUSTR_26 "level 26: ballistyx"
|
||||
#define THUSTR_27 "level 27: mount pain"
|
||||
#define THUSTR_28 "level 28: heck"
|
||||
#define THUSTR_29 "level 29: river styx"
|
||||
#define THUSTR_30 "level 30: last call"
|
||||
|
||||
#define THUSTR_31 "level 31: pharaoh"
|
||||
#define THUSTR_32 "level 32: caribbean"
|
||||
|
||||
#define HUSTR_CHATMACRO1 "I'm ready to kick butt!"
|
||||
#define HUSTR_CHATMACRO2 "I'm OK."
|
||||
#define HUSTR_CHATMACRO3 "I'm not looking too good!"
|
||||
#define HUSTR_CHATMACRO4 "Help!"
|
||||
#define HUSTR_CHATMACRO5 "You suck!"
|
||||
#define HUSTR_CHATMACRO6 "Next time, scumbag..."
|
||||
#define HUSTR_CHATMACRO7 "Come here!"
|
||||
#define HUSTR_CHATMACRO8 "I'll take care of it."
|
||||
#define HUSTR_CHATMACRO9 "Yes"
|
||||
#define HUSTR_CHATMACRO0 "No"
|
||||
|
||||
#define HUSTR_TALKTOSELF1 "You mumble to yourself"
|
||||
#define HUSTR_TALKTOSELF2 "Who's there?"
|
||||
#define HUSTR_TALKTOSELF3 "You scare yourself"
|
||||
#define HUSTR_TALKTOSELF4 "You start to rave"
|
||||
#define HUSTR_TALKTOSELF5 "You've lost it..."
|
||||
|
||||
#define HUSTR_MESSAGESENT "[Message Sent]"
|
||||
|
||||
// The following should NOT be changed unless it seems
|
||||
// just AWFULLY necessary
|
||||
|
||||
#define HUSTR_PLRGREEN "Green: "
|
||||
#define HUSTR_PLRINDIGO "Indigo: "
|
||||
#define HUSTR_PLRBROWN "Brown: "
|
||||
#define HUSTR_PLRRED "Red: "
|
||||
|
||||
#define HUSTR_KEYGREEN 'g'
|
||||
#define HUSTR_KEYINDIGO 'i'
|
||||
#define HUSTR_KEYBROWN 'b'
|
||||
#define HUSTR_KEYRED 'r'
|
||||
|
||||
//
|
||||
// AM_map.C
|
||||
//
|
||||
|
||||
#define AMSTR_FOLLOWON "Follow Mode ON"
|
||||
#define AMSTR_FOLLOWOFF "Follow Mode OFF"
|
||||
|
||||
#define AMSTR_GRIDON "Grid ON"
|
||||
#define AMSTR_GRIDOFF "Grid OFF"
|
||||
|
||||
#define AMSTR_MARKEDSPOT "Marked Spot"
|
||||
#define AMSTR_MARKSCLEARED "All Marks Cleared"
|
||||
|
||||
//
|
||||
// ST_stuff.C
|
||||
//
|
||||
|
||||
#define STSTR_MUS "Music Change"
|
||||
#define STSTR_NOMUS "IMPOSSIBLE SELECTION"
|
||||
#define STSTR_DQDON "Degreelessness Mode On"
|
||||
#define STSTR_DQDOFF "Degreelessness Mode Off"
|
||||
|
||||
#define STSTR_KFAADDED "Very Happy Ammo Added"
|
||||
#define STSTR_FAADDED "Ammo (no keys) Added"
|
||||
|
||||
#define STSTR_NCON "No Clipping Mode ON"
|
||||
#define STSTR_NCOFF "No Clipping Mode OFF"
|
||||
|
||||
#define STSTR_BEHOLD "inVuln, Str, Inviso, Rad, Allmap, or Lite-amp"
|
||||
#define STSTR_BEHOLDX "Power-up Toggled"
|
||||
|
||||
#define STSTR_CHOPPERS "... doesn't suck - GM"
|
||||
#define STSTR_CLEV "Changing Level..."
|
||||
|
||||
//
|
||||
// F_Finale.C
|
||||
//
|
||||
#define E1TEXT \
|
||||
"Once you beat the big badasses and\n"\
|
||||
"clean out the moon base you're supposed\n"\
|
||||
"to win, aren't you? Aren't you? Where's\n"\
|
||||
"your fat reward and ticket home? What\n"\
|
||||
"the hell is this? It's not supposed to\n"\
|
||||
"end this way!\n"\
|
||||
"\n" \
|
||||
"It stinks like rotten meat, but looks\n"\
|
||||
"like the lost Deimos base. Looks like\n"\
|
||||
"you're stuck on The Shores of Hell.\n"\
|
||||
"The only way out is through.\n"\
|
||||
"\n"\
|
||||
"To continue the DOOM experience, play\n"\
|
||||
"The Shores of Hell and its amazing\n"\
|
||||
"sequel, Inferno!\n"
|
||||
|
||||
|
||||
#define E2TEXT \
|
||||
"You've done it! The hideous cyber-\n"\
|
||||
"demon lord that ruled the lost Deimos\n"\
|
||||
"moon base has been slain and you\n"\
|
||||
"are triumphant! But ... where are\n"\
|
||||
"you? You clamber to the edge of the\n"\
|
||||
"moon and look down to see the awful\n"\
|
||||
"truth.\n" \
|
||||
"\n"\
|
||||
"Deimos floats above Hell itself!\n"\
|
||||
"You've never heard of anyone escaping\n"\
|
||||
"from Hell, but you'll make the bastards\n"\
|
||||
"sorry they ever heard of you! Quickly,\n"\
|
||||
"you rappel down to the surface of\n"\
|
||||
"Hell.\n"\
|
||||
"\n" \
|
||||
"Now, it's on to the final chapter of\n"\
|
||||
"DOOM! -- Inferno."
|
||||
|
||||
|
||||
#define E3TEXT \
|
||||
"The loathsome spiderdemon that\n"\
|
||||
"masterminded the invasion of the moon\n"\
|
||||
"bases and caused so much death has had\n"\
|
||||
"its ass kicked for all time.\n"\
|
||||
"\n"\
|
||||
"A hidden doorway opens and you enter.\n"\
|
||||
"You've proven too tough for Hell to\n"\
|
||||
"contain, and now Hell at last plays\n"\
|
||||
"fair -- for you emerge from the door\n"\
|
||||
"to see the green fields of Earth!\n"\
|
||||
"Home at last.\n" \
|
||||
"\n"\
|
||||
"You wonder what's been happening on\n"\
|
||||
"Earth while you were battling evil\n"\
|
||||
"unleashed. It's good that no Hell-\n"\
|
||||
"spawn could have come through that\n"\
|
||||
"door with you ..."
|
||||
|
||||
|
||||
#define E4TEXT \
|
||||
"the spider mastermind must have sent forth\n"\
|
||||
"its legions of hellspawn before your\n"\
|
||||
"final confrontation with that terrible\n"\
|
||||
"beast from hell. but you stepped forward\n"\
|
||||
"and brought forth eternal damnation and\n"\
|
||||
"suffering upon the horde as a true hero\n"\
|
||||
"would in the face of something so evil.\n"\
|
||||
"\n"\
|
||||
"besides, someone was gonna pay for what\n"\
|
||||
"happened to daisy, your pet rabbit.\n"\
|
||||
"\n"\
|
||||
"but now, you see spread before you more\n"\
|
||||
"potential pain and gibbitude as a nation\n"\
|
||||
"of demons run amok among our cities.\n"\
|
||||
"\n"\
|
||||
"next stop, hell on earth!"
|
||||
|
||||
|
||||
// after level 6, put this:
|
||||
|
||||
#define C1TEXT \
|
||||
"YOU HAVE ENTERED DEEPLY INTO THE INFESTED\n" \
|
||||
"STARPORT. BUT SOMETHING IS WRONG. THE\n" \
|
||||
"MONSTERS HAVE BROUGHT THEIR OWN REALITY\n" \
|
||||
"WITH THEM, AND THE STARPORT'S TECHNOLOGY\n" \
|
||||
"IS BEING SUBVERTED BY THEIR PRESENCE.\n" \
|
||||
"\n"\
|
||||
"AHEAD, YOU SEE AN OUTPOST OF HELL, A\n" \
|
||||
"FORTIFIED ZONE. IF YOU CAN GET PAST IT,\n" \
|
||||
"YOU CAN PENETRATE INTO THE HAUNTED HEART\n" \
|
||||
"OF THE STARBASE AND FIND THE CONTROLLING\n" \
|
||||
"SWITCH WHICH HOLDS EARTH'S POPULATION\n" \
|
||||
"HOSTAGE."
|
||||
|
||||
// After level 11, put this:
|
||||
|
||||
#define C2TEXT \
|
||||
"YOU HAVE WON! YOUR VICTORY HAS ENABLED\n" \
|
||||
"HUMANKIND TO EVACUATE EARTH AND ESCAPE\n"\
|
||||
"THE NIGHTMARE. NOW YOU ARE THE ONLY\n"\
|
||||
"HUMAN LEFT ON THE FACE OF THE PLANET.\n"\
|
||||
"CANNIBAL MUTATIONS, CARNIVOROUS ALIENS,\n"\
|
||||
"AND EVIL SPIRITS ARE YOUR ONLY NEIGHBORS.\n"\
|
||||
"YOU SIT BACK AND WAIT FOR DEATH, CONTENT\n"\
|
||||
"THAT YOU HAVE SAVED YOUR SPECIES.\n"\
|
||||
"\n"\
|
||||
"BUT THEN, EARTH CONTROL BEAMS DOWN A\n"\
|
||||
"MESSAGE FROM SPACE: \"SENSORS HAVE LOCATED\n"\
|
||||
"THE SOURCE OF THE ALIEN INVASION. IF YOU\n"\
|
||||
"GO THERE, YOU MAY BE ABLE TO BLOCK THEIR\n"\
|
||||
"ENTRY. THE ALIEN BASE IS IN THE HEART OF\n"\
|
||||
"YOUR OWN HOME CITY, NOT FAR FROM THE\n"\
|
||||
"STARPORT.\" SLOWLY AND PAINFULLY YOU GET\n"\
|
||||
"UP AND RETURN TO THE FRAY."
|
||||
|
||||
|
||||
// After level 20, put this:
|
||||
|
||||
#define C3TEXT \
|
||||
"YOU ARE AT THE CORRUPT HEART OF THE CITY,\n"\
|
||||
"SURROUNDED BY THE CORPSES OF YOUR ENEMIES.\n"\
|
||||
"YOU SEE NO WAY TO DESTROY THE CREATURES'\n"\
|
||||
"ENTRYWAY ON THIS SIDE, SO YOU CLENCH YOUR\n"\
|
||||
"TEETH AND PLUNGE THROUGH IT.\n"\
|
||||
"\n"\
|
||||
"THERE MUST BE A WAY TO CLOSE IT ON THE\n"\
|
||||
"OTHER SIDE. WHAT DO YOU CARE IF YOU'VE\n"\
|
||||
"GOT TO GO THROUGH HELL TO GET TO IT?"
|
||||
|
||||
|
||||
// After level 29, put this:
|
||||
|
||||
#define C4TEXT \
|
||||
"THE HORRENDOUS VISAGE OF THE BIGGEST\n"\
|
||||
"DEMON YOU'VE EVER SEEN CRUMBLES BEFORE\n"\
|
||||
"YOU, AFTER YOU PUMP YOUR ROCKETS INTO\n"\
|
||||
"HIS EXPOSED BRAIN. THE MONSTER SHRIVELS\n"\
|
||||
"UP AND DIES, ITS THRASHING LIMBS\n"\
|
||||
"DEVASTATING UNTOLD MILES OF HELL'S\n"\
|
||||
"SURFACE.\n"\
|
||||
"\n"\
|
||||
"YOU'VE DONE IT. THE INVASION IS OVER.\n"\
|
||||
"EARTH IS SAVED. HELL IS A WRECK. YOU\n"\
|
||||
"WONDER WHERE BAD FOLKS WILL GO WHEN THEY\n"\
|
||||
"DIE, NOW. WIPING THE SWEAT FROM YOUR\n"\
|
||||
"FOREHEAD YOU BEGIN THE LONG TREK BACK\n"\
|
||||
"HOME. REBUILDING EARTH OUGHT TO BE A\n"\
|
||||
"LOT MORE FUN THAN RUINING IT WAS.\n"
|
||||
|
||||
|
||||
|
||||
// Before level 31, put this:
|
||||
|
||||
#define C5TEXT \
|
||||
"CONGRATULATIONS, YOU'VE FOUND THE SECRET\n"\
|
||||
"LEVEL! LOOKS LIKE IT'S BEEN BUILT BY\n"\
|
||||
"HUMANS, RATHER THAN DEMONS. YOU WONDER\n"\
|
||||
"WHO THE INMATES OF THIS CORNER OF HELL\n"\
|
||||
"WILL BE."
|
||||
|
||||
|
||||
// Before level 32, put this:
|
||||
|
||||
#define C6TEXT \
|
||||
"CONGRATULATIONS, YOU'VE FOUND THE\n"\
|
||||
"SUPER SECRET LEVEL! YOU'D BETTER\n"\
|
||||
"BLAZE THROUGH THIS ONE!\n"
|
||||
|
||||
|
||||
// after map 06
|
||||
|
||||
#define P1TEXT \
|
||||
"You gloat over the steaming carcass of the\n"\
|
||||
"Guardian. With its death, you've wrested\n"\
|
||||
"the Accelerator from the stinking claws\n"\
|
||||
"of Hell. You relax and glance around the\n"\
|
||||
"room. Damn! There was supposed to be at\n"\
|
||||
"least one working prototype, but you can't\n"\
|
||||
"see it. The demons must have taken it.\n"\
|
||||
"\n"\
|
||||
"You must find the prototype, or all your\n"\
|
||||
"struggles will have been wasted. Keep\n"\
|
||||
"moving, keep fighting, keep killing.\n"\
|
||||
"Oh yes, keep living, too."
|
||||
|
||||
|
||||
// after map 11
|
||||
|
||||
#define P2TEXT \
|
||||
"Even the deadly Arch-Vile labyrinth could\n"\
|
||||
"not stop you, and you've gotten to the\n"\
|
||||
"prototype Accelerator which is soon\n"\
|
||||
"efficiently and permanently deactivated.\n"\
|
||||
"\n"\
|
||||
"You're good at that kind of thing."
|
||||
|
||||
|
||||
// after map 20
|
||||
|
||||
#define P3TEXT \
|
||||
"You've bashed and battered your way into\n"\
|
||||
"the heart of the devil-hive. Time for a\n"\
|
||||
"Search-and-Destroy mission, aimed at the\n"\
|
||||
"Gatekeeper, whose foul offspring is\n"\
|
||||
"cascading to Earth. Yeah, he's bad. But\n"\
|
||||
"you know who's worse!\n"\
|
||||
"\n"\
|
||||
"Grinning evilly, you check your gear, and\n"\
|
||||
"get ready to give the bastard a little Hell\n"\
|
||||
"of your own making!"
|
||||
|
||||
// after map 30
|
||||
|
||||
#define P4TEXT \
|
||||
"The Gatekeeper's evil face is splattered\n"\
|
||||
"all over the place. As its tattered corpse\n"\
|
||||
"collapses, an inverted Gate forms and\n"\
|
||||
"sucks down the shards of the last\n"\
|
||||
"prototype Accelerator, not to mention the\n"\
|
||||
"few remaining demons. You're done. Hell\n"\
|
||||
"has gone back to pounding bad dead folks \n"\
|
||||
"instead of good live ones. Remember to\n"\
|
||||
"tell your grandkids to put a rocket\n"\
|
||||
"launcher in your coffin. If you go to Hell\n"\
|
||||
"when you die, you'll need it for some\n"\
|
||||
"final cleaning-up ..."
|
||||
|
||||
// before map 31
|
||||
|
||||
#define P5TEXT \
|
||||
"You've found the second-hardest level we\n"\
|
||||
"got. Hope you have a saved game a level or\n"\
|
||||
"two previous. If not, be prepared to die\n"\
|
||||
"aplenty. For master marines only."
|
||||
|
||||
// before map 32
|
||||
|
||||
#define P6TEXT \
|
||||
"Betcha wondered just what WAS the hardest\n"\
|
||||
"level we had ready for ya? Now you know.\n"\
|
||||
"No one gets out alive."
|
||||
|
||||
|
||||
#define T1TEXT \
|
||||
"You've fought your way out of the infested\n"\
|
||||
"experimental labs. It seems that UAC has\n"\
|
||||
"once again gulped it down. With their\n"\
|
||||
"high turnover, it must be hard for poor\n"\
|
||||
"old UAC to buy corporate health insurance\n"\
|
||||
"nowadays..\n"\
|
||||
"\n"\
|
||||
"Ahead lies the military complex, now\n"\
|
||||
"swarming with diseased horrors hot to get\n"\
|
||||
"their teeth into you. With luck, the\n"\
|
||||
"complex still has some warlike ordnance\n"\
|
||||
"laying around."
|
||||
|
||||
|
||||
#define T2TEXT \
|
||||
"You hear the grinding of heavy machinery\n"\
|
||||
"ahead. You sure hope they're not stamping\n"\
|
||||
"out new hellspawn, but you're ready to\n"\
|
||||
"ream out a whole herd if you have to.\n"\
|
||||
"They might be planning a blood feast, but\n"\
|
||||
"you feel about as mean as two thousand\n"\
|
||||
"maniacs packed into one mad killer.\n"\
|
||||
"\n"\
|
||||
"You don't plan to go down easy."
|
||||
|
||||
|
||||
#define T3TEXT \
|
||||
"The vista opening ahead looks real damn\n"\
|
||||
"familiar. Smells familiar, too -- like\n"\
|
||||
"fried excrement. You didn't like this\n"\
|
||||
"place before, and you sure as hell ain't\n"\
|
||||
"planning to like it now. The more you\n"\
|
||||
"brood on it, the madder you get.\n"\
|
||||
"Hefting your gun, an evil grin trickles\n"\
|
||||
"onto your face. Time to take some names."
|
||||
|
||||
#define T4TEXT \
|
||||
"Suddenly, all is silent, from one horizon\n"\
|
||||
"to the other. The agonizing echo of Hell\n"\
|
||||
"fades away, the nightmare sky turns to\n"\
|
||||
"blue, the heaps of monster corpses start \n"\
|
||||
"to evaporate along with the evil stench \n"\
|
||||
"that filled the air. Jeeze, maybe you've\n"\
|
||||
"done it. Have you really won?\n"\
|
||||
"\n"\
|
||||
"Something rumbles in the distance.\n"\
|
||||
"A blue light begins to glow inside the\n"\
|
||||
"ruined skull of the demon-spitter."
|
||||
|
||||
|
||||
#define T5TEXT \
|
||||
"What now? Looks totally different. Kind\n"\
|
||||
"of like King Tut's condo. Well,\n"\
|
||||
"whatever's here can't be any worse\n"\
|
||||
"than usual. Can it? Or maybe it's best\n"\
|
||||
"to let sleeping gods lie.."
|
||||
|
||||
|
||||
#define T6TEXT \
|
||||
"Time for a vacation. You've burst the\n"\
|
||||
"bowels of hell and by golly you're ready\n"\
|
||||
"for a break. You mutter to yourself,\n"\
|
||||
"Maybe someone else can kick Hell's ass\n"\
|
||||
"next time around. Ahead lies a quiet town,\n"\
|
||||
"with peaceful flowing water, quaint\n"\
|
||||
"buildings, and presumably no Hellspawn.\n"\
|
||||
"\n"\
|
||||
"As you step off the transport, you hear\n"\
|
||||
"the stomp of a cyberdemon's iron shoe."
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Character cast strings F_FINALE.C
|
||||
//
|
||||
#define CC_ZOMBIE "ZOMBIEMAN"
|
||||
#define CC_SHOTGUN "SHOTGUN GUY"
|
||||
#define CC_HEAVY "HEAVY WEAPON DUDE"
|
||||
#define CC_IMP "IMP"
|
||||
#define CC_DEMON "DEMON"
|
||||
#define CC_LOST "LOST SOUL"
|
||||
#define CC_CACO "CACODEMON"
|
||||
#define CC_HELL "HELL KNIGHT"
|
||||
#define CC_BARON "BARON OF HELL"
|
||||
#define CC_ARACH "ARACHNOTRON"
|
||||
#define CC_PAIN "PAIN ELEMENTAL"
|
||||
#define CC_REVEN "REVENANT"
|
||||
#define CC_MANCU "MANCUBUS"
|
||||
#define CC_ARCH "ARCH-VILE"
|
||||
#define CC_SPIDER "THE SPIDER MASTERMIND"
|
||||
#define CC_CYBER "THE CYBERDEMON"
|
||||
#define CC_HERO "OUR HERO"
|
||||
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
122
demos/3rdparty/doom/d_event.h
vendored
122
demos/3rdparty/doom/d_event.h
vendored
|
@ -1,122 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
//
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __D_EVENT__
|
||||
#define __D_EVENT__
|
||||
|
||||
|
||||
#include "doomtype.h"
|
||||
|
||||
|
||||
//
|
||||
// Event handling.
|
||||
//
|
||||
|
||||
// Input event types.
|
||||
typedef enum
|
||||
{
|
||||
ev_keydown,
|
||||
ev_keyup,
|
||||
ev_mouse,
|
||||
ev_joystick
|
||||
} evtype_t;
|
||||
|
||||
// Event structure.
|
||||
typedef struct
|
||||
{
|
||||
evtype_t type;
|
||||
int data1; // keys / mouse/joystick buttons
|
||||
int data2; // mouse/joystick x move
|
||||
int data3; // mouse/joystick y move
|
||||
} event_t;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ga_nothing,
|
||||
ga_loadlevel,
|
||||
ga_newgame,
|
||||
ga_loadgame,
|
||||
ga_savegame,
|
||||
ga_playdemo,
|
||||
ga_completed,
|
||||
ga_victory,
|
||||
ga_worlddone,
|
||||
ga_screenshot
|
||||
} gameaction_t;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Button/action code definitions.
|
||||
//
|
||||
typedef enum
|
||||
{
|
||||
// Press "Fire".
|
||||
BT_ATTACK = 1,
|
||||
// Use button, to open doors, activate switches.
|
||||
BT_USE = 2,
|
||||
|
||||
// Flag: game events, not really buttons.
|
||||
BT_SPECIAL = 128,
|
||||
BT_SPECIALMASK = 3,
|
||||
|
||||
// Flag, weapon change pending.
|
||||
// If true, the next 3 bits hold weapon num.
|
||||
BT_CHANGE = 4,
|
||||
// The 3bit weapon mask and shift, convenience.
|
||||
BT_WEAPONMASK = (8+16+32),
|
||||
BT_WEAPONSHIFT = 3,
|
||||
|
||||
// Pause the game.
|
||||
BTS_PAUSE = 1,
|
||||
// Save the game at each console.
|
||||
BTS_SAVEGAME = 2,
|
||||
|
||||
// Savegame slot numbers
|
||||
// occupy the second byte of buttons.
|
||||
BTS_SAVEMASK = (4+8+16),
|
||||
BTS_SAVESHIFT = 2,
|
||||
|
||||
} buttoncode_t;
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// GLOBAL VARIABLES
|
||||
//
|
||||
#define MAXEVENTS 64
|
||||
|
||||
extern event_t events[MAXEVENTS];
|
||||
extern int eventhead;
|
||||
extern int eventtail;
|
||||
|
||||
extern gameaction_t gameaction;
|
||||
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
433
demos/3rdparty/doom/d_french.h
vendored
433
demos/3rdparty/doom/d_french.h
vendored
|
@ -1,433 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Printed strings, french translation.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __D_FRENCH__
|
||||
#define __D_FRENCH__
|
||||
|
||||
//
|
||||
// D_Main.C
|
||||
//
|
||||
#define D_DEVSTR "MODE DEVELOPPEMENT ON.\n"
|
||||
#define D_CDROM "VERSION CD-ROM: DEFAULT.CFG DANS C:\\DOOMDATA\n"
|
||||
|
||||
//
|
||||
// M_Menu.C
|
||||
//
|
||||
#define PRESSKEY "APPUYEZ SUR UNE TOUCHE."
|
||||
#define PRESSYN "APPUYEZ SUR Y OU N"
|
||||
#define QUITMSG "VOUS VOULEZ VRAIMENT\nQUITTER CE SUPER JEU?"
|
||||
#define LOADNET "VOUS NE POUVEZ PAS CHARGER\nUN JEU EN RESEAU!\n\n"PRESSKEY
|
||||
#define QLOADNET "CHARGEMENT RAPIDE INTERDIT EN RESEAU!\n\n"PRESSKEY
|
||||
#define QSAVESPOT "VOUS N'AVEZ PAS CHOISI UN EMPLACEMENT!\n\n"PRESSKEY
|
||||
#define SAVEDEAD "VOUS NE POUVEZ PAS SAUVER SI VOUS NE JOUEZ "\
|
||||
"PAS!\n\n"PRESSKEY
|
||||
#define QSPROMPT "SAUVEGARDE RAPIDE DANS LE FICHIER \n\n'%s'?\n\n"PRESSYN
|
||||
#define QLPROMPT "VOULEZ-VOUS CHARGER LA SAUVEGARDE"\
|
||||
"\n\n'%s'?\n\n"PRESSYN
|
||||
#define NEWGAME "VOUS NE POUVEZ PAS LANCER\n"\
|
||||
"UN NOUVEAU JEU SUR RESEAU.\n\n"PRESSKEY
|
||||
#define NIGHTMARE "VOUS CONFIRMEZ? CE NIVEAU EST\n"\
|
||||
"VRAIMENT IMPITOYABLE!n"PRESSYN
|
||||
#define SWSTRING "CECI EST UNE VERSION SHAREWARE DE DOOM.\n\n"\
|
||||
"VOUS DEVRIEZ COMMANDER LA TRILOGIE COMPLETE.\n\n"PRESSKEY
|
||||
#define MSGOFF "MESSAGES OFF"
|
||||
#define MSGON "MESSAGES ON"
|
||||
#define NETEND "VOUS NE POUVEZ PAS METTRE FIN A UN JEU SUR "\
|
||||
"RESEAU!\n\n"PRESSKEY
|
||||
#define ENDGAME "VOUS VOULEZ VRAIMENT METTRE FIN AU JEU?\n\n"PRESSYN
|
||||
|
||||
#define DOSY "(APPUYEZ SUR Y POUR REVENIR AU OS.)"
|
||||
|
||||
#define DETAILHI "GRAPHISMES MAXIMUM "
|
||||
#define DETAILLO "GRAPHISMES MINIMUM "
|
||||
#define GAMMALVL0 "CORRECTION GAMMA OFF"
|
||||
#define GAMMALVL1 "CORRECTION GAMMA NIVEAU 1"
|
||||
#define GAMMALVL2 "CORRECTION GAMMA NIVEAU 2"
|
||||
#define GAMMALVL3 "CORRECTION GAMMA NIVEAU 3"
|
||||
#define GAMMALVL4 "CORRECTION GAMMA NIVEAU 4"
|
||||
#define EMPTYSTRING "EMPLACEMENT VIDE"
|
||||
|
||||
//
|
||||
// P_inter.C
|
||||
//
|
||||
#define GOTARMOR "ARMURE RECUPEREE."
|
||||
#define GOTMEGA "MEGA-ARMURE RECUPEREE!"
|
||||
#define GOTHTHBONUS "BONUS DE SANTE RECUPERE."
|
||||
#define GOTARMBONUS "BONUS D'ARMURE RECUPERE."
|
||||
#define GOTSTIM "STIMPACK RECUPERE."
|
||||
#define GOTMEDINEED "MEDIKIT RECUPERE. VOUS EN AVEZ VRAIMENT BESOIN!"
|
||||
#define GOTMEDIKIT "MEDIKIT RECUPERE."
|
||||
#define GOTSUPER "SUPERCHARGE!"
|
||||
|
||||
#define GOTBLUECARD "CARTE MAGNETIQUE BLEUE RECUPEREE."
|
||||
#define GOTYELWCARD "CARTE MAGNETIQUE JAUNE RECUPEREE."
|
||||
#define GOTREDCARD "CARTE MAGNETIQUE ROUGE RECUPEREE."
|
||||
#define GOTBLUESKUL "CLEF CRANE BLEUE RECUPEREE."
|
||||
#define GOTYELWSKUL "CLEF CRANE JAUNE RECUPEREE."
|
||||
#define GOTREDSKULL "CLEF CRANE ROUGE RECUPEREE."
|
||||
|
||||
#define GOTINVUL "INVULNERABILITE!"
|
||||
#define GOTBERSERK "BERSERK!"
|
||||
#define GOTINVIS "INVISIBILITE PARTIELLE "
|
||||
#define GOTSUIT "COMBINAISON ANTI-RADIATIONS "
|
||||
#define GOTMAP "CARTE INFORMATIQUE "
|
||||
#define GOTVISOR "VISEUR A AMPLIFICATION DE LUMIERE "
|
||||
#define GOTMSPHERE "MEGASPHERE!"
|
||||
|
||||
#define GOTCLIP "CHARGEUR RECUPERE."
|
||||
#define GOTCLIPBOX "BOITE DE BALLES RECUPEREE."
|
||||
#define GOTROCKET "ROQUETTE RECUPEREE."
|
||||
#define GOTROCKBOX "CAISSE DE ROQUETTES RECUPEREE."
|
||||
#define GOTCELL "CELLULE D'ENERGIE RECUPEREE."
|
||||
#define GOTCELLBOX "PACK DE CELLULES D'ENERGIE RECUPERE."
|
||||
#define GOTSHELLS "4 CARTOUCHES RECUPEREES."
|
||||
#define GOTSHELLBOX "BOITE DE CARTOUCHES RECUPEREE."
|
||||
#define GOTBACKPACK "SAC PLEIN DE MUNITIONS RECUPERE!"
|
||||
|
||||
#define GOTBFG9000 "VOUS AVEZ UN BFG9000! OH, OUI!"
|
||||
#define GOTCHAINGUN "VOUS AVEZ LA MITRAILLEUSE!"
|
||||
#define GOTCHAINSAW "UNE TRONCONNEUSE!"
|
||||
#define GOTLAUNCHER "VOUS AVEZ UN LANCE-ROQUETTES!"
|
||||
#define GOTPLASMA "VOUS AVEZ UN FUSIL A PLASMA!"
|
||||
#define GOTSHOTGUN "VOUS AVEZ UN FUSIL!"
|
||||
#define GOTSHOTGUN2 "VOUS AVEZ UN SUPER FUSIL!"
|
||||
|
||||
//
|
||||
// P_Doors.C
|
||||
//
|
||||
#define PD_BLUEO "IL VOUS FAUT UNE CLEF BLEUE"
|
||||
#define PD_REDO "IL VOUS FAUT UNE CLEF ROUGE"
|
||||
#define PD_YELLOWO "IL VOUS FAUT UNE CLEF JAUNE"
|
||||
#define PD_BLUEK PD_BLUEO
|
||||
#define PD_REDK PD_REDO
|
||||
#define PD_YELLOWK PD_YELLOWO
|
||||
|
||||
//
|
||||
// G_game.C
|
||||
//
|
||||
#define GGSAVED "JEU SAUVEGARDE."
|
||||
|
||||
//
|
||||
// HU_stuff.C
|
||||
//
|
||||
#define HUSTR_MSGU "[MESSAGE NON ENVOYE]"
|
||||
|
||||
#define HUSTR_E1M1 "E1M1: HANGAR"
|
||||
#define HUSTR_E1M2 "E1M2: USINE NUCLEAIRE "
|
||||
#define HUSTR_E1M3 "E1M3: RAFFINERIE DE TOXINES "
|
||||
#define HUSTR_E1M4 "E1M4: CENTRE DE CONTROLE "
|
||||
#define HUSTR_E1M5 "E1M5: LABORATOIRE PHOBOS "
|
||||
#define HUSTR_E1M6 "E1M6: TRAITEMENT CENTRAL "
|
||||
#define HUSTR_E1M7 "E1M7: CENTRE INFORMATIQUE "
|
||||
#define HUSTR_E1M8 "E1M8: ANOMALIE PHOBOS "
|
||||
#define HUSTR_E1M9 "E1M9: BASE MILITAIRE "
|
||||
|
||||
#define HUSTR_E2M1 "E2M1: ANOMALIE DEIMOS "
|
||||
#define HUSTR_E2M2 "E2M2: ZONE DE CONFINEMENT "
|
||||
#define HUSTR_E2M3 "E2M3: RAFFINERIE"
|
||||
#define HUSTR_E2M4 "E2M4: LABORATOIRE DEIMOS "
|
||||
#define HUSTR_E2M5 "E2M5: CENTRE DE CONTROLE "
|
||||
#define HUSTR_E2M6 "E2M6: HALLS DES DAMNES "
|
||||
#define HUSTR_E2M7 "E2M7: CUVES DE REPRODUCTION "
|
||||
#define HUSTR_E2M8 "E2M8: TOUR DE BABEL "
|
||||
#define HUSTR_E2M9 "E2M9: FORTERESSE DU MYSTERE "
|
||||
|
||||
#define HUSTR_E3M1 "E3M1: DONJON DE L'ENFER "
|
||||
#define HUSTR_E3M2 "E3M2: BOURBIER DU DESESPOIR "
|
||||
#define HUSTR_E3M3 "E3M3: PANDEMONIUM"
|
||||
#define HUSTR_E3M4 "E3M4: MAISON DE LA DOULEUR "
|
||||
#define HUSTR_E3M5 "E3M5: CATHEDRALE PROFANE "
|
||||
#define HUSTR_E3M6 "E3M6: MONT EREBUS"
|
||||
#define HUSTR_E3M7 "E3M7: LIMBES"
|
||||
#define HUSTR_E3M8 "E3M8: DIS"
|
||||
#define HUSTR_E3M9 "E3M9: CLAPIERS"
|
||||
|
||||
#define HUSTR_1 "NIVEAU 1: ENTREE "
|
||||
#define HUSTR_2 "NIVEAU 2: HALLS SOUTERRAINS "
|
||||
#define HUSTR_3 "NIVEAU 3: LE FEU NOURRI "
|
||||
#define HUSTR_4 "NIVEAU 4: LE FOYER "
|
||||
#define HUSTR_5 "NIVEAU 5: LES EGOUTS "
|
||||
#define HUSTR_6 "NIVEAU 6: LE BROYEUR "
|
||||
#define HUSTR_7 "NIVEAU 7: L'HERBE DE LA MORT"
|
||||
#define HUSTR_8 "NIVEAU 8: RUSES ET PIEGES "
|
||||
#define HUSTR_9 "NIVEAU 9: LE PUITS "
|
||||
#define HUSTR_10 "NIVEAU 10: BASE DE RAVITAILLEMENT "
|
||||
#define HUSTR_11 "NIVEAU 11: LE CERCLE DE LA MORT!"
|
||||
|
||||
#define HUSTR_12 "NIVEAU 12: L'USINE "
|
||||
#define HUSTR_13 "NIVEAU 13: LE CENTRE VILLE"
|
||||
#define HUSTR_14 "NIVEAU 14: LES ANTRES PROFONDES "
|
||||
#define HUSTR_15 "NIVEAU 15: LA ZONE INDUSTRIELLE "
|
||||
#define HUSTR_16 "NIVEAU 16: LA BANLIEUE"
|
||||
#define HUSTR_17 "NIVEAU 17: LES IMMEUBLES"
|
||||
#define HUSTR_18 "NIVEAU 18: LA COUR "
|
||||
#define HUSTR_19 "NIVEAU 19: LA CITADELLE "
|
||||
#define HUSTR_20 "NIVEAU 20: JE T'AI EU!"
|
||||
|
||||
#define HUSTR_21 "NIVEAU 21: LE NIRVANA"
|
||||
#define HUSTR_22 "NIVEAU 22: LES CATACOMBES "
|
||||
#define HUSTR_23 "NIVEAU 23: LA GRANDE FETE "
|
||||
#define HUSTR_24 "NIVEAU 24: LE GOUFFRE "
|
||||
#define HUSTR_25 "NIVEAU 25: LES CHUTES DE SANG"
|
||||
#define HUSTR_26 "NIVEAU 26: LES MINES ABANDONNEES "
|
||||
#define HUSTR_27 "NIVEAU 27: CHEZ LES MONSTRES "
|
||||
#define HUSTR_28 "NIVEAU 28: LE MONDE DE L'ESPRIT "
|
||||
#define HUSTR_29 "NIVEAU 29: LA LIMITE "
|
||||
#define HUSTR_30 "NIVEAU 30: L'ICONE DU PECHE "
|
||||
|
||||
#define HUSTR_31 "NIVEAU 31: WOLFENSTEIN"
|
||||
#define HUSTR_32 "NIVEAU 32: LE MASSACRE"
|
||||
|
||||
|
||||
#define HUSTR_CHATMACRO1 "JE SUIS PRET A LEUR EN FAIRE BAVER!"
|
||||
#define HUSTR_CHATMACRO2 "JE VAIS BIEN."
|
||||
#define HUSTR_CHATMACRO3 "JE N'AI PAS L'AIR EN FORME!"
|
||||
#define HUSTR_CHATMACRO4 "AU SECOURS!"
|
||||
#define HUSTR_CHATMACRO5 "TU CRAINS!"
|
||||
#define HUSTR_CHATMACRO6 "LA PROCHAINE FOIS, MINABLE..."
|
||||
#define HUSTR_CHATMACRO7 "VIENS ICI!"
|
||||
#define HUSTR_CHATMACRO8 "JE VAIS M'EN OCCUPER."
|
||||
#define HUSTR_CHATMACRO9 "OUI"
|
||||
#define HUSTR_CHATMACRO0 "NON"
|
||||
|
||||
#define HUSTR_TALKTOSELF1 "VOUS PARLEZ TOUT SEUL "
|
||||
#define HUSTR_TALKTOSELF2 "QUI EST LA?"
|
||||
#define HUSTR_TALKTOSELF3 "VOUS VOUS FAITES PEUR "
|
||||
#define HUSTR_TALKTOSELF4 "VOUS COMMENCEZ A DELIRER "
|
||||
#define HUSTR_TALKTOSELF5 "VOUS ETES LARGUE..."
|
||||
|
||||
#define HUSTR_MESSAGESENT "[MESSAGE ENVOYE]"
|
||||
|
||||
// The following should NOT be changed unless it seems
|
||||
// just AWFULLY necessary
|
||||
|
||||
#define HUSTR_PLRGREEN "VERT: "
|
||||
#define HUSTR_PLRINDIGO "INDIGO: "
|
||||
#define HUSTR_PLRBROWN "BRUN: "
|
||||
#define HUSTR_PLRRED "ROUGE: "
|
||||
|
||||
#define HUSTR_KEYGREEN 'g' // french key should be "V"
|
||||
#define HUSTR_KEYINDIGO 'i'
|
||||
#define HUSTR_KEYBROWN 'b'
|
||||
#define HUSTR_KEYRED 'r'
|
||||
|
||||
//
|
||||
// AM_map.C
|
||||
//
|
||||
|
||||
#define AMSTR_FOLLOWON "MODE POURSUITE ON"
|
||||
#define AMSTR_FOLLOWOFF "MODE POURSUITE OFF"
|
||||
|
||||
#define AMSTR_GRIDON "GRILLE ON"
|
||||
#define AMSTR_GRIDOFF "GRILLE OFF"
|
||||
|
||||
#define AMSTR_MARKEDSPOT "REPERE MARQUE "
|
||||
#define AMSTR_MARKSCLEARED "REPERES EFFACES "
|
||||
|
||||
//
|
||||
// ST_stuff.C
|
||||
//
|
||||
|
||||
#define STSTR_MUS "CHANGEMENT DE MUSIQUE "
|
||||
#define STSTR_NOMUS "IMPOSSIBLE SELECTION"
|
||||
#define STSTR_DQDON "INVULNERABILITE ON "
|
||||
#define STSTR_DQDOFF "INVULNERABILITE OFF"
|
||||
|
||||
#define STSTR_KFAADDED "ARMEMENT MAXIMUM! "
|
||||
#define STSTR_FAADDED "ARMES (SAUF CLEFS) AJOUTEES"
|
||||
|
||||
#define STSTR_NCON "BARRIERES ON"
|
||||
#define STSTR_NCOFF "BARRIERES OFF"
|
||||
|
||||
#define STSTR_BEHOLD " inVuln, Str, Inviso, Rad, Allmap, or Lite-amp"
|
||||
#define STSTR_BEHOLDX "AMELIORATION ACTIVEE"
|
||||
|
||||
#define STSTR_CHOPPERS "... DOESN'T SUCK - GM"
|
||||
#define STSTR_CLEV "CHANGEMENT DE NIVEAU..."
|
||||
|
||||
//
|
||||
// F_Finale.C
|
||||
//
|
||||
#define E1TEXT "APRES AVOIR VAINCU LES GROS MECHANTS\n"\
|
||||
"ET NETTOYE LA BASE LUNAIRE, VOUS AVEZ\n"\
|
||||
"GAGNE, NON? PAS VRAI? OU EST DONC VOTRE\n"\
|
||||
" RECOMPENSE ET VOTRE BILLET DE\n"\
|
||||
"RETOUR? QU'EST-QUE CA VEUT DIRE?CE"\
|
||||
"N'EST PAS LA FIN ESPEREE!\n"\
|
||||
"\n" \
|
||||
"CA SENT LA VIANDE PUTREFIEE, MAIS\n"\
|
||||
"ON DIRAIT LA BASE DEIMOS. VOUS ETES\n"\
|
||||
"APPAREMMENT BLOQUE AUX PORTES DE L'ENFER.\n"\
|
||||
"LA SEULE ISSUE EST DE L'AUTRE COTE.\n"\
|
||||
"\n"\
|
||||
"POUR VIVRE LA SUITE DE DOOM, JOUEZ\n"\
|
||||
"A 'AUX PORTES DE L'ENFER' ET A\n"\
|
||||
"L'EPISODE SUIVANT, 'L'ENFER'!\n"
|
||||
|
||||
#define E2TEXT "VOUS AVEZ REUSSI. L'INFAME DEMON\n"\
|
||||
"QUI CONTROLAIT LA BASE LUNAIRE DE\n"\
|
||||
"DEIMOS EST MORT, ET VOUS AVEZ\n"\
|
||||
"TRIOMPHE! MAIS... OU ETES-VOUS?\n"\
|
||||
"VOUS GRIMPEZ JUSQU'AU BORD DE LA\n"\
|
||||
"LUNE ET VOUS DECOUVREZ L'ATROCE\n"\
|
||||
"VERITE.\n" \
|
||||
"\n"\
|
||||
"DEIMOS EST AU-DESSUS DE L'ENFER!\n"\
|
||||
"VOUS SAVEZ QUE PERSONNE NE S'EN\n"\
|
||||
"EST JAMAIS ECHAPPE, MAIS CES FUMIERS\n"\
|
||||
"VONT REGRETTER DE VOUS AVOIR CONNU!\n"\
|
||||
"VOUS REDESCENDEZ RAPIDEMENT VERS\n"\
|
||||
"LA SURFACE DE L'ENFER.\n"\
|
||||
"\n" \
|
||||
"VOICI MAINTENANT LE CHAPITRE FINAL DE\n"\
|
||||
"DOOM! -- L'ENFER."
|
||||
|
||||
#define E3TEXT "LE DEMON ARACHNEEN ET REPUGNANT\n"\
|
||||
"QUI A DIRIGE L'INVASION DES BASES\n"\
|
||||
"LUNAIRES ET SEME LA MORT VIENT DE SE\n"\
|
||||
"FAIRE PULVERISER UNE FOIS POUR TOUTES.\n"\
|
||||
"\n"\
|
||||
"UNE PORTE SECRETE S'OUVRE. VOUS ENTREZ.\n"\
|
||||
"VOUS AVEZ PROUVE QUE VOUS POUVIEZ\n"\
|
||||
"RESISTER AUX HORREURS DE L'ENFER.\n"\
|
||||
"IL SAIT ETRE BEAU JOUEUR, ET LORSQUE\n"\
|
||||
"VOUS SORTEZ, VOUS REVOYEZ LES VERTES\n"\
|
||||
"PRAIRIES DE LA TERRE, VOTRE PLANETE.\n"\
|
||||
"\n"\
|
||||
"VOUS VOUS DEMANDEZ CE QUI S'EST PASSE\n"\
|
||||
"SUR TERRE PENDANT QUE VOUS AVEZ\n"\
|
||||
"COMBATTU LE DEMON. HEUREUSEMENT,\n"\
|
||||
"AUCUN GERME DU MAL N'A FRANCHI\n"\
|
||||
"CETTE PORTE AVEC VOUS..."
|
||||
|
||||
|
||||
|
||||
// after level 6, put this:
|
||||
|
||||
#define C1TEXT "VOUS ETES AU PLUS PROFOND DE L'ASTROPORT\n" \
|
||||
"INFESTE DE MONSTRES, MAIS QUELQUE CHOSE\n" \
|
||||
"NE VA PAS. ILS ONT APPORTE LEUR PROPRE\n" \
|
||||
"REALITE, ET LA TECHNOLOGIE DE L'ASTROPORT\n" \
|
||||
"EST AFFECTEE PAR LEUR PRESENCE.\n" \
|
||||
"\n"\
|
||||
"DEVANT VOUS, VOUS VOYEZ UN POSTE AVANCE\n" \
|
||||
"DE L'ENFER, UNE ZONE FORTIFIEE. SI VOUS\n" \
|
||||
"POUVEZ PASSER, VOUS POURREZ PENETRER AU\n" \
|
||||
"COEUR DE LA BASE HANTEE ET TROUVER \n" \
|
||||
"L'INTERRUPTEUR DE CONTROLE QUI GARDE LA \n" \
|
||||
"POPULATION DE LA TERRE EN OTAGE."
|
||||
|
||||
// After level 11, put this:
|
||||
|
||||
#define C2TEXT "VOUS AVEZ GAGNE! VOTRE VICTOIRE A PERMIS\n" \
|
||||
"A L'HUMANITE D'EVACUER LA TERRE ET \n"\
|
||||
"D'ECHAPPER AU CAUCHEMAR. VOUS ETES \n"\
|
||||
"MAINTENANT LE DERNIER HUMAIN A LA SURFACE \n"\
|
||||
"DE LA PLANETE. VOUS ETES ENTOURE DE \n"\
|
||||
"MUTANTS CANNIBALES, D'EXTRATERRESTRES \n"\
|
||||
"CARNIVORES ET D'ESPRITS DU MAL. VOUS \n"\
|
||||
"ATTENDEZ CALMEMENT LA MORT, HEUREUX \n"\
|
||||
"D'AVOIR PU SAUVER VOTRE RACE.\n"\
|
||||
"MAIS UN MESSAGE VOUS PARVIENT SOUDAIN\n"\
|
||||
"DE L'ESPACE: \"NOS CAPTEURS ONT LOCALISE\n"\
|
||||
"LA SOURCE DE L'INVASION EXTRATERRESTRE.\n"\
|
||||
"SI VOUS Y ALLEZ, VOUS POURREZ PEUT-ETRE\n"\
|
||||
"LES ARRETER. LEUR BASE EST SITUEE AU COEUR\n"\
|
||||
"DE VOTRE VILLE NATALE, PRES DE L'ASTROPORT.\n"\
|
||||
"VOUS VOUS RELEVEZ LENTEMENT ET PENIBLEMENT\n"\
|
||||
"ET VOUS REPARTEZ POUR LE FRONT."
|
||||
|
||||
// After level 20, put this:
|
||||
|
||||
#define C3TEXT "VOUS ETES AU COEUR DE LA CITE CORROMPUE,\n"\
|
||||
"ENTOURE PAR LES CADAVRES DE VOS ENNEMIS.\n"\
|
||||
"VOUS NE VOYEZ PAS COMMENT DETRUIRE LA PORTE\n"\
|
||||
"DES CREATURES DE CE COTE. VOUS SERREZ\n"\
|
||||
"LES DENTS ET PLONGEZ DANS L'OUVERTURE.\n"\
|
||||
"\n"\
|
||||
"IL DOIT Y AVOIR UN MOYEN DE LA FERMER\n"\
|
||||
"DE L'AUTRE COTE. VOUS ACCEPTEZ DE\n"\
|
||||
"TRAVERSER L'ENFER POUR LE FAIRE?"
|
||||
|
||||
// After level 29, put this:
|
||||
|
||||
#define C4TEXT "LE VISAGE HORRIBLE D'UN DEMON D'UNE\n"\
|
||||
"TAILLE INCROYABLE S'EFFONDRE DEVANT\n"\
|
||||
"VOUS LORSQUE VOUS TIREZ UNE SALVE DE\n"\
|
||||
"ROQUETTES DANS SON CERVEAU. LE MONSTRE\n"\
|
||||
"SE RATATINE, SES MEMBRES DECHIQUETES\n"\
|
||||
"SE REPANDANT SUR DES CENTAINES DE\n"\
|
||||
"KILOMETRES A LA SURFACE DE L'ENFER.\n"\
|
||||
"\n"\
|
||||
"VOUS AVEZ REUSSI. L'INVASION N'AURA.\n"\
|
||||
"PAS LIEU. LA TERRE EST SAUVEE. L'ENFER\n"\
|
||||
"EST ANEANTI. EN VOUS DEMANDANT OU IRONT\n"\
|
||||
"MAINTENANT LES DAMNES, VOUS ESSUYEZ\n"\
|
||||
"VOTRE FRONT COUVERT DE SUEUR ET REPARTEZ\n"\
|
||||
"VERS LA TERRE. SA RECONSTRUCTION SERA\n"\
|
||||
"BEAUCOUP PLUS DROLE QUE SA DESTRUCTION.\n"
|
||||
|
||||
// Before level 31, put this:
|
||||
|
||||
#define C5TEXT "FELICITATIONS! VOUS AVEZ TROUVE LE\n"\
|
||||
"NIVEAU SECRET! IL SEMBLE AVOIR ETE\n"\
|
||||
"CONSTRUIT PAR LES HUMAINS. VOUS VOUS\n"\
|
||||
"DEMANDEZ QUELS PEUVENT ETRE LES\n"\
|
||||
"HABITANTS DE CE COIN PERDU DE L'ENFER."
|
||||
|
||||
// Before level 32, put this:
|
||||
|
||||
#define C6TEXT "FELICITATIONS! VOUS AVEZ DECOUVERT\n"\
|
||||
"LE NIVEAU SUPER SECRET! VOUS FERIEZ\n"\
|
||||
"MIEUX DE FONCER DANS CELUI-LA!\n"
|
||||
|
||||
//
|
||||
// Character cast strings F_FINALE.C
|
||||
//
|
||||
#define CC_ZOMBIE "ZOMBIE"
|
||||
#define CC_SHOTGUN "TYPE AU FUSIL"
|
||||
#define CC_HEAVY "MEC SUPER-ARME"
|
||||
#define CC_IMP "DIABLOTIN"
|
||||
#define CC_DEMON "DEMON"
|
||||
#define CC_LOST "AME PERDUE"
|
||||
#define CC_CACO "CACODEMON"
|
||||
#define CC_HELL "CHEVALIER DE L'ENFER"
|
||||
#define CC_BARON "BARON DE L'ENFER"
|
||||
#define CC_ARACH "ARACHNOTRON"
|
||||
#define CC_PAIN "ELEMENTAIRE DE LA DOULEUR"
|
||||
#define CC_REVEN "REVENANT"
|
||||
#define CC_MANCU "MANCUBUS"
|
||||
#define CC_ARCH "ARCHI-INFAME"
|
||||
#define CC_SPIDER "L'ARAIGNEE CERVEAU"
|
||||
#define CC_CYBER "LE CYBERDEMON"
|
||||
#define CC_HERO "NOTRE HEROS"
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
138
demos/3rdparty/doom/d_items.c
vendored
138
demos/3rdparty/doom/d_items.c
vendored
|
@ -1,138 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
// DESCRIPTION:
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static const char
|
||||
rcsid[] = "$Id:$";
|
||||
|
||||
// We are referring to sprite numbers.
|
||||
#include "info.h"
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "d_items.h"
|
||||
#endif
|
||||
#include "d_items.h"
|
||||
|
||||
|
||||
//
|
||||
// PSPRITE ACTIONS for waepons.
|
||||
// This struct controls the weapon animations.
|
||||
//
|
||||
// Each entry is:
|
||||
// ammo/amunition type
|
||||
// upstate
|
||||
// downstate
|
||||
// readystate
|
||||
// atkstate, i.e. attack/fire/hit frame
|
||||
// flashstate, muzzle flash
|
||||
//
|
||||
weaponinfo_t weaponinfo[NUMWEAPONS] =
|
||||
{
|
||||
{
|
||||
// fist
|
||||
am_noammo,
|
||||
S_PUNCHUP,
|
||||
S_PUNCHDOWN,
|
||||
S_PUNCH,
|
||||
S_PUNCH1,
|
||||
S_NULL
|
||||
},
|
||||
{
|
||||
// pistol
|
||||
am_clip,
|
||||
S_PISTOLUP,
|
||||
S_PISTOLDOWN,
|
||||
S_PISTOL,
|
||||
S_PISTOL1,
|
||||
S_PISTOLFLASH
|
||||
},
|
||||
{
|
||||
// shotgun
|
||||
am_shell,
|
||||
S_SGUNUP,
|
||||
S_SGUNDOWN,
|
||||
S_SGUN,
|
||||
S_SGUN1,
|
||||
S_SGUNFLASH1
|
||||
},
|
||||
{
|
||||
// chaingun
|
||||
am_clip,
|
||||
S_CHAINUP,
|
||||
S_CHAINDOWN,
|
||||
S_CHAIN,
|
||||
S_CHAIN1,
|
||||
S_CHAINFLASH1
|
||||
},
|
||||
{
|
||||
// missile launcher
|
||||
am_misl,
|
||||
S_MISSILEUP,
|
||||
S_MISSILEDOWN,
|
||||
S_MISSILE,
|
||||
S_MISSILE1,
|
||||
S_MISSILEFLASH1
|
||||
},
|
||||
{
|
||||
// plasma rifle
|
||||
am_cell,
|
||||
S_PLASMAUP,
|
||||
S_PLASMADOWN,
|
||||
S_PLASMA,
|
||||
S_PLASMA1,
|
||||
S_PLASMAFLASH1
|
||||
},
|
||||
{
|
||||
// bfg 9000
|
||||
am_cell,
|
||||
S_BFGUP,
|
||||
S_BFGDOWN,
|
||||
S_BFG,
|
||||
S_BFG1,
|
||||
S_BFGFLASH1
|
||||
},
|
||||
{
|
||||
// chainsaw
|
||||
am_noammo,
|
||||
S_SAWUP,
|
||||
S_SAWDOWN,
|
||||
S_SAW,
|
||||
S_SAW1,
|
||||
S_NULL
|
||||
},
|
||||
{
|
||||
// super shotgun
|
||||
am_shell,
|
||||
S_DSGUNUP,
|
||||
S_DSGUNDOWN,
|
||||
S_DSGUN,
|
||||
S_DSGUN1,
|
||||
S_DSGUNFLASH1
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
52
demos/3rdparty/doom/d_items.h
vendored
52
demos/3rdparty/doom/d_items.h
vendored
|
@ -1,52 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Items: key cards, artifacts, weapon, ammunition.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __D_ITEMS__
|
||||
#define __D_ITEMS__
|
||||
|
||||
#include "doomdef.h"
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
|
||||
// Weapon info: sprite frames, ammunition use.
|
||||
typedef struct
|
||||
{
|
||||
ammotype_t ammo;
|
||||
int upstate;
|
||||
int downstate;
|
||||
int readystate;
|
||||
int atkstate;
|
||||
int flashstate;
|
||||
|
||||
} weaponinfo_t;
|
||||
|
||||
extern weaponinfo_t weaponinfo[NUMWEAPONS];
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
1005
demos/3rdparty/doom/d_main.c
vendored
1005
demos/3rdparty/doom/d_main.c
vendored
File diff suppressed because it is too large
Load diff
64
demos/3rdparty/doom/d_main.h
vendored
64
demos/3rdparty/doom/d_main.h
vendored
|
@ -1,64 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// System specific interface stuff.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __D_MAIN__
|
||||
#define __D_MAIN__
|
||||
|
||||
#include "d_event.h"
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define MAXWADFILES 20
|
||||
extern char* wadfiles[MAXWADFILES];
|
||||
|
||||
void D_AddFile (char *file);
|
||||
|
||||
|
||||
|
||||
//
|
||||
// D_DoomMain()
|
||||
// Not a globally visible function, just included for source reference,
|
||||
// calls all startup code, parses command line options.
|
||||
// If not overrided by user input, calls N_AdvanceDemo.
|
||||
//
|
||||
void D_DoomMain (void);
|
||||
|
||||
// Called by IO functions when input is detected.
|
||||
void D_PostEvent (event_t* ev);
|
||||
|
||||
|
||||
|
||||
//
|
||||
// BASE LEVEL
|
||||
//
|
||||
void D_PageTicker (void);
|
||||
void D_PageDrawer (void);
|
||||
void D_AdvanceDemo (void);
|
||||
void D_StartTitle (void);
|
||||
|
||||
#endif
|
759
demos/3rdparty/doom/d_net.c
vendored
759
demos/3rdparty/doom/d_net.c
vendored
|
@ -1,759 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// DOOM Network game communication and protocol,
|
||||
// all OS independend parts.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
static const char rcsid[] = "$Id: d_net.c,v 1.3 1997/02/03 22:01:47 b1 Exp $";
|
||||
|
||||
|
||||
#include "m_menu.h"
|
||||
#include "i_system.h"
|
||||
#include "i_video.h"
|
||||
#include "i_net.h"
|
||||
#include "g_game.h"
|
||||
#include "doomdef.h"
|
||||
#include "doomstat.h"
|
||||
|
||||
#define NCMD_EXIT 0x80000000
|
||||
#define NCMD_RETRANSMIT 0x40000000
|
||||
#define NCMD_SETUP 0x20000000
|
||||
#define NCMD_KILL 0x10000000 // kill game
|
||||
#define NCMD_CHECKSUM 0x0fffffff
|
||||
|
||||
|
||||
doomcom_t* doomcom;
|
||||
doomdata_t* netbuffer; // points inside doomcom
|
||||
|
||||
|
||||
//
|
||||
// NETWORKING
|
||||
//
|
||||
// gametic is the tic about to (or currently being) run
|
||||
// maketic is the tick that hasn't had control made for it yet
|
||||
// nettics[] has the maketics for all players
|
||||
//
|
||||
// a gametic cannot be run until nettics[] > gametic for all players
|
||||
//
|
||||
#define RESENDCOUNT 10
|
||||
#define PL_DRONE 0x80 // bit flag in doomdata->player
|
||||
|
||||
ticcmd_t localcmds[BACKUPTICS];
|
||||
|
||||
ticcmd_t netcmds[MAXPLAYERS][BACKUPTICS];
|
||||
int nettics[MAXNETNODES];
|
||||
boolean nodeingame[MAXNETNODES]; // set false as nodes leave game
|
||||
boolean remoteresend[MAXNETNODES]; // set when local needs tics
|
||||
int resendto[MAXNETNODES]; // set when remote needs tics
|
||||
int resendcount[MAXNETNODES];
|
||||
|
||||
int nodeforplayer[MAXPLAYERS];
|
||||
|
||||
int maketic;
|
||||
int lastnettic;
|
||||
int skiptics;
|
||||
int ticdup;
|
||||
int maxsend; // BACKUPTICS/(2*ticdup)-1
|
||||
|
||||
|
||||
void D_ProcessEvents (void);
|
||||
void G_BuildTiccmd (ticcmd_t *cmd);
|
||||
void D_DoAdvanceDemo (void);
|
||||
|
||||
boolean reboundpacket;
|
||||
doomdata_t reboundstore;
|
||||
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
int NetbufferSize (void)
|
||||
{
|
||||
return (int)&(((doomdata_t *)0)->cmds[netbuffer->numtics]);
|
||||
}
|
||||
|
||||
//
|
||||
// Checksum
|
||||
//
|
||||
unsigned NetbufferChecksum (void)
|
||||
{
|
||||
unsigned c;
|
||||
int i,l;
|
||||
|
||||
c = 0x1234567;
|
||||
|
||||
// FIXME -endianess?
|
||||
#ifdef NORMALUNIX
|
||||
return 0; // byte order problems
|
||||
#endif
|
||||
|
||||
l = (NetbufferSize () - (int)&(((doomdata_t *)0)->retransmitfrom))/4;
|
||||
for (i=0 ; i<l ; i++)
|
||||
c += ((unsigned *)&netbuffer->retransmitfrom)[i] * (i+1);
|
||||
|
||||
return c & NCMD_CHECKSUM;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
int ExpandTics (int low)
|
||||
{
|
||||
int delta;
|
||||
|
||||
delta = low - (maketic&0xff);
|
||||
|
||||
if (delta >= -64 && delta <= 64)
|
||||
return (maketic&~0xff) + low;
|
||||
if (delta > 64)
|
||||
return (maketic&~0xff) - 256 + low;
|
||||
if (delta < -64)
|
||||
return (maketic&~0xff) + 256 + low;
|
||||
|
||||
I_Error ("ExpandTics: strange value %i at maketic %i",low,maketic);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// HSendPacket
|
||||
//
|
||||
void
|
||||
HSendPacket
|
||||
(int node,
|
||||
int flags )
|
||||
{
|
||||
netbuffer->checksum = NetbufferChecksum () | flags;
|
||||
|
||||
if (!node)
|
||||
{
|
||||
reboundstore = *netbuffer;
|
||||
reboundpacket = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (demoplayback)
|
||||
return;
|
||||
|
||||
if (!netgame)
|
||||
I_Error ("Tried to transmit to another node");
|
||||
|
||||
doomcom->command = CMD_SEND;
|
||||
doomcom->remotenode = node;
|
||||
doomcom->datalength = NetbufferSize ();
|
||||
|
||||
#if 0 // AJH HACK
|
||||
if (debugfile)
|
||||
{
|
||||
int i;
|
||||
int realretrans;
|
||||
if (netbuffer->checksum & NCMD_RETRANSMIT)
|
||||
realretrans = ExpandTics (netbuffer->retransmitfrom);
|
||||
else
|
||||
realretrans = -1;
|
||||
|
||||
I_DBGprintf("send (%i + %i, R %i) [%i] ",
|
||||
ExpandTics(netbuffer->starttic),
|
||||
netbuffer->numtics, realretrans, doomcom->datalength);
|
||||
|
||||
for (i=0 ; i<doomcom->datalength ; i++)
|
||||
I_DBGprintf("%i ",((byte *)netbuffer)[i]);
|
||||
|
||||
I_DBGprintf("\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
I_NetCmd ();
|
||||
}
|
||||
|
||||
//
|
||||
// HGetPacket
|
||||
// Returns false if no packet is waiting
|
||||
//
|
||||
boolean HGetPacket (void)
|
||||
{
|
||||
if (reboundpacket)
|
||||
{
|
||||
*netbuffer = reboundstore;
|
||||
doomcom->remotenode = 0;
|
||||
reboundpacket = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!netgame)
|
||||
return false;
|
||||
|
||||
if (demoplayback)
|
||||
return false;
|
||||
|
||||
doomcom->command = CMD_GET;
|
||||
I_NetCmd ();
|
||||
|
||||
if (doomcom->remotenode == -1)
|
||||
return false;
|
||||
|
||||
if (doomcom->datalength != NetbufferSize ())
|
||||
{
|
||||
I_DBGprintf("bad packet length %i\n",doomcom->datalength);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (NetbufferChecksum () != (netbuffer->checksum&NCMD_CHECKSUM) )
|
||||
{
|
||||
I_DBGprintf("bad packet checksum\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
#if 0 // AJH uGFX Hack
|
||||
if (debugfile)
|
||||
{
|
||||
int realretrans;
|
||||
int i;
|
||||
|
||||
if (netbuffer->checksum & NCMD_SETUP)
|
||||
I_DBGprintf("setup packet\n");
|
||||
else
|
||||
{
|
||||
if (netbuffer->checksum & NCMD_RETRANSMIT)
|
||||
realretrans = ExpandTics (netbuffer->retransmitfrom);
|
||||
else
|
||||
realretrans = -1;
|
||||
|
||||
I_DBGprintf("get %i = (%i + %i, R %i)[%i] ",
|
||||
doomcom->remotenode,
|
||||
ExpandTics(netbuffer->starttic),
|
||||
netbuffer->numtics, realretrans, doomcom->datalength);
|
||||
|
||||
for (i=0 ; i<doomcom->datalength ; i++)
|
||||
I_DBGprintf("%i ",((byte *)netbuffer)[i]);
|
||||
I_DBGprintf("\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// GetPackets
|
||||
//
|
||||
char exitmsg[80];
|
||||
|
||||
void GetPackets (void)
|
||||
{
|
||||
int netconsole;
|
||||
int netnode;
|
||||
ticcmd_t *src, *dest;
|
||||
int realend;
|
||||
int realstart;
|
||||
|
||||
while ( HGetPacket() )
|
||||
{
|
||||
if (netbuffer->checksum & NCMD_SETUP)
|
||||
continue; // extra setup packet
|
||||
|
||||
netconsole = netbuffer->player & ~PL_DRONE;
|
||||
netnode = doomcom->remotenode;
|
||||
|
||||
// to save bytes, only the low byte of tic numbers are sent
|
||||
// Figure out what the rest of the bytes are
|
||||
realstart = ExpandTics (netbuffer->starttic);
|
||||
realend = (realstart+netbuffer->numtics);
|
||||
|
||||
// check for exiting the game
|
||||
if (netbuffer->checksum & NCMD_EXIT)
|
||||
{
|
||||
if (!nodeingame[netnode])
|
||||
continue;
|
||||
nodeingame[netnode] = false;
|
||||
playeringame[netconsole] = false;
|
||||
strcpy (exitmsg, "Player 1 left the game");
|
||||
exitmsg[7] += netconsole;
|
||||
players[consoleplayer].message = exitmsg;
|
||||
if (demorecording)
|
||||
G_CheckDemoStatus ();
|
||||
continue;
|
||||
}
|
||||
|
||||
// check for a remote game kill
|
||||
if (netbuffer->checksum & NCMD_KILL)
|
||||
I_Error ("Killed by network driver");
|
||||
|
||||
nodeforplayer[netconsole] = netnode;
|
||||
|
||||
// check for retransmit request
|
||||
if ( resendcount[netnode] <= 0
|
||||
&& (netbuffer->checksum & NCMD_RETRANSMIT) )
|
||||
{
|
||||
resendto[netnode] = ExpandTics(netbuffer->retransmitfrom);
|
||||
I_DBGprintf ("retransmit from %i\n", resendto[netnode]);
|
||||
resendcount[netnode] = RESENDCOUNT;
|
||||
}
|
||||
else
|
||||
resendcount[netnode]--;
|
||||
|
||||
// check for out of order / duplicated packet
|
||||
if (realend == nettics[netnode])
|
||||
continue;
|
||||
|
||||
if (realend < nettics[netnode])
|
||||
{
|
||||
I_DBGprintf ("out of order packet (%i + %i)\n" ,
|
||||
realstart,netbuffer->numtics);
|
||||
continue;
|
||||
}
|
||||
|
||||
// check for a missed packet
|
||||
if (realstart > nettics[netnode])
|
||||
{
|
||||
// stop processing until the other system resends the missed tics
|
||||
I_DBGprintf("missed tics from %i (%i - %i)\n",
|
||||
netnode, realstart, nettics[netnode]);
|
||||
remoteresend[netnode] = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
// update command store from the packet
|
||||
{
|
||||
int start;
|
||||
|
||||
remoteresend[netnode] = false;
|
||||
|
||||
start = nettics[netnode] - realstart;
|
||||
src = &netbuffer->cmds[start];
|
||||
|
||||
while (nettics[netnode] < realend)
|
||||
{
|
||||
dest = &netcmds[netconsole][nettics[netnode]%BACKUPTICS];
|
||||
nettics[netnode]++;
|
||||
*dest = *src;
|
||||
src++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// NetUpdate
|
||||
// Builds ticcmds for console player,
|
||||
// sends out a packet
|
||||
//
|
||||
int gametime;
|
||||
|
||||
void NetUpdate (void)
|
||||
{
|
||||
int nowtime;
|
||||
int newtics;
|
||||
int i,j;
|
||||
int realstart;
|
||||
int gameticdiv;
|
||||
|
||||
// check time
|
||||
nowtime = I_GetTime ()/ticdup;
|
||||
newtics = nowtime - gametime;
|
||||
gametime = nowtime;
|
||||
|
||||
if (newtics <= 0) // nothing new to update
|
||||
goto listen;
|
||||
|
||||
if (skiptics <= newtics)
|
||||
{
|
||||
newtics -= skiptics;
|
||||
skiptics = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
skiptics -= newtics;
|
||||
newtics = 0;
|
||||
}
|
||||
|
||||
|
||||
netbuffer->player = consoleplayer;
|
||||
|
||||
// build new ticcmds for console player
|
||||
gameticdiv = gametic/ticdup;
|
||||
for (i=0 ; i<newtics ; i++)
|
||||
{
|
||||
I_StartTic ();
|
||||
D_ProcessEvents ();
|
||||
if (maketic - gameticdiv >= BACKUPTICS/2-1)
|
||||
break; // can't hold any more
|
||||
|
||||
//I_printf("mk:%i ",maketic);
|
||||
G_BuildTiccmd (&localcmds[maketic%BACKUPTICS]);
|
||||
maketic++;
|
||||
}
|
||||
|
||||
|
||||
if (singletics)
|
||||
return; // singletic update is syncronous
|
||||
|
||||
// send the packet to the other nodes
|
||||
for (i=0 ; i<doomcom->numnodes ; i++)
|
||||
if (nodeingame[i])
|
||||
{
|
||||
netbuffer->starttic = realstart = resendto[i];
|
||||
netbuffer->numtics = maketic - realstart;
|
||||
if (netbuffer->numtics > BACKUPTICS)
|
||||
I_Error ("NetUpdate: netbuffer->numtics > BACKUPTICS");
|
||||
|
||||
resendto[i] = maketic - doomcom->extratics;
|
||||
|
||||
for (j=0 ; j< netbuffer->numtics ; j++)
|
||||
netbuffer->cmds[j] =
|
||||
localcmds[(realstart+j)%BACKUPTICS];
|
||||
|
||||
if (remoteresend[i])
|
||||
{
|
||||
netbuffer->retransmitfrom = nettics[i];
|
||||
HSendPacket (i, NCMD_RETRANSMIT);
|
||||
}
|
||||
else
|
||||
{
|
||||
netbuffer->retransmitfrom = 0;
|
||||
HSendPacket (i, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// listen for other packets
|
||||
listen:
|
||||
GetPackets ();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// CheckAbort
|
||||
//
|
||||
void CheckAbort (void)
|
||||
{
|
||||
event_t *ev;
|
||||
int stoptic;
|
||||
|
||||
stoptic = I_GetTime () + 2;
|
||||
while (I_GetTime() < stoptic)
|
||||
I_StartTic ();
|
||||
|
||||
I_StartTic ();
|
||||
for ( ; eventtail != eventhead
|
||||
; eventtail = (++eventtail)&(MAXEVENTS-1) )
|
||||
{
|
||||
ev = &events[eventtail];
|
||||
if (ev->type == ev_keydown && ev->data1 == KEY_ESCAPE)
|
||||
I_Error ("Network game synchronization aborted.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// D_ArbitrateNetStart
|
||||
//
|
||||
void D_ArbitrateNetStart (void)
|
||||
{
|
||||
int i;
|
||||
boolean gotinfo[MAXNETNODES];
|
||||
|
||||
autostart = true;
|
||||
memset (gotinfo,0,sizeof(gotinfo));
|
||||
|
||||
if (doomcom->consoleplayer)
|
||||
{
|
||||
// listen for setup info from key player
|
||||
I_printf ("listening for network start info...\n");
|
||||
while (1)
|
||||
{
|
||||
CheckAbort ();
|
||||
if (!HGetPacket ())
|
||||
continue;
|
||||
if (netbuffer->checksum & NCMD_SETUP)
|
||||
{
|
||||
if (netbuffer->player != VERSION)
|
||||
I_Error ("Different DOOM versions cannot play a net game!");
|
||||
startskill = netbuffer->retransmitfrom & 15;
|
||||
deathmatch = (netbuffer->retransmitfrom & 0xc0) >> 6;
|
||||
nomonsters = (netbuffer->retransmitfrom & 0x20) > 0;
|
||||
respawnparm = (netbuffer->retransmitfrom & 0x10) > 0;
|
||||
startmap = netbuffer->starttic & 0x3f;
|
||||
startepisode = netbuffer->starttic >> 6;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// key player, send the setup info
|
||||
I_printf ("sending network start info...\n");
|
||||
do
|
||||
{
|
||||
CheckAbort ();
|
||||
for (i=0 ; i<doomcom->numnodes ; i++)
|
||||
{
|
||||
netbuffer->retransmitfrom = startskill;
|
||||
if (deathmatch)
|
||||
netbuffer->retransmitfrom |= (deathmatch<<6);
|
||||
if (nomonsters)
|
||||
netbuffer->retransmitfrom |= 0x20;
|
||||
if (respawnparm)
|
||||
netbuffer->retransmitfrom |= 0x10;
|
||||
netbuffer->starttic = startepisode * 64 + startmap;
|
||||
netbuffer->player = VERSION;
|
||||
netbuffer->numtics = 0;
|
||||
HSendPacket (i, NCMD_SETUP);
|
||||
}
|
||||
|
||||
#if 1
|
||||
for(i = 10 ; i && HGetPacket(); --i)
|
||||
{
|
||||
if((netbuffer->player&0x7f) < MAXNETNODES)
|
||||
gotinfo[netbuffer->player&0x7f] = true;
|
||||
}
|
||||
#else
|
||||
while (HGetPacket ())
|
||||
{
|
||||
gotinfo[netbuffer->player&0x7f] = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (i=1 ; i<doomcom->numnodes ; i++)
|
||||
if (!gotinfo[i])
|
||||
break;
|
||||
} while (i < doomcom->numnodes);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// D_CheckNetGame
|
||||
// Works out player numbers among the net participants
|
||||
//
|
||||
extern int viewangleoffset;
|
||||
|
||||
void D_CheckNetGame (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0 ; i<MAXNETNODES ; i++)
|
||||
{
|
||||
nodeingame[i] = false;
|
||||
nettics[i] = 0;
|
||||
remoteresend[i] = false; // set when local needs tics
|
||||
resendto[i] = 0; // which tic to start sending
|
||||
}
|
||||
|
||||
// I_InitNetwork sets doomcom and netgame
|
||||
I_InitNetwork ();
|
||||
if (doomcom->id != DOOMCOM_ID)
|
||||
I_Error ("Doomcom buffer invalid!");
|
||||
|
||||
netbuffer = &doomcom->data;
|
||||
consoleplayer = displayplayer = doomcom->consoleplayer;
|
||||
if (netgame)
|
||||
D_ArbitrateNetStart ();
|
||||
|
||||
I_printf ("startskill %i deathmatch: %i startmap: %i startepisode: %i\n",
|
||||
startskill, deathmatch, startmap, startepisode);
|
||||
|
||||
// read values out of doomcom
|
||||
ticdup = doomcom->ticdup;
|
||||
maxsend = BACKUPTICS/(2*ticdup)-1;
|
||||
if (maxsend<1)
|
||||
maxsend = 1;
|
||||
|
||||
for (i=0 ; i<doomcom->numplayers ; i++)
|
||||
playeringame[i] = true;
|
||||
for (i=0 ; i<doomcom->numnodes ; i++)
|
||||
nodeingame[i] = true;
|
||||
|
||||
I_printf ("player %i of %i (%i nodes)\n",
|
||||
consoleplayer+1, doomcom->numplayers, doomcom->numnodes);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// D_QuitNetGame
|
||||
// Called before quitting to leave a net game
|
||||
// without hanging the other players
|
||||
//
|
||||
void D_QuitNetGame (void)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
if (!netgame || !usergame || consoleplayer == -1 || demoplayback)
|
||||
return;
|
||||
|
||||
// send a bunch of packets for security
|
||||
netbuffer->player = consoleplayer;
|
||||
netbuffer->numtics = 0;
|
||||
for (i=0 ; i<4 ; i++)
|
||||
{
|
||||
for (j=1 ; j<doomcom->numnodes ; j++)
|
||||
if (nodeingame[j])
|
||||
HSendPacket (j, NCMD_EXIT);
|
||||
I_WaitVBL (1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// TryRunTics
|
||||
//
|
||||
int frametics[4];
|
||||
int frameon;
|
||||
int frameskip[4];
|
||||
int oldnettics;
|
||||
|
||||
extern boolean advancedemo;
|
||||
|
||||
void TryRunTics (void)
|
||||
{
|
||||
int i;
|
||||
int lowtic;
|
||||
int entertic;
|
||||
static int oldentertics;
|
||||
int realtics;
|
||||
int availabletics;
|
||||
int counts;
|
||||
int numplaying;
|
||||
|
||||
// get real tics
|
||||
entertic = I_GetTime ()/ticdup;
|
||||
realtics = entertic - oldentertics;
|
||||
oldentertics = entertic;
|
||||
|
||||
// get available tics
|
||||
NetUpdate ();
|
||||
|
||||
lowtic = MAXINT;
|
||||
numplaying = 0;
|
||||
for (i=0 ; i<doomcom->numnodes ; i++)
|
||||
{
|
||||
if (nodeingame[i])
|
||||
{
|
||||
numplaying++;
|
||||
if (nettics[i] < lowtic)
|
||||
lowtic = nettics[i];
|
||||
}
|
||||
}
|
||||
availabletics = lowtic - gametic/ticdup;
|
||||
|
||||
// decide how many tics to run
|
||||
if (realtics < availabletics-1)
|
||||
counts = realtics+1;
|
||||
else if (realtics < availabletics)
|
||||
counts = realtics;
|
||||
else
|
||||
counts = availabletics;
|
||||
|
||||
if (counts < 1)
|
||||
counts = 1;
|
||||
|
||||
frameon++;
|
||||
|
||||
I_DBGprintf("=======real: %i avail: %i game: %i\n",
|
||||
realtics, availabletics,counts);
|
||||
|
||||
if (!demoplayback)
|
||||
{
|
||||
// ideally nettics[0] should be 1 - 3 tics above lowtic
|
||||
// if we are consistantly slower, speed up time
|
||||
for (i=0 ; i<MAXPLAYERS ; i++)
|
||||
if (playeringame[i])
|
||||
break;
|
||||
if (consoleplayer == i)
|
||||
{
|
||||
// the key player does not adapt
|
||||
}
|
||||
else
|
||||
{
|
||||
if (nettics[0] <= nettics[nodeforplayer[i]])
|
||||
{
|
||||
gametime--;
|
||||
// I_printf ("-");
|
||||
}
|
||||
frameskip[frameon&3] = (oldnettics > nettics[nodeforplayer[i]]);
|
||||
oldnettics = nettics[0];
|
||||
if (frameskip[0] && frameskip[1] && frameskip[2] && frameskip[3])
|
||||
{
|
||||
skiptics = 1;
|
||||
// I_printf ("+");
|
||||
}
|
||||
}
|
||||
}// demoplayback
|
||||
|
||||
// wait for new tics if needed
|
||||
while (lowtic < gametic/ticdup + counts)
|
||||
{
|
||||
NetUpdate ();
|
||||
lowtic = MAXINT;
|
||||
|
||||
for (i=0 ; i<doomcom->numnodes ; i++)
|
||||
if (nodeingame[i] && nettics[i] < lowtic)
|
||||
lowtic = nettics[i];
|
||||
|
||||
if (lowtic < gametic/ticdup)
|
||||
I_Error ("TryRunTics: lowtic < gametic");
|
||||
|
||||
// don't stay in here forever -- give the menu a chance to work
|
||||
if (I_GetTime ()/ticdup - entertic >= 20)
|
||||
{
|
||||
M_Ticker ();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// run the count * ticdup dics
|
||||
while (counts--)
|
||||
{
|
||||
for (i=0 ; i<ticdup ; i++)
|
||||
{
|
||||
if (gametic/ticdup > lowtic)
|
||||
I_Error ("gametic>lowtic");
|
||||
if (advancedemo)
|
||||
D_DoAdvanceDemo ();
|
||||
M_Ticker ();
|
||||
G_Ticker ();
|
||||
gametic++;
|
||||
|
||||
// modify command for duplicated tics
|
||||
if (i != ticdup-1)
|
||||
{
|
||||
ticcmd_t *cmd;
|
||||
int buf;
|
||||
int j;
|
||||
|
||||
buf = (gametic/ticdup)%BACKUPTICS;
|
||||
for (j=0 ; j<MAXPLAYERS ; j++)
|
||||
{
|
||||
cmd = &netcmds[j][buf];
|
||||
cmd->chatchar = 0;
|
||||
if (cmd->buttons & BT_SPECIAL)
|
||||
cmd->buttons = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
NetUpdate (); // check for new console commands
|
||||
}
|
||||
}
|
149
demos/3rdparty/doom/d_net.h
vendored
149
demos/3rdparty/doom/d_net.h
vendored
|
@ -1,149 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Networking stuff.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __D_NET__
|
||||
#define __D_NET__
|
||||
|
||||
#include "d_player.h"
|
||||
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Network play related stuff.
|
||||
// There is a data struct that stores network
|
||||
// communication related stuff, and another
|
||||
// one that defines the actual packets to
|
||||
// be transmitted.
|
||||
//
|
||||
|
||||
#define DOOMCOM_ID 0x12345678l
|
||||
|
||||
// Max computers/players in a game.
|
||||
#define MAXNETNODES 8
|
||||
|
||||
|
||||
// Networking and tick handling related.
|
||||
#define BACKUPTICS 12
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CMD_SEND = 1,
|
||||
CMD_GET = 2
|
||||
|
||||
} command_t;
|
||||
|
||||
|
||||
//
|
||||
// Network packet data.
|
||||
//
|
||||
typedef struct
|
||||
{
|
||||
// High bit is retransmit request.
|
||||
unsigned checksum;
|
||||
// Only valid if NCMD_RETRANSMIT.
|
||||
byte retransmitfrom;
|
||||
|
||||
byte starttic;
|
||||
byte player;
|
||||
byte numtics;
|
||||
ticcmd_t cmds[BACKUPTICS];
|
||||
|
||||
} doomdata_t;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// Supposed to be DOOMCOM_ID?
|
||||
long id;
|
||||
|
||||
// DOOM executes an int to execute commands.
|
||||
short intnum;
|
||||
// Communication between DOOM and the driver.
|
||||
// Is CMD_SEND or CMD_GET.
|
||||
short command;
|
||||
// Is dest for send, set by get (-1 = no packet).
|
||||
short remotenode;
|
||||
|
||||
// Number of bytes in doomdata to be sent
|
||||
short datalength;
|
||||
|
||||
// Info common to all nodes.
|
||||
// Console is allways node 0.
|
||||
short numnodes;
|
||||
// Flag: 1 = no duplication, 2-5 = dup for slow nets.
|
||||
short ticdup;
|
||||
// Flag: 1 = send a backup tic in every packet.
|
||||
short extratics;
|
||||
// Flag: 1 = deathmatch.
|
||||
short deathmatch;
|
||||
// Flag: -1 = new game, 0-5 = load savegame
|
||||
short savegame;
|
||||
short episode; // 1-3
|
||||
short map; // 1-9
|
||||
short skill; // 1-5
|
||||
|
||||
// Info specific to this node.
|
||||
short consoleplayer;
|
||||
short numplayers;
|
||||
|
||||
// These are related to the 3-display mode,
|
||||
// in which two drones looking left and right
|
||||
// were used to render two additional views
|
||||
// on two additional computers.
|
||||
// Probably not operational anymore.
|
||||
// 1 = left, 0 = center, -1 = right
|
||||
short angleoffset;
|
||||
// 1 = drone
|
||||
short drone;
|
||||
|
||||
// The packet data to be sent.
|
||||
doomdata_t data;
|
||||
|
||||
} doomcom_t;
|
||||
|
||||
|
||||
|
||||
// Create any new ticcmds and broadcast to other players.
|
||||
void NetUpdate (void);
|
||||
|
||||
// Broadcasts special packets to other players
|
||||
// to notify of game exit
|
||||
void D_QuitNetGame (void);
|
||||
|
||||
//? how many ticks to run?
|
||||
void TryRunTics (void);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
219
demos/3rdparty/doom/d_player.h
vendored
219
demos/3rdparty/doom/d_player.h
vendored
|
@ -1,219 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
//
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __D_PLAYER__
|
||||
#define __D_PLAYER__
|
||||
|
||||
|
||||
// The player data structure depends on a number
|
||||
// of other structs: items (internal inventory),
|
||||
// animation states (closely tied to the sprites
|
||||
// used to represent them, unfortunately).
|
||||
#include "d_items.h"
|
||||
#include "p_pspr.h"
|
||||
|
||||
// In addition, the player is just a special
|
||||
// case of the generic moving object/actor.
|
||||
#include "p_mobj.h"
|
||||
|
||||
// Finally, for odd reasons, the player input
|
||||
// is buffered within the player data struct,
|
||||
// as commands per game tick.
|
||||
#include "d_ticcmd.h"
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Player states.
|
||||
//
|
||||
typedef enum
|
||||
{
|
||||
// Playing or camping.
|
||||
PST_LIVE,
|
||||
// Dead on the ground, view follows killer.
|
||||
PST_DEAD,
|
||||
// Ready to restart/respawn???
|
||||
PST_REBORN
|
||||
|
||||
} playerstate_t;
|
||||
|
||||
|
||||
//
|
||||
// Player internal flags, for cheats and debug.
|
||||
//
|
||||
typedef enum
|
||||
{
|
||||
// No clipping, walk through barriers.
|
||||
CF_NOCLIP = 1,
|
||||
// No damage, no health loss.
|
||||
CF_GODMODE = 2,
|
||||
// Not really a cheat, just a debug aid.
|
||||
CF_NOMOMENTUM = 4
|
||||
|
||||
} cheat_t;
|
||||
|
||||
|
||||
//
|
||||
// Extended player object info: player_t
|
||||
//
|
||||
typedef struct player_s
|
||||
{
|
||||
mobj_t* mo;
|
||||
playerstate_t playerstate;
|
||||
ticcmd_t cmd;
|
||||
|
||||
// Determine POV,
|
||||
// including viewpoint bobbing during movement.
|
||||
// Focal origin above r.z
|
||||
fixed_t viewz;
|
||||
// Base height above floor for viewz.
|
||||
fixed_t viewheight;
|
||||
// Bob/squat speed.
|
||||
fixed_t deltaviewheight;
|
||||
// bounded/scaled total momentum.
|
||||
fixed_t bob;
|
||||
|
||||
// This is only used between levels,
|
||||
// mo->health is used during levels.
|
||||
int health;
|
||||
int armorpoints;
|
||||
// Armor type is 0-2.
|
||||
int armortype;
|
||||
|
||||
// Power ups. invinc and invis are tic counters.
|
||||
int powers[NUMPOWERS];
|
||||
boolean cards[NUMCARDS];
|
||||
boolean backpack;
|
||||
|
||||
// Frags, kills of other players.
|
||||
int frags[MAXPLAYERS];
|
||||
weapontype_t readyweapon;
|
||||
|
||||
// Is wp_nochange if not changing.
|
||||
weapontype_t pendingweapon;
|
||||
|
||||
boolean weaponowned[NUMWEAPONS];
|
||||
int ammo[NUMAMMO];
|
||||
int maxammo[NUMAMMO];
|
||||
|
||||
// True if button down last tic.
|
||||
int attackdown;
|
||||
int usedown;
|
||||
|
||||
// Bit flags, for cheats and debug.
|
||||
// See cheat_t, above.
|
||||
int cheats;
|
||||
|
||||
// Refired shots are less accurate.
|
||||
int refire;
|
||||
|
||||
// For intermission stats.
|
||||
int killcount;
|
||||
int itemcount;
|
||||
int secretcount;
|
||||
|
||||
// Hint messages.
|
||||
char* message;
|
||||
|
||||
// For screen flashing (red or bright).
|
||||
int damagecount;
|
||||
int bonuscount;
|
||||
|
||||
// Who did damage (NULL for floors/ceilings).
|
||||
mobj_t* attacker;
|
||||
|
||||
// So gun flashes light up areas.
|
||||
int extralight;
|
||||
|
||||
// Current PLAYPAL, ???
|
||||
// can be set to REDCOLORMAP for pain, etc.
|
||||
int fixedcolormap;
|
||||
|
||||
// Player skin colorshift,
|
||||
// 0-3 for which color to draw player.
|
||||
int colormap;
|
||||
|
||||
// Overlay view sprites (gun, etc).
|
||||
pspdef_t psprites[NUMPSPRITES];
|
||||
|
||||
// True if secret level has been done.
|
||||
boolean didsecret;
|
||||
|
||||
} player_t;
|
||||
|
||||
|
||||
//
|
||||
// INTERMISSION
|
||||
// Structure passed e.g. to WI_Start(wb)
|
||||
//
|
||||
typedef struct
|
||||
{
|
||||
boolean in; // whether the player is in game
|
||||
|
||||
// Player stats, kills, collected items etc.
|
||||
int skills;
|
||||
int sitems;
|
||||
int ssecret;
|
||||
int stime;
|
||||
int frags[4];
|
||||
int score; // current score on entry, modified on return
|
||||
|
||||
} wbplayerstruct_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int epsd; // episode # (0-2)
|
||||
|
||||
// if true, splash the secret level
|
||||
boolean didsecret;
|
||||
|
||||
// previous and next levels, origin 0
|
||||
int last;
|
||||
int next;
|
||||
|
||||
int maxkills;
|
||||
int maxitems;
|
||||
int maxsecret;
|
||||
int maxfrags;
|
||||
|
||||
// the par time
|
||||
int partime;
|
||||
|
||||
// index of this player in game
|
||||
int pnum;
|
||||
|
||||
wbplayerstruct_t plyr[MAXPLAYERS];
|
||||
|
||||
} wbstartstruct_t;
|
||||
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
51
demos/3rdparty/doom/d_textur.h
vendored
51
demos/3rdparty/doom/d_textur.h
vendored
|
@ -1,51 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Typedefs related to to textures etc.,
|
||||
// isolated here to make it easier separating modules.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __D_TEXTUR__
|
||||
#define __D_TEXTUR__
|
||||
|
||||
#include "doomtype.h"
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Flats?
|
||||
//
|
||||
// a pic is an unmasked block of pixels
|
||||
typedef struct
|
||||
{
|
||||
byte width;
|
||||
byte height;
|
||||
byte data;
|
||||
} pic_t;
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
79
demos/3rdparty/doom/d_think.h
vendored
79
demos/3rdparty/doom/d_think.h
vendored
|
@ -1,79 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// MapObj data. Map Objects or mobjs are actors, entities,
|
||||
// thinker, take-your-pick... anything that moves, acts, or
|
||||
// suffers state changes of more or less violent nature.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __D_THINK__
|
||||
#define __D_THINK__
|
||||
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Experimental stuff.
|
||||
// To compile this as "ANSI C with classes"
|
||||
// we will need to handle the various
|
||||
// action functions cleanly.
|
||||
//
|
||||
typedef void (*actionf_v)();
|
||||
typedef void (*actionf_p1)( void* );
|
||||
typedef void (*actionf_p2)( void*, void* );
|
||||
|
||||
typedef union
|
||||
{
|
||||
actionf_p1 acp1;
|
||||
actionf_v acv;
|
||||
actionf_p2 acp2;
|
||||
|
||||
} actionf_t;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Historically, "think_t" is yet another
|
||||
// function pointer to a routine to handle
|
||||
// an actor.
|
||||
typedef actionf_t think_t;
|
||||
|
||||
|
||||
// Doubly linked list of actors.
|
||||
typedef struct thinker_s
|
||||
{
|
||||
struct thinker_s* prev;
|
||||
struct thinker_s* next;
|
||||
think_t function;
|
||||
|
||||
} thinker_t;
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
53
demos/3rdparty/doom/d_ticcmd.h
vendored
53
demos/3rdparty/doom/d_ticcmd.h
vendored
|
@ -1,53 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// System specific interface stuff.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __D_TICCMD__
|
||||
#define __D_TICCMD__
|
||||
|
||||
#include "doomtype.h"
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
// The data sampled per tick (single player)
|
||||
// and transmitted to other peers (multiplayer).
|
||||
// Mainly movements/button commands per game tick,
|
||||
// plus a checksum for internal state consistency.
|
||||
typedef struct
|
||||
{
|
||||
char forwardmove; // *2048 for move
|
||||
char sidemove; // *2048 for move
|
||||
short angleturn; // <<16 for angle delta
|
||||
short consistancy; // checks for net game
|
||||
byte chatchar;
|
||||
byte buttons;
|
||||
} ticcmd_t;
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
65
demos/3rdparty/doom/demo.mk
vendored
65
demos/3rdparty/doom/demo.mk
vendored
|
@ -1,65 +0,0 @@
|
|||
DEMODIR = $(GFXLIB)/demos/3rdparty/doom
|
||||
GFXINC += $(DEMODIR)
|
||||
GFXSRC += \
|
||||
$(DEMODIR)/d_main.c \
|
||||
$(DEMODIR)/i_main.c \
|
||||
$(DEMODIR)/i_system.c \
|
||||
$(DEMODIR)/i_sound.c \
|
||||
$(DEMODIR)/i_video.c \
|
||||
$(DEMODIR)/i_net.c \
|
||||
$(DEMODIR)/doomdef.c \
|
||||
$(DEMODIR)/doomstat.c \
|
||||
$(DEMODIR)/dstrings.c \
|
||||
$(DEMODIR)/tables.c \
|
||||
$(DEMODIR)/f_finale.c \
|
||||
$(DEMODIR)/f_wipe.c \
|
||||
$(DEMODIR)/d_net.c \
|
||||
$(DEMODIR)/d_items.c \
|
||||
$(DEMODIR)/g_game.c \
|
||||
$(DEMODIR)/m_menu.c \
|
||||
$(DEMODIR)/m_misc.c \
|
||||
$(DEMODIR)/m_argv.c \
|
||||
$(DEMODIR)/m_bbox.c \
|
||||
$(DEMODIR)/m_fixed.c \
|
||||
$(DEMODIR)/m_swap.c \
|
||||
$(DEMODIR)/m_cheat.c \
|
||||
$(DEMODIR)/m_random.c \
|
||||
$(DEMODIR)/am_map.c \
|
||||
$(DEMODIR)/p_ceilng.c \
|
||||
$(DEMODIR)/p_doors.c \
|
||||
$(DEMODIR)/p_enemy.c \
|
||||
$(DEMODIR)/p_floor.c \
|
||||
$(DEMODIR)/p_inter.c \
|
||||
$(DEMODIR)/p_lights.c \
|
||||
$(DEMODIR)/p_map.c \
|
||||
$(DEMODIR)/p_maputl.c \
|
||||
$(DEMODIR)/p_plats.c \
|
||||
$(DEMODIR)/p_pspr.c \
|
||||
$(DEMODIR)/p_setup.c \
|
||||
$(DEMODIR)/p_sight.c \
|
||||
$(DEMODIR)/p_spec.c \
|
||||
$(DEMODIR)/p_switch.c \
|
||||
$(DEMODIR)/p_mobj.c \
|
||||
$(DEMODIR)/p_telept.c \
|
||||
$(DEMODIR)/p_tick.c \
|
||||
$(DEMODIR)/p_saveg.c \
|
||||
$(DEMODIR)/p_user.c \
|
||||
$(DEMODIR)/r_bsp.c \
|
||||
$(DEMODIR)/r_data.c \
|
||||
$(DEMODIR)/r_draw.c \
|
||||
$(DEMODIR)/r_main.c \
|
||||
$(DEMODIR)/r_plane.c \
|
||||
$(DEMODIR)/r_segs.c \
|
||||
$(DEMODIR)/r_sky.c \
|
||||
$(DEMODIR)/r_things.c \
|
||||
$(DEMODIR)/w_wad.c \
|
||||
$(DEMODIR)/wi_stuff.c \
|
||||
$(DEMODIR)/v_video.c \
|
||||
$(DEMODIR)/st_lib.c \
|
||||
$(DEMODIR)/st_stuff.c \
|
||||
$(DEMODIR)/hu_stuff.c \
|
||||
$(DEMODIR)/hu_lib.c \
|
||||
$(DEMODIR)/s_sound.c \
|
||||
$(DEMODIR)/z_zone.c \
|
||||
$(DEMODIR)/info.c \
|
||||
$(DEMODIR)/sounds.c
|
262260
demos/3rdparty/doom/doom1_wad.h
vendored
262260
demos/3rdparty/doom/doom1_wad.h
vendored
File diff suppressed because it is too large
Load diff
222
demos/3rdparty/doom/doomdata.h
vendored
222
demos/3rdparty/doom/doomdata.h
vendored
|
@ -1,222 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// all external data is defined here
|
||||
// most of the data is loaded into different structures at run time
|
||||
// some internal structures shared by many modules are here
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef __DOOMDATA__
|
||||
#define __DOOMDATA__
|
||||
|
||||
// The most basic types we use, portability.
|
||||
#include "doomtype.h"
|
||||
|
||||
// Some global defines, that configure the game.
|
||||
#include "doomdef.h"
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Map level types.
|
||||
// The following data structures define the persistent format
|
||||
// used in the lumps of the WAD files.
|
||||
//
|
||||
|
||||
// Lump order in a map WAD: each map needs a couple of lumps
|
||||
// to provide a complete scene geometry description.
|
||||
enum
|
||||
{
|
||||
ML_LABEL, // A separator, name, ExMx or MAPxx
|
||||
ML_THINGS, // Monsters, items..
|
||||
ML_LINEDEFS, // LineDefs, from editing
|
||||
ML_SIDEDEFS, // SideDefs, from editing
|
||||
ML_VERTEXES, // Vertices, edited and BSP splits generated
|
||||
ML_SEGS, // LineSegs, from LineDefs split by BSP
|
||||
ML_SSECTORS, // SubSectors, list of LineSegs
|
||||
ML_NODES, // BSP nodes
|
||||
ML_SECTORS, // Sectors, from editing
|
||||
ML_REJECT, // LUT, sector-sector visibility
|
||||
ML_BLOCKMAP // LUT, motion clipping, walls/grid element
|
||||
};
|
||||
|
||||
|
||||
// A single Vertex.
|
||||
typedef struct
|
||||
{
|
||||
short x;
|
||||
short y;
|
||||
} mapvertex_t;
|
||||
|
||||
|
||||
// A SideDef, defining the visual appearance of a wall,
|
||||
// by setting textures and offsets.
|
||||
typedef struct
|
||||
{
|
||||
short textureoffset;
|
||||
short rowoffset;
|
||||
char toptexture[8];
|
||||
char bottomtexture[8];
|
||||
char midtexture[8];
|
||||
// Front sector, towards viewer.
|
||||
short sector;
|
||||
} mapsidedef_t;
|
||||
|
||||
|
||||
|
||||
// A LineDef, as used for editing, and as input
|
||||
// to the BSP builder.
|
||||
typedef struct
|
||||
{
|
||||
short v1;
|
||||
short v2;
|
||||
short flags;
|
||||
short special;
|
||||
short tag;
|
||||
// sidenum[1] will be -1 if one sided
|
||||
short sidenum[2];
|
||||
} maplinedef_t;
|
||||
|
||||
|
||||
//
|
||||
// LineDef attributes.
|
||||
//
|
||||
|
||||
// Solid, is an obstacle.
|
||||
#define ML_BLOCKING 1
|
||||
|
||||
// Blocks monsters only.
|
||||
#define ML_BLOCKMONSTERS 2
|
||||
|
||||
// Backside will not be present at all
|
||||
// if not two sided.
|
||||
#define ML_TWOSIDED 4
|
||||
|
||||
// If a texture is pegged, the texture will have
|
||||
// the end exposed to air held constant at the
|
||||
// top or bottom of the texture (stairs or pulled
|
||||
// down things) and will move with a height change
|
||||
// of one of the neighbor sectors.
|
||||
// Unpegged textures allways have the first row of
|
||||
// the texture at the top pixel of the line for both
|
||||
// top and bottom textures (use next to windows).
|
||||
|
||||
// upper texture unpegged
|
||||
#define ML_DONTPEGTOP 8
|
||||
|
||||
// lower texture unpegged
|
||||
#define ML_DONTPEGBOTTOM 16
|
||||
|
||||
// In AutoMap: don't map as two sided: IT'S A SECRET!
|
||||
#define ML_SECRET 32
|
||||
|
||||
// Sound rendering: don't let sound cross two of these.
|
||||
#define ML_SOUNDBLOCK 64
|
||||
|
||||
// Don't draw on the automap at all.
|
||||
#define ML_DONTDRAW 128
|
||||
|
||||
// Set if already seen, thus drawn in automap.
|
||||
#define ML_MAPPED 256
|
||||
|
||||
|
||||
|
||||
|
||||
// Sector definition, from editing.
|
||||
typedef struct
|
||||
{
|
||||
short floorheight;
|
||||
short ceilingheight;
|
||||
char floorpic[8];
|
||||
char ceilingpic[8];
|
||||
short lightlevel;
|
||||
short special;
|
||||
short tag;
|
||||
} mapsector_t;
|
||||
|
||||
// SubSector, as generated by BSP.
|
||||
typedef struct
|
||||
{
|
||||
short numsegs;
|
||||
// Index of first one, segs are stored sequentially.
|
||||
short firstseg;
|
||||
} mapsubsector_t;
|
||||
|
||||
|
||||
// LineSeg, generated by splitting LineDefs
|
||||
// using partition lines selected by BSP builder.
|
||||
typedef struct
|
||||
{
|
||||
short v1;
|
||||
short v2;
|
||||
short angle;
|
||||
short linedef;
|
||||
short side;
|
||||
short offset;
|
||||
} mapseg_t;
|
||||
|
||||
|
||||
|
||||
// BSP node structure.
|
||||
|
||||
// Indicate a leaf.
|
||||
#define NF_SUBSECTOR 0x8000
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// Partition line from (x,y) to x+dx,y+dy)
|
||||
short x;
|
||||
short y;
|
||||
short dx;
|
||||
short dy;
|
||||
|
||||
// Bounding box for each child,
|
||||
// clip against view frustum.
|
||||
short bbox[2][4];
|
||||
|
||||
// If NF_SUBSECTOR its a subsector,
|
||||
// else it's a node of another subtree.
|
||||
unsigned short children[2];
|
||||
|
||||
} mapnode_t;
|
||||
|
||||
|
||||
|
||||
|
||||
// Thing definition, position, orientation and type,
|
||||
// plus skill/visibility flags and attributes.
|
||||
typedef struct
|
||||
{
|
||||
short x;
|
||||
short y;
|
||||
short angle;
|
||||
short type;
|
||||
short options;
|
||||
} mapthing_t;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __DOOMDATA__
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
38
demos/3rdparty/doom/doomdef.c
vendored
38
demos/3rdparty/doom/doomdef.c
vendored
|
@ -1,38 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// DoomDef - basic defines for DOOM, e.g. Version, game mode
|
||||
// and skill level, and display parameters.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static const char
|
||||
rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
|
||||
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "doomdef.h"
|
||||
#endif
|
||||
#include "doomdef.h"
|
||||
|
||||
// Location for any defines turned variables.
|
||||
|
||||
// None.
|
||||
|
||||
|
338
demos/3rdparty/doom/doomdef.h
vendored
338
demos/3rdparty/doom/doomdef.h
vendored
|
@ -1,338 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Internally used data structures for virtually everything,
|
||||
// key definitions, lots of other stuff.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef __DOOMDEF__
|
||||
#define __DOOMDEF__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
//
|
||||
// Global parameters/defines.
|
||||
//
|
||||
// DOOM version
|
||||
enum { VERSION = 110 };
|
||||
|
||||
|
||||
// Game mode handling - identify IWAD version
|
||||
// to handle IWAD dependend animations etc.
|
||||
typedef enum
|
||||
{
|
||||
shareware, // DOOM 1 shareware, E1, M9
|
||||
registered, // DOOM 1 registered, E3, M27
|
||||
commercial, // DOOM 2 retail, E1 M34
|
||||
// DOOM 2 german edition not handled
|
||||
retail, // DOOM 1 retail, E4, M36
|
||||
indetermined // Well, no IWAD found.
|
||||
|
||||
} GameMode_t;
|
||||
|
||||
|
||||
// Mission packs - might be useful for TC stuff?
|
||||
typedef enum
|
||||
{
|
||||
doom, // DOOM 1
|
||||
doom2, // DOOM 2
|
||||
pack_tnt, // TNT mission pack
|
||||
pack_plut, // Plutonia pack
|
||||
none
|
||||
|
||||
} GameMission_t;
|
||||
|
||||
|
||||
// Identify language to use, software localization.
|
||||
typedef enum
|
||||
{
|
||||
english,
|
||||
french,
|
||||
german,
|
||||
unknown
|
||||
|
||||
} Language_t;
|
||||
|
||||
|
||||
// If rangecheck is undefined,
|
||||
// most parameter validation debugging code will not be compiled
|
||||
#define RANGECHECK
|
||||
|
||||
// Do or do not use external soundserver.
|
||||
// The sndserver binary to be run separately
|
||||
// has been introduced by Dave Taylor.
|
||||
// The integrated sound support is experimental,
|
||||
// and unfinished. Default is synchronous.
|
||||
// Experimental asynchronous timer based is
|
||||
// handled by SNDINTR.
|
||||
#define SNDSERV 1
|
||||
//#define SNDINTR 1
|
||||
|
||||
|
||||
// This one switches between MIT SHM (no proper mouse)
|
||||
// and XFree86 DGA (mickey sampling). The original
|
||||
// linuxdoom used SHM, which is default.
|
||||
//#define X11_DGA 1
|
||||
|
||||
|
||||
//
|
||||
// For resize of screen, at start of game.
|
||||
// It will not work dynamically, see visplanes.
|
||||
//
|
||||
#define BASE_WIDTH 320
|
||||
|
||||
// It is educational but futile to change this
|
||||
// scaling e.g. to 2. Drawing of status bar,
|
||||
// menues etc. is tied to the scale implied
|
||||
// by the graphics.
|
||||
#define SCREEN_MUL 1
|
||||
#define INV_ASPECT_RATIO 0.625 // 0.75, ideally
|
||||
|
||||
// Defines suck. C sucks.
|
||||
// C++ might sucks for OOP, but it sure is a better C.
|
||||
// So there.
|
||||
#define SCREENWIDTH 320
|
||||
//SCREEN_MUL*BASE_WIDTH //320
|
||||
#define SCREENHEIGHT 200
|
||||
//(int)(SCREEN_MUL*BASE_WIDTH*INV_ASPECT_RATIO) //200
|
||||
|
||||
|
||||
|
||||
|
||||
// The maximum number of players, multiplayer/networking.
|
||||
#define MAXPLAYERS 4
|
||||
|
||||
// State updates, number of tics / second.
|
||||
#define TICRATE 35
|
||||
|
||||
// The current state of the game: whether we are
|
||||
// playing, gazing at the intermission screen,
|
||||
// the game final animation, or a demo.
|
||||
typedef enum
|
||||
{
|
||||
GS_LEVEL,
|
||||
GS_INTERMISSION,
|
||||
GS_FINALE,
|
||||
GS_DEMOSCREEN
|
||||
} gamestate_t;
|
||||
|
||||
//
|
||||
// Difficulty/skill settings/filters.
|
||||
//
|
||||
|
||||
// Skill flags.
|
||||
#define MTF_EASY 1
|
||||
#define MTF_NORMAL 2
|
||||
#define MTF_HARD 4
|
||||
|
||||
// Deaf monsters/do not react to sound.
|
||||
#define MTF_AMBUSH 8
|
||||
|
||||
typedef enum
|
||||
{
|
||||
sk_baby,
|
||||
sk_easy,
|
||||
sk_medium,
|
||||
sk_hard,
|
||||
sk_nightmare
|
||||
} skill_t;
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Key cards.
|
||||
//
|
||||
typedef enum
|
||||
{
|
||||
it_bluecard,
|
||||
it_yellowcard,
|
||||
it_redcard,
|
||||
it_blueskull,
|
||||
it_yellowskull,
|
||||
it_redskull,
|
||||
|
||||
NUMCARDS
|
||||
|
||||
} card_t;
|
||||
|
||||
|
||||
|
||||
// The defined weapons,
|
||||
// including a marker indicating
|
||||
// user has not changed weapon.
|
||||
typedef enum
|
||||
{
|
||||
wp_fist,
|
||||
wp_pistol,
|
||||
wp_shotgun,
|
||||
wp_chaingun,
|
||||
wp_missile,
|
||||
wp_plasma,
|
||||
wp_bfg,
|
||||
wp_chainsaw,
|
||||
wp_supershotgun,
|
||||
|
||||
NUMWEAPONS,
|
||||
|
||||
// No pending weapon change.
|
||||
wp_nochange
|
||||
|
||||
} weapontype_t;
|
||||
|
||||
|
||||
// Ammunition types defined.
|
||||
typedef enum
|
||||
{
|
||||
am_clip, // Pistol / chaingun ammo.
|
||||
am_shell, // Shotgun / double barreled shotgun.
|
||||
am_cell, // Plasma rifle, BFG.
|
||||
am_misl, // Missile launcher.
|
||||
NUMAMMO,
|
||||
am_noammo // Unlimited for chainsaw / fist.
|
||||
|
||||
} ammotype_t;
|
||||
|
||||
|
||||
// Power up artifacts.
|
||||
typedef enum
|
||||
{
|
||||
pw_invulnerability,
|
||||
pw_strength,
|
||||
pw_invisibility,
|
||||
pw_ironfeet,
|
||||
pw_allmap,
|
||||
pw_infrared,
|
||||
NUMPOWERS
|
||||
|
||||
} powertype_t;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Power up durations,
|
||||
// how many seconds till expiration,
|
||||
// assuming TICRATE is 35 ticks/second.
|
||||
//
|
||||
typedef enum
|
||||
{
|
||||
INVULNTICS = (30*TICRATE),
|
||||
INVISTICS = (60*TICRATE),
|
||||
INFRATICS = (120*TICRATE),
|
||||
IRONTICS = (60*TICRATE)
|
||||
|
||||
} powerduration_t;
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// DOOM keyboard definition.
|
||||
// This is the stuff configured by Setup.Exe.
|
||||
// Most key data are simple ascii (uppercased).
|
||||
//
|
||||
#define KEY_RIGHTARROW 0xae
|
||||
#define KEY_LEFTARROW 0xac
|
||||
#define KEY_UPARROW 0xad
|
||||
#define KEY_DOWNARROW 0xaf
|
||||
#define KEY_ESCAPE 27
|
||||
#define KEY_ENTER 13
|
||||
#define KEY_TAB 9
|
||||
#define KEY_F1 (0x80+0x3b)
|
||||
#define KEY_F2 (0x80+0x3c)
|
||||
#define KEY_F3 (0x80+0x3d)
|
||||
#define KEY_F4 (0x80+0x3e)
|
||||
#define KEY_F5 (0x80+0x3f)
|
||||
#define KEY_F6 (0x80+0x40)
|
||||
#define KEY_F7 (0x80+0x41)
|
||||
#define KEY_F8 (0x80+0x42)
|
||||
#define KEY_F9 (0x80+0x43)
|
||||
#define KEY_F10 (0x80+0x44)
|
||||
#define KEY_F11 (0x80+0x57)
|
||||
#define KEY_F12 (0x80+0x58)
|
||||
|
||||
#define KEY_BACKSPACE 127
|
||||
#define KEY_PAUSE 0xff
|
||||
|
||||
#define KEY_EQUALS 0x3d
|
||||
#define KEY_MINUS 0x2d
|
||||
|
||||
#define KEY_RSHIFT (0x80+0x36)
|
||||
#define KEY_RCTRL (0x80+0x1d)
|
||||
#define KEY_RALT (0x80+0x38)
|
||||
|
||||
#define KEY_LALT KEY_RALT
|
||||
|
||||
|
||||
|
||||
// DOOM basic types (boolean),
|
||||
// and max/min values.
|
||||
//#include "doomtype.h"
|
||||
|
||||
// Fixed point.
|
||||
//#include "m_fixed.h"
|
||||
|
||||
// Endianess handling.
|
||||
//#include "m_swap.h"
|
||||
|
||||
|
||||
// Binary Angles, sine/cosine/atan lookups.
|
||||
//#include "tables.h"
|
||||
|
||||
// Event type.
|
||||
//#include "d_event.h"
|
||||
|
||||
// Game function, skills.
|
||||
//#include "g_game.h"
|
||||
|
||||
// All external data is defined here.
|
||||
//#include "doomdata.h"
|
||||
|
||||
// All important printed strings.
|
||||
// Language selection (message strings).
|
||||
//#include "dstrings.h"
|
||||
|
||||
// Player is a special actor.
|
||||
//struct player_s;
|
||||
|
||||
|
||||
//#include "d_items.h"
|
||||
//#include "d_player.h"
|
||||
//#include "p_mobj.h"
|
||||
//#include "d_net.h"
|
||||
|
||||
// PLAY
|
||||
//#include "p_tick.h"
|
||||
|
||||
|
||||
|
||||
|
||||
// Header, generated by sound utility.
|
||||
// The utility was written by Dave Taylor.
|
||||
//#include "sounds.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __DOOMDEF__
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
46
demos/3rdparty/doom/doomstat.c
vendored
46
demos/3rdparty/doom/doomstat.c
vendored
|
@ -1,46 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Put all global tate variables here.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static const char
|
||||
rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
|
||||
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "doomstat.h"
|
||||
#endif
|
||||
#include "doomstat.h"
|
||||
|
||||
|
||||
// Game Mode - identify IWAD as shareware, retail etc.
|
||||
GameMode_t gamemode = indetermined;
|
||||
GameMission_t gamemission = doom;
|
||||
|
||||
// Language.
|
||||
Language_t language = english;
|
||||
|
||||
// Set if homebrew PWAD stuff has been added.
|
||||
boolean modifiedgame;
|
||||
|
||||
|
||||
|
||||
|
295
demos/3rdparty/doom/doomstat.h
vendored
295
demos/3rdparty/doom/doomstat.h
vendored
|
@ -1,295 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// All the global variables that store the internal state.
|
||||
// Theoretically speaking, the internal state of the engine
|
||||
// should be found by looking at the variables collected
|
||||
// here, and every relevant module will have to include
|
||||
// this header file.
|
||||
// In practice, things are a bit messy.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __D_STATE__
|
||||
#define __D_STATE__
|
||||
|
||||
// We need globally shared data structures,
|
||||
// for defining the global state variables.
|
||||
#include "doomdata.h"
|
||||
#include "d_net.h"
|
||||
|
||||
// We need the playr data structure as well.
|
||||
#include "d_player.h"
|
||||
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// ------------------------
|
||||
// Command line parameters.
|
||||
//
|
||||
extern boolean nomonsters; // checkparm of -nomonsters
|
||||
extern boolean respawnparm; // checkparm of -respawn
|
||||
extern boolean fastparm; // checkparm of -fast
|
||||
|
||||
extern boolean devparm; // DEBUG: launched with -devparm
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------
|
||||
// Game Mode - identify IWAD as shareware, retail etc.
|
||||
//
|
||||
extern GameMode_t gamemode;
|
||||
extern GameMission_t gamemission;
|
||||
|
||||
// Set if homebrew PWAD stuff has been added.
|
||||
extern boolean modifiedgame;
|
||||
|
||||
|
||||
// -------------------------------------------
|
||||
// Language.
|
||||
extern Language_t language;
|
||||
|
||||
|
||||
// -------------------------------------------
|
||||
// Selected skill type, map etc.
|
||||
//
|
||||
|
||||
// Defaults for menu, methinks.
|
||||
extern skill_t startskill;
|
||||
extern int startepisode;
|
||||
extern int startmap;
|
||||
|
||||
extern boolean autostart;
|
||||
|
||||
// Selected by user.
|
||||
extern skill_t gameskill;
|
||||
extern int gameepisode;
|
||||
extern int gamemap;
|
||||
|
||||
// Nightmare mode flag, single player.
|
||||
extern boolean respawnmonsters;
|
||||
|
||||
// Netgame? Only true if >1 player.
|
||||
extern boolean netgame;
|
||||
|
||||
// Flag: true only if started as net deathmatch.
|
||||
// An enum might handle altdeath/cooperative better.
|
||||
extern boolean deathmatch;
|
||||
|
||||
// -------------------------
|
||||
// Internal parameters for sound rendering.
|
||||
// These have been taken from the DOS version,
|
||||
// but are not (yet) supported with Linux
|
||||
// (e.g. no sound volume adjustment with menu.
|
||||
|
||||
// These are not used, but should be (menu).
|
||||
// From m_menu.c:
|
||||
// Sound FX volume has default, 0 - 15
|
||||
// Music volume has default, 0 - 15
|
||||
// These are multiplied by 8.
|
||||
extern int snd_SfxVolume; // maximum volume for sound
|
||||
extern int snd_MusicVolume; // maximum volume for music
|
||||
|
||||
// Current music/sfx card - index useless
|
||||
// w/o a reference LUT in a sound module.
|
||||
// Ideally, this would use indices found
|
||||
// in: /usr/include/linux/soundcard.h
|
||||
extern int snd_MusicDevice;
|
||||
extern int snd_SfxDevice;
|
||||
// Config file? Same disclaimer as above.
|
||||
extern int snd_DesiredMusicDevice;
|
||||
extern int snd_DesiredSfxDevice;
|
||||
|
||||
|
||||
// -------------------------
|
||||
// Status flags for refresh.
|
||||
//
|
||||
|
||||
// Depending on view size - no status bar?
|
||||
// Note that there is no way to disable the
|
||||
// status bar explicitely.
|
||||
extern boolean statusbaractive;
|
||||
|
||||
extern boolean automapactive; // In AutoMap mode?
|
||||
extern boolean menuactive; // Menu overlayed?
|
||||
extern boolean paused; // Game Pause?
|
||||
|
||||
|
||||
extern boolean viewactive;
|
||||
|
||||
extern boolean nodrawers;
|
||||
extern boolean noblit;
|
||||
|
||||
extern int viewwindowx;
|
||||
extern int viewwindowy;
|
||||
extern int viewheight;
|
||||
extern int viewwidth;
|
||||
extern int scaledviewwidth;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// This one is related to the 3-screen display mode.
|
||||
// ANG90 = left side, ANG270 = right
|
||||
extern int viewangleoffset;
|
||||
|
||||
// Player taking events, and displaying.
|
||||
extern int consoleplayer;
|
||||
extern int displayplayer;
|
||||
|
||||
|
||||
// -------------------------------------
|
||||
// Scores, rating.
|
||||
// Statistics on a given map, for intermission.
|
||||
//
|
||||
extern int totalkills;
|
||||
extern int totalitems;
|
||||
extern int totalsecret;
|
||||
|
||||
// Timer, for scores.
|
||||
extern int levelstarttic; // gametic at level start
|
||||
extern int leveltime; // tics in game play for par
|
||||
|
||||
|
||||
|
||||
// --------------------------------------
|
||||
// DEMO playback/recording related stuff.
|
||||
// No demo, there is a human player in charge?
|
||||
// Disable save/end game?
|
||||
extern boolean usergame;
|
||||
|
||||
//?
|
||||
extern boolean demoplayback;
|
||||
extern boolean demorecording;
|
||||
|
||||
// Quit after playing a demo from cmdline.
|
||||
extern boolean singledemo;
|
||||
|
||||
|
||||
|
||||
|
||||
//?
|
||||
extern gamestate_t gamestate;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------
|
||||
// Internal parameters, fixed.
|
||||
// These are set by the engine, and not changed
|
||||
// according to user inputs. Partly load from
|
||||
// WAD, partly set at startup time.
|
||||
|
||||
|
||||
|
||||
extern int gametic;
|
||||
|
||||
|
||||
// Bookkeeping on players - state.
|
||||
extern player_t players[MAXPLAYERS];
|
||||
|
||||
// Alive? Disconnected?
|
||||
extern boolean playeringame[MAXPLAYERS];
|
||||
|
||||
|
||||
// Player spawn spots for deathmatch.
|
||||
#define MAX_DM_STARTS 10
|
||||
extern mapthing_t deathmatchstarts[MAX_DM_STARTS];
|
||||
extern mapthing_t* deathmatch_p;
|
||||
|
||||
// Player spawn spots.
|
||||
extern mapthing_t playerstarts[MAXPLAYERS];
|
||||
|
||||
// Intermission stats.
|
||||
// Parameters for world map / intermission.
|
||||
extern wbstartstruct_t wminfo;
|
||||
|
||||
|
||||
// LUT of ammunition limits for each kind.
|
||||
// This doubles with BackPack powerup item.
|
||||
extern int maxammo[NUMAMMO];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Internal parameters, used for engine.
|
||||
//
|
||||
|
||||
// File handling stuff.
|
||||
extern char basedefault[1024];
|
||||
|
||||
// if true, load all graphics at level load
|
||||
extern boolean precache;
|
||||
|
||||
|
||||
// wipegamestate can be set to -1
|
||||
// to force a wipe on the next draw
|
||||
extern gamestate_t wipegamestate;
|
||||
|
||||
extern int mouseSensitivity;
|
||||
//?
|
||||
// debug flag to cancel adaptiveness
|
||||
extern boolean singletics;
|
||||
|
||||
extern int bodyqueslot;
|
||||
|
||||
|
||||
|
||||
// Needed to store the number of the dummy sky flat.
|
||||
// Used for rendering,
|
||||
// as well as tracking projectiles etc.
|
||||
extern int skyflatnum;
|
||||
|
||||
|
||||
|
||||
// Netgame stuff (buffers and pointers, i.e. indices).
|
||||
|
||||
// This is ???
|
||||
extern doomcom_t* doomcom;
|
||||
|
||||
// This points inside doomcom.
|
||||
extern doomdata_t* netbuffer;
|
||||
|
||||
|
||||
extern ticcmd_t localcmds[BACKUPTICS];
|
||||
extern int rndindex;
|
||||
|
||||
extern int maketic;
|
||||
extern int nettics[MAXNETNODES];
|
||||
|
||||
extern ticcmd_t netcmds[MAXPLAYERS][BACKUPTICS];
|
||||
extern int ticdup;
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
72
demos/3rdparty/doom/doomtype.h
vendored
72
demos/3rdparty/doom/doomtype.h
vendored
|
@ -1,72 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Simple basic typedefs, isolated here to make it easier
|
||||
// separating modules.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __DOOMTYPE__
|
||||
#define __DOOMTYPE__
|
||||
|
||||
|
||||
#ifndef __BYTEBOOL__
|
||||
#define __BYTEBOOL__
|
||||
// Fixed to use builtin bool type with C++.
|
||||
#ifdef __cplusplus
|
||||
typedef bool boolean;
|
||||
#else
|
||||
#ifdef false
|
||||
#undef false
|
||||
#endif
|
||||
#ifdef true
|
||||
#undef true
|
||||
#endif
|
||||
typedef enum {false, true} boolean;
|
||||
#endif
|
||||
typedef unsigned char byte;
|
||||
#endif
|
||||
|
||||
|
||||
// Predefined with some OS.
|
||||
#ifdef LINUX
|
||||
#include <values.h>
|
||||
#else
|
||||
#define MAXCHAR ((char)0x7f)
|
||||
#define MAXSHORT ((short)0x7fff)
|
||||
|
||||
// Max pos 32-bit int.
|
||||
#define MAXINT ((int)0x7fffffff)
|
||||
#define MAXLONG ((long)0x7fffffff)
|
||||
#define MINCHAR ((char)0x80)
|
||||
#define MINSHORT ((short)0x8000)
|
||||
|
||||
// Max negative 32-bit integer.
|
||||
#define MININT ((int)0x80000000)
|
||||
#define MINLONG ((long)0x80000000)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
72
demos/3rdparty/doom/dstrings.c
vendored
72
demos/3rdparty/doom/dstrings.c
vendored
|
@ -1,72 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Globally defined strings.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static const char
|
||||
rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
|
||||
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "dstrings.h"
|
||||
#endif
|
||||
#include "dstrings.h"
|
||||
|
||||
|
||||
|
||||
char* endmsg[NUM_QUITMESSAGES+1]=
|
||||
{
|
||||
// DOOM1
|
||||
QUITMSG,
|
||||
"please don't leave, there's more\ndemons to toast!",
|
||||
"let's beat it -- this is turning\ninto a bloodbath!",
|
||||
"i wouldn't leave if i were you.\ndos is much worse.",
|
||||
"you're trying to say you like dos\nbetter than me, right?",
|
||||
"don't leave yet -- there's a\ndemon around that corner!",
|
||||
"ya know, next time you come in here\ni'm gonna toast ya.",
|
||||
"go ahead and leave. see if i care."
|
||||
|
||||
// QuitDOOM II messages
|
||||
"you want to quit?\nthen, thou hast lost an eighth!",
|
||||
"don't go now, there's a \ndimensional shambler waiting\nat the dos prompt!",
|
||||
"get outta here and go back\nto your boring programs.",
|
||||
"if i were your boss, i'd \n deathmatch ya in a minute!",
|
||||
"look, bud. you leave now\nand you forfeit your body count!",
|
||||
"just leave. when you come\nback, i'll be waiting with a bat.",
|
||||
"you're lucky i don't smack\nyou for thinking about leaving."
|
||||
|
||||
// FinalDOOM?
|
||||
"fuck you, pussy!\nget the fuck out!",
|
||||
"you quit and i'll jizz\nin your cystholes!",
|
||||
"if you leave, i'll make\nthe lord drink my jizz.",
|
||||
"hey, ron! can we say\n'fuck' in the game?",
|
||||
"i'd leave: this is just\nmore monsters and levels.\nwhat a load.",
|
||||
"suck it down, asshole!\nyou're a fucking wimp!",
|
||||
"don't quit now! we're \nstill spending your money!",
|
||||
|
||||
// Internal debug. Different style, too.
|
||||
"THIS IS NO MESSAGE!\nPage intentionally left blank."
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
66
demos/3rdparty/doom/dstrings.h
vendored
66
demos/3rdparty/doom/dstrings.h
vendored
|
@ -1,66 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// DOOM strings, by language.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __DSTRINGS__
|
||||
#define __DSTRINGS__
|
||||
|
||||
|
||||
// All important printed strings.
|
||||
// Language selection (message strings).
|
||||
// Use -DFRENCH etc.
|
||||
|
||||
#ifdef FRENCH
|
||||
#include "d_french.h"
|
||||
#else
|
||||
#include "d_englsh.h"
|
||||
#endif
|
||||
|
||||
// Misc. other strings.
|
||||
#define SAVEGAMENAME "doomsav"
|
||||
|
||||
|
||||
//
|
||||
// File locations,
|
||||
// relative to current position.
|
||||
// Path names are OS-sensitive.
|
||||
//
|
||||
#define DEVMAPS "devmaps"
|
||||
#define DEVDATA "devdata"
|
||||
|
||||
|
||||
// Not done in french?
|
||||
|
||||
// QuitDOOM messages
|
||||
#define NUM_QUITMESSAGES 22
|
||||
|
||||
extern char* endmsg[];
|
||||
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
738
demos/3rdparty/doom/f_finale.c
vendored
738
demos/3rdparty/doom/f_finale.c
vendored
|
@ -1,738 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Game completion, final screen animation.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
static const char
|
||||
rcsid[] = "$Id: f_finale.c,v 1.5 1997/02/03 21:26:34 b1 Exp $";
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
// Functions.
|
||||
#include "i_system.h"
|
||||
#include "m_swap.h"
|
||||
#include "z_zone.h"
|
||||
#include "v_video.h"
|
||||
#include "w_wad.h"
|
||||
#include "s_sound.h"
|
||||
|
||||
// Data.
|
||||
#include "dstrings.h"
|
||||
#include "sounds.h"
|
||||
|
||||
#include "doomstat.h"
|
||||
#include "r_state.h"
|
||||
|
||||
// ?
|
||||
//#include "doomstat.h"
|
||||
//#include "r_local.h"
|
||||
//#include "f_finale.h"
|
||||
|
||||
// Stage of animation:
|
||||
// 0 = text, 1 = art screen, 2 = character cast
|
||||
int finalestage;
|
||||
|
||||
int finalecount;
|
||||
|
||||
#define TEXTSPEED 3
|
||||
#define TEXTWAIT 250
|
||||
|
||||
char* e1text = E1TEXT;
|
||||
char* e2text = E2TEXT;
|
||||
char* e3text = E3TEXT;
|
||||
char* e4text = E4TEXT;
|
||||
|
||||
char* c1text = C1TEXT;
|
||||
char* c2text = C2TEXT;
|
||||
char* c3text = C3TEXT;
|
||||
char* c4text = C4TEXT;
|
||||
char* c5text = C5TEXT;
|
||||
char* c6text = C6TEXT;
|
||||
|
||||
char* p1text = P1TEXT;
|
||||
char* p2text = P2TEXT;
|
||||
char* p3text = P3TEXT;
|
||||
char* p4text = P4TEXT;
|
||||
char* p5text = P5TEXT;
|
||||
char* p6text = P6TEXT;
|
||||
|
||||
char* t1text = T1TEXT;
|
||||
char* t2text = T2TEXT;
|
||||
char* t3text = T3TEXT;
|
||||
char* t4text = T4TEXT;
|
||||
char* t5text = T5TEXT;
|
||||
char* t6text = T6TEXT;
|
||||
|
||||
char* finaletext;
|
||||
char* finaleflat;
|
||||
|
||||
void F_StartCast (void);
|
||||
void F_CastTicker (void);
|
||||
boolean F_CastResponder (event_t *ev);
|
||||
void F_CastDrawer (void);
|
||||
|
||||
//
|
||||
// F_StartFinale
|
||||
//
|
||||
void F_StartFinale (void)
|
||||
{
|
||||
gameaction = ga_nothing;
|
||||
gamestate = GS_FINALE;
|
||||
viewactive = false;
|
||||
automapactive = false;
|
||||
|
||||
// Okay - IWAD dependend stuff.
|
||||
// This has been changed severly, and
|
||||
// some stuff might have changed in the process.
|
||||
switch ( gamemode )
|
||||
{
|
||||
|
||||
// DOOM 1 - E1, E3 or E4, but each nine missions
|
||||
case shareware:
|
||||
case registered:
|
||||
case retail:
|
||||
{
|
||||
S_ChangeMusic(mus_victor, true);
|
||||
|
||||
switch (gameepisode)
|
||||
{
|
||||
case 1:
|
||||
finaleflat = "FLOOR4_8";
|
||||
finaletext = e1text;
|
||||
break;
|
||||
case 2:
|
||||
finaleflat = "SFLR6_1";
|
||||
finaletext = e2text;
|
||||
break;
|
||||
case 3:
|
||||
finaleflat = "MFLR8_4";
|
||||
finaletext = e3text;
|
||||
break;
|
||||
case 4:
|
||||
finaleflat = "MFLR8_3";
|
||||
finaletext = e4text;
|
||||
break;
|
||||
default:
|
||||
// Ouch.
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// DOOM II and missions packs with E1, M34
|
||||
case commercial:
|
||||
{
|
||||
S_ChangeMusic(mus_read_m, true);
|
||||
|
||||
switch (gamemap)
|
||||
{
|
||||
case 6:
|
||||
finaleflat = "SLIME16";
|
||||
finaletext = c1text;
|
||||
break;
|
||||
case 11:
|
||||
finaleflat = "RROCK14";
|
||||
finaletext = c2text;
|
||||
break;
|
||||
case 20:
|
||||
finaleflat = "RROCK07";
|
||||
finaletext = c3text;
|
||||
break;
|
||||
case 30:
|
||||
finaleflat = "RROCK17";
|
||||
finaletext = c4text;
|
||||
break;
|
||||
case 15:
|
||||
finaleflat = "RROCK13";
|
||||
finaletext = c5text;
|
||||
break;
|
||||
case 31:
|
||||
finaleflat = "RROCK19";
|
||||
finaletext = c6text;
|
||||
break;
|
||||
default:
|
||||
// Ouch.
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// Indeterminate.
|
||||
default:
|
||||
S_ChangeMusic(mus_read_m, true);
|
||||
finaleflat = "F_SKY1"; // Not used anywhere else.
|
||||
finaletext = c1text; // FIXME - other text, music?
|
||||
break;
|
||||
}
|
||||
|
||||
finalestage = 0;
|
||||
finalecount = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
boolean F_Responder (event_t *event)
|
||||
{
|
||||
if (finalestage == 2)
|
||||
return F_CastResponder (event);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// F_Ticker
|
||||
//
|
||||
void F_Ticker (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
// check for skipping
|
||||
if ( (gamemode == commercial)
|
||||
&& ( finalecount > 50) )
|
||||
{
|
||||
// go on to the next level
|
||||
for (i=0 ; i<MAXPLAYERS ; i++)
|
||||
if (players[i].cmd.buttons)
|
||||
break;
|
||||
|
||||
if (i < MAXPLAYERS)
|
||||
{
|
||||
if (gamemap == 30)
|
||||
F_StartCast ();
|
||||
else
|
||||
gameaction = ga_worlddone;
|
||||
}
|
||||
}
|
||||
|
||||
// advance animation
|
||||
finalecount++;
|
||||
|
||||
if (finalestage == 2)
|
||||
{
|
||||
F_CastTicker ();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( gamemode == commercial)
|
||||
return;
|
||||
|
||||
if (!finalestage && finalecount>strlen (finaletext)*TEXTSPEED + TEXTWAIT)
|
||||
{
|
||||
finalecount = 0;
|
||||
finalestage = 1;
|
||||
wipegamestate = -1; // force a wipe
|
||||
if (gameepisode == 3)
|
||||
S_StartMusic (mus_bunny);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// F_TextWrite
|
||||
//
|
||||
|
||||
#include "hu_stuff.h"
|
||||
extern patch_t *hu_font[HU_FONTSIZE];
|
||||
|
||||
|
||||
void F_TextWrite (void)
|
||||
{
|
||||
byte* src;
|
||||
byte* dest;
|
||||
|
||||
int x,y,w;
|
||||
int count;
|
||||
char* ch;
|
||||
int c;
|
||||
int cx;
|
||||
int cy;
|
||||
|
||||
// erase the entire screen to a tiled background
|
||||
src = W_CacheLumpName ( finaleflat , PU_CACHE);
|
||||
dest = screens[0];
|
||||
|
||||
for (y=0 ; y<SCREENHEIGHT ; y++)
|
||||
{
|
||||
for (x=0 ; x<SCREENWIDTH/64 ; x++)
|
||||
{
|
||||
memcpy (dest, src+((y&63)<<6), 64);
|
||||
dest += 64;
|
||||
}
|
||||
if (SCREENWIDTH&63)
|
||||
{
|
||||
memcpy (dest, src+((y&63)<<6), SCREENWIDTH&63);
|
||||
dest += (SCREENWIDTH&63);
|
||||
}
|
||||
}
|
||||
|
||||
V_MarkRect (0, 0, SCREENWIDTH, SCREENHEIGHT);
|
||||
|
||||
// draw some of the text onto the screen
|
||||
cx = 10;
|
||||
cy = 10;
|
||||
ch = finaletext;
|
||||
|
||||
count = (finalecount - 10)/TEXTSPEED;
|
||||
if (count < 0)
|
||||
count = 0;
|
||||
for ( ; count ; count-- )
|
||||
{
|
||||
c = *ch++;
|
||||
if (!c)
|
||||
break;
|
||||
if (c == '\n')
|
||||
{
|
||||
cx = 10;
|
||||
cy += 11;
|
||||
continue;
|
||||
}
|
||||
|
||||
c = toupper(c) - HU_FONTSTART;
|
||||
if (c < 0 || c> HU_FONTSIZE)
|
||||
{
|
||||
cx += 4;
|
||||
continue;
|
||||
}
|
||||
|
||||
w = SHORT (hu_font[c]->width);
|
||||
if (cx+w > SCREENWIDTH)
|
||||
break;
|
||||
V_DrawPatch(cx, cy, 0, hu_font[c]);
|
||||
cx+=w;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Final DOOM 2 animation
|
||||
// Casting by id Software.
|
||||
// in order of appearance
|
||||
//
|
||||
typedef struct
|
||||
{
|
||||
char *name;
|
||||
mobjtype_t type;
|
||||
} castinfo_t;
|
||||
|
||||
castinfo_t castorder[] = {
|
||||
{CC_ZOMBIE, MT_POSSESSED},
|
||||
{CC_SHOTGUN, MT_SHOTGUY},
|
||||
{CC_HEAVY, MT_CHAINGUY},
|
||||
{CC_IMP, MT_TROOP},
|
||||
{CC_DEMON, MT_SERGEANT},
|
||||
{CC_LOST, MT_SKULL},
|
||||
{CC_CACO, MT_HEAD},
|
||||
{CC_HELL, MT_KNIGHT},
|
||||
{CC_BARON, MT_BRUISER},
|
||||
{CC_ARACH, MT_BABY},
|
||||
{CC_PAIN, MT_PAIN},
|
||||
{CC_REVEN, MT_UNDEAD},
|
||||
{CC_MANCU, MT_FATSO},
|
||||
{CC_ARCH, MT_VILE},
|
||||
{CC_SPIDER, MT_SPIDER},
|
||||
{CC_CYBER, MT_CYBORG},
|
||||
{CC_HERO, MT_PLAYER},
|
||||
|
||||
{NULL,0}
|
||||
};
|
||||
|
||||
int castnum;
|
||||
int casttics;
|
||||
state_t* caststate;
|
||||
boolean castdeath;
|
||||
int castframes;
|
||||
int castonmelee;
|
||||
boolean castattacking;
|
||||
|
||||
|
||||
//
|
||||
// F_StartCast
|
||||
//
|
||||
extern gamestate_t wipegamestate;
|
||||
|
||||
|
||||
void F_StartCast (void)
|
||||
{
|
||||
wipegamestate = -1; // force a screen wipe
|
||||
castnum = 0;
|
||||
caststate = &states[mobjinfo[castorder[castnum].type].seestate];
|
||||
casttics = caststate->tics;
|
||||
castdeath = false;
|
||||
finalestage = 2;
|
||||
castframes = 0;
|
||||
castonmelee = 0;
|
||||
castattacking = false;
|
||||
S_ChangeMusic(mus_evil, true);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// F_CastTicker
|
||||
//
|
||||
void F_CastTicker (void)
|
||||
{
|
||||
int st;
|
||||
int sfx;
|
||||
|
||||
if (--casttics > 0)
|
||||
return; // not time to change state yet
|
||||
|
||||
if (caststate->tics == -1 || caststate->nextstate == S_NULL)
|
||||
{
|
||||
// switch from deathstate to next monster
|
||||
castnum++;
|
||||
castdeath = false;
|
||||
if (castorder[castnum].name == NULL)
|
||||
castnum = 0;
|
||||
if (mobjinfo[castorder[castnum].type].seesound)
|
||||
S_StartSound (NULL, mobjinfo[castorder[castnum].type].seesound);
|
||||
caststate = &states[mobjinfo[castorder[castnum].type].seestate];
|
||||
castframes = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// just advance to next state in animation
|
||||
if (caststate == &states[S_PLAY_ATK1])
|
||||
goto stopattack; // Oh, gross hack!
|
||||
st = caststate->nextstate;
|
||||
caststate = &states[st];
|
||||
castframes++;
|
||||
|
||||
// sound hacks....
|
||||
switch (st)
|
||||
{
|
||||
case S_PLAY_ATK1: sfx = sfx_dshtgn; break;
|
||||
case S_POSS_ATK2: sfx = sfx_pistol; break;
|
||||
case S_SPOS_ATK2: sfx = sfx_shotgn; break;
|
||||
case S_VILE_ATK2: sfx = sfx_vilatk; break;
|
||||
case S_SKEL_FIST2: sfx = sfx_skeswg; break;
|
||||
case S_SKEL_FIST4: sfx = sfx_skepch; break;
|
||||
case S_SKEL_MISS2: sfx = sfx_skeatk; break;
|
||||
case S_FATT_ATK8:
|
||||
case S_FATT_ATK5:
|
||||
case S_FATT_ATK2: sfx = sfx_firsht; break;
|
||||
case S_CPOS_ATK2:
|
||||
case S_CPOS_ATK3:
|
||||
case S_CPOS_ATK4: sfx = sfx_shotgn; break;
|
||||
case S_TROO_ATK3: sfx = sfx_claw; break;
|
||||
case S_SARG_ATK2: sfx = sfx_sgtatk; break;
|
||||
case S_BOSS_ATK2:
|
||||
case S_BOS2_ATK2:
|
||||
case S_HEAD_ATK2: sfx = sfx_firsht; break;
|
||||
case S_SKULL_ATK2: sfx = sfx_sklatk; break;
|
||||
case S_SPID_ATK2:
|
||||
case S_SPID_ATK3: sfx = sfx_shotgn; break;
|
||||
case S_BSPI_ATK2: sfx = sfx_plasma; break;
|
||||
case S_CYBER_ATK2:
|
||||
case S_CYBER_ATK4:
|
||||
case S_CYBER_ATK6: sfx = sfx_rlaunc; break;
|
||||
case S_PAIN_ATK3: sfx = sfx_sklatk; break;
|
||||
default: sfx = 0; break;
|
||||
}
|
||||
|
||||
if (sfx)
|
||||
S_StartSound (NULL, sfx);
|
||||
}
|
||||
|
||||
if (castframes == 12)
|
||||
{
|
||||
// go into attack frame
|
||||
castattacking = true;
|
||||
if (castonmelee)
|
||||
caststate=&states[mobjinfo[castorder[castnum].type].meleestate];
|
||||
else
|
||||
caststate=&states[mobjinfo[castorder[castnum].type].missilestate];
|
||||
castonmelee ^= 1;
|
||||
if (caststate == &states[S_NULL])
|
||||
{
|
||||
if (castonmelee)
|
||||
caststate=
|
||||
&states[mobjinfo[castorder[castnum].type].meleestate];
|
||||
else
|
||||
caststate=
|
||||
&states[mobjinfo[castorder[castnum].type].missilestate];
|
||||
}
|
||||
}
|
||||
|
||||
if (castattacking)
|
||||
{
|
||||
if (castframes == 24
|
||||
|| caststate == &states[mobjinfo[castorder[castnum].type].seestate] )
|
||||
{
|
||||
stopattack:
|
||||
castattacking = false;
|
||||
castframes = 0;
|
||||
caststate = &states[mobjinfo[castorder[castnum].type].seestate];
|
||||
}
|
||||
}
|
||||
|
||||
casttics = caststate->tics;
|
||||
if (casttics == -1)
|
||||
casttics = 15;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// F_CastResponder
|
||||
//
|
||||
|
||||
boolean F_CastResponder (event_t* ev)
|
||||
{
|
||||
if (ev->type != ev_keydown)
|
||||
return false;
|
||||
|
||||
if (castdeath)
|
||||
return true; // already in dying frames
|
||||
|
||||
// go into death frame
|
||||
castdeath = true;
|
||||
caststate = &states[mobjinfo[castorder[castnum].type].deathstate];
|
||||
casttics = caststate->tics;
|
||||
castframes = 0;
|
||||
castattacking = false;
|
||||
if (mobjinfo[castorder[castnum].type].deathsound)
|
||||
S_StartSound (NULL, mobjinfo[castorder[castnum].type].deathsound);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void F_CastPrint (char* text)
|
||||
{
|
||||
char* ch;
|
||||
int c;
|
||||
int cx;
|
||||
int w;
|
||||
int width;
|
||||
|
||||
// find width
|
||||
ch = text;
|
||||
width = 0;
|
||||
|
||||
while (ch)
|
||||
{
|
||||
c = *ch++;
|
||||
if (!c)
|
||||
break;
|
||||
c = toupper(c) - HU_FONTSTART;
|
||||
if (c < 0 || c> HU_FONTSIZE)
|
||||
{
|
||||
width += 4;
|
||||
continue;
|
||||
}
|
||||
|
||||
w = SHORT (hu_font[c]->width);
|
||||
width += w;
|
||||
}
|
||||
|
||||
// draw it
|
||||
cx = 160-width/2;
|
||||
ch = text;
|
||||
while (ch)
|
||||
{
|
||||
c = *ch++;
|
||||
if (!c)
|
||||
break;
|
||||
c = toupper(c) - HU_FONTSTART;
|
||||
if (c < 0 || c> HU_FONTSIZE)
|
||||
{
|
||||
cx += 4;
|
||||
continue;
|
||||
}
|
||||
|
||||
w = SHORT (hu_font[c]->width);
|
||||
V_DrawPatch(cx, 180, 0, hu_font[c]);
|
||||
cx+=w;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// F_CastDrawer
|
||||
//
|
||||
void V_DrawPatchFlipped (int x, int y, int scrn, patch_t *patch);
|
||||
|
||||
void F_CastDrawer (void)
|
||||
{
|
||||
spritedef_t* sprdef;
|
||||
spriteframe_t* sprframe;
|
||||
int lump;
|
||||
boolean flip;
|
||||
patch_t* patch;
|
||||
|
||||
// erase the entire screen to a background
|
||||
V_DrawPatch (0,0,0, W_CacheLumpName ("BOSSBACK", PU_CACHE));
|
||||
|
||||
F_CastPrint (castorder[castnum].name);
|
||||
|
||||
// draw the current frame in the middle of the screen
|
||||
sprdef = &sprites[caststate->sprite];
|
||||
sprframe = &sprdef->spriteframes[ caststate->frame & FF_FRAMEMASK];
|
||||
lump = sprframe->lump[0];
|
||||
flip = (boolean)sprframe->flip[0];
|
||||
|
||||
patch = W_CacheLumpNum (lump+firstspritelump, PU_CACHE);
|
||||
if (flip)
|
||||
V_DrawPatchFlipped (160,170,0,patch);
|
||||
else
|
||||
V_DrawPatch (160,170,0,patch);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// F_DrawPatchCol
|
||||
//
|
||||
void
|
||||
F_DrawPatchCol
|
||||
( int x,
|
||||
patch_t* patch,
|
||||
int col )
|
||||
{
|
||||
column_t* column;
|
||||
byte* source;
|
||||
byte* dest;
|
||||
byte* desttop;
|
||||
int count;
|
||||
|
||||
column = (column_t *)((byte *)patch + LONG(patch->columnofs[col]));
|
||||
desttop = screens[0]+x;
|
||||
|
||||
// step through the posts in a column
|
||||
while (column->topdelta != 0xff )
|
||||
{
|
||||
source = (byte *)column + 3;
|
||||
dest = desttop + column->topdelta*SCREENWIDTH;
|
||||
count = column->length;
|
||||
|
||||
while (count--)
|
||||
{
|
||||
*dest = *source++;
|
||||
dest += SCREENWIDTH;
|
||||
}
|
||||
column = (column_t *)( (byte *)column + column->length + 4 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// F_BunnyScroll
|
||||
//
|
||||
void F_BunnyScroll (void)
|
||||
{
|
||||
int scrolled;
|
||||
int x;
|
||||
patch_t* p1;
|
||||
patch_t* p2;
|
||||
char name[10];
|
||||
int stage;
|
||||
static int laststage;
|
||||
|
||||
p1 = W_CacheLumpName ("PFUB2", PU_LEVEL);
|
||||
p2 = W_CacheLumpName ("PFUB1", PU_LEVEL);
|
||||
|
||||
V_MarkRect (0, 0, SCREENWIDTH, SCREENHEIGHT);
|
||||
|
||||
scrolled = 320 - (finalecount-230)/2;
|
||||
if (scrolled > 320)
|
||||
scrolled = 320;
|
||||
if (scrolled < 0)
|
||||
scrolled = 0;
|
||||
|
||||
for ( x=0 ; x<SCREENWIDTH ; x++)
|
||||
{
|
||||
if (x+scrolled < 320)
|
||||
F_DrawPatchCol (x, p1, x+scrolled);
|
||||
else
|
||||
F_DrawPatchCol (x, p2, x+scrolled - 320);
|
||||
}
|
||||
|
||||
if (finalecount < 1130)
|
||||
return;
|
||||
if (finalecount < 1180)
|
||||
{
|
||||
V_DrawPatch ((SCREENWIDTH-13*8)/2,
|
||||
(SCREENHEIGHT-8*8)/2,0, W_CacheLumpName ("END0",PU_CACHE));
|
||||
laststage = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
stage = (finalecount-1180) / 5;
|
||||
if (stage > 6)
|
||||
stage = 6;
|
||||
if (stage > laststage)
|
||||
{
|
||||
S_StartSound (NULL, sfx_pistol);
|
||||
laststage = stage;
|
||||
}
|
||||
|
||||
I_sprintf (name,"END%i",stage);
|
||||
V_DrawPatch ((SCREENWIDTH-13*8)/2, (SCREENHEIGHT-8*8)/2,0, W_CacheLumpName (name,PU_CACHE));
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// F_Drawer
|
||||
//
|
||||
void F_Drawer (void)
|
||||
{
|
||||
if (finalestage == 2)
|
||||
{
|
||||
F_CastDrawer ();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!finalestage)
|
||||
F_TextWrite ();
|
||||
else
|
||||
{
|
||||
switch (gameepisode)
|
||||
{
|
||||
case 1:
|
||||
if ( gamemode == retail )
|
||||
V_DrawPatch (0,0,0,
|
||||
W_CacheLumpName("CREDIT",PU_CACHE));
|
||||
else
|
||||
V_DrawPatch (0,0,0,
|
||||
W_CacheLumpName("HELP2",PU_CACHE));
|
||||
break;
|
||||
case 2:
|
||||
V_DrawPatch(0,0,0,
|
||||
W_CacheLumpName("VICTORY2",PU_CACHE));
|
||||
break;
|
||||
case 3:
|
||||
F_BunnyScroll ();
|
||||
break;
|
||||
case 4:
|
||||
V_DrawPatch (0,0,0,
|
||||
W_CacheLumpName("ENDPIC",PU_CACHE));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
53
demos/3rdparty/doom/f_finale.h
vendored
53
demos/3rdparty/doom/f_finale.h
vendored
|
@ -1,53 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
//
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __F_FINALE__
|
||||
#define __F_FINALE__
|
||||
|
||||
|
||||
#include "doomtype.h"
|
||||
#include "d_event.h"
|
||||
//
|
||||
// FINALE
|
||||
//
|
||||
|
||||
// Called by main loop.
|
||||
boolean F_Responder (event_t* ev);
|
||||
|
||||
// Called by main loop.
|
||||
void F_Ticker (void);
|
||||
|
||||
// Called by main loop.
|
||||
void F_Drawer (void);
|
||||
|
||||
|
||||
void F_StartFinale (void);
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
302
demos/3rdparty/doom/f_wipe.c
vendored
302
demos/3rdparty/doom/f_wipe.c
vendored
|
@ -1,302 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Mission begin melt/wipe screen special effect.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
static const char rcsid[] = "$Id: f_wipe.c,v 1.2 1997/02/03 22:45:09 b1 Exp $";
|
||||
|
||||
|
||||
|
||||
#include "z_zone.h"
|
||||
#include "i_video.h"
|
||||
#include "v_video.h"
|
||||
#include "m_random.h"
|
||||
|
||||
#include "doomdef.h"
|
||||
|
||||
#include "f_wipe.h"
|
||||
|
||||
//
|
||||
// SCREEN WIPE PACKAGE
|
||||
//
|
||||
|
||||
// when zero, stop the wipe
|
||||
static boolean go = 0;
|
||||
|
||||
static byte* wipe_scr_start;
|
||||
static byte* wipe_scr_end;
|
||||
static byte* wipe_scr;
|
||||
|
||||
|
||||
void
|
||||
wipe_shittyColMajorXform
|
||||
( short* array,
|
||||
int width,
|
||||
int height )
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
short* dest;
|
||||
|
||||
dest = (short*) Z_Malloc(width*height*2, PU_STATIC, 0);
|
||||
|
||||
for(y=0;y<height;y++)
|
||||
for(x=0;x<width;x++)
|
||||
dest[x*height+y] = array[y*width+x];
|
||||
|
||||
memcpy(array, dest, width*height*2);
|
||||
|
||||
Z_Free(dest);
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
wipe_initColorXForm
|
||||
( int width,
|
||||
int height,
|
||||
int ticks )
|
||||
{
|
||||
memcpy(wipe_scr, wipe_scr_start, width*height);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
wipe_doColorXForm
|
||||
( int width,
|
||||
int height,
|
||||
int ticks )
|
||||
{
|
||||
boolean changed;
|
||||
byte* w;
|
||||
byte* e;
|
||||
int newval;
|
||||
|
||||
changed = false;
|
||||
w = wipe_scr;
|
||||
e = wipe_scr_end;
|
||||
|
||||
while (w!=wipe_scr+width*height)
|
||||
{
|
||||
if (*w != *e)
|
||||
{
|
||||
if (*w > *e)
|
||||
{
|
||||
newval = *w - ticks;
|
||||
if (newval < *e)
|
||||
*w = *e;
|
||||
else
|
||||
*w = newval;
|
||||
changed = true;
|
||||
}
|
||||
else if (*w < *e)
|
||||
{
|
||||
newval = *w + ticks;
|
||||
if (newval > *e)
|
||||
*w = *e;
|
||||
else
|
||||
*w = newval;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
w++;
|
||||
e++;
|
||||
}
|
||||
|
||||
return !changed;
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
wipe_exitColorXForm
|
||||
( int width,
|
||||
int height,
|
||||
int ticks )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int* y;
|
||||
|
||||
int
|
||||
wipe_initMelt
|
||||
( int width,
|
||||
int height,
|
||||
int ticks )
|
||||
{
|
||||
int i, r;
|
||||
|
||||
// copy start screen to main screen
|
||||
memcpy(wipe_scr, wipe_scr_start, width*height);
|
||||
|
||||
// makes this wipe faster (in theory)
|
||||
// to have stuff in column-major format
|
||||
wipe_shittyColMajorXform((short*)wipe_scr_start, width/2, height);
|
||||
wipe_shittyColMajorXform((short*)wipe_scr_end, width/2, height);
|
||||
|
||||
// setup initial column positions
|
||||
// (y<0 => not ready to scroll yet)
|
||||
y = (int *) Z_Malloc(width*sizeof(int), PU_STATIC, 0);
|
||||
y[0] = -(M_Random()%16);
|
||||
for (i=1;i<width;i++)
|
||||
{
|
||||
r = (M_Random()%3) - 1;
|
||||
y[i] = y[i-1] + r;
|
||||
if (y[i] > 0) y[i] = 0;
|
||||
else if (y[i] == -16) y[i] = -15;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
wipe_doMelt
|
||||
( int width,
|
||||
int height,
|
||||
int ticks )
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
int dy;
|
||||
int idx;
|
||||
|
||||
short* s;
|
||||
short* d;
|
||||
boolean done = true;
|
||||
|
||||
width/=2;
|
||||
|
||||
while (ticks--)
|
||||
{
|
||||
for (i=0;i<width;i++)
|
||||
{
|
||||
if (y[i]<0)
|
||||
{
|
||||
y[i]++; done = false;
|
||||
}
|
||||
else if (y[i] < height)
|
||||
{
|
||||
dy = (y[i] < 16) ? y[i]+1 : 8;
|
||||
if (y[i]+dy >= height) dy = height - y[i];
|
||||
s = &((short *)wipe_scr_end)[i*height+y[i]];
|
||||
d = &((short *)wipe_scr)[y[i]*width+i];
|
||||
idx = 0;
|
||||
for (j=dy;j;j--)
|
||||
{
|
||||
d[idx] = *(s++);
|
||||
idx += width;
|
||||
}
|
||||
y[i] += dy;
|
||||
s = &((short *)wipe_scr_start)[i*height];
|
||||
d = &((short *)wipe_scr)[y[i]*width+i];
|
||||
idx = 0;
|
||||
for (j=height-y[i];j;j--)
|
||||
{
|
||||
d[idx] = *(s++);
|
||||
idx += width;
|
||||
}
|
||||
done = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return done;
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
wipe_exitMelt
|
||||
( int width,
|
||||
int height,
|
||||
int ticks )
|
||||
{
|
||||
Z_Free(y);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
wipe_StartScreen
|
||||
( int x,
|
||||
int y,
|
||||
int width,
|
||||
int height )
|
||||
{
|
||||
wipe_scr_start = screens[2];
|
||||
I_ReadScreen(wipe_scr_start);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
wipe_EndScreen
|
||||
( int x,
|
||||
int y,
|
||||
int width,
|
||||
int height )
|
||||
{
|
||||
wipe_scr_end = screens[3];
|
||||
I_ReadScreen(wipe_scr_end);
|
||||
V_DrawBlock(x, y, 0, width, height, wipe_scr_start); // restore start scr.
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
wipe_ScreenWipe
|
||||
( int wipeno,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
int ticks )
|
||||
{
|
||||
int rc;
|
||||
static int (*wipes[])(int, int, int) =
|
||||
{
|
||||
wipe_initColorXForm, wipe_doColorXForm, wipe_exitColorXForm,
|
||||
wipe_initMelt, wipe_doMelt, wipe_exitMelt
|
||||
};
|
||||
|
||||
void V_MarkRect(int, int, int, int);
|
||||
|
||||
// initial stuff
|
||||
if (!go)
|
||||
{
|
||||
go = 1;
|
||||
// wipe_scr = (byte *) Z_Malloc(width*height, PU_STATIC, 0); // DEBUG
|
||||
wipe_scr = screens[0];
|
||||
(*wipes[wipeno*3])(width, height, ticks);
|
||||
}
|
||||
|
||||
// do a piece of wipe-in
|
||||
V_MarkRect(0, 0, width, height);
|
||||
rc = (*wipes[wipeno*3+1])(width, height, ticks);
|
||||
// V_DrawBlock(x, y, 0, width, height, wipe_scr); // DEBUG
|
||||
|
||||
// final stuff
|
||||
if (rc)
|
||||
{
|
||||
go = 0;
|
||||
(*wipes[wipeno*3+2])(width, height, ticks);
|
||||
}
|
||||
|
||||
return !go;
|
||||
|
||||
}
|
71
demos/3rdparty/doom/f_wipe.h
vendored
71
demos/3rdparty/doom/f_wipe.h
vendored
|
@ -1,71 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Mission start screen wipe/melt, special effects.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __F_WIPE_H__
|
||||
#define __F_WIPE_H__
|
||||
|
||||
//
|
||||
// SCREEN WIPE PACKAGE
|
||||
//
|
||||
|
||||
enum
|
||||
{
|
||||
// simple gradual pixel change for 8-bit only
|
||||
wipe_ColorXForm,
|
||||
|
||||
// weird screen melt
|
||||
wipe_Melt,
|
||||
|
||||
wipe_NUMWIPES
|
||||
};
|
||||
|
||||
int
|
||||
wipe_StartScreen
|
||||
( int x,
|
||||
int y,
|
||||
int width,
|
||||
int height );
|
||||
|
||||
|
||||
int
|
||||
wipe_EndScreen
|
||||
( int x,
|
||||
int y,
|
||||
int width,
|
||||
int height );
|
||||
|
||||
|
||||
int
|
||||
wipe_ScreenWipe
|
||||
( int wipeno,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
int ticks );
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
1690
demos/3rdparty/doom/g_game.c
vendored
1690
demos/3rdparty/doom/g_game.c
vendored
File diff suppressed because it is too large
Load diff
79
demos/3rdparty/doom/g_game.h
vendored
79
demos/3rdparty/doom/g_game.h
vendored
|
@ -1,79 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// Duh.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __G_GAME__
|
||||
#define __G_GAME__
|
||||
|
||||
#include "doomdef.h"
|
||||
#include "d_event.h"
|
||||
|
||||
|
||||
|
||||
//
|
||||
// GAME
|
||||
//
|
||||
void G_DeathMatchSpawnPlayer (int playernum);
|
||||
|
||||
void G_InitNew (skill_t skill, int episode, int map);
|
||||
|
||||
// Can be called by the startup code or M_Responder.
|
||||
// A normal game starts at map 1,
|
||||
// but a warp test can start elsewhere
|
||||
void G_DeferedInitNew (skill_t skill, int episode, int map);
|
||||
|
||||
void G_DeferedPlayDemo (char* demo);
|
||||
|
||||
// Can be called by the startup code or M_Responder,
|
||||
// calls P_SetupLevel or W_EnterWorld.
|
||||
void G_LoadGame (char* name);
|
||||
|
||||
void G_DoLoadGame (void);
|
||||
|
||||
// Called by M_Responder.
|
||||
void G_SaveGame (int slot, char* description);
|
||||
|
||||
// Only called by startup code.
|
||||
void G_RecordDemo (char* name);
|
||||
|
||||
void G_BeginRecording (void);
|
||||
|
||||
void G_PlayDemo (char* name);
|
||||
void G_TimeDemo (char* name);
|
||||
boolean G_CheckDemoStatus (void);
|
||||
|
||||
void G_ExitLevel (void);
|
||||
void G_SecretExitLevel (void);
|
||||
|
||||
void G_WorldDone (void);
|
||||
|
||||
void G_Ticker (void);
|
||||
boolean G_Responder (event_t* ev);
|
||||
|
||||
void G_ScreenShot (void);
|
||||
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
44
demos/3rdparty/doom/gfxconf.h
vendored
44
demos/3rdparty/doom/gfxconf.h
vendored
|
@ -1,44 +0,0 @@
|
|||
/**
|
||||
* This file has a different license to the rest of the GFX system.
|
||||
* You can copy, modify and distribute this file as you see fit.
|
||||
* You do not need to publish your source modifications to this file.
|
||||
* The only thing you are not permitted to do is to relicense it
|
||||
* under a different license.
|
||||
*/
|
||||
|
||||
#ifndef _GFXCONF_H
|
||||
#define _GFXCONF_H
|
||||
|
||||
/* The operating system to use. One of these must be defined - preferably in your Makefile */
|
||||
//#define GFX_USE_OS_CHIBIOS FALSE
|
||||
//#define GFX_USE_OS_WIN32 FALSE
|
||||
//#define GFX_USE_OS_LINUX FALSE
|
||||
//#define GFX_USE_OS_OSX FALSE
|
||||
|
||||
/* GFX subsystems to turn on */
|
||||
#define GFX_USE_GDISP TRUE
|
||||
#define GFX_USE_GEVENT TRUE
|
||||
#define GFX_USE_GTIMER TRUE
|
||||
#define GFX_USE_GINPUT TRUE
|
||||
//#define GFX_USE_GAUDIN FALSE
|
||||
//#define GFX_USE_GAUDOUT FALSE
|
||||
|
||||
/* Features for the GDISP subsystem */
|
||||
//#define GDISP_NEED_AUTOFLUSH FALSE
|
||||
//#define GDISP_NEED_TIMERFLUSH FALSE
|
||||
#define GDISP_NEED_VALIDATION TRUE
|
||||
#define GDISP_NEED_CONTROL TRUE
|
||||
#define GDISP_NEED_STREAMING TRUE
|
||||
#define GDISP_NEED_TEXT TRUE
|
||||
|
||||
#define GDISP_INCLUDE_FONT_UI2 TRUE
|
||||
|
||||
/* Features for the GINPUT subsystem. */
|
||||
#define GINPUT_NEED_MOUSE TRUE
|
||||
//#define GINPUT_NEED_KEYBOARD FALSE
|
||||
#define GINPUT_NEED_TOGGLE FALSE
|
||||
//#define GINPUT_NEED_DIAL FALSE
|
||||
|
||||
#define GDISP_DEFAULT_ORIENTATION GDISP_ROTATE_LANDSCAPE
|
||||
|
||||
#endif /* _GFXCONF_H */
|
354
demos/3rdparty/doom/hu_lib.c
vendored
354
demos/3rdparty/doom/hu_lib.c
vendored
|
@ -1,354 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
// DESCRIPTION: heads-up text and input code
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static const char
|
||||
rcsid[] = "$Id: hu_lib.c,v 1.3 1997/01/26 07:44:58 b1 Exp $";
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "doomdef.h"
|
||||
|
||||
#include "v_video.h"
|
||||
#include "m_swap.h"
|
||||
|
||||
#include "hu_lib.h"
|
||||
#include "r_local.h"
|
||||
#include "r_draw.h"
|
||||
|
||||
// boolean : whether the screen is always erased
|
||||
#define noterased viewwindowx
|
||||
|
||||
extern boolean automapactive; // in AM_map.c
|
||||
|
||||
void HUlib_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
void HUlib_clearTextLine(hu_textline_t* t)
|
||||
{
|
||||
t->len = 0;
|
||||
t->l[0] = 0;
|
||||
t->needsupdate = true;
|
||||
}
|
||||
|
||||
void
|
||||
HUlib_initTextLine
|
||||
( hu_textline_t* t,
|
||||
int x,
|
||||
int y,
|
||||
patch_t** f,
|
||||
int sc )
|
||||
{
|
||||
t->x = x;
|
||||
t->y = y;
|
||||
t->f = f;
|
||||
t->sc = sc;
|
||||
HUlib_clearTextLine(t);
|
||||
}
|
||||
|
||||
boolean
|
||||
HUlib_addCharToTextLine
|
||||
( hu_textline_t* t,
|
||||
char ch )
|
||||
{
|
||||
|
||||
if (t->len == HU_MAXLINELENGTH)
|
||||
return false;
|
||||
else
|
||||
{
|
||||
t->l[t->len++] = ch;
|
||||
t->l[t->len] = 0;
|
||||
t->needsupdate = 4;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
boolean HUlib_delCharFromTextLine(hu_textline_t* t)
|
||||
{
|
||||
|
||||
if (!t->len) return false;
|
||||
else
|
||||
{
|
||||
t->l[--t->len] = 0;
|
||||
t->needsupdate = 4;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
HUlib_drawTextLine
|
||||
( hu_textline_t* l,
|
||||
boolean drawcursor )
|
||||
{
|
||||
|
||||
int i;
|
||||
int w;
|
||||
int x;
|
||||
unsigned char c;
|
||||
|
||||
// draw the new stuff
|
||||
x = l->x;
|
||||
for (i=0;i<l->len;i++)
|
||||
{
|
||||
c = toupper(l->l[i]);
|
||||
if (c != ' '
|
||||
&& c >= l->sc
|
||||
&& c <= '_')
|
||||
{
|
||||
w = SHORT(l->f[c - l->sc]->width);
|
||||
if (x+w > SCREENWIDTH)
|
||||
break;
|
||||
V_DrawPatchDirect(x, l->y, FG, l->f[c - l->sc]);
|
||||
x += w;
|
||||
}
|
||||
else
|
||||
{
|
||||
x += 4;
|
||||
if (x >= SCREENWIDTH)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// draw the cursor if requested
|
||||
if (drawcursor
|
||||
&& x + SHORT(l->f['_' - l->sc]->width) <= SCREENWIDTH)
|
||||
{
|
||||
V_DrawPatchDirect(x, l->y, FG, l->f['_' - l->sc]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// sorta called by HU_Erase and just better darn get things straight
|
||||
void HUlib_eraseTextLine(hu_textline_t* l)
|
||||
{
|
||||
int lh;
|
||||
int y;
|
||||
int yoffset;
|
||||
static boolean lastautomapactive = true;
|
||||
|
||||
// Only erases when NOT in automap and the screen is reduced,
|
||||
// and the text must either need updating or refreshing
|
||||
// (because of a recent change back from the automap)
|
||||
|
||||
if (!automapactive &&
|
||||
viewwindowx && l->needsupdate)
|
||||
{
|
||||
lh = SHORT(l->f[0]->height) + 1;
|
||||
for (y=l->y,yoffset=y*SCREENWIDTH ; y<l->y+lh ; y++,yoffset+=SCREENWIDTH)
|
||||
{
|
||||
if (y < viewwindowy || y >= viewwindowy + viewheight)
|
||||
R_VideoErase(yoffset, SCREENWIDTH); // erase entire line
|
||||
else
|
||||
{
|
||||
R_VideoErase(yoffset, viewwindowx); // erase left border
|
||||
R_VideoErase(yoffset + viewwindowx + viewwidth, viewwindowx);
|
||||
// erase right border
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lastautomapactive = automapactive;
|
||||
if (l->needsupdate) l->needsupdate--;
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
HUlib_initSText
|
||||
( hu_stext_t* s,
|
||||
int x,
|
||||
int y,
|
||||
int h,
|
||||
patch_t** font,
|
||||
int startchar,
|
||||
boolean* on )
|
||||
{
|
||||
|
||||
int i;
|
||||
|
||||
s->h = h;
|
||||
s->on = on;
|
||||
s->laston = true;
|
||||
s->cl = 0;
|
||||
for (i=0;i<h;i++)
|
||||
HUlib_initTextLine(&s->l[i],
|
||||
x, y - i*(SHORT(font[0]->height)+1),
|
||||
font, startchar);
|
||||
|
||||
}
|
||||
|
||||
void HUlib_addLineToSText(hu_stext_t* s)
|
||||
{
|
||||
|
||||
int i;
|
||||
|
||||
// add a clear line
|
||||
if (++s->cl == s->h)
|
||||
s->cl = 0;
|
||||
HUlib_clearTextLine(&s->l[s->cl]);
|
||||
|
||||
// everything needs updating
|
||||
for (i=0 ; i<s->h ; i++)
|
||||
s->l[i].needsupdate = 4;
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
HUlib_addMessageToSText
|
||||
( hu_stext_t* s,
|
||||
char* prefix,
|
||||
char* msg )
|
||||
{
|
||||
HUlib_addLineToSText(s);
|
||||
if (prefix)
|
||||
while (*prefix)
|
||||
HUlib_addCharToTextLine(&s->l[s->cl], *(prefix++));
|
||||
|
||||
while (*msg)
|
||||
HUlib_addCharToTextLine(&s->l[s->cl], *(msg++));
|
||||
}
|
||||
|
||||
void HUlib_drawSText(hu_stext_t* s)
|
||||
{
|
||||
int i, idx;
|
||||
hu_textline_t *l;
|
||||
|
||||
if (!*s->on)
|
||||
return; // if not on, don't draw
|
||||
|
||||
// draw everything
|
||||
for (i=0 ; i<s->h ; i++)
|
||||
{
|
||||
idx = s->cl - i;
|
||||
if (idx < 0)
|
||||
idx += s->h; // handle queue of lines
|
||||
|
||||
l = &s->l[idx];
|
||||
|
||||
// need a decision made here on whether to skip the draw
|
||||
HUlib_drawTextLine(l, false); // no cursor, please
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void HUlib_eraseSText(hu_stext_t* s)
|
||||
{
|
||||
|
||||
int i;
|
||||
|
||||
for (i=0 ; i<s->h ; i++)
|
||||
{
|
||||
if (s->laston && !*s->on)
|
||||
s->l[i].needsupdate = 4;
|
||||
HUlib_eraseTextLine(&s->l[i]);
|
||||
}
|
||||
s->laston = *s->on;
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
HUlib_initIText
|
||||
( hu_itext_t* it,
|
||||
int x,
|
||||
int y,
|
||||
patch_t** font,
|
||||
int startchar,
|
||||
boolean* on )
|
||||
{
|
||||
it->lm = 0; // default left margin is start of text
|
||||
it->on = on;
|
||||
it->laston = true;
|
||||
HUlib_initTextLine(&it->l, x, y, font, startchar);
|
||||
}
|
||||
|
||||
|
||||
// The following deletion routines adhere to the left margin restriction
|
||||
void HUlib_delCharFromIText(hu_itext_t* it)
|
||||
{
|
||||
if (it->l.len != it->lm)
|
||||
HUlib_delCharFromTextLine(&it->l);
|
||||
}
|
||||
|
||||
void HUlib_eraseLineFromIText(hu_itext_t* it)
|
||||
{
|
||||
while (it->lm != it->l.len)
|
||||
HUlib_delCharFromTextLine(&it->l);
|
||||
}
|
||||
|
||||
// Resets left margin as well
|
||||
void HUlib_resetIText(hu_itext_t* it)
|
||||
{
|
||||
it->lm = 0;
|
||||
HUlib_clearTextLine(&it->l);
|
||||
}
|
||||
|
||||
void
|
||||
HUlib_addPrefixToIText
|
||||
( hu_itext_t* it,
|
||||
char* str )
|
||||
{
|
||||
while (*str)
|
||||
HUlib_addCharToTextLine(&it->l, *(str++));
|
||||
it->lm = it->l.len;
|
||||
}
|
||||
|
||||
// wrapper function for handling general keyed input.
|
||||
// returns true if it ate the key
|
||||
boolean
|
||||
HUlib_keyInIText
|
||||
( hu_itext_t* it,
|
||||
unsigned char ch )
|
||||
{
|
||||
|
||||
if (ch >= ' ' && ch <= '_')
|
||||
HUlib_addCharToTextLine(&it->l, (char) ch);
|
||||
else
|
||||
if (ch == KEY_BACKSPACE)
|
||||
HUlib_delCharFromIText(it);
|
||||
else
|
||||
if (ch != KEY_ENTER)
|
||||
return false; // did not eat key
|
||||
|
||||
return true; // ate the key
|
||||
|
||||
}
|
||||
|
||||
void HUlib_drawIText(hu_itext_t* it)
|
||||
{
|
||||
|
||||
hu_textline_t *l = &it->l;
|
||||
|
||||
if (!*it->on)
|
||||
return;
|
||||
HUlib_drawTextLine(l, true); // draw the line w/ cursor
|
||||
|
||||
}
|
||||
|
||||
void HUlib_eraseIText(hu_itext_t* it)
|
||||
{
|
||||
if (it->laston && !*it->on)
|
||||
it->l.needsupdate = 4;
|
||||
HUlib_eraseTextLine(&it->l);
|
||||
it->laston = *it->on;
|
||||
}
|
||||
|
196
demos/3rdparty/doom/hu_lib.h
vendored
196
demos/3rdparty/doom/hu_lib.h
vendored
|
@ -1,196 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION: none
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef __HULIB__
|
||||
#define __HULIB__
|
||||
|
||||
// We are referring to patches.
|
||||
#include "r_defs.h"
|
||||
|
||||
|
||||
// background and foreground screen numbers
|
||||
// different from other modules.
|
||||
#define BG 1
|
||||
#define FG 0
|
||||
|
||||
// font stuff
|
||||
#define HU_CHARERASE KEY_BACKSPACE
|
||||
|
||||
#define HU_MAXLINES 4
|
||||
#define HU_MAXLINELENGTH 80
|
||||
|
||||
//
|
||||
// Typedefs of widgets
|
||||
//
|
||||
|
||||
// Text Line widget
|
||||
// (parent of Scrolling Text and Input Text widgets)
|
||||
typedef struct
|
||||
{
|
||||
// left-justified position of scrolling text window
|
||||
int x;
|
||||
int y;
|
||||
|
||||
patch_t** f; // font
|
||||
int sc; // start character
|
||||
char l[HU_MAXLINELENGTH+1]; // line of text
|
||||
int len; // current line length
|
||||
|
||||
// whether this line needs to be udpated
|
||||
int needsupdate;
|
||||
|
||||
} hu_textline_t;
|
||||
|
||||
|
||||
|
||||
// Scrolling Text window widget
|
||||
// (child of Text Line widget)
|
||||
typedef struct
|
||||
{
|
||||
hu_textline_t l[HU_MAXLINES]; // text lines to draw
|
||||
int h; // height in lines
|
||||
int cl; // current line number
|
||||
|
||||
// pointer to boolean stating whether to update window
|
||||
boolean* on;
|
||||
boolean laston; // last value of *->on.
|
||||
|
||||
} hu_stext_t;
|
||||
|
||||
|
||||
|
||||
// Input Text Line widget
|
||||
// (child of Text Line widget)
|
||||
typedef struct
|
||||
{
|
||||
hu_textline_t l; // text line to input on
|
||||
|
||||
// left margin past which I am not to delete characters
|
||||
int lm;
|
||||
|
||||
// pointer to boolean stating whether to update window
|
||||
boolean* on;
|
||||
boolean laston; // last value of *->on;
|
||||
|
||||
} hu_itext_t;
|
||||
|
||||
|
||||
//
|
||||
// Widget creation, access, and update routines
|
||||
//
|
||||
|
||||
// initializes heads-up widget library
|
||||
void HUlib_init(void);
|
||||
|
||||
//
|
||||
// textline code
|
||||
//
|
||||
|
||||
// clear a line of text
|
||||
void HUlib_clearTextLine(hu_textline_t *t);
|
||||
|
||||
void HUlib_initTextLine(hu_textline_t *t, int x, int y, patch_t **f, int sc);
|
||||
|
||||
// returns success
|
||||
boolean HUlib_addCharToTextLine(hu_textline_t *t, char ch);
|
||||
|
||||
// returns success
|
||||
boolean HUlib_delCharFromTextLine(hu_textline_t *t);
|
||||
|
||||
// draws tline
|
||||
void HUlib_drawTextLine(hu_textline_t *l, boolean drawcursor);
|
||||
|
||||
// erases text line
|
||||
void HUlib_eraseTextLine(hu_textline_t *l);
|
||||
|
||||
|
||||
//
|
||||
// Scrolling Text window widget routines
|
||||
//
|
||||
|
||||
// ?
|
||||
void
|
||||
HUlib_initSText
|
||||
( hu_stext_t* s,
|
||||
int x,
|
||||
int y,
|
||||
int h,
|
||||
patch_t** font,
|
||||
int startchar,
|
||||
boolean* on );
|
||||
|
||||
// add a new line
|
||||
void HUlib_addLineToSText(hu_stext_t* s);
|
||||
|
||||
// ?
|
||||
void
|
||||
HUlib_addMessageToSText
|
||||
( hu_stext_t* s,
|
||||
char* prefix,
|
||||
char* msg );
|
||||
|
||||
// draws stext
|
||||
void HUlib_drawSText(hu_stext_t* s);
|
||||
|
||||
// erases all stext lines
|
||||
void HUlib_eraseSText(hu_stext_t* s);
|
||||
|
||||
// Input Text Line widget routines
|
||||
void
|
||||
HUlib_initIText
|
||||
( hu_itext_t* it,
|
||||
int x,
|
||||
int y,
|
||||
patch_t** font,
|
||||
int startchar,
|
||||
boolean* on );
|
||||
|
||||
// enforces left margin
|
||||
void HUlib_delCharFromIText(hu_itext_t* it);
|
||||
|
||||
// enforces left margin
|
||||
void HUlib_eraseLineFromIText(hu_itext_t* it);
|
||||
|
||||
// resets line and left margin
|
||||
void HUlib_resetIText(hu_itext_t* it);
|
||||
|
||||
// left of left-margin
|
||||
void
|
||||
HUlib_addPrefixToIText
|
||||
( hu_itext_t* it,
|
||||
char* str );
|
||||
|
||||
// whether eaten
|
||||
boolean
|
||||
HUlib_keyInIText
|
||||
( hu_itext_t* it,
|
||||
unsigned char ch );
|
||||
|
||||
void HUlib_drawIText(hu_itext_t* it);
|
||||
|
||||
// erases all itext lines
|
||||
void HUlib_eraseIText(hu_itext_t* it);
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
759
demos/3rdparty/doom/hu_stuff.c
vendored
759
demos/3rdparty/doom/hu_stuff.c
vendored
|
@ -1,759 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
// DESCRIPTION: Heads-up displays
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static const char
|
||||
rcsid[] = "$Id: hu_stuff.c,v 1.4 1997/02/03 16:47:52 b1 Exp $";
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "doomdef.h"
|
||||
|
||||
#include "z_zone.h"
|
||||
|
||||
#include "m_swap.h"
|
||||
|
||||
#include "hu_stuff.h"
|
||||
#include "hu_lib.h"
|
||||
#include "w_wad.h"
|
||||
|
||||
#include "s_sound.h"
|
||||
|
||||
#include "doomstat.h"
|
||||
|
||||
// Data.
|
||||
#include "dstrings.h"
|
||||
#include "sounds.h"
|
||||
|
||||
//
|
||||
// Locally used constants, shortcuts.
|
||||
//
|
||||
#define HU_TITLE (mapnames[(gameepisode-1)*9+gamemap-1])
|
||||
#define HU_TITLE2 (mapnames2[gamemap-1])
|
||||
#define HU_TITLEP (mapnamesp[gamemap-1])
|
||||
#define HU_TITLET (mapnamest[gamemap-1])
|
||||
#define HU_TITLEHEIGHT 1
|
||||
#define HU_TITLEX 0
|
||||
#define HU_TITLEY (167 - SHORT(hu_font[0]->height))
|
||||
|
||||
#define HU_INPUTTOGGLE 't'
|
||||
#define HU_INPUTX HU_MSGX
|
||||
#define HU_INPUTY (HU_MSGY + HU_MSGHEIGHT*(SHORT(hu_font[0]->height) +1))
|
||||
#define HU_INPUTWIDTH 64
|
||||
#define HU_INPUTHEIGHT 1
|
||||
|
||||
|
||||
|
||||
char* chat_macros[] =
|
||||
{
|
||||
HUSTR_CHATMACRO0,
|
||||
HUSTR_CHATMACRO1,
|
||||
HUSTR_CHATMACRO2,
|
||||
HUSTR_CHATMACRO3,
|
||||
HUSTR_CHATMACRO4,
|
||||
HUSTR_CHATMACRO5,
|
||||
HUSTR_CHATMACRO6,
|
||||
HUSTR_CHATMACRO7,
|
||||
HUSTR_CHATMACRO8,
|
||||
HUSTR_CHATMACRO9
|
||||
};
|
||||
|
||||
char* player_names[] =
|
||||
{
|
||||
HUSTR_PLRGREEN,
|
||||
HUSTR_PLRINDIGO,
|
||||
HUSTR_PLRBROWN,
|
||||
HUSTR_PLRRED
|
||||
};
|
||||
|
||||
|
||||
char chat_char; // remove later.
|
||||
static player_t* plr;
|
||||
patch_t* hu_font[HU_FONTSIZE];
|
||||
static hu_textline_t w_title;
|
||||
boolean chat_on;
|
||||
static hu_itext_t w_chat;
|
||||
static boolean always_off = false;
|
||||
static char chat_dest[MAXPLAYERS];
|
||||
static hu_itext_t w_inputbuffer[MAXPLAYERS];
|
||||
|
||||
static boolean message_on;
|
||||
boolean message_dontfuckwithme;
|
||||
static boolean message_nottobefuckedwith;
|
||||
|
||||
static hu_stext_t w_message;
|
||||
static int message_counter;
|
||||
|
||||
extern int showMessages;
|
||||
extern boolean automapactive;
|
||||
|
||||
static boolean headsupactive = false;
|
||||
|
||||
//
|
||||
// Builtin map names.
|
||||
// The actual names can be found in DStrings.h.
|
||||
//
|
||||
|
||||
char* mapnames[] = // DOOM shareware/registered/retail (Ultimate) names.
|
||||
{
|
||||
|
||||
HUSTR_E1M1,
|
||||
HUSTR_E1M2,
|
||||
HUSTR_E1M3,
|
||||
HUSTR_E1M4,
|
||||
HUSTR_E1M5,
|
||||
HUSTR_E1M6,
|
||||
HUSTR_E1M7,
|
||||
HUSTR_E1M8,
|
||||
HUSTR_E1M9,
|
||||
|
||||
HUSTR_E2M1,
|
||||
HUSTR_E2M2,
|
||||
HUSTR_E2M3,
|
||||
HUSTR_E2M4,
|
||||
HUSTR_E2M5,
|
||||
HUSTR_E2M6,
|
||||
HUSTR_E2M7,
|
||||
HUSTR_E2M8,
|
||||
HUSTR_E2M9,
|
||||
|
||||
HUSTR_E3M1,
|
||||
HUSTR_E3M2,
|
||||
HUSTR_E3M3,
|
||||
HUSTR_E3M4,
|
||||
HUSTR_E3M5,
|
||||
HUSTR_E3M6,
|
||||
HUSTR_E3M7,
|
||||
HUSTR_E3M8,
|
||||
HUSTR_E3M9,
|
||||
|
||||
HUSTR_E4M1,
|
||||
HUSTR_E4M2,
|
||||
HUSTR_E4M3,
|
||||
HUSTR_E4M4,
|
||||
HUSTR_E4M5,
|
||||
HUSTR_E4M6,
|
||||
HUSTR_E4M7,
|
||||
HUSTR_E4M8,
|
||||
HUSTR_E4M9,
|
||||
|
||||
"NEWLEVEL",
|
||||
"NEWLEVEL",
|
||||
"NEWLEVEL",
|
||||
"NEWLEVEL",
|
||||
"NEWLEVEL",
|
||||
"NEWLEVEL",
|
||||
"NEWLEVEL",
|
||||
"NEWLEVEL",
|
||||
"NEWLEVEL"
|
||||
};
|
||||
|
||||
char* mapnames2[] = // DOOM 2 map names.
|
||||
{
|
||||
HUSTR_1,
|
||||
HUSTR_2,
|
||||
HUSTR_3,
|
||||
HUSTR_4,
|
||||
HUSTR_5,
|
||||
HUSTR_6,
|
||||
HUSTR_7,
|
||||
HUSTR_8,
|
||||
HUSTR_9,
|
||||
HUSTR_10,
|
||||
HUSTR_11,
|
||||
|
||||
HUSTR_12,
|
||||
HUSTR_13,
|
||||
HUSTR_14,
|
||||
HUSTR_15,
|
||||
HUSTR_16,
|
||||
HUSTR_17,
|
||||
HUSTR_18,
|
||||
HUSTR_19,
|
||||
HUSTR_20,
|
||||
|
||||
HUSTR_21,
|
||||
HUSTR_22,
|
||||
HUSTR_23,
|
||||
HUSTR_24,
|
||||
HUSTR_25,
|
||||
HUSTR_26,
|
||||
HUSTR_27,
|
||||
HUSTR_28,
|
||||
HUSTR_29,
|
||||
HUSTR_30,
|
||||
HUSTR_31,
|
||||
HUSTR_32
|
||||
};
|
||||
|
||||
|
||||
char* mapnamesp[] = // Plutonia WAD map names.
|
||||
{
|
||||
PHUSTR_1,
|
||||
PHUSTR_2,
|
||||
PHUSTR_3,
|
||||
PHUSTR_4,
|
||||
PHUSTR_5,
|
||||
PHUSTR_6,
|
||||
PHUSTR_7,
|
||||
PHUSTR_8,
|
||||
PHUSTR_9,
|
||||
PHUSTR_10,
|
||||
PHUSTR_11,
|
||||
|
||||
PHUSTR_12,
|
||||
PHUSTR_13,
|
||||
PHUSTR_14,
|
||||
PHUSTR_15,
|
||||
PHUSTR_16,
|
||||
PHUSTR_17,
|
||||
PHUSTR_18,
|
||||
PHUSTR_19,
|
||||
PHUSTR_20,
|
||||
|
||||
PHUSTR_21,
|
||||
PHUSTR_22,
|
||||
PHUSTR_23,
|
||||
PHUSTR_24,
|
||||
PHUSTR_25,
|
||||
PHUSTR_26,
|
||||
PHUSTR_27,
|
||||
PHUSTR_28,
|
||||
PHUSTR_29,
|
||||
PHUSTR_30,
|
||||
PHUSTR_31,
|
||||
PHUSTR_32
|
||||
};
|
||||
|
||||
|
||||
char *mapnamest[] = // TNT WAD map names.
|
||||
{
|
||||
THUSTR_1,
|
||||
THUSTR_2,
|
||||
THUSTR_3,
|
||||
THUSTR_4,
|
||||
THUSTR_5,
|
||||
THUSTR_6,
|
||||
THUSTR_7,
|
||||
THUSTR_8,
|
||||
THUSTR_9,
|
||||
THUSTR_10,
|
||||
THUSTR_11,
|
||||
|
||||
THUSTR_12,
|
||||
THUSTR_13,
|
||||
THUSTR_14,
|
||||
THUSTR_15,
|
||||
THUSTR_16,
|
||||
THUSTR_17,
|
||||
THUSTR_18,
|
||||
THUSTR_19,
|
||||
THUSTR_20,
|
||||
|
||||
THUSTR_21,
|
||||
THUSTR_22,
|
||||
THUSTR_23,
|
||||
THUSTR_24,
|
||||
THUSTR_25,
|
||||
THUSTR_26,
|
||||
THUSTR_27,
|
||||
THUSTR_28,
|
||||
THUSTR_29,
|
||||
THUSTR_30,
|
||||
THUSTR_31,
|
||||
THUSTR_32
|
||||
};
|
||||
|
||||
|
||||
const char* shiftxform;
|
||||
|
||||
const char french_shiftxform[] =
|
||||
{
|
||||
0,
|
||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
||||
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
||||
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||
31,
|
||||
' ', '!', '"', '#', '$', '%', '&',
|
||||
'"', // shift-'
|
||||
'(', ')', '*', '+',
|
||||
'?', // shift-,
|
||||
'_', // shift--
|
||||
'>', // shift-.
|
||||
'?', // shift-/
|
||||
'0', // shift-0
|
||||
'1', // shift-1
|
||||
'2', // shift-2
|
||||
'3', // shift-3
|
||||
'4', // shift-4
|
||||
'5', // shift-5
|
||||
'6', // shift-6
|
||||
'7', // shift-7
|
||||
'8', // shift-8
|
||||
'9', // shift-9
|
||||
'/',
|
||||
'.', // shift-;
|
||||
'<',
|
||||
'+', // shift-=
|
||||
'>', '?', '@',
|
||||
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
|
||||
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
|
||||
'[', // shift-[
|
||||
'!', // shift-backslash - OH MY GOD DOES WATCOM SUCK
|
||||
']', // shift-]
|
||||
'"', '_',
|
||||
'\'', // shift-`
|
||||
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
|
||||
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
|
||||
'{', '|', '}', '~', 127
|
||||
|
||||
};
|
||||
|
||||
const char english_shiftxform[] =
|
||||
{
|
||||
|
||||
0,
|
||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
||||
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
||||
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||
31,
|
||||
' ', '!', '"', '#', '$', '%', '&',
|
||||
'"', // shift-'
|
||||
'(', ')', '*', '+',
|
||||
'<', // shift-,
|
||||
'_', // shift--
|
||||
'>', // shift-.
|
||||
'?', // shift-/
|
||||
')', // shift-0
|
||||
'!', // shift-1
|
||||
'@', // shift-2
|
||||
'#', // shift-3
|
||||
'$', // shift-4
|
||||
'%', // shift-5
|
||||
'^', // shift-6
|
||||
'&', // shift-7
|
||||
'*', // shift-8
|
||||
'(', // shift-9
|
||||
':',
|
||||
':', // shift-;
|
||||
'<',
|
||||
'+', // shift-=
|
||||
'>', '?', '@',
|
||||
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
|
||||
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
|
||||
'[', // shift-[
|
||||
'!', // shift-backslash - OH MY GOD DOES WATCOM SUCK
|
||||
']', // shift-]
|
||||
'"', '_',
|
||||
'\'', // shift-`
|
||||
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
|
||||
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
|
||||
'{', '|', '}', '~', 127
|
||||
};
|
||||
|
||||
char frenchKeyMap[128]=
|
||||
{
|
||||
0,
|
||||
1,2,3,4,5,6,7,8,9,10,
|
||||
11,12,13,14,15,16,17,18,19,20,
|
||||
21,22,23,24,25,26,27,28,29,30,
|
||||
31,
|
||||
' ','!','"','#','$','%','&','%','(',')','*','+',';','-',':','!',
|
||||
'0','1','2','3','4','5','6','7','8','9',':','M','<','=','>','?',
|
||||
'@','Q','B','C','D','E','F','G','H','I','J','K','L',',','N','O',
|
||||
'P','A','R','S','T','U','V','Z','X','Y','W','^','\\','$','^','_',
|
||||
'@','Q','B','C','D','E','F','G','H','I','J','K','L',',','N','O',
|
||||
'P','A','R','S','T','U','V','Z','X','Y','W','^','\\','$','^',127
|
||||
};
|
||||
|
||||
char ForeignTranslation(unsigned char ch)
|
||||
{
|
||||
return ch < 128 ? frenchKeyMap[ch] : ch;
|
||||
}
|
||||
|
||||
void HU_Init(void)
|
||||
{
|
||||
|
||||
int i;
|
||||
int j;
|
||||
char buffer[9];
|
||||
|
||||
if (french)
|
||||
shiftxform = french_shiftxform;
|
||||
else
|
||||
shiftxform = english_shiftxform;
|
||||
|
||||
// load the heads-up font
|
||||
j = HU_FONTSTART;
|
||||
for (i=0;i<HU_FONTSIZE;i++)
|
||||
{
|
||||
I_sprintf(buffer, "STCFN%.3d", j++);
|
||||
hu_font[i] = (patch_t *) W_CacheLumpName(buffer, PU_STATIC);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void HU_Stop(void)
|
||||
{
|
||||
headsupactive = false;
|
||||
}
|
||||
|
||||
void HU_Start(void)
|
||||
{
|
||||
|
||||
int i;
|
||||
char* s;
|
||||
|
||||
if (headsupactive)
|
||||
HU_Stop();
|
||||
|
||||
plr = &players[consoleplayer];
|
||||
message_on = false;
|
||||
message_dontfuckwithme = false;
|
||||
message_nottobefuckedwith = false;
|
||||
chat_on = false;
|
||||
|
||||
// create the message widget
|
||||
HUlib_initSText(&w_message,
|
||||
HU_MSGX, HU_MSGY, HU_MSGHEIGHT,
|
||||
hu_font,
|
||||
HU_FONTSTART, &message_on);
|
||||
|
||||
// create the map title widget
|
||||
HUlib_initTextLine(&w_title,
|
||||
HU_TITLEX, HU_TITLEY,
|
||||
hu_font,
|
||||
HU_FONTSTART);
|
||||
|
||||
switch ( gamemode )
|
||||
{
|
||||
case shareware:
|
||||
case registered:
|
||||
case retail:
|
||||
s = HU_TITLE;
|
||||
break;
|
||||
|
||||
/* FIXME
|
||||
case pack_plut:
|
||||
s = HU_TITLEP;
|
||||
break;
|
||||
case pack_tnt:
|
||||
s = HU_TITLET;
|
||||
break;
|
||||
*/
|
||||
|
||||
case commercial:
|
||||
default:
|
||||
s = HU_TITLE2;
|
||||
break;
|
||||
}
|
||||
|
||||
while (*s)
|
||||
HUlib_addCharToTextLine(&w_title, *(s++));
|
||||
|
||||
// create the chat widget
|
||||
HUlib_initIText(&w_chat,
|
||||
HU_INPUTX, HU_INPUTY,
|
||||
hu_font,
|
||||
HU_FONTSTART, &chat_on);
|
||||
|
||||
// create the inputbuffer widgets
|
||||
for (i=0 ; i<MAXPLAYERS ; i++)
|
||||
HUlib_initIText(&w_inputbuffer[i], 0, 0, 0, 0, &always_off);
|
||||
|
||||
headsupactive = true;
|
||||
|
||||
}
|
||||
|
||||
void HU_Drawer(void)
|
||||
{
|
||||
|
||||
HUlib_drawSText(&w_message);
|
||||
HUlib_drawIText(&w_chat);
|
||||
if (automapactive)
|
||||
HUlib_drawTextLine(&w_title, false);
|
||||
|
||||
}
|
||||
|
||||
void HU_Erase(void)
|
||||
{
|
||||
|
||||
HUlib_eraseSText(&w_message);
|
||||
HUlib_eraseIText(&w_chat);
|
||||
HUlib_eraseTextLine(&w_title);
|
||||
|
||||
}
|
||||
|
||||
void HU_Ticker(void)
|
||||
{
|
||||
|
||||
int i, rc;
|
||||
char c;
|
||||
|
||||
// tick down message counter if message is up
|
||||
if (message_counter && !--message_counter)
|
||||
{
|
||||
message_on = false;
|
||||
message_nottobefuckedwith = false;
|
||||
}
|
||||
|
||||
if (showMessages || message_dontfuckwithme)
|
||||
{
|
||||
|
||||
// display message if necessary
|
||||
if ((plr->message && !message_nottobefuckedwith)
|
||||
|| (plr->message && message_dontfuckwithme))
|
||||
{
|
||||
HUlib_addMessageToSText(&w_message, 0, plr->message);
|
||||
plr->message = 0;
|
||||
message_on = true;
|
||||
message_counter = HU_MSGTIMEOUT;
|
||||
message_nottobefuckedwith = message_dontfuckwithme;
|
||||
message_dontfuckwithme = 0;
|
||||
}
|
||||
|
||||
} // else message_on = false;
|
||||
|
||||
// check for incoming chat characters
|
||||
if (netgame)
|
||||
{
|
||||
for (i=0 ; i<MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i])
|
||||
continue;
|
||||
if (i != consoleplayer
|
||||
&& (c = players[i].cmd.chatchar))
|
||||
{
|
||||
if (c <= HU_BROADCAST)
|
||||
chat_dest[i] = c;
|
||||
else
|
||||
{
|
||||
if (c >= 'a' && c <= 'z')
|
||||
c = (char) shiftxform[(unsigned char) c];
|
||||
rc = HUlib_keyInIText(&w_inputbuffer[i], c);
|
||||
if (rc && c == KEY_ENTER)
|
||||
{
|
||||
if (w_inputbuffer[i].l.len
|
||||
&& (chat_dest[i] == consoleplayer+1
|
||||
|| chat_dest[i] == HU_BROADCAST))
|
||||
{
|
||||
HUlib_addMessageToSText(&w_message,
|
||||
player_names[i],
|
||||
w_inputbuffer[i].l.l);
|
||||
|
||||
message_nottobefuckedwith = true;
|
||||
message_on = true;
|
||||
message_counter = HU_MSGTIMEOUT;
|
||||
if ( gamemode == commercial )
|
||||
S_StartSound(0, sfx_radio);
|
||||
else
|
||||
S_StartSound(0, sfx_tink);
|
||||
}
|
||||
HUlib_resetIText(&w_inputbuffer[i]);
|
||||
}
|
||||
}
|
||||
players[i].cmd.chatchar = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#define QUEUESIZE 128
|
||||
|
||||
static char chatchars[QUEUESIZE];
|
||||
static int head = 0;
|
||||
static int tail = 0;
|
||||
|
||||
|
||||
void HU_queueChatChar(char c)
|
||||
{
|
||||
if (((head + 1) & (QUEUESIZE-1)) == tail)
|
||||
{
|
||||
plr->message = HUSTR_MSGU;
|
||||
}
|
||||
else
|
||||
{
|
||||
chatchars[head] = c;
|
||||
head = (head + 1) & (QUEUESIZE-1);
|
||||
}
|
||||
}
|
||||
|
||||
char HU_dequeueChatChar(void)
|
||||
{
|
||||
char c;
|
||||
|
||||
if (head != tail)
|
||||
{
|
||||
c = chatchars[tail];
|
||||
tail = (tail + 1) & (QUEUESIZE-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
c = 0;
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
boolean HU_Responder(event_t *ev)
|
||||
{
|
||||
|
||||
static char lastmessage[HU_MAXLINELENGTH+1];
|
||||
char* macromessage;
|
||||
boolean eatkey = false;
|
||||
static boolean shiftdown = false;
|
||||
static boolean altdown = false;
|
||||
unsigned char c;
|
||||
int i;
|
||||
int numplayers;
|
||||
|
||||
static char destination_keys[MAXPLAYERS] =
|
||||
{
|
||||
HUSTR_KEYGREEN,
|
||||
HUSTR_KEYINDIGO,
|
||||
HUSTR_KEYBROWN,
|
||||
HUSTR_KEYRED
|
||||
};
|
||||
|
||||
static int num_nobrainers = 0;
|
||||
|
||||
numplayers = 0;
|
||||
for (i=0 ; i<MAXPLAYERS ; i++)
|
||||
numplayers += playeringame[i];
|
||||
|
||||
if (ev->data1 == KEY_RSHIFT)
|
||||
{
|
||||
shiftdown = ev->type == ev_keydown;
|
||||
return false;
|
||||
}
|
||||
else if (ev->data1 == KEY_RALT || ev->data1 == KEY_LALT)
|
||||
{
|
||||
altdown = ev->type == ev_keydown;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ev->type != ev_keydown)
|
||||
return false;
|
||||
|
||||
if (!chat_on)
|
||||
{
|
||||
if (ev->data1 == HU_MSGREFRESH)
|
||||
{
|
||||
message_on = true;
|
||||
message_counter = HU_MSGTIMEOUT;
|
||||
eatkey = true;
|
||||
}
|
||||
else if (netgame && ev->data1 == HU_INPUTTOGGLE)
|
||||
{
|
||||
eatkey = chat_on = true;
|
||||
HUlib_resetIText(&w_chat);
|
||||
HU_queueChatChar(HU_BROADCAST);
|
||||
}
|
||||
else if (netgame && numplayers > 2)
|
||||
{
|
||||
for (i=0; i<MAXPLAYERS ; i++)
|
||||
{
|
||||
if (ev->data1 == destination_keys[i])
|
||||
{
|
||||
if (playeringame[i] && i!=consoleplayer)
|
||||
{
|
||||
eatkey = chat_on = true;
|
||||
HUlib_resetIText(&w_chat);
|
||||
HU_queueChatChar(i+1);
|
||||
break;
|
||||
}
|
||||
else if (i == consoleplayer)
|
||||
{
|
||||
num_nobrainers++;
|
||||
if (num_nobrainers < 3)
|
||||
plr->message = HUSTR_TALKTOSELF1;
|
||||
else if (num_nobrainers < 6)
|
||||
plr->message = HUSTR_TALKTOSELF2;
|
||||
else if (num_nobrainers < 9)
|
||||
plr->message = HUSTR_TALKTOSELF3;
|
||||
else if (num_nobrainers < 32)
|
||||
plr->message = HUSTR_TALKTOSELF4;
|
||||
else
|
||||
plr->message = HUSTR_TALKTOSELF5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
c = ev->data1;
|
||||
// send a macro
|
||||
if (altdown)
|
||||
{
|
||||
c = c - '0';
|
||||
if (c > 9)
|
||||
return false;
|
||||
// I_DBGprintf("got here\n");
|
||||
macromessage = chat_macros[c];
|
||||
|
||||
// kill last message with a '\n'
|
||||
HU_queueChatChar(KEY_ENTER); // DEBUG!!!
|
||||
|
||||
// send the macro message
|
||||
while (*macromessage)
|
||||
HU_queueChatChar(*macromessage++);
|
||||
HU_queueChatChar(KEY_ENTER);
|
||||
|
||||
// leave chat mode and notify that it was sent
|
||||
chat_on = false;
|
||||
strcpy(lastmessage, chat_macros[c]);
|
||||
plr->message = lastmessage;
|
||||
eatkey = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (french)
|
||||
c = ForeignTranslation(c);
|
||||
if (shiftdown || (c >= 'a' && c <= 'z'))
|
||||
c = shiftxform[c];
|
||||
eatkey = HUlib_keyInIText(&w_chat, c);
|
||||
if (eatkey)
|
||||
{
|
||||
// static unsigned char buf[20]; // DEBUG
|
||||
HU_queueChatChar(c);
|
||||
|
||||
// I_sprintf(buf, "KEY: %d => %d", ev->data1, c);
|
||||
// plr->message = buf;
|
||||
}
|
||||
if (c == KEY_ENTER)
|
||||
{
|
||||
chat_on = false;
|
||||
if (w_chat.l.len)
|
||||
{
|
||||
strcpy(lastmessage, w_chat.l.l);
|
||||
plr->message = lastmessage;
|
||||
}
|
||||
}
|
||||
else if (c == KEY_ESCAPE)
|
||||
chat_on = false;
|
||||
}
|
||||
}
|
||||
|
||||
return eatkey;
|
||||
|
||||
}
|
66
demos/3rdparty/doom/hu_stuff.h
vendored
66
demos/3rdparty/doom/hu_stuff.h
vendored
|
@ -1,66 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION: Head up display
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef __HU_STUFF_H__
|
||||
#define __HU_STUFF_H__
|
||||
|
||||
#include "d_event.h"
|
||||
|
||||
|
||||
//
|
||||
// Globally visible constants.
|
||||
//
|
||||
#define HU_FONTSTART '!' // the first font characters
|
||||
#define HU_FONTEND '_' // the last font characters
|
||||
|
||||
// Calculate # of glyphs in font.
|
||||
#define HU_FONTSIZE (HU_FONTEND - HU_FONTSTART + 1)
|
||||
|
||||
#define HU_BROADCAST 5
|
||||
|
||||
#define HU_MSGREFRESH KEY_ENTER
|
||||
#define HU_MSGX 0
|
||||
#define HU_MSGY 0
|
||||
#define HU_MSGWIDTH 64 // in characters
|
||||
#define HU_MSGHEIGHT 1 // in lines
|
||||
|
||||
#define HU_MSGTIMEOUT (4*TICRATE)
|
||||
|
||||
//
|
||||
// HEADS UP TEXT
|
||||
//
|
||||
|
||||
void HU_Init(void);
|
||||
void HU_Start(void);
|
||||
|
||||
boolean HU_Responder(event_t* ev);
|
||||
|
||||
void HU_Ticker(void);
|
||||
void HU_Drawer(void);
|
||||
char HU_dequeueChatChar(void);
|
||||
void HU_Erase(void);
|
||||
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
17
demos/3rdparty/doom/i_main.c
vendored
17
demos/3rdparty/doom/i_main.c
vendored
|
@ -1,17 +0,0 @@
|
|||
#include "gfx.h"
|
||||
|
||||
#include "doomdef.h"
|
||||
|
||||
#include "m_argv.h"
|
||||
#include "d_main.h"
|
||||
|
||||
// Emulate a command line
|
||||
static const char const *argv[] = { "doom" };
|
||||
|
||||
int main(void) {
|
||||
gfxInit();
|
||||
|
||||
myargc = sizeof(argv)/sizeof(argv[0]);
|
||||
myargv = argv;
|
||||
D_DoomMain();
|
||||
}
|
389
demos/3rdparty/doom/i_net.c
vendored
389
demos/3rdparty/doom/i_net.c
vendored
|
@ -1,389 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
// DESCRIPTION:
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if 0
|
||||
static const char
|
||||
rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <netdb.h>
|
||||
#include <sys/ioctl.h>
|
||||
#else
|
||||
#include "gfx.h"
|
||||
#endif
|
||||
|
||||
#include "i_system.h"
|
||||
#include "d_event.h"
|
||||
#include "d_net.h"
|
||||
#include "m_argv.h"
|
||||
|
||||
#include "doomstat.h"
|
||||
|
||||
#if 0
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "i_net.h"
|
||||
#endif
|
||||
#endif
|
||||
#include "i_net.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
// For some odd reason...
|
||||
#define ntohl(x) \
|
||||
((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \
|
||||
(((unsigned long int)(x) & 0x0000ff00U) << 8) | \
|
||||
(((unsigned long int)(x) & 0x00ff0000U) >> 8) | \
|
||||
(((unsigned long int)(x) & 0xff000000U) >> 24)))
|
||||
|
||||
#define ntohs(x) \
|
||||
((unsigned short int)((((unsigned short int)(x) & 0x00ff) << 8) | \
|
||||
(((unsigned short int)(x) & 0xff00) >> 8))) \
|
||||
|
||||
#define htonl(x) ntohl(x)
|
||||
#define htons(x) ntohs(x)
|
||||
#endif
|
||||
|
||||
void NetSend (void);
|
||||
boolean NetListen (void);
|
||||
|
||||
|
||||
//
|
||||
// NETWORKING
|
||||
//
|
||||
|
||||
#if 0
|
||||
int DOOMPORT = (IPPORT_USERRESERVED +0x1d );
|
||||
#endif
|
||||
|
||||
int sendsocket;
|
||||
int insocket;
|
||||
|
||||
#if 0
|
||||
struct sockaddr_in sendaddress[MAXNETNODES];
|
||||
#endif
|
||||
|
||||
void (*netget) (void);
|
||||
void (*netsend) (void);
|
||||
|
||||
|
||||
//
|
||||
// UDPsocket
|
||||
//
|
||||
int UDPsocket (void)
|
||||
{
|
||||
#if 0
|
||||
int s;
|
||||
|
||||
// allocate a socket
|
||||
s = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||
if (s<0)
|
||||
I_Error ("can't create socket: %s",strerror(errno));
|
||||
|
||||
return s;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
// BindToLocalPort
|
||||
//
|
||||
void
|
||||
BindToLocalPort
|
||||
( int s,
|
||||
int port )
|
||||
{
|
||||
#if 0
|
||||
int v;
|
||||
struct sockaddr_in address;
|
||||
|
||||
memset (&address, 0, sizeof(address));
|
||||
address.sin_family = AF_INET;
|
||||
address.sin_addr.s_addr = INADDR_ANY;
|
||||
address.sin_port = port;
|
||||
|
||||
v = bind (s, (void *)&address, sizeof(address));
|
||||
if (v == -1)
|
||||
I_Error ("BindToPort: bind: %s", strerror(errno));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// PacketSend
|
||||
//
|
||||
void PacketSend (void)
|
||||
{
|
||||
#if 0
|
||||
int c;
|
||||
doomdata_t sw;
|
||||
|
||||
// byte swap
|
||||
sw.checksum = htonl(netbuffer->checksum);
|
||||
sw.player = netbuffer->player;
|
||||
sw.retransmitfrom = netbuffer->retransmitfrom;
|
||||
sw.starttic = netbuffer->starttic;
|
||||
sw.numtics = netbuffer->numtics;
|
||||
for (c=0 ; c< netbuffer->numtics ; c++)
|
||||
{
|
||||
sw.cmds[c].forwardmove = netbuffer->cmds[c].forwardmove;
|
||||
sw.cmds[c].sidemove = netbuffer->cmds[c].sidemove;
|
||||
sw.cmds[c].angleturn = htons(netbuffer->cmds[c].angleturn);
|
||||
sw.cmds[c].consistancy = htons(netbuffer->cmds[c].consistancy);
|
||||
sw.cmds[c].chatchar = netbuffer->cmds[c].chatchar;
|
||||
sw.cmds[c].buttons = netbuffer->cmds[c].buttons;
|
||||
}
|
||||
|
||||
//I_DBGprintf("sending %i\n",gametic);
|
||||
c = sendto (sendsocket , &sw, doomcom->datalength
|
||||
,0,(void *)&sendaddress[doomcom->remotenode]
|
||||
,sizeof(sendaddress[doomcom->remotenode]));
|
||||
|
||||
// if (c == -1)
|
||||
// I_Error ("SendPacket error: %s",strerror(errno));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// PacketGet
|
||||
//
|
||||
void PacketGet (void)
|
||||
{
|
||||
#if 0
|
||||
int i;
|
||||
int c;
|
||||
struct sockaddr_in fromaddress;
|
||||
int fromlen;
|
||||
doomdata_t sw;
|
||||
|
||||
fromlen = sizeof(fromaddress);
|
||||
c = recvfrom (insocket, &sw, sizeof(sw), 0
|
||||
, (struct sockaddr *)&fromaddress, &fromlen );
|
||||
if (c == -1 )
|
||||
{
|
||||
if (errno != EWOULDBLOCK)
|
||||
I_Error ("GetPacket: %s",strerror(errno));
|
||||
doomcom->remotenode = -1; // no packet
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
static int first=1;
|
||||
if (first)
|
||||
I_printf("len=%d:p=[0x%x 0x%x] \n", c, *(int*)&sw, *((int*)&sw+1));
|
||||
first = 0;
|
||||
}
|
||||
|
||||
// find remote node number
|
||||
for (i=0 ; i<doomcom->numnodes ; i++)
|
||||
if ( fromaddress.sin_addr.s_addr == sendaddress[i].sin_addr.s_addr )
|
||||
break;
|
||||
|
||||
if (i == doomcom->numnodes)
|
||||
{
|
||||
// packet is not from one of the players (new game broadcast)
|
||||
doomcom->remotenode = -1; // no packet
|
||||
return;
|
||||
}
|
||||
|
||||
doomcom->remotenode = i; // good packet from a game player
|
||||
doomcom->datalength = c;
|
||||
|
||||
// byte swap
|
||||
netbuffer->checksum = ntohl(sw.checksum);
|
||||
netbuffer->player = sw.player;
|
||||
netbuffer->retransmitfrom = sw.retransmitfrom;
|
||||
netbuffer->starttic = sw.starttic;
|
||||
netbuffer->numtics = sw.numtics;
|
||||
|
||||
for (c=0 ; c< netbuffer->numtics ; c++)
|
||||
{
|
||||
netbuffer->cmds[c].forwardmove = sw.cmds[c].forwardmove;
|
||||
netbuffer->cmds[c].sidemove = sw.cmds[c].sidemove;
|
||||
netbuffer->cmds[c].angleturn = ntohs(sw.cmds[c].angleturn);
|
||||
netbuffer->cmds[c].consistancy = ntohs(sw.cmds[c].consistancy);
|
||||
netbuffer->cmds[c].chatchar = sw.cmds[c].chatchar;
|
||||
netbuffer->cmds[c].buttons = sw.cmds[c].buttons;
|
||||
}
|
||||
#else
|
||||
doomcom->remotenode = -1; // no packet
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
int GetLocalAddress (void)
|
||||
{
|
||||
#if 0
|
||||
char hostname[1024];
|
||||
struct hostent* hostentry; // host information entry
|
||||
int v;
|
||||
|
||||
// get local address
|
||||
v = gethostname (hostname, sizeof(hostname));
|
||||
if (v == -1)
|
||||
I_Error ("GetLocalAddress : gethostname: errno %d",errno);
|
||||
|
||||
hostentry = gethostbyname (hostname);
|
||||
if (!hostentry)
|
||||
I_Error ("GetLocalAddress : gethostbyname: couldn't get local host");
|
||||
|
||||
return *(int *)hostentry->h_addr_list[0];
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// I_InitNetwork
|
||||
//
|
||||
void I_InitNetwork (void)
|
||||
{
|
||||
#if 0
|
||||
boolean trueval = true;
|
||||
int i;
|
||||
int p;
|
||||
struct hostent* hostentry; // host information entry
|
||||
|
||||
doomcom = I_malloc (sizeof (*doomcom) );
|
||||
memset (doomcom, 0, sizeof(*doomcom) );
|
||||
|
||||
// set up for network
|
||||
i = M_CheckParm ("-dup");
|
||||
if (i && i< myargc-1)
|
||||
{
|
||||
doomcom->ticdup = myargv[i+1][0]-'0';
|
||||
if (doomcom->ticdup < 1)
|
||||
doomcom->ticdup = 1;
|
||||
if (doomcom->ticdup > 9)
|
||||
doomcom->ticdup = 9;
|
||||
}
|
||||
else
|
||||
doomcom-> ticdup = 1;
|
||||
|
||||
if (M_CheckParm ("-extratic"))
|
||||
doomcom-> extratics = 1;
|
||||
else
|
||||
doomcom-> extratics = 0;
|
||||
|
||||
p = M_CheckParm ("-port");
|
||||
if (p && p<myargc-1)
|
||||
{
|
||||
DOOMPORT = atoi (myargv[p+1]);
|
||||
I_printf ("using alternate port %i\n",DOOMPORT);
|
||||
}
|
||||
|
||||
// parse network game options,
|
||||
// -net <consoleplayer> <host> <host> ...
|
||||
i = M_CheckParm ("-net");
|
||||
if (!i)
|
||||
{
|
||||
// single player game
|
||||
netgame = false;
|
||||
doomcom->id = DOOMCOM_ID;
|
||||
doomcom->numplayers = doomcom->numnodes = 1;
|
||||
doomcom->deathmatch = false;
|
||||
doomcom->consoleplayer = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
netsend = PacketSend;
|
||||
netget = PacketGet;
|
||||
netgame = true;
|
||||
|
||||
// parse player number and host list
|
||||
doomcom->consoleplayer = myargv[i+1][0]-'1';
|
||||
|
||||
doomcom->numnodes = 1; // this node for sure
|
||||
|
||||
i++;
|
||||
while (++i < myargc && myargv[i][0] != '-')
|
||||
{
|
||||
sendaddress[doomcom->numnodes].sin_family = AF_INET;
|
||||
sendaddress[doomcom->numnodes].sin_port = htons(DOOMPORT);
|
||||
if (myargv[i][0] == '.')
|
||||
{
|
||||
sendaddress[doomcom->numnodes].sin_addr.s_addr
|
||||
= inet_addr (myargv[i]+1);
|
||||
}
|
||||
else
|
||||
{
|
||||
hostentry = gethostbyname (myargv[i]);
|
||||
if (!hostentry)
|
||||
I_Error ("gethostbyname: couldn't find %s", myargv[i]);
|
||||
sendaddress[doomcom->numnodes].sin_addr.s_addr
|
||||
= *(int *)hostentry->h_addr_list[0];
|
||||
}
|
||||
doomcom->numnodes++;
|
||||
}
|
||||
|
||||
doomcom->id = DOOMCOM_ID;
|
||||
doomcom->numplayers = doomcom->numnodes;
|
||||
|
||||
// build message to receive
|
||||
insocket = UDPsocket ();
|
||||
BindToLocalPort (insocket,htons(DOOMPORT));
|
||||
ioctl (insocket, FIONBIO, &trueval);
|
||||
|
||||
sendsocket = UDPsocket ();
|
||||
#else
|
||||
doomcom = gfxAlloc (sizeof (*doomcom) );
|
||||
memset (doomcom, 0, sizeof(*doomcom) );
|
||||
|
||||
// single player game
|
||||
netgame = false;
|
||||
doomcom-> ticdup = 1;
|
||||
doomcom-> extratics = 0;
|
||||
doomcom->id = DOOMCOM_ID;
|
||||
doomcom->numplayers = doomcom->numnodes = 1;
|
||||
doomcom->deathmatch = false;
|
||||
doomcom->consoleplayer = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void I_NetCmd (void)
|
||||
{
|
||||
if (doomcom->command == CMD_SEND)
|
||||
{
|
||||
netsend ();
|
||||
}
|
||||
else if (doomcom->command == CMD_GET)
|
||||
{
|
||||
netget ();
|
||||
}
|
||||
else
|
||||
I_Error ("Bad net cmd: %i\n",doomcom->command);
|
||||
}
|
||||
|
45
demos/3rdparty/doom/i_net.h
vendored
45
demos/3rdparty/doom/i_net.h
vendored
|
@ -1,45 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// System specific network interface stuff.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __I_NET__
|
||||
#define __I_NET__
|
||||
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// Called by D_DoomMain.
|
||||
|
||||
|
||||
void I_InitNetwork (void);
|
||||
void I_NetCmd (void);
|
||||
|
||||
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
820
demos/3rdparty/doom/i_sound.c
vendored
820
demos/3rdparty/doom/i_sound.c
vendored
|
@ -1,820 +0,0 @@
|
|||
// Emacs style mode select -*- C++ -*-
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Id:$
|
||||
//
|
||||
// Copyright (C) 1993-1996 by id Software, Inc.
|
||||
//
|
||||
// This source is available for distribution and/or modification
|
||||
// only under the terms of the DOOM Source Code License as
|
||||
// published by id Software. All rights reserved.
|
||||
//
|
||||
// The source is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
||||
// for more details.
|
||||
//
|
||||
// $Log:$
|
||||
//
|
||||
// DESCRIPTION:
|
||||
// System interface for sound.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "gfx.h"
|
||||
|
||||
#include "z_zone.h"
|
||||
|
||||
#include "i_system.h"
|
||||
#include "i_sound.h"
|
||||
#include "m_argv.h"
|
||||
#include "m_misc.h"
|
||||
#include "w_wad.h"
|
||||
|
||||
#include "doomdef.h"
|
||||
|
||||
// A quick hack to establish a protocol between
|
||||
// synchronous mix buffer updates and asynchronous
|
||||
// audio writes. Probably redundant with gametic.
|
||||
static int flag = 0;
|
||||
|
||||
// The number of internal mixing channels,
|
||||
// the samples calculated for each mixing step,
|
||||
// the size of the 16bit, 2 hardware channel (stereo)
|
||||
// mixing buffer, and the samplerate of the raw data.
|
||||
|
||||
|
||||
// Needed for calling the actual sound output.
|
||||
#define SAMPLECOUNT 512
|
||||
#define NUM_CHANNELS 8
|
||||
// It is 2 for 16bit, and 2 for two channels.
|
||||
#define BUFMUL 4
|
||||
#define MIXBUFFERSIZE (SAMPLECOUNT*BUFMUL)
|
||||
|
||||
#define SAMPLERATE 11025 // Hz
|
||||
#define SAMPLESIZE 2 // 16bit
|
||||
|
||||
// The actual lengths of all sound effects.
|
||||
int lengths[NUMSFX];
|
||||
|
||||
// The actual output device.
|
||||
int audio_fd;
|
||||
|
||||
// The global mixing buffer.
|
||||
// Basically, samples from all active internal channels
|
||||
// are modifed and added, and stored in the buffer
|
||||
// that is submitted to the audio device.
|
||||
signed short mixbuffer[MIXBUFFERSIZE];
|
||||
|
||||
|
||||
// The channel step amount...
|
||||
unsigned int channelstep[NUM_CHANNELS];
|
||||
// ... and a 0.16 bit remainder of last step.
|
||||
unsigned int channelstepremainder[NUM_CHANNELS];
|
||||
|
||||
|
||||
// The channel data pointers, start and end.
|
||||
unsigned char* channels[NUM_CHANNELS];
|
||||
unsigned char* channelsend[NUM_CHANNELS];
|
||||
|
||||
|
||||
// Time/gametic that the channel started playing,
|
||||
// used to determine oldest, which automatically
|
||||
// has lowest priority.
|
||||
// In case number of active sounds exceeds
|
||||
// available channels.
|
||||
int channelstart[NUM_CHANNELS];
|
||||
|
||||
// The sound in channel handles,
|
||||
// determined on registration,
|
||||
// might be used to unregister/stop/modify,
|
||||
// currently unused.
|
||||
int channelhandles[NUM_CHANNELS];
|
||||
|
||||
// SFX id of the playing sound effect.
|
||||
// Used to catch duplicates (like chainsaw).
|
||||
int channelids[NUM_CHANNELS];
|
||||
|
||||
// Pitch to stepping lookup, unused.
|
||||
int steptable[256];
|
||||
|
||||
// Volume lookups.
|
||||
int vol_lookup[128*256];
|
||||
|
||||
// Hardware left and right channel volume lookup.
|
||||
int* channelleftvol_lookup[NUM_CHANNELS];
|
||||
int* channelrightvol_lookup[NUM_CHANNELS];
|
||||
|
||||
|
||||
//
|
||||
// This function loads the sound data from the WAD lump,
|
||||
// for single sound.
|
||||
//
|
||||
void*
|
||||
getsfx
|
||||
( char* sfxname,
|
||||
int* len )
|
||||
{
|
||||
unsigned char* sfx;
|
||||
unsigned char* paddedsfx;
|
||||
int i;
|
||||
int size;
|
||||
int paddedsize;
|
||||
char name[20];
|
||||
int sfxlump;
|
||||
|
||||
|
||||
// Get the sound data from the WAD, allocate lump
|
||||
// in zone memory.
|
||||
I_sprintf(name, "ds%s", sfxname);
|
||||
|
||||
// Now, there is a severe problem with the
|
||||
// sound handling, in it is not (yet/anymore)
|
||||
// gamemode aware. That means, sounds from
|
||||
// DOOM II will be requested even with DOOM
|
||||
// shareware.
|
||||
// The sound list is wired into sounds.c,
|
||||
// which sets the external variable.
|
||||
// I do not do runtime patches to that
|
||||
// variable. Instead, we will use a
|
||||
// default sound for replacement.
|
||||
if ( W_CheckNumForName(name) == -1 )
|
||||
sfxlump = W_GetNumForName("dspistol");
|
||||
else
|
||||
sfxlump = W_GetNumForName(name);
|
||||
|
||||
size = W_LumpLength( sfxlump );
|
||||
|
||||
// Debug.
|
||||
// I_DBGprintf( "." );
|
||||
//I_DBGprintf( " -loading %s (lump %d, %d bytes)\n",
|
||||
// sfxname, sfxlump, size );
|
||||
|
||||
sfx = (unsigned char*)W_CacheLumpNum( sfxlump, PU_STATIC );
|
||||
|
||||
// Pads the sound effect out to the mixing buffer size.
|
||||
// The original realloc would interfere with zone memory.
|
||||
paddedsize = ((size-8 + (SAMPLECOUNT-1)) / SAMPLECOUNT) * SAMPLECOUNT;
|
||||
|
||||
// Allocate from zone memory.
|
||||
paddedsfx = (unsigned char*)Z_Malloc( paddedsize+8, PU_STATIC, 0 );
|
||||
// ddt: (unsigned char *) I_Realloc(sfx, paddedsize+8);
|
||||
// This should interfere with zone memory handling,
|
||||
// which does not kick in in the soundserver.
|
||||
|
||||
// Now copy and pad.
|
||||
memcpy( paddedsfx, sfx, size );
|
||||
for (i=size ; i<paddedsize+8 ; i++)
|
||||
paddedsfx[i] = 128;
|
||||
|
||||
// Remove the cached lump.
|
||||
Z_Free( sfx );
|
||||
|
||||
// Preserve padded length.
|
||||
*len = paddedsize;
|
||||
|
||||
// Return allocated padded data.
|
||||
return (void *) (paddedsfx + 8);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// This function adds a sound to the
|
||||
// list of currently active sounds,
|
||||
// which is maintained as a given number
|
||||
// (eight, usually) of internal channels.
|
||||
// Returns a handle.
|
||||
//
|
||||
int
|
||||
addsfx
|
||||
( int sfxid,
|
||||
int volume,
|
||||
int step,
|
||||
int seperation )
|
||||
{
|
||||
static unsigned short handlenums = 0;
|
||||
|
||||
int i;
|
||||
int rc = -1;
|
||||
|
||||
int oldest = gametic;
|
||||
int oldestnum = 0;
|
||||
int slot;
|
||||
|
||||
int rightvol;
|
||||
int leftvol;
|
||||
|
||||
// Chainsaw troubles.
|
||||
// Play these sound effects only one at a time.
|
||||
if ( sfxid == sfx_sawup
|
||||
|| sfxid == sfx_sawidl
|
||||
|| sfxid == sfx_sawful
|
||||
|| sfxid == sfx_sawhit
|
||||
|| sfxid == sfx_stnmov
|
||||
|| sfxid == sfx_pistol )
|
||||
{
|
||||
// Loop all channels, check.
|
||||
for (i=0 ; i<NUM_CHANNELS ; i++)
|
||||
{
|
||||
// Active, and using the same SFX?
|
||||
if ( (channels[i])
|
||||
&& (channelids[i] == sfxid) )
|
||||
{
|
||||
// Reset.
|
||||
channels[i] = 0;
|
||||
// We are sure that iff,
|
||||
// there will only be one.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Loop all channels to find oldest SFX.
|
||||
for (i=0; (i<NUM_CHANNELS) && (channels[i]); i++)
|
||||
{
|
||||
if (channelstart[i] < oldest)
|
||||
{
|
||||
oldestnum = i;
|
||||
oldest = channelstart[i];
|
||||
}
|
||||
}
|
||||
|
||||
// Tales from the cryptic.
|
||||
// If we found a channel, fine.
|
||||
// If not, we simply overwrite the first one, 0.
|
||||
// Probably only happens at startup.
|
||||
if (i == NUM_CHANNELS)
|
||||
slot = oldestnum;
|
||||
else
|
||||
slot = i;
|
||||
|
||||
// Okay, in the less recent channel,
|
||||
// we will handle the new SFX.
|
||||
// Set pointer to raw data.
|
||||
channels[slot] = (unsigned char *) S_sfx[sfxid].data;
|
||||
// Set pointer to end of raw data.
|
||||
channelsend[slot] = channels[slot] + lengths[sfxid];
|
||||
|
||||
// Reset current handle number, limited to 0..100.
|
||||
if (!handlenums)
|
||||
handlenums = 100;
|
||||
|
||||
// Assign current handle number.
|
||||
// Preserved so sounds could be stopped (unused).
|
||||
channelhandles[slot] = rc = handlenums++;
|
||||
|
||||
// Set stepping???
|
||||
// Kinda getting the impression this is never used.
|
||||
channelstep[slot] = step;
|
||||
// ???
|
||||
channelstepremainder[slot] = 0;
|
||||
// Should be gametic, I presume.
|
||||
channelstart[slot] = gametic;
|
||||
|
||||
// Separation, that is, orientation/stereo.
|
||||
// range is: 1 - 256
|
||||
seperation += 1;
|
||||
|
||||
// Per left/right channel.
|
||||
// x^2 seperation,
|
||||
// adjust volume properly.
|
||||
leftvol =
|
||||
volume - ((volume*seperation*seperation) >> 16); ///(256*256);
|
||||
seperation = seperation - 257;
|
||||
rightvol =
|
||||
volume - ((volume*seperation*seperation) >> 16);
|
||||
|
||||
// Sanity check, clamp volume.
|
||||
if (rightvol < 0 || rightvol > 127)
|
||||
I_Error("rightvol out of bounds");
|
||||
|
||||
if (leftvol < 0 || leftvol > 127)
|
||||
I_Error("leftvol out of bounds");
|
||||
|
||||
// Get the proper lookup table piece
|
||||
// for this volume level???
|
||||
channelleftvol_lookup[slot] = &vol_lookup[leftvol*256];
|
||||
channelrightvol_lookup[slot] = &vol_lookup[rightvol*256];
|
||||
|
||||
// Preserve sound SFX id,
|
||||
// e.g. for avoiding duplicates of chainsaw.
|
||||
channelids[slot] = sfxid;
|
||||
|
||||
// You tell me.
|
||||
return rc;
|
||||
}
|
||||
|
||||
//
|
||||
// SFX API
|
||||
// Note: this was called by S_Init.
|
||||
// However, whatever they did in the
|
||||
// old DPMS based DOS version, this
|
||||
// were simply dummies in the Linux
|
||||
// version.
|
||||
// See soundserver initdata().
|
||||
//
|
||||
void I_SetChannels()
|
||||
{
|
||||
#if 0
|
||||
// Init internal lookups (raw data, mixing buffer, channels).
|
||||
// This function sets up internal lookups used during
|
||||
// the mixing process.
|
||||
int i;
|
||||
int j;
|
||||
|
||||
int* steptablemid = steptable + 128;
|
||||
|
||||
// Okay, reset internal mixing channels to zero.
|
||||
/*for (i=0; i<NUM_CHANNELS; i++)
|
||||
{
|
||||
channels[i] = 0;
|
||||
}*/
|
||||
|
||||
// This table provides step widths for pitch parameters.
|
||||
// I fail to see that this is currently used.
|
||||
for (i=-128 ; i<128 ; i++)
|
||||
steptablemid[i] = (int)(pow(2.0, (i/64.0))*65536.0);
|
||||
|
||||
|
||||
// Generates volume lookup tables
|
||||
// which also turn the unsigned samples
|
||||
// into signed samples.
|
||||
for (i=0 ; i<128 ; i++)
|
||||
for (j=0 ; j<256 ; j++)
|
||||
vol_lookup[i*256+j] = (i*(j-128)*256)/127;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void I_SetSfxVolume(int volume)
|
||||
{
|
||||
#if 0
|
||||
// Identical to DOS.
|
||||
// Basically, this should propagate
|
||||
// the menu/config file setting
|
||||
// to the state variable used in
|
||||
// the mixing.
|
||||
snd_SfxVolume = volume;
|
||||
#endif
|
||||
}
|
||||
|
||||
// MUSIC API - dummy. Some code from DOS version.
|
||||
void I_SetMusicVolume(int volume)
|
||||
{
|
||||
#if 0
|
||||
// Internal state variable.
|
||||
snd_MusicVolume = volume;
|
||||
// Now set volume on output device.
|
||||
// Whatever( snd_MusciVolume );
|
||||
#endif
|
||||
}
|
||||