1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

adding respawnaritfacts and configurable shortkeys

bump PORTREVISION

PR:		ports/156536
Submitted By:	Kalten <kalten@gmx.at>
This commit is contained in:
Oliver Lehmann 2011-06-08 11:46:40 +00:00
parent ff91d9d966
commit cbb0e53c10
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=275223
8 changed files with 166 additions and 3 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= heretic
PORTVERSION= 1.2
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= games
MASTER_SITES= http://heretic.linuxgames.com/heretic/src/:source \
http://heretic.linuxgames.com/wad/:wad
@ -72,8 +72,10 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/heretic_share.wad ${PREFIX}/share/heretic
.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${PREFIX}/share/doc/heretic
${INSTALL_DATA} ${WRKSRC}/doc/* ${PREFIX}/share/doc/heretic
@${MKDIR} ${DOCSDIR}
.for i in "End User License Heretic Source Code.txt" Gamekeys.txt README.txt AUTHORS SourceReadme.txt Changelog README.opengl
${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DOCSDIR}
.endfor
.endif
.include <bsd.port.post.mk>

View File

@ -0,0 +1,25 @@
--- d_main.c.ori Sun Mar 11 16:31:49 2007
+++ d_main.c Sun Mar 11 16:33:46 2007
@@ -690,6 +690,7 @@
setbuf(stdout, NULL);
nomonsters = M_CheckParm("-nomonsters");
respawnparm = M_CheckParm("-respawn");
+ respawnartifacts = M_CheckParm("-respawnartifacts");
ravpic = M_CheckParm("-ravpic");
noartiskip = M_CheckParm("-noartiskip");
debugmode = M_CheckParm("-debug");
@@ -778,7 +779,13 @@
{
deathmatch = true;
}
-
+
+ if ( M_CheckParm("-respawnartifacts")!=0 )
+ {
+ printf("Parameter: -respawnartifacts\n");
+ respawnartifacts=1;
+ }
+
p = M_CheckParm("-skill");
if(p && p < myargc-1)
{

View File

@ -0,0 +1,13 @@
--- doc/Gamekeys.txt.orig 1999-04-06 14:58:18.000000000 +0200
+++ doc/Gamekeys.txt 2011-04-21 01:30:38.000000000 +0200
@@ -9,6 +9,10 @@
key_fire: Control-key
key_use: Space-key
+key_health: 'a'
+key_tomeofpower: Backspace-key
+key_egg: 'q'
+key_firebomb: 'b'
key_strafe: Alt/Meta-key
key_speed: Shift-key

View File

@ -0,0 +1,12 @@
--- doc/README.opengl.orig 2000-05-15 22:46:24.000000000 +0200
+++ doc/README.opengl 2011-04-21 01:36:33.000000000 +0200
@@ -71,6 +71,9 @@
7. -mlook
With this switch you enable free mouse look in the game. Normaly it makes sense to use this switch together with the -grabmouse switch. Mouselook is enabled by default, but it can be switched inside the game.
+8. -respawnartifacts
+With this switch you enable respawning of artifacts even in version 1.3 as it
+was in version 1.0 of heretic.
-You can also edit the generated glheretic.cfg file in the $HOME/.heretic
directory after you have started the game once.

View File

@ -0,0 +1,19 @@
--- doomdef.h.ori Sun Mar 4 15:43:44 2007
+++ doomdef.h Sun Mar 4 15:57:04 2007
@@ -681,6 +681,7 @@
short ticdup __PACKED__ ; /* 1 = no duplication, 2-5 = dup for slow nets */
short extratics __PACKED__ ; /* 1 = send a backup tic in every packet */
short deathmatch __PACKED__ ; /* 1 = deathmatch */
+ short respawnartifacts __PACKED__ ; /* respawn the artifacts? 1=yes */
short savegame __PACKED__ ; /* -1 = new game, 0-5 = load savegame */
short episode __PACKED__ ; /* 1-3 */
short map __PACKED__ ; /* 1-9 */
@@ -753,6 +754,8 @@
extern boolean cdrom; /* true if cd-rom mode active ("-cdrom") */
extern boolean deathmatch; /* only if started as net death */
+
+extern boolean respawnartifacts; /* respawn the artifacts */
extern boolean netgame; /* only true if >1 player */

View File

@ -0,0 +1,56 @@
--- g_game.c.ori Sun Mar 4 15:44:07 2007
+++ g_game.c Sun Mar 4 15:50:29 2007
@@ -91,6 +91,7 @@
boolean viewactive;
boolean deathmatch; /* only if started as net death */
+boolean respawnartifacts; /* respawning Artifacts */
boolean netgame; /* only true if packets are broadcast */
boolean playeringame[MAXPLAYERS];
player_t players[MAXPLAYERS];
@@ -122,6 +123,7 @@
long key_right, key_left, key_up, key_down;
long key_strafeleft, key_straferight;
long key_fire, key_use, key_strafe, key_speed;
+long key_health, key_tomeofpower, key_egg, key_firebomb;
long key_flyup, key_flydown, key_flycenter;
long key_lookup, key_lookdown, key_lookcenter;
long key_invleft, key_invright, key_useartifact;
@@ -361,13 +363,34 @@
}
}
}
- if(gamekeydown[127] && !cmd->arti
+ if(gamekeydown[key_tomeofpower] && !cmd->arti
&& !players[consoleplayer].powers[pw_weaponlevel2])
{
- gamekeydown[127] = false;
+ gamekeydown[key_tomeofpower] = false;
cmd->arti = arti_tomeofpower;
}
-
+ // Health by key:
+ if(gamekeydown[key_health] && !cmd->arti)
+ {
+ gamekeydown[key_health] = false;
+ cmd->arti = arti_health;
+ }
+
+ // Egg by key:
+ if(gamekeydown[key_egg] && !cmd->arti)
+ {
+ gamekeydown[key_egg] = false;
+ cmd->arti = arti_egg;
+ }
+
+ // Timebombe by key:
+ if(gamekeydown[key_firebomb] && !cmd->arti)
+ {
+ gamekeydown[key_firebomb] = false;
+ cmd->arti = arti_firebomb;
+ }
+
+
/*
* buttons
*/

View File

@ -0,0 +1,21 @@
--- m_misc.c.ori Sun Mar 4 15:50:54 2007
+++ m_misc.c Sun Mar 4 15:52:40 2007
@@ -365,6 +365,7 @@
extern long key_right, key_left, key_up, key_down;
extern long key_strafeleft, key_straferight;
extern long key_fire, key_use, key_strafe, key_speed;
+extern long key_health, key_tomeofpower, key_egg, key_firebomb;
extern long key_flyup, key_flydown, key_flycenter;
extern long key_lookup, key_lookdown, key_lookcenter;
extern long key_invleft, key_invright, key_useartifact;
@@ -447,6 +448,10 @@
{ "key_fire", &key_fire, KEY_RCTRL, 1 },
{ "key_use", &key_use, ' ', 1 },
+ { "key_health", &key_health, 'a' },
+ { "key_tomeofpower", &key_tomeofpower, 127},
+ { "key_egg", &key_egg, 'q'},
+ { "key_firebomb", &key_firebomb, 'b'},
{ "key_strafe", &key_strafe, KEY_RALT, 1 },
{ "key_speed", &key_speed, KEY_RSHIFT, 1 },

View File

@ -0,0 +1,15 @@
--- p_inter.c.ori Sun Mar 4 15:38:51 2007
+++ p_inter.c Sun Mar 4 15:41:50 2007
@@ -477,8 +477,10 @@
void P_SetDormantArtifact(mobj_t *arti)
{
arti->flags &= ~MF_SPECIAL;
- if(deathmatch && (arti->type != MT_ARTIINVULNERABILITY)
- && (arti->type != MT_ARTIINVISIBILITY))
+ if(
+ (deathmatch && (arti->type != MT_ARTIINVULNERABILITY)
+ && (arti->type != MT_ARTIINVISIBILITY))
+ || (respawnartifacts) )
{
P_SetMobjState(arti, S_DORMANTARTI1);
}