Browse Source

I don't remember what I did in this update so just check the commit diffs

Alison Watson 5 years ago
parent
commit
087190b8e0
7 changed files with 139 additions and 108 deletions
  1. 2
    2
      .gitattributes
  2. 2
    1
      CREDITS.txt
  3. 6
    7
      pk7/SNDINFO.txt
  4. 1
    86
      pk7/acs/CWMain.ds
  5. 19
    8
      pk7/acs/inc/CWAtchMenu.dh
  6. 105
    0
      pk7/acs/inc/CWDefs.dh
  7. 4
    4
      pk7/acs/inc/CWLaser.dh

+ 2
- 2
.gitattributes View File

@@ -1,4 +1,4 @@
1
-*.c text
2
-*.h text
1
+*.ds text
2
+*.dh text
3 3
 *.dec text
4 4
 *.txt text

+ 2
- 1
CREDITS.txt View File

@@ -2,4 +2,5 @@ Credits:
2 2
 	JoeyTD for the silencer sprites
3 3
 	Bloax for the pistol customization sprite
4 4
 	Kyle873 for some ACS functions
5
-	torridGristle for all of the sounds
5
+	torridGristle for all of the sounds
6
+	TheZombieKiller for the footstep ACS

+ 6
- 7
pk7/SNDINFO.txt View File

@@ -1,7 +1,6 @@
1
-weapons/silpistol	DSSPISFR
2
-weapons/pistolupg	DSPISUP
3
-
4
-weapons/silshotgun	DSSHGSFR
5
-weapons/shogupg		DSSHGCK1
6
-weapons/shogupg2	DSSHGCK2
7
-weapons/shotty		DSSHOGFR
1
+weapons/silpistol DSSPISFR
2
+weapons/pistolupg DSPISUP
3
+weapons/silshotgun DSSHGSFR
4
+weapons/shogupg DSSHGCK1
5
+weapons/shogupg2 DSSHGCK2
6
+weapons/shotty DSSHOGFR

+ 1
- 86
pk7/acs/CWMain.ds View File

@@ -1,92 +1,7 @@
1 1
 __library("CWMain");
2 2
 #include <zcommon.acs>
3 3
 
4
-// Pistol related
5
-#define PIST_SIL	1
6
-#define PIST_LAZ	2
7
-#define PIST_TRG	3
8
-#define CM_PISTL	4
9
-
10
-// Shotgun related
11
-#define SHOG_SIL	5
12
-#define SHOG_LAZ	6
13
-#define SHOG_TRG	7
14
-#define SHOG_PMP	8
15
-#define CM_SHTGN	9
16
-
17
-// GetVal arguments
18
-#define GV_PSTF1	1
19
-#define GV_PSTF2	2
20
-#define GV_SHTF1	3
21
-#define GV_SHTP1	4
22
-
23
-#define ClearMsg(arg1)	__printf<__printf_hud>("\n",0,(arg1),0,0,0,0)
24
-#define and				&&
25
-#define or				||
26
-#define INT_MAX			0x7FFFFFFF
27
-#define script			__extscript "ACS"
28
-
29
-__function void SWepFunc(str arg1, str arg2, str arg3)
30
-{
31
-	if(CheckInventory(arg1))
32
-	{
33
-		GiveInventory(arg2,1);
34
-		SetWeapon(arg2);
35
-	}
36
-	else
37
-	{
38
-		GiveInventory(arg3,1);
39
-		SetWeapon(arg3);
40
-	};
41
-};
42
-
43
-__function void SItmFunc(str arg1, str arg2)
44
-{
45
-	if(CheckInventory(arg1))
46
-	{
47
-		TakeInventory(arg2,1);
48
-		TakeInventory(arg1,1);
49
-	}
50
-	else
51
-	{
52
-		GiveInventory(arg2,1);
53
-		GiveInventory(arg1,1);
54
-	};
55
-};
56
-
57
-__function void SItmFunc2(str arg1)
58
-{
59
-	if(CheckInventory(arg1))
60
-	{
61
-		TakeInventory(arg1,1);
62
-	}
63
-	else
64
-	{
65
-		GiveInventory(arg1,1);
66
-	};
67
-};
68
-
69
-__function void CWepFunc(str arg1, str arg2)
70
-{
71
-	if(CheckWeapon(arg1))
72
-	{
73
-		GiveInventory(arg2,1);
74
-		SetWeapon(arg2);
75
-	};
76
-};
77
-
78
-__function void SprPrint(str sprite, int id, int x, int y)
79
-{
80
-	SetFont(sprite);
81
-	__printf<__printf_hud>("A\n", HUDMSG_PLAIN, id, CR_UNTRANSLATED, x, y, 1.0);
82
-};
83
-
84
-__function void SprPrintFade(str sprite, int id, int x, int y, int d, int h)
85
-{
86
-	SetFont(sprite);
87
-	__printf<__printf_hud>("A\n", HUDMSG_FADEOUT, id, CR_UNTRANSLATED, x, y, d, h);
88
-};
89
-
4
+#include "inc/CWDefs.dh"		// Definitions file
90 5
 #include "inc/CWKeyFinder.dh"	// Script trigger
91 6
 #include "inc/CWAttach.dh"		// Attachment script
92 7
 #include "inc/CWAtchMenu.dh"	// Customization menu

+ 19
- 8
pk7/acs/inc/CWAtchMenu.dh View File

@@ -1,5 +1,19 @@
1 1
 __library("CWAtchMenu");
2 2
 
3
+str[3] atchnames =
4
+{
5
+	"LTrig";
6
+	"Laz";
7
+	"PumpMech";
8
+};
9
+
10
+int[3] atchnums =
11
+{
12
+	0x10;
13
+	0x20;
14
+	0x40;
15
+};
16
+
3 17
 script CW_MENUOPEN(int arg1)
4 18
 {
5 19
 	/* id index
@@ -19,15 +33,12 @@ script CW_MENUOPEN(int arg1)
19 33
 	SetHudSize(320,200,0);
20 34
 	SetFont("DBIGFONT");
21 35
 	__printf<__printf_hud>("Reload:Attach\nFire:Switch\n",0,67,0,160.0,15.0,1.0);
22
-	int CMenuX, CMenuY, wep1;
36
+	int CMenuX, CMenuY, wep1, i;
23 37
 	int atch1 = 0;
24 38
 	
25
-	if(CheckInventory("LTrig"))
26
-		atch1 = 0x10;
27
-	if(CheckInventory("Laz"))
28
-		atch1 = atch1 + 0x20;
29
-	if(CheckInventory("PumpMech"))
30
-		atch1 = atch1 + 0x40;
39
+	for(i=0;i<3;i++)
40
+		if(CheckInventory(atchnames[i]))
41
+			atch1 = (atch1 + atchnums[i]);
31 42
 	
32 43
 	switch(arg1)
33 44
 	{
@@ -79,7 +90,7 @@ script CW_MENUOPEN(int arg1)
79 90
 	SprPrint("CMENU2", 30, CMenuX-1.0, CMenuY-(30.0-(7.0*CheckInventory("CMenuNext"))));
80 91
 	SprPrint("CMENU1", 71, CMenuX, CMenuY);
81 92
 	Delay(1);
82
-	for(int i = 30; i < 73; i++)
93
+	for(i = 30; i < 73; i++)
83 94
 		ClearMsg(i);
84 95
 	goto start;
85 96
 };

+ 105
- 0
pk7/acs/inc/CWDefs.dh View File

@@ -0,0 +1,105 @@
1
+__library("CWDefs");
2
+
3
+// Pistol related
4
+#define PIST_SIL	1
5
+#define PIST_LAZ	2
6
+#define PIST_TRG	3
7
+#define CM_PISTL	4
8
+
9
+// Shotgun related
10
+#define SHOG_SIL	5
11
+#define SHOG_LAZ	6
12
+#define SHOG_TRG	7
13
+#define SHOG_PMP	8
14
+#define CM_SHTGN	9
15
+
16
+// GetVal arguments
17
+#define GV_PSTF1	1
18
+#define GV_PSTF2	2
19
+#define GV_SHTF1	3
20
+#define GV_SHTP1	4
21
+
22
+#define ClearMsg(arg1)	__printf<__printf_hud>("\n",0,(arg1),0,0,0,0)
23
+#define script			__extscript "ACS"
24
+
25
+__function void SWepFunc(str arg1, str arg2, str arg3)
26
+{
27
+	if(CheckInventory(arg1))
28
+	{
29
+		GiveInventory(arg2,1);
30
+		SetWeapon(arg2);
31
+	}
32
+	else
33
+	{
34
+		GiveInventory(arg3,1);
35
+		SetWeapon(arg3);
36
+	};
37
+};
38
+
39
+__function void SItmFunc(str arg1, str arg2)
40
+{
41
+	if(CheckInventory(arg1))
42
+	{
43
+		TakeInventory(arg2,1);
44
+		TakeInventory(arg1,1);
45
+	}
46
+	else
47
+	{
48
+		GiveInventory(arg2,1);
49
+		GiveInventory(arg1,1);
50
+	};
51
+};
52
+
53
+__function void SItmFunc2(str arg1)
54
+{
55
+	if(CheckInventory(arg1))
56
+	{
57
+		TakeInventory(arg1,1);
58
+	}
59
+	else
60
+	{
61
+		GiveInventory(arg1,1);
62
+	};
63
+};
64
+
65
+__function void CWepFunc(str arg1, str arg2)
66
+{
67
+	if(CheckWeapon(arg1))
68
+	{
69
+		GiveInventory(arg2,1);
70
+		SetWeapon(arg2);
71
+	};
72
+};
73
+
74
+__function void SprPrint(str sprite, int id, int x, int y)
75
+{
76
+	SetFont(sprite);
77
+	__printf<__printf_hud>("A\n", HUDMSG_PLAIN, id, CR_UNTRANSLATED, x, y, 1.0);
78
+};
79
+
80
+__function void SprPrintFade(str sprite, int id, int x, int y, int d, int h)
81
+{
82
+	SetFont(sprite);
83
+	__printf<__printf_hud>("A\n", HUDMSG_FADEOUT, id, CR_UNTRANSLATED, x, y, d, h);
84
+};
85
+
86
+__function int GetVelocity(void)
87
+{
88
+	fixed vel;
89
+	fixed x = GetActorVelX(0);
90
+	fixed y = GetActorVelY(0);
91
+	fixed angle = VectorAngle(x, y);
92
+	
93
+	if(((angle + 0.125) % 0.5) > 0.25)
94
+	{
95
+		vel = y * Sin(angle);
96
+	}
97
+	else
98
+	{
99
+		vel = x * Cos(angle);
100
+	};
101
+	int retvel = vel;
102
+	retvel = retvel >> 16;
103
+	return retvel;
104
+};
105
+

+ 4
- 4
pk7/acs/inc/CWLaser.dh View File

@@ -3,11 +3,11 @@ __library("CWLaser");
3 3
 script CW_LASER(void) __enter
4 4
 {
5 5
 	start:
6
-	if( (CheckInventory("PistolLaz") and CheckWeapon("CPistol")) or (CheckInventory("ShotgunLaz") and CheckWeapon("CShotgun")) )
6
+	if((CheckInventory("PistolLaz")&&CheckWeapon("CPistol"))||(CheckInventory("ShotgunLaz")&&CheckWeapon("CShotgun")))
7 7
 	{
8
-		int ang = GetActorAngle(0);
9
-		int pit = GetActorPitch(0);
10
-		LineAttack(0, ang, pit, 0, "LaserPointer", "NoDam", INT_MAX, FHF_NORANDOMPUFFZ);
8
+		fixed angl = GetActorAngle(0);
9
+		fixed pitc = GetActorPitch(0);
10
+		LineAttack(0, angl, pitc, 0, "LaserPointer", "NoDam", 32767.9999, 1);
11 11
 	};
12 12
 	Delay(1);
13 13
 	goto start;

Loading…
Cancel
Save