Skip to content

Commit 25b58f0

Browse files
committed
Added missing code from previous CL.
1 parent 6e26f3d commit 25b58f0

File tree

3 files changed

+340
-0
lines changed

3 files changed

+340
-0
lines changed

Scripts/DukeScript.csproj

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{F9BFDBB3-6C19-4EB0-8E36-E2A303491F12}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>DukeScript</RootNamespace>
11+
<AssemblyName>DukeScript</AssemblyName>
12+
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<Deterministic>true</Deterministic>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>..\Assets\Plugins\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<DebugType>pdbonly</DebugType>
27+
<Optimize>true</Optimize>
28+
<OutputPath>bin\Release\</OutputPath>
29+
<DefineConstants>TRACE</DefineConstants>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
</PropertyGroup>
33+
<ItemGroup>
34+
<Reference Include="System" />
35+
<Reference Include="System.Data" />
36+
<Reference Include="System.Xml" />
37+
</ItemGroup>
38+
<ItemGroup>
39+
<Compile Include="actor_blimp.cs" />
40+
<Compile Include="actor_breakable.cs" />
41+
<Compile Include="actor_core.cs" />
42+
<Compile Include="actor_player.cs" />
43+
<Compile Include="actor_register.cs" />
44+
<Compile Include="Defs.cs" />
45+
<Compile Include="females.cs" />
46+
<Compile Include="items.cs" />
47+
<Compile Include="jibs.cs" />
48+
<Compile Include="monster_boss1.cs" />
49+
<Compile Include="monster_boss2.cs" />
50+
<Compile Include="monster_boss3.cs" />
51+
<Compile Include="monster_boss4.cs" />
52+
<Compile Include="monster_commander.cs" />
53+
<Compile Include="monster_drone.cs" />
54+
<Compile Include="monster_egg.cs" />
55+
<Compile Include="monster_lizman.cs" />
56+
<Compile Include="monster_newbeast.cs" />
57+
<Compile Include="monster_octobrain.cs" />
58+
<Compile Include="monster_pigcop.cs" />
59+
<Compile Include="monster_shark.cs" />
60+
<Compile Include="monster_tank.cs" />
61+
<Compile Include="monster_troop.cs" />
62+
<Compile Include="Properties\AssemblyInfo.cs" />
63+
<Compile Include="toilet.cs" />
64+
<Compile Include="traps.cs" />
65+
<Compile Include="User.cs" />
66+
</ItemGroup>
67+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
68+
</Project>

Scripts/Properties/AssemblyInfo.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("DukeScript")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("DukeScript")]
13+
[assembly: AssemblyCopyright("Copyright © 2020")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("f9bfdbb3-6c19-4eb0-8e36-e2a303491f12")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

Scripts/traps.cs

Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
public class ScriptActorRegistration
2+
{
3+
public delegate void Function_t();
4+
public Function_t func;
5+
public int aiType;
6+
public int aiType2;
7+
public ConAction action;
8+
}
9+
public class ConAction
10+
{
11+
public int startframe;
12+
public int frames;
13+
public int viewtype;
14+
public int invvalue;
15+
public int delay;
16+
17+
public int GetIndex(int i)
18+
{
19+
switch (i)
20+
{
21+
case 0:
22+
return startframe;
23+
case 1:
24+
return frames;
25+
case 2:
26+
return viewtype;
27+
case 3:
28+
return invvalue;
29+
case 4:
30+
return delay;
31+
}
32+
return -1;
33+
}
34+
35+
public ConAction(int startframe = 0, int frames = 0, int viewtype = 0, int invvalue = 0, int delay = 0)
36+
{
37+
this.startframe = startframe;
38+
this.frames = frames;
39+
this.viewtype = viewtype;
40+
this.invvalue = invvalue;
41+
this.delay = delay;
42+
}
43+
}
44+
45+
public class AIAction
46+
{
47+
public ConAction action;
48+
public MoveAction moveAction;
49+
public int val;
50+
public AIAction(ConAction action, MoveAction moveAction, int val = 0, int unknown = 0)
51+
{
52+
this.action = action;
53+
this.moveAction = moveAction;
54+
this.val = val;
55+
}
56+
}
57+
58+
public class MoveAction
59+
{
60+
public int horizontal;
61+
public int vertical;
62+
63+
public int GetIndex(int i)
64+
{
65+
switch (i)
66+
{
67+
case 0:
68+
return horizontal;
69+
case 1:
70+
return vertical;
71+
}
72+
return -1;
73+
}
74+
75+
public MoveAction(int horizontal = 0, int vertical = 0)
76+
{
77+
this.horizontal = horizontal;
78+
this.vertical = vertical;
79+
}
80+
}
81+
public abstract class ConTraps
82+
{
83+
public abstract void gamestartup(params int[] parms);
84+
85+
public abstract void definemusic(int episode, params string[] music);
86+
public abstract void definesound(int id, string filename, int var1, int var2, int var3, int var4, int var5);
87+
public abstract void definelevelname(int episode, int level, string mapfile, string time1, string time2, string name);
88+
public abstract void defineskillname(int id, string name);
89+
public abstract void definevolumename(int id, string name);
90+
public abstract void definequote(int id, string str);
91+
public abstract void RegisterActor(ScriptActorRegistration.Function_t function, int picnum, int aiType, int aiType2 = 0, ConAction action = null, MoveAction unknown2 = null, int unknown3 = 0, int unknown4 = 0);
92+
93+
94+
public abstract bool ifnosounds();
95+
public abstract bool ifangdiffl(int value);
96+
public abstract bool ifspritepal(int value);
97+
98+
public abstract void respawnhitag();
99+
public abstract bool ifnotmoving();
100+
public abstract bool ifinouterspace();
101+
public abstract void quote(int value);
102+
public abstract bool ifawayfromwall();
103+
public abstract void pstomp();
104+
105+
public abstract bool ifpinventory(int val1, int val2);
106+
107+
public abstract bool ifphealthl(int value);
108+
public abstract void palfrom(int v1 = 0, int v2 = 0, int v3 = 0, int v4 = 0);
109+
public abstract bool ifceilingdistl(int val);
110+
public abstract bool iffloordistl(int val);
111+
public abstract bool ifrespawn();
112+
public abstract bool ifbulletnear();
113+
public abstract void cactor(int value);
114+
public abstract void spritepal(int value);
115+
public abstract bool ifinspace();
116+
public abstract void operate();
117+
public abstract bool ifmultiplayer();
118+
public abstract bool ifoutside();
119+
public abstract bool ifhitspace();
120+
public abstract bool ifgapzl(int val);
121+
public abstract void wackplayer();
122+
123+
public abstract bool ifspawnedby(int value);
124+
125+
public abstract void guts(int value1, int value2);
126+
127+
public abstract bool ifstrength(int value);
128+
129+
public abstract bool ifp(int value, object notused = null, object notused2 = null, object notused3 = null, object notused4 = null);
130+
131+
public abstract void hitradius(int val1 = 0, int val2 = 0, int val3 = 0, int val4 = 0, int val5 = 0);
132+
133+
public abstract void addinventory(int val1, int val2);
134+
public abstract void resetcount();
135+
public abstract bool ifactor(int val1);
136+
public abstract bool ifcount(int val);
137+
public abstract bool ifinwater();
138+
public abstract bool ifonwater();
139+
public abstract void resetplayer();
140+
public abstract bool ifmove(MoveAction val1);
141+
142+
public abstract void cstat(int value);
143+
public abstract void clipdist(int value);
144+
public abstract void cstator(int value);
145+
public abstract void count(int value);
146+
public abstract void debris(int val1, int val2);
147+
public abstract bool ifrnd(int val1);
148+
public abstract void resetactioncount();
149+
public abstract bool ifactioncount(int val1);
150+
151+
public abstract void SetAction(ConAction action);
152+
153+
public abstract bool ifaction(ConAction action);
154+
155+
public abstract void Ai(AIAction ai);
156+
public abstract bool ifai(AIAction ai);
157+
158+
public abstract bool ifwasweapon(int val);
159+
public abstract void spawn(int val);
160+
161+
public abstract void Move(MoveAction val, int val2 = 0, int val3 = 0, int unknown1 = 0);
162+
163+
public abstract void Move(int val, int val2 = 0);
164+
165+
166+
public abstract void addphealth(int val);
167+
168+
public abstract void endofgame(int timebeforeexit);
169+
170+
public abstract void debug();
171+
172+
public abstract void addweapon(int val, int val2);
173+
public abstract void killit();
174+
public abstract void lotsofglass(int val);
175+
public abstract void addkills(int val);
176+
177+
public abstract void paper(int val);
178+
public abstract void sleeptime(int val);
179+
public abstract void mail(int val);
180+
181+
public abstract void money(int val);
182+
public abstract void addammo(int val, int val2);
183+
public abstract void fall();
184+
185+
public abstract void tip();
186+
public abstract void sound(int val);
187+
public abstract void globalsound(int val);
188+
public abstract void stopsound(int val);
189+
public abstract void soundonce(int val);
190+
public abstract void shoot(int val);
191+
public abstract void sizeat(int val, int val2);
192+
public abstract void sizeto(int val, int val2);
193+
public abstract void pkick();
194+
public abstract void mikesnd();
195+
public abstract void nullop();
196+
public abstract void tossweapon();
197+
198+
public abstract void getlastpal();
199+
public abstract bool ifgotweaponce(int val);
200+
public abstract void strength(int val);
201+
202+
public abstract void addstrength(int val);
203+
204+
205+
public abstract bool ifpdistg(int val);
206+
207+
public abstract bool ifpdistl(int val);
208+
209+
// jmarshall
210+
//public abstract void ai()
211+
//{
212+
// insptr++;
213+
// g_t[5] = insptr;
214+
// g_t[4] = g_t[5]; // Action
215+
// g_t[1] = g_t[5] + 4; // move
216+
// g_sp.hitag = (short)scriptptr.buffer[g_t[5] + 8]; // Ai
217+
// hittype[g_i].count = hittype[g_i].actioncount = hittype[g_i].animcounter = 0;
218+
// if ((g_sp.hitag & DefineConstants.random_angle) != 0)
219+
// {
220+
// g_sp.ang = (short)(Engine.krand() & 2047);
221+
// }
222+
// insptr++;
223+
//}
224+
// jmarshall end
225+
public abstract bool ifdead();
226+
public abstract bool ifsquished();
227+
228+
public abstract bool ifhitweapon();
229+
230+
public abstract bool ifcansee();
231+
232+
public abstract bool ifactornotstayput();
233+
234+
public abstract bool ifcanseetarget();
235+
public abstract bool ifcanshoottarget();
236+
}

0 commit comments

Comments
 (0)