├── .gitattributes
├── .gitignore
├── GTA3ScriptSharp.sln
├── GTA3ScriptSharp
├── AGTA3Script.cs
├── AGTA3ScriptRuntime.cs
├── EGTA3ScriptFilesMode.cs
├── EGTA3ScriptGTAIIIDataType.cs
├── EGTA3ScriptGTALibertyCityStoriesDataType.cs
├── EGTA3ScriptGTASanAndreasDataType.cs
├── EGTA3ScriptGTAViceCityDataType.cs
├── EGTA3ScriptGTAViceCityStoriesDataType.cs
├── EGame.cs
├── EReferenceType.cs
├── GTA3Script.cs
├── GTA3ScriptCommand.cs
├── GTA3ScriptExecutionException.cs
├── GTA3ScriptFiles.cs
├── GTA3ScriptGTAIIIRuntime.cs
├── GTA3ScriptGTALibertyCityStoriesRuntime.cs
├── GTA3ScriptGTASanAndreasRuntime.cs
├── GTA3ScriptGTAViceCityRuntime.cs
├── GTA3ScriptGTAViceCityStoriesRuntime.cs
├── GTA3ScriptInstruction.cs
├── GTA3ScriptLoadException.cs
├── GTA3ScriptOpCodeCallDelegate.cs
├── GTA3ScriptReferenceArray.cs
├── GTA3ScriptReferenceValue.cs
├── GTA3ScriptRuntimeProvider.cs
├── GTA3ScriptSharp.csproj
├── GTA3ScriptStreamedScriptData.cs
├── IR2.cs
├── Properties
│ └── AssemblyInfo.cs
├── SC.cs
├── SCM.cs
└── libs
│ └── IMGSharp.dll
├── GTA3ScriptSharpTest
├── GTA3ScriptSharpTest.csproj
├── GTA3ScriptUnitTest.cs
├── Properties
│ └── AssemblyInfo.cs
└── packages.config
├── README.md
└── docs
└── opcodes
├── iii_keywords.md
├── iii_opcodes.txt
├── sa_keywords.md
├── sa_opcodes.txt
├── vc_keywords.md
└── vc_opcodes.txt
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | bld/
21 | [Bb]in/
22 | [Oo]bj/
23 | [Ll]og/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 | # Uncomment if you have tasks that create the project's static files in wwwroot
28 | #wwwroot/
29 |
30 | # MSTest test Results
31 | [Tt]est[Rr]esult*/
32 | [Bb]uild[Ll]og.*
33 |
34 | # NUNIT
35 | *.VisualState.xml
36 | TestResult.xml
37 |
38 | # Build Results of an ATL Project
39 | [Dd]ebugPS/
40 | [Rr]eleasePS/
41 | dlldata.c
42 |
43 | # DNX
44 | project.lock.json
45 | project.fragment.lock.json
46 | artifacts/
47 |
48 | *_i.c
49 | *_p.c
50 | *_i.h
51 | *.ilk
52 | *.meta
53 | *.obj
54 | *.pch
55 | *.pdb
56 | *.pgc
57 | *.pgd
58 | *.rsp
59 | *.sbr
60 | *.tlb
61 | *.tli
62 | *.tlh
63 | *.tmp
64 | *.tmp_proj
65 | *.log
66 | *.vspscc
67 | *.vssscc
68 | .builds
69 | *.pidb
70 | *.svclog
71 | *.scc
72 |
73 | # Chutzpah Test files
74 | _Chutzpah*
75 |
76 | # Visual C++ cache files
77 | ipch/
78 | *.aps
79 | *.ncb
80 | *.opendb
81 | *.opensdf
82 | *.sdf
83 | *.cachefile
84 | *.VC.db
85 | *.VC.VC.opendb
86 |
87 | # Visual Studio profiler
88 | *.psess
89 | *.vsp
90 | *.vspx
91 | *.sap
92 |
93 | # TFS 2012 Local Workspace
94 | $tf/
95 |
96 | # Guidance Automation Toolkit
97 | *.gpState
98 |
99 | # ReSharper is a .NET coding add-in
100 | _ReSharper*/
101 | *.[Rr]e[Ss]harper
102 | *.DotSettings.user
103 |
104 | # JustCode is a .NET coding add-in
105 | .JustCode
106 |
107 | # TeamCity is a build add-in
108 | _TeamCity*
109 |
110 | # DotCover is a Code Coverage Tool
111 | *.dotCover
112 |
113 | # NCrunch
114 | _NCrunch_*
115 | .*crunch*.local.xml
116 | nCrunchTemp_*
117 |
118 | # MightyMoose
119 | *.mm.*
120 | AutoTest.Net/
121 |
122 | # Web workbench (sass)
123 | .sass-cache/
124 |
125 | # Installshield output folder
126 | [Ee]xpress/
127 |
128 | # DocProject is a documentation generator add-in
129 | DocProject/buildhelp/
130 | DocProject/Help/*.HxT
131 | DocProject/Help/*.HxC
132 | DocProject/Help/*.hhc
133 | DocProject/Help/*.hhk
134 | DocProject/Help/*.hhp
135 | DocProject/Help/Html2
136 | DocProject/Help/html
137 |
138 | # Click-Once directory
139 | publish/
140 |
141 | # Publish Web Output
142 | *.[Pp]ublish.xml
143 | *.azurePubxml
144 | # TODO: Comment the next line if you want to checkin your web deploy settings
145 | # but database connection strings (with potential passwords) will be unencrypted
146 | #*.pubxml
147 | *.publishproj
148 |
149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
150 | # checkin your Azure Web App publish settings, but sensitive information contained
151 | # in these scripts will be unencrypted
152 | PublishScripts/
153 |
154 | # NuGet Packages
155 | *.nupkg
156 | # The packages folder can be ignored because of Package Restore
157 | **/packages/*
158 | # except build/, which is used as an MSBuild target.
159 | !**/packages/build/
160 | # Uncomment if necessary however generally it will be regenerated when needed
161 | #!**/packages/repositories.config
162 | # NuGet v3's project.json files produces more ignoreable files
163 | *.nuget.props
164 | *.nuget.targets
165 |
166 | # Microsoft Azure Build Output
167 | csx/
168 | *.build.csdef
169 |
170 | # Microsoft Azure Emulator
171 | ecf/
172 | rcf/
173 |
174 | # Windows Store app package directories and files
175 | AppPackages/
176 | BundleArtifacts/
177 | Package.StoreAssociation.xml
178 | _pkginfo.txt
179 |
180 | # Visual Studio cache files
181 | # files ending in .cache can be ignored
182 | *.[Cc]ache
183 | # but keep track of directories ending in .cache
184 | !*.[Cc]ache/
185 |
186 | # Others
187 | ClientBin/
188 | ~$*
189 | *~
190 | *.dbmdl
191 | *.dbproj.schemaview
192 | *.jfm
193 | *.pfx
194 | *.publishsettings
195 | node_modules/
196 | orleans.codegen.cs
197 |
198 | # Since there are multiple workflows, uncomment next line to ignore bower_components
199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
200 | #bower_components/
201 |
202 | # RIA/Silverlight projects
203 | Generated_Code/
204 |
205 | # Backup & report files from converting an old project file
206 | # to a newer Visual Studio version. Backup files are not needed,
207 | # because we have git ;-)
208 | _UpgradeReport_Files/
209 | Backup*/
210 | UpgradeLog*.XML
211 | UpgradeLog*.htm
212 |
213 | # SQL Server files
214 | *.mdf
215 | *.ldf
216 |
217 | # Business Intelligence projects
218 | *.rdl.data
219 | *.bim.layout
220 | *.bim_*.settings
221 |
222 | # Microsoft Fakes
223 | FakesAssemblies/
224 |
225 | # GhostDoc plugin setting file
226 | *.GhostDoc.xml
227 |
228 | # Node.js Tools for Visual Studio
229 | .ntvs_analysis.dat
230 |
231 | # Visual Studio 6 build log
232 | *.plg
233 |
234 | # Visual Studio 6 workspace options file
235 | *.opt
236 |
237 | # Visual Studio LightSwitch build output
238 | **/*.HTMLClient/GeneratedArtifacts
239 | **/*.DesktopClient/GeneratedArtifacts
240 | **/*.DesktopClient/ModelManifest.xml
241 | **/*.Server/GeneratedArtifacts
242 | **/*.Server/ModelManifest.xml
243 | _Pvt_Extensions
244 |
245 | # Paket dependency manager
246 | .paket/paket.exe
247 | paket-files/
248 |
249 | # FAKE - F# Make
250 | .fake/
251 |
252 | # JetBrains Rider
253 | .idea/
254 | *.sln.iml
255 |
256 | # CodeRush
257 | .cr/
258 |
259 | # Python Tools for Visual Studio (PTVS)
260 | __pycache__/
261 | *.pyc
--------------------------------------------------------------------------------
/GTA3ScriptSharp.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.168
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GTA3ScriptSharp", "GTA3ScriptSharp\GTA3ScriptSharp.csproj", "{7F11278E-944D-4688-B3D6-08FB38D6E2F7}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GTA3ScriptSharpTest", "GTA3ScriptSharpTest\GTA3ScriptSharpTest.csproj", "{96D9A01E-5DD4-4119-B023-73653473899D}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {7F11278E-944D-4688-B3D6-08FB38D6E2F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {7F11278E-944D-4688-B3D6-08FB38D6E2F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {7F11278E-944D-4688-B3D6-08FB38D6E2F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {7F11278E-944D-4688-B3D6-08FB38D6E2F7}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {96D9A01E-5DD4-4119-B023-73653473899D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {96D9A01E-5DD4-4119-B023-73653473899D}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {96D9A01E-5DD4-4119-B023-73653473899D}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {96D9A01E-5DD4-4119-B023-73653473899D}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {DE9B2FFA-6660-4D78-BCF5-21E2D40F7F43}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/AGTA3Script.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | ///
5 | /// GTA3Script sharp namespace
6 | ///
7 | namespace GTA3ScriptSharp
8 | {
9 | ///
10 | /// GTA3Script interface
11 | ///
12 | public abstract class AGTA3Script : IDisposable
13 | {
14 | ///
15 | /// Game
16 | ///
17 | public readonly EGame Game;
18 |
19 | ///
20 | /// Stream
21 | ///
22 | public Stream Stream { get; private set; }
23 |
24 | ///
25 | /// Dispose stream on dispose
26 | ///
27 | private readonly bool DisposeStreamOnDispose = true;
28 |
29 | ///
30 | /// Load GTA3Script to GTA3Script runtime
31 | ///
32 | /// GTA3Script runtime
33 | internal abstract void LoadToRuntime(AGTA3ScriptRuntime runtime);
34 |
35 | ///
36 | /// Constructor
37 | ///
38 | /// Game
39 | /// Stream
40 | internal AGTA3Script(EGame game, Stream stream)
41 | {
42 | Game = game;
43 | Stream = stream;
44 | }
45 |
46 | ///
47 | /// Constructor
48 | ///
49 | /// Game
50 | /// Stream
51 | /// Dispose stream on dispose
52 | internal AGTA3Script(EGame game, Stream stream, bool disposeStreamOnDispose)
53 | {
54 | Game = game;
55 | Stream = stream;
56 | DisposeStreamOnDispose = disposeStreamOnDispose;
57 | }
58 |
59 | ///
60 | /// Dispose
61 | ///
62 | public void Dispose()
63 | {
64 | if (Stream != null)
65 | {
66 | if (DisposeStreamOnDispose)
67 | {
68 | Stream.Dispose();
69 | }
70 | Stream = null;
71 | }
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/AGTA3ScriptRuntime.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Threading;
4 |
5 | ///
6 | /// GTA3Script sharp namespace
7 | ///
8 | namespace GTA3ScriptSharp
9 | {
10 | ///
11 | /// GTA3Script runtime abstract class
12 | ///
13 | public abstract class AGTA3ScriptRuntime
14 | {
15 | ///
16 | /// Keywords
17 | ///
18 | private Dictionary keywords = new Dictionary()
19 | {
20 | { "NOP", 0x0 },
21 | { "WAIT", 0x1 },
22 | { "GOTO", 0x2 },
23 | { "SHAKE_CAM", 0x3 },
24 | { "SET_VAR_INT", 0x4 },
25 | { "SET_VAR_FLOAT", 0x5 },
26 | { "SET_LVAR_INT", 0x6 },
27 | { "SET_LVAR_FLOAT", 0x7 },
28 | { "ADD_VAL_TO_INT_VAR", 0x8 },
29 | { "ADD_VAL_TO_FLOAT_VAR", 0x9 },
30 | { "ADD_VAL_TO_INT_LVAR", 0xA },
31 | { "ADD_VAL_TO_FLOAT_LVAR", 0xB },
32 | { "SUB_VAL_FROM_INT_VAR", 0xC },
33 | { "SUB_VAL_FROM_FLOAT_VAR", 0xD },
34 | { "SUB_VAL_FROM_INT_LVAR", 0xE },
35 | { "SUB_VAL_FROM_FLOAT_LVAR", 0xF },
36 | { "MULT_INT_VAR_BY_VAL", 0x10 },
37 | { "MULT_FLOAT_VAR_BY_VAL", 0x11 },
38 | { "MULT_INT_LVAR_BY_VAL", 0x12 },
39 | { "MULT_FLOAT_LVAR_BY_VAL", 0x13 },
40 | { "DIV_INT_VAR_BY_VAL", 0x14 },
41 | { "DIV_FLOAT_VAR_BY_VAL", 0x15 },
42 | { "DIV_INT_LVAR_BY_VAL", 0x16 },
43 | { "DIV_FLOAT_LVAR_BY_VAL", 0x17 },
44 | { "IS_INT_VAR_GREATER_THAN_NUMBER", 0x18 },
45 | { "IS_INT_LVAR_GREATER_THAN_NUMBER", 0x19 },
46 | { "IS_NUMBER_GREATER_THAN_INT_VAR", 0x1A },
47 | { "IS_NUMBER_GREATER_THAN_INT_LVAR", 0x1B },
48 | { "IS_INT_VAR_GREATER_THAN_INT_VAR", 0x1C },
49 | { "IS_INT_LVAR_GREATER_THAN_INT_LVAR", 0x1D },
50 | { "IS_INT_VAR_GREATER_THAN_INT_LVAR", 0x1E },
51 | { "IS_INT_LVAR_GREATER_THAN_INT_VAR", 0x1F },
52 | { "IS_FLOAT_VAR_GREATER_THAN_NUMBER", 0x20 },
53 | { "IS_FLOAT_LVAR_GREATER_THAN_NUMBER", 0x21 },
54 | { "IS_NUMBER_GREATER_THAN_FLOAT_VAR", 0x22 },
55 | { "IS_NUMBER_GREATER_THAN_FLOAT_LVAR", 0x23 },
56 | { "IS_FLOAT_VAR_GREATER_THAN_FLOAT_VAR", 0x24 },
57 | { "IS_FLOAT_LVAR_GREATER_THAN_FLOAT_LVAR", 0x25 },
58 | { "IS_FLOAT_VAR_GREATER_THAN_FLOAT_LVAR", 0x26 },
59 | { "IS_FLOAT_LVAR_GREATER_THAN_FLOAT_VAR", 0x27 },
60 | { "IS_INT_VAR_GREATER_OR_EQUAL_TO_NUMBER", 0x28 },
61 | { "IS_INT_LVAR_GREATER_OR_EQUAL_TO_NUMBER", 0x29 },
62 | { "IS_NUMBER_GREATER_OR_EQUAL_TO_INT_VAR", 0x2A },
63 | { "IS_NUMBER_GREATER_OR_EQUAL_TO_INT_LVAR", 0x2B },
64 | { "IS_INT_VAR_GREATER_OR_EQUAL_TO_INT_VAR", 0x2C },
65 | { "IS_INT_LVAR_GREATER_OR_EQUAL_TO_INT_LVAR", 0x2D },
66 | { "IS_INT_VAR_GREATER_OR_EQUAL_TO_INT_LVAR", 0x2E },
67 | { "IS_INT_LVAR_GREATER_OR_EQUAL_TO_INT_VAR", 0x2F },
68 | { "IS_FLOAT_VAR_GREATER_OR_EQUAL_TO_NUMBER", 0x30 },
69 | { "IS_FLOAT_LVAR_GREATER_OR_EQUAL_TO_NUMBER", 0x31 },
70 | { "IS_NUMBER_GREATER_OR_EQUAL_TO_FLOAT_VAR", 0x32 },
71 | { "IS_NUMBER_GREATER_OR_EQUAL_TO_FLOAT_LVAR", 0x33 },
72 | { "IS_FLOAT_VAR_GREATER_OR_EQUAL_TO_FLOAT_VAR", 0x34 },
73 | { "IS_FLOAT_LVAR_GREATER_OR_EQUAL_TO_FLOAT_LVAR", 0x35 },
74 | { "IS_FLOAT_VAR_GREATER_OR_EQUAL_TO_FLOAT_LVAR", 0x36 },
75 | { "IS_FLOAT_LVAR_GREATER_OR_EQUAL_TO_FLOAT_VAR", 0x37 },
76 | { "IS_INT_VAR_EQUAL_TO_NUMBER", 0x38 },
77 | { "IS_INT_LVAR_EQUAL_TO_NUMBER", 0x39 },
78 | { "IS_INT_VAR_EQUAL_TO_INT_VAR", 0x3A },
79 | { "IS_INT_LVAR_EQUAL_TO_INT_LVAR", 0x3B },
80 | { "IS_INT_VAR_EQUAL_TO_INT_LVAR", 0x3C },
81 | { "IS_FLOAT_VAR_EQUAL_TO_NUMBER", 0x42 },
82 | { "IS_FLOAT_LVAR_EQUAL_TO_NUMBER", 0x43 },
83 | { "IS_FLOAT_VAR_EQUAL_TO_FLOAT_VAR", 0x44 },
84 | { "IS_FLOAT_LVAR_EQUAL_TO_FLOAT_LVAR", 0x45 },
85 | { "IS_FLOAT_VAR_EQUAL_TO_FLOAT_LVAR", 0x46 },
86 | { "GOTO_IF_FALSE", 0x4D },
87 | { "TERMINATE_THIS_SCRIPT", 0x4E },
88 | { "MISSION_END", 0x4E }
89 |
90 | // TODO
91 | };
92 |
93 | ///
94 | /// GTA3Script instruction set
95 | ///
96 | private GTA3ScriptInstruction[] instructionSet = new GTA3ScriptInstruction[]
97 | {
98 | // 0x0
99 | new GTA3ScriptInstruction(new Type[0], (runtime, arguments) =>
100 | {
101 | // ...
102 | }),
103 |
104 | // 0x1
105 | new GTA3ScriptInstruction(new Type[] { typeof(int) }, (runtime, arguments) =>
106 | {
107 | Thread.Sleep((int)(arguments[0]));
108 | }),
109 |
110 | // 0x2
111 | new GTA3ScriptInstruction(new Type[] { typeof(ushort), typeof(uint) }, (runtime, arguments) =>
112 | {
113 | runtime.CurrentCommandIndex = (uint)(arguments[1]);
114 | }),
115 |
116 | // 0x3
117 | new GTA3ScriptInstruction(new Type[] { typeof(int) }, null),
118 |
119 | // 0x4
120 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
121 | {
122 | // TODO
123 | throw new NotImplementedException();
124 | }),
125 |
126 | // 0x5
127 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(float) }, (runtime, arguments) =>
128 | {
129 | // TODO
130 | throw new NotImplementedException();
131 | }),
132 |
133 | // 0x6
134 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
135 | {
136 | // TODO
137 | throw new NotImplementedException();
138 | }),
139 |
140 | // 0x7
141 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(float) }, (runtime, arguments) =>
142 | {
143 | // TODO
144 | throw new NotImplementedException();
145 | }),
146 |
147 | // 0x8
148 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
149 | {
150 | // TODO
151 | throw new NotImplementedException();
152 | }),
153 |
154 | // 0x9
155 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(float) }, (runtime, arguments) =>
156 | {
157 | // TODO
158 | throw new NotImplementedException();
159 | }),
160 |
161 | // 0xA
162 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
163 | {
164 | // TODO
165 | throw new NotImplementedException();
166 | }),
167 |
168 | // 0xB
169 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(float) }, (runtime, arguments) =>
170 | {
171 | // TODO
172 | throw new NotImplementedException();
173 | }),
174 |
175 | // 0xC
176 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
177 | {
178 | // TODO
179 | throw new NotImplementedException();
180 | }),
181 |
182 | // 0xD
183 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(float) }, (runtime, arguments) =>
184 | {
185 | // TODO
186 | throw new NotImplementedException();
187 | }),
188 |
189 | // 0xE
190 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
191 | {
192 | // TODO
193 | throw new NotImplementedException();
194 | }),
195 |
196 | // 0xF
197 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(float) }, (runtime, arguments) =>
198 | {
199 | // TODO
200 | throw new NotImplementedException();
201 | }),
202 |
203 | // 0x10
204 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
205 | {
206 | // TODO
207 | throw new NotImplementedException();
208 | }),
209 |
210 | // 0x11
211 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(float) }, (runtime, arguments) =>
212 | {
213 | // TODO
214 | throw new NotImplementedException();
215 | }),
216 |
217 | // 0x12
218 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
219 | {
220 | // TODO
221 | throw new NotImplementedException();
222 | }),
223 |
224 | // 0x13
225 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(float) }, (runtime, arguments) =>
226 | {
227 | // TODO
228 | throw new NotImplementedException();
229 | }),
230 |
231 | // 0x14
232 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
233 | {
234 | // TODO
235 | throw new NotImplementedException();
236 | }),
237 |
238 | // 0x15
239 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(float) }, (runtime, arguments) =>
240 | {
241 | // TODO
242 | throw new NotImplementedException();
243 | }),
244 |
245 | // 0x16
246 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
247 | {
248 | // TODO
249 | throw new NotImplementedException();
250 | }),
251 |
252 | // 0x17
253 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
254 | {
255 | // TODO
256 | throw new NotImplementedException();
257 | }),
258 |
259 | // 0x18
260 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
261 | {
262 | // TODO
263 | throw new NotImplementedException();
264 | }),
265 |
266 | // 0x19
267 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
268 | {
269 | // TODO
270 | throw new NotImplementedException();
271 | }),
272 |
273 | // 0x1A
274 | new GTA3ScriptInstruction(new Type[] { typeof(int), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
275 | {
276 | // TODO
277 | throw new NotImplementedException();
278 | }),
279 |
280 | // 0x1B
281 | new GTA3ScriptInstruction(new Type[] { typeof(int), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
282 | {
283 | // TODO
284 | throw new NotImplementedException();
285 | }),
286 |
287 | // 0x1C
288 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
289 | {
290 | // TODO
291 | throw new NotImplementedException();
292 | }),
293 |
294 | // 0x1D
295 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
296 | {
297 | // TODO
298 | throw new NotImplementedException();
299 | }),
300 |
301 | // 0x1E
302 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
303 | {
304 | // TODO
305 | throw new NotImplementedException();
306 | }),
307 |
308 | // 0x1F
309 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
310 | {
311 | // TODO
312 | throw new NotImplementedException();
313 | }),
314 |
315 | // 0x20
316 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(float) }, (runtime, arguments) =>
317 | {
318 | // TODO
319 | throw new NotImplementedException();
320 | }),
321 |
322 | // 0x21
323 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(float) }, (runtime, arguments) =>
324 | {
325 | // TODO
326 | throw new NotImplementedException();
327 | }),
328 |
329 | // 0x22
330 | new GTA3ScriptInstruction(new Type[] { typeof(float), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
331 | {
332 | // TODO
333 | throw new NotImplementedException();
334 | }),
335 |
336 | // 0x23
337 | new GTA3ScriptInstruction(new Type[] { typeof(float), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
338 | {
339 | // TODO
340 | throw new NotImplementedException();
341 | }),
342 |
343 | // 0x24
344 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
345 | {
346 | // TODO
347 | throw new NotImplementedException();
348 | }),
349 |
350 | // 0x25
351 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
352 | {
353 | // TODO
354 | throw new NotImplementedException();
355 | }),
356 |
357 | // 0x26
358 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
359 | {
360 | // TODO
361 | throw new NotImplementedException();
362 | }),
363 |
364 | // 0x27
365 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
366 | {
367 | // TODO
368 | throw new NotImplementedException();
369 | }),
370 |
371 | // 0x28
372 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
373 | {
374 | // TODO
375 | throw new NotImplementedException();
376 | }),
377 |
378 | // 0x29
379 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
380 | {
381 | // TODO
382 | throw new NotImplementedException();
383 | }),
384 |
385 | // 0x2A
386 | new GTA3ScriptInstruction(new Type[] { typeof(int), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
387 | {
388 | // TODO
389 | throw new NotImplementedException();
390 | }),
391 |
392 | // 0x2B
393 | new GTA3ScriptInstruction(new Type[] { typeof(int), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
394 | {
395 | // TODO
396 | throw new NotImplementedException();
397 | }),
398 |
399 | // 0x2C
400 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
401 | {
402 | // TODO
403 | throw new NotImplementedException();
404 | }),
405 |
406 | // 0x2D
407 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
408 | {
409 | // TODO
410 | throw new NotImplementedException();
411 | }),
412 |
413 | // 0x2E
414 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
415 | {
416 | // TODO
417 | throw new NotImplementedException();
418 | }),
419 |
420 | // 0x2F
421 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
422 | {
423 | // TODO
424 | throw new NotImplementedException();
425 | }),
426 |
427 | // 0x30
428 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(float) }, (runtime, arguments) =>
429 | {
430 | // TODO
431 | throw new NotImplementedException();
432 | }),
433 |
434 | // 0x31
435 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(float) }, (runtime, arguments) =>
436 | {
437 | // TODO
438 | throw new NotImplementedException();
439 | }),
440 |
441 | // 0x32
442 | new GTA3ScriptInstruction(new Type[] { typeof(float), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
443 | {
444 | // TODO
445 | throw new NotImplementedException();
446 | }),
447 |
448 | // 0x33
449 | new GTA3ScriptInstruction(new Type[] { typeof(float), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
450 | {
451 | // TODO
452 | throw new NotImplementedException();
453 | }),
454 |
455 | // 0x34
456 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
457 | {
458 | // TODO
459 | throw new NotImplementedException();
460 | }),
461 |
462 | // 0x35
463 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
464 | {
465 | // TODO
466 | throw new NotImplementedException();
467 | }),
468 |
469 | // 0x36
470 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
471 | {
472 | // TODO
473 | throw new NotImplementedException();
474 | }),
475 |
476 | // 0x37
477 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
478 | {
479 | // TODO
480 | throw new NotImplementedException();
481 | }),
482 |
483 | // 0x38
484 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
485 | {
486 | // TODO
487 | throw new NotImplementedException();
488 | }),
489 |
490 | // 0x39
491 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(int) }, (runtime, arguments) =>
492 | {
493 | // TODO
494 | throw new NotImplementedException();
495 | }),
496 |
497 | // 0x3A
498 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
499 | {
500 | // TODO
501 | throw new NotImplementedException();
502 | }),
503 |
504 | // 0x3B
505 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
506 | {
507 | // TODO
508 | throw new NotImplementedException();
509 | }),
510 |
511 | // 0x3C
512 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
513 | {
514 | // TODO
515 | throw new NotImplementedException();
516 | }),
517 |
518 | // 0x3D
519 | null,
520 |
521 | // 0x3E
522 | null,
523 |
524 | // 0x3F
525 | null,
526 |
527 | // 0x40
528 | null,
529 |
530 | // 0x41
531 | null,
532 |
533 | // 0x42
534 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(float) }, (runtime, arguments) =>
535 | {
536 | // TODO
537 | throw new NotImplementedException();
538 | }),
539 |
540 | // 0x43
541 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(float) }, (runtime, arguments) =>
542 | {
543 | // TODO
544 | throw new NotImplementedException();
545 | }),
546 |
547 | // 0x44
548 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
549 | {
550 | // TODO
551 | throw new NotImplementedException();
552 | }),
553 |
554 | // 0x45
555 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
556 | {
557 | // TODO
558 | throw new NotImplementedException();
559 | }),
560 |
561 | // 0x46
562 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
563 | {
564 | // TODO
565 | throw new NotImplementedException();
566 | }),
567 |
568 | //0x47
569 | null,
570 |
571 | //0x48
572 | null,
573 |
574 | //0x49
575 | null,
576 |
577 | //0x4A
578 | null,
579 |
580 | //0x4B
581 | null,
582 |
583 | //0x4C
584 | null,
585 |
586 | // 0x4D
587 | new GTA3ScriptInstruction(new Type[] { typeof(ushort), typeof(uint) }, (runtime, arguments) =>
588 | {
589 | if ((bool)(runtime.ReturnValue))
590 | {
591 | runtime.CurrentCommandIndex = (uint)(arguments[1]);
592 | }
593 | }),
594 |
595 | // 0x4E
596 | new GTA3ScriptInstruction(new Type[0], (runtime, arguments) =>
597 | {
598 | runtime.KeepRunning = false;
599 | }),
600 |
601 | // 0x4F
602 | new GTA3ScriptInstruction(new Type[] { typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue) }, (runtime, arguments) =>
603 | {
604 | // TODO
605 | })
606 |
607 | // TODO
608 | };
609 |
610 | /*///
611 | /// Thread name
612 | ///
613 | private string threadName;*/
614 |
615 | ///
616 | /// Main script commands
617 | ///
618 | private GTA3ScriptCommand[] mainScriptCommands;
619 |
620 | ///
621 | /// Mission scripts commmands
622 | ///
623 | private GTA3ScriptCommand[][] missionScriptsCommands;
624 |
625 | ///
626 | /// Keep running
627 | ///
628 | public bool KeepRunning { get; internal set; } = true;
629 |
630 | ///
631 | /// Current command index
632 | ///
633 | public uint CurrentCommandIndex { get; internal set; }
634 |
635 | ///
636 | /// Return value
637 | ///
638 | public object ReturnValue { get; internal set; }
639 |
640 | ///
641 | /// Is patchable
642 | ///
643 | public bool IsPatchable { get; private set; } = true;
644 |
645 | ///
646 | /// GTA3Script instruction set
647 | ///
648 | internal GTA3ScriptInstruction[] InstructionSet
649 | {
650 | get
651 | {
652 | if (instructionSet == null)
653 | {
654 | instructionSet = new GTA3ScriptInstruction[0];
655 | }
656 | return instructionSet;
657 | }
658 | }
659 |
660 | ///
661 | /// Main script commands
662 | ///
663 | private GTA3ScriptCommand[] MainScriptCommands
664 | {
665 | get
666 | {
667 | if (mainScriptCommands == null)
668 | {
669 | mainScriptCommands = new GTA3ScriptCommand[0];
670 | }
671 | return mainScriptCommands;
672 | }
673 | }
674 |
675 | ///
676 | /// Default constructor
677 | ///
678 | internal AGTA3ScriptRuntime()
679 | {
680 | // ...
681 | }
682 |
683 | ///
684 | /// Resize instruction set
685 | ///
686 | /// New size
687 | private void ResizeInstructionSet(ushort newSize)
688 | {
689 | if (newSize != InstructionSet.Length)
690 | {
691 | GTA3ScriptInstruction[] instruction_set = new GTA3ScriptInstruction[newSize];
692 | if (newSize > 0U)
693 | {
694 | Array.Copy(InstructionSet, instruction_set, Math.Min(InstructionSet.Length, instruction_set.Length));
695 | instructionSet = instruction_set;
696 | }
697 | }
698 | }
699 |
700 | ///
701 | /// Patch instruction
702 | ///
703 | /// GTA3Script operation code
704 | /// Keywords
705 | /// GTA3Script instruction on call event
706 | /// GTA3Script instruction argument types
707 | /// Invalid argument
708 | public void Patch(ushort opCode, string[] keywords, GTA3ScriptOpCodeCallDelegate onCall, params Type[] argumentTypes)
709 | {
710 | Type[] argument_types = ((argumentTypes == null) ? (new Type[0]) : argumentTypes);
711 | if (IsPatchable && (opCode >= 0))
712 | {
713 | if (opCode > InstructionSet.Length)
714 | {
715 | ResizeInstructionSet((ushort)(opCode + 1));
716 | }
717 | for (int i = 0; i < argument_types.Length; i++)
718 | {
719 | if (argument_types[i] == null)
720 | {
721 | throw new ArgumentException("argTypes[" + i + "] is null", "argTypes");
722 | }
723 | }
724 | InstructionSet[opCode] = new GTA3ScriptInstruction(argument_types, onCall);
725 | AddKeywords(opCode, keywords);
726 | }
727 | }
728 |
729 | ///
730 | /// Patch instruction
731 | ///
732 | /// GTA3Script operation code
733 | /// Keyword
734 | /// GTA3Script instruction on call event
735 | /// GTA3Script instruction argument types
736 | /// Invalid argument
737 | public void Patch(ushort opCode, string keyword, GTA3ScriptOpCodeCallDelegate onCall, params Type[] argumentTypes)
738 | {
739 | Patch(opCode, new string[] { keyword }, onCall, argumentTypes);
740 | }
741 |
742 | ///
743 | /// Add keyword
744 | ///
745 | /// GTA3Script operation code
746 | /// Keyword
747 | public void AddKeyword(ushort opCode, string keyword)
748 | {
749 | if (keyword != null)
750 | {
751 | if (!(keywords.ContainsKey(keyword)))
752 | {
753 | keywords.Add(keyword, opCode);
754 | }
755 | }
756 | }
757 |
758 | ///
759 | /// Add keyword
760 | ///
761 | /// GTA3Script operation code
762 | /// Keywords
763 | public void AddKeywords(ushort opCode, params string[] keywords)
764 | {
765 | if (keywords != null)
766 | {
767 | foreach (string keyword in keywords)
768 | {
769 | AddKeyword(opCode, keyword);
770 | }
771 | }
772 | }
773 |
774 | ///
775 | /// Execute step
776 | ///
777 | /// GTA3Script execution exception
778 | public bool ExecuteStep()
779 | {
780 | bool ret = false;
781 | if (KeepRunning && (CurrentCommandIndex < MainScriptCommands.Length))
782 | {
783 | ref GTA3ScriptCommand command = ref MainScriptCommands[CurrentCommandIndex];
784 | try
785 | {
786 | InstructionSet[command.OpCode].Invoke(this, command.Arguments);
787 | ++CurrentCommandIndex;
788 | ret = true;
789 | }
790 | catch (Exception e)
791 | {
792 | Console.Error.WriteLine(e);
793 | throw new GTA3ScriptExecutionException("Error executing operation code " + command.OpCode + " at command index " + CurrentCommandIndex, e);
794 | }
795 | }
796 | return ret;
797 | }
798 |
799 | ///
800 | /// Execute
801 | ///
802 | /// GTA3Script execution exception
803 | public void Execute()
804 | {
805 | while (ExecuteStep()) ;
806 | }
807 |
808 | ///
809 | /// Load GTA3Script
810 | ///
811 | /// Script
812 | public void LoadScript(AGTA3Script script)
813 | {
814 | if (script != null)
815 | {
816 | script.LoadToRuntime(this);
817 | }
818 | }
819 |
820 | ///
821 | /// Load GTA3Script finished
822 | ///
823 | /// Main script commands
824 | /// Mission script commands
825 | internal void LoadScriptFinished(GTA3ScriptCommand[] mainScriptCommands, GTA3ScriptCommand[][] missionScriptsCommands)
826 | {
827 | this.mainScriptCommands = mainScriptCommands;
828 | this.missionScriptsCommands = missionScriptsCommands;
829 | IsPatchable = false;
830 | }
831 | }
832 | }
833 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/EGTA3ScriptFilesMode.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// GTA3Script sharp namespace
3 | ///
4 | namespace GTA3ScriptSharp
5 | {
6 | ///
7 | /// GTA3Script sharp files mode enumerator
8 | ///
9 | public enum EGTA3ScriptFilesMode
10 | {
11 | ///
12 | /// Read GTA3Script files
13 | ///
14 | Read //,
15 |
16 | ///
17 | /// Write GTA3Script files
18 | ///
19 | //Write
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/EGTA3ScriptGTAIIIDataType.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// GTA3Script sharp namespace
3 | ///
4 | namespace GTA3ScriptSharp
5 | {
6 | ///
7 | /// GTA3Script data type enumerator
8 | ///
9 | public enum EGTA3ScriptGTAIIIDataType
10 | {
11 | ///
12 | /// End of argument list
13 | /// Argument length: 0
14 | ///
15 | /// - GTA III
16 | /// - GTA Vice City
17 | /// - GTA San Andreas
18 | /// - GTA Liberty City Stories
19 | /// - GTA Vice City Stories
20 | ///
21 | EndOfArgumentList = 0x0,
22 |
23 | ///
24 | /// Immediate 32-bit signed integer
25 | /// Argument length: 4
26 | ///
27 | /// - GTA III
28 | /// - GTA Vice City
29 | /// - GTA San Andreas
30 | ///
31 | Immediate32BitInt = 0x1,
32 |
33 | ///
34 | /// Global variable
35 | /// Argument length: 2
36 | ///
37 | /// - GTA III
38 | /// - GTA Vice City
39 | /// - GTA San Andreas
40 | ///
41 | GlobalVariable = 0x2,
42 |
43 | ///
44 | /// Local variable
45 | /// Argument length: 2
46 | ///
47 | /// - GTA III
48 | /// - GTA Vice City
49 | /// - GTA San Andreas
50 | ///
51 | LocalVariable = 0x3,
52 |
53 | ///
54 | /// Immediate 8-bit signed integer
55 | /// Argument length: 1
56 | ///
57 | /// - GTA III
58 | /// - GTA Vice City
59 | /// - GTA San Andreas
60 | ///
61 | Immediate8BitInt = 0x4,
62 |
63 | ///
64 | /// Immediate 16-bit signed integer
65 | /// Argument length: 2
66 | ///
67 | /// - GTA III
68 | /// - GTA Vice City
69 | /// - GTA San Andreas
70 | ///
71 | Immediate16BitInt = 0x5,
72 |
73 | ///
74 | /// Immediate 16-bit fixed-point
75 | /// Argument length: 2
76 | ///
77 | /// - GTA III
78 | ///
79 | Immediate16BitFixedPoint = 0x6
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/EGTA3ScriptGTALibertyCityStoriesDataType.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// GTA3Script sharp namespace
3 | ///
4 | namespace GTA3ScriptSharp
5 | {
6 | ///
7 | /// GTA3Script GTA Liberty City Stories data type enumerator
8 | ///
9 | public enum EGTA3ScriptGTALibertyCityStoriesDataType
10 | {
11 | ///
12 | /// End of argument list
13 | /// Argument length: 0
14 | ///
15 | /// - GTA III
16 | /// - GTA Vice City
17 | /// - GTA San Andreas
18 | /// - GTA Liberty City Stories
19 | /// - GTA Vice City Stories
20 | ///
21 | EndOfArgumentList = 0x0,
22 |
23 | ///
24 | /// Immediate 8-bit signed integer constant 0
25 | /// Argument length: 0
26 | ///
27 | /// - GTA Liberty City Stories
28 | /// - GTA Vice City Stories
29 | ///
30 | Immediate8BitIntConst0 = 0x1,
31 |
32 | ///
33 | /// Immediate 8-bit floating-point constant 0.0
34 | /// Argument length: 0
35 | ///
36 | /// - GTA Liberty City Stories
37 | /// - GTA Vice City Stories
38 | ///
39 | Immediate8BitFloatConst0 = 0x2,
40 |
41 | ///
42 | /// Immediate 8-bit packed floating-point
43 | /// Argument length: 1
44 | ///
45 | /// - GTA Liberty City Stories
46 | /// - GTA Vice City Stories
47 | ///
48 | Immediate8BitPackedFloat = 0x3,
49 |
50 | ///
51 | /// Immediate 16-bit packed floating-point
52 | /// Argument length: 2
53 | ///
54 | /// - GTA Liberty City Stories
55 | /// - GTA Vice City Stories
56 | ///
57 | Immediate16BitPackedFloat = 0x4,
58 |
59 | ///
60 | /// Immediate 24-bit packed floating-point
61 | /// Argument length: 3
62 | ///
63 | /// - GTA Liberty City Stories
64 | /// - GTA Vice City Stories
65 | ///
66 | Immediate24BitPackedFloat = 0x5,
67 |
68 | ///
69 | /// Immediate 32-bit signed integer
70 | /// Argument length: 4
71 | ///
72 | /// - GTA Liberty City Stories
73 | /// - GTA Vice City Stories
74 | ///
75 | Immediate32BitInt = 0x6,
76 |
77 | ///
78 | /// Immediate 8-bit integer
79 | /// Argument length: 1
80 | ///
81 | /// - GTA Liberty City Stories
82 | /// - GTA Vice City Stories
83 | ///
84 | Immediate8BitInt = 0x7,
85 |
86 | ///
87 | /// Immediate 16-bit integer
88 | /// Argument length: 2
89 | ///
90 | /// - GTA Liberty City Stories
91 | /// - GTA Vice City Stories
92 | ///
93 | Immediate16BitInt = 0x8,
94 |
95 | ///
96 | /// Immediate 32-bit floating-point
97 | /// Argument length: 4
98 | ///
99 | /// - GTA Liberty City Stories
100 | /// - GTA Vice City Stories
101 | ///
102 | Immediate32BitFloat = 0x9
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/EGTA3ScriptGTASanAndreasDataType.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// GTA3Script sharp namespace
3 | ///
4 | namespace GTA3ScriptSharp
5 | {
6 | ///
7 | /// GTA3Script GTA San Andreas enumerator
8 | ///
9 | public enum EGTA3ScriptGTASanAndreasDataType
10 | {
11 | ///
12 | /// End of argument list
13 | /// Argument length: 0
14 | ///
15 | /// - GTA III
16 | /// - GTA Vice City
17 | /// - GTA San Andreas
18 | /// - GTA Liberty City Stories
19 | /// - GTA Vice City Stories
20 | ///
21 | EndOfArgumentList = 0x0,
22 |
23 | ///
24 | /// Immediate 32-bit signed integer
25 | /// Argument length: 4
26 | ///
27 | /// - GTA III
28 | /// - GTA Vice City
29 | /// - GTA San Andreas
30 | ///
31 | Immediate32BitInt = 0x1,
32 |
33 | ///
34 | /// Global variable
35 | /// Argument length: 2
36 | ///
37 | /// - GTA III
38 | /// - GTA Vice City
39 | /// - GTA San Andreas
40 | ///
41 | GlobalVariable = 0x2,
42 |
43 | ///
44 | /// Local variable
45 | /// Argument length: 2
46 | ///
47 | /// - GTA III
48 | /// - GTA Vice City
49 | /// - GTA San Andreas
50 | ///
51 | LocalVariable = 0x3,
52 |
53 | ///
54 | /// Immediate 8-bit signed integer
55 | /// Argument length: 1
56 | ///
57 | /// - GTA III
58 | /// - GTA Vice City
59 | /// - GTA San Andreas
60 | ///
61 | Immediate8BitInt = 0x4,
62 |
63 | ///
64 | /// Immediate 16-bit signed integer
65 | /// Argument length: 2
66 | ///
67 | /// - GTA III
68 | /// - GTA Vice City
69 | /// - GTA San Andreas
70 | ///
71 | Immediate16BitInt = 0x5,
72 |
73 | ///
74 | /// Immediate 32-bit float
75 | /// Argument length: 4
76 | ///
77 | /// - GTA Vice City
78 | /// - GTA San Andreas
79 | ///
80 | Immediate32BitFloat = 0x6,
81 |
82 | ///
83 | /// Global array
84 | /// Argument length: 6
85 | ///
86 | /// - GTA San Andreas
87 | ///
88 | GlobalArray = 0x7,
89 |
90 | ///
91 | /// Local array
92 | /// Argument length: 6
93 | ///
94 | /// - GTA San Andreas
95 | ///
96 | LocalArray = 0x8,
97 |
98 | ///
99 | /// Immediate 8-byte string
100 | /// Argument length: 8
101 | ///
102 | /// - GTA San Andreas
103 | ///
104 | Immediate8ByteString = 0x9,
105 |
106 | ///
107 | /// Global 8-byte string
108 | /// Argument length: 2
109 | ///
110 | /// - GTA San Andreas
111 | ///
112 | Global8ByteString = 0xA,
113 |
114 | ///
115 | /// Local 8-byte string
116 | /// Argument length: 2
117 | ///
118 | /// - GTA San Andreas
119 | ///
120 | Local8ByteString = 0xB,
121 |
122 | ///
123 | /// Global 8-byte string array
124 | /// Argument length: 6
125 | ///
126 | /// - GTA San Andreas
127 | ///
128 | Global8ByteStringArray = 0xC,
129 |
130 | ///
131 | /// Local 8-byte string array
132 | /// Argument length: 6
133 | ///
134 | /// - GTA San Andreas
135 | ///
136 | Local8ByteStringArray = 0xD,
137 |
138 | ///
139 | /// Immediate variable-length string
140 | /// Argument length: 1 + (n - 1)
141 | ///
142 | /// - GTA San Andreas
143 | ///
144 | ImmediateVarLengthString = 0xE,
145 |
146 | ///
147 | /// Immediate 16-byte string
148 | /// Argument length: 16
149 | ///
150 | /// - GTA San Andreas
151 | ///
152 | Immediate16ByteString = 0xF,
153 |
154 | ///
155 | /// Global 16-byte string
156 | /// Argument length: 2
157 | ///
158 | /// - GTA San Andreas
159 | ///
160 | Global16ByteString = 0x10,
161 |
162 | ///
163 | /// Local 16-byte string
164 | /// Argument length: 2
165 | ///
166 | /// - GTA San Andreas
167 | ///
168 | Local16ByteString = 0x11,
169 |
170 | ///
171 | /// Global 16-byte string array
172 | /// Argument length: 6
173 | ///
174 | /// - GTA San Andreas
175 | ///
176 | Global16ByteStringArray = 0x12,
177 |
178 | ///
179 | /// Local 16-byte string array
180 | /// Argument length: 6
181 | ///
182 | /// - GTA San Andreas
183 | ///
184 | Local16ByteStringArray = 0x13
185 | }
186 | }
187 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/EGTA3ScriptGTAViceCityDataType.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// GTA3Script sharp namespace
3 | ///
4 | namespace GTA3ScriptSharp
5 | {
6 | ///
7 | /// GTA3Script GTA Vice City data type enumerator
8 | ///
9 | public enum EGTA3ScriptGTAViceCityDataType
10 | {
11 | ///
12 | /// End of argument list
13 | /// Argument length: 0
14 | ///
15 | /// - GTA III
16 | /// - GTA Vice City
17 | /// - GTA San Andreas
18 | /// - GTA Liberty City Stories
19 | /// - GTA Vice City Stories
20 | ///
21 | EndOfArgumentList = 0x0,
22 |
23 | ///
24 | /// Immediate 32-bit signed integer
25 | /// Argument length: 4
26 | ///
27 | /// - GTA III
28 | /// - GTA Vice City
29 | /// - GTA San Andreas
30 | ///
31 | Immediate32BitInt = 0x1,
32 |
33 | ///
34 | /// Global variable
35 | /// Argument length: 2
36 | ///
37 | /// - GTA III
38 | /// - GTA Vice City
39 | /// - GTA San Andreas
40 | ///
41 | GlobalVariable = 0x2,
42 |
43 | ///
44 | /// Local variable
45 | /// Argument length: 2
46 | ///
47 | /// - GTA III
48 | /// - GTA Vice City
49 | /// - GTA San Andreas
50 | ///
51 | LocalVariable = 0x3,
52 |
53 | ///
54 | /// Immediate 8-bit signed integer
55 | /// Argument length: 1
56 | ///
57 | /// - GTA III
58 | /// - GTA Vice City
59 | /// - GTA San Andreas
60 | ///
61 | Immediate8BitInt = 0x4,
62 |
63 | ///
64 | /// Immediate 16-bit signed integer
65 | /// Argument length: 2
66 | ///
67 | /// - GTA III
68 | /// - GTA Vice City
69 | /// - GTA San Andreas
70 | ///
71 | Immediate16BitInt = 0x5,
72 |
73 | ///
74 | /// Immediate 32-bit float
75 | /// Argument length: 4
76 | ///
77 | /// - GTA Vice City
78 | /// - GTA San Andreas
79 | ///
80 | Immediate32BitFloat = 0x6
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/EGTA3ScriptGTAViceCityStoriesDataType.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// GTA3Script sharp namespace
3 | ///
4 | namespace GTA3ScriptSharp
5 | {
6 | ///
7 | /// GTA3Script GTA Vice City Stories data type enumerator
8 | ///
9 | public enum EGTA3ScriptGTAViceCityStoriesDataType
10 | {
11 | ///
12 | /// End of argument list
13 | /// Argument length: 0
14 | ///
15 | /// - GTA III
16 | /// - GTA Vice City
17 | /// - GTA San Andreas
18 | /// - GTA Liberty City Stories
19 | /// - GTA Vice City Stories
20 | ///
21 | EndOfArgumentList = 0x0,
22 |
23 | ///
24 | /// Immediate 8-bit signed integer constant 0
25 | /// Argument length: 0
26 | ///
27 | /// - GTA Liberty City Stories
28 | /// - GTA Vice City Stories
29 | ///
30 | Immediate8BitIntConst0 = 0x1,
31 |
32 | ///
33 | /// Immediate 8-bit floating-point constant 0.0
34 | /// Argument length: 0
35 | ///
36 | /// - GTA Liberty City Stories
37 | /// - GTA Vice City Stories
38 | ///
39 | Immediate8BitFloatConst0 = 0x2,
40 |
41 | ///
42 | /// Immediate 8-bit packed floating-point
43 | /// Argument length: 1
44 | ///
45 | /// - GTA Liberty City Stories
46 | /// - GTA Vice City Stories
47 | ///
48 | Immediate8BitPackedFloat = 0x3,
49 |
50 | ///
51 | /// Immediate 16-bit packed floating-point
52 | /// Argument length: 2
53 | ///
54 | /// - GTA Liberty City Stories
55 | /// - GTA Vice City Stories
56 | ///
57 | Immediate16BitPackedFloat = 0x4,
58 |
59 | ///
60 | /// Immediate 24-bit packed floating-point
61 | /// Argument length: 3
62 | ///
63 | /// - GTA Liberty City Stories
64 | /// - GTA Vice City Stories
65 | ///
66 | Immediate24BitPackedFloat = 0x5,
67 |
68 | ///
69 | /// Immediate 32-bit signed integer
70 | /// Argument length: 4
71 | ///
72 | /// - GTA Liberty City Stories
73 | /// - GTA Vice City Stories
74 | ///
75 | Immediate32BitInt = 0x6,
76 |
77 | ///
78 | /// Immediate 8-bit integer
79 | /// Argument length: 1
80 | ///
81 | /// - GTA Liberty City Stories
82 | /// - GTA Vice City Stories
83 | ///
84 | Immediate8BitInt = 0x7,
85 |
86 | ///
87 | /// Immediate 16-bit integer
88 | /// Argument length: 2
89 | ///
90 | /// - GTA Liberty City Stories
91 | /// - GTA Vice City Stories
92 | ///
93 | Immediate16BitInt = 0x8,
94 |
95 | ///
96 | /// Immediate 32-bit floating-point
97 | /// Argument length: 4
98 | ///
99 | /// - GTA Liberty City Stories
100 | /// - GTA Vice City Stories
101 | ///
102 | Immediate32BitFloat = 0x9,
103 |
104 | ///
105 | /// Immediate null terminated string
106 | /// Argument length: n + NUL
107 | ///
108 | /// - GTA Liberty City Stories
109 | /// - GTA Vice City Stories
110 | ///
111 | ImmediateNullTerminatedString = 0xA
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/EGame.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// GTA3Script sharp namespace
3 | ///
4 | namespace GTA3ScriptSharp
5 | {
6 | ///
7 | /// Game enumerator
8 | ///
9 | public enum EGame
10 | {
11 | ///
12 | /// GTA III
13 | ///
14 | GTAIII,
15 |
16 | ///
17 | /// GTA Vice City
18 | ///
19 | GTAViceCity,
20 |
21 | ///
22 | /// GTA San Andreas
23 | ///
24 | GTASanAndreas,
25 |
26 | ///
27 | /// GTA LIberty City Stories
28 | ///
29 | GTALibertyCityStories,
30 |
31 | ///
32 | /// GTA Vice City Stories
33 | ///
34 | GTAViceCityStories
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/EReferenceType.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// GTA3Script sharp namespace
3 | ///
4 | namespace GTA3ScriptSharp
5 | {
6 | ///
7 | /// Reference value type enumerator
8 | ///
9 | public enum EReferenceType
10 | {
11 | ///
12 | /// Integer or float
13 | ///
14 | IntFloat,
15 |
16 | ///
17 | /// 8 byte string
18 | ///
19 | ByteString8,
20 |
21 | ///
22 | /// 16 byte string
23 | ///
24 | ByteString16
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3Script.cs:
--------------------------------------------------------------------------------
1 | using IMGSharp;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.IO;
5 |
6 | ///
7 | /// GTA3Script sharp namespace
8 | ///
9 | namespace GTA3ScriptSharp
10 | {
11 | ///
12 | /// GTA3Script class
13 | ///
14 | public static class GTA3Script
15 | {
16 | ///
17 | /// Open script directory
18 | ///
19 | /// Script directory
20 | /// Game
21 | /// Script files mode
22 | /// Script files if successful, otherwise "null"
23 | public static GTA3ScriptFiles OpenScriptDirectory(string directory, EGame game, EGTA3ScriptFilesMode filesMode)
24 | {
25 | GTA3ScriptFiles ret = null;
26 | if (Directory.Exists(directory))
27 | {
28 | string main_scm_path = Path.Combine(directory, "main.scm");
29 | string script_img_path = Path.Combine(directory, "script.img");
30 | if (File.Exists(main_scm_path) && File.Exists(script_img_path))
31 | {
32 | List streams = new List();
33 | try
34 | {
35 | streams.Add(File.Open(main_scm_path, FileMode.Open, FileAccess.Read));
36 | using (IMGArchive img_archive = IMGFile.OpenRead(script_img_path))
37 | {
38 | IMGArchiveEntry[] entries = img_archive.Entries;
39 | foreach (IMGArchiveEntry entry in entries)
40 | {
41 | if (entry != null)
42 | {
43 | Stream stream = entry.Open();
44 | if (stream != null)
45 | {
46 | streams.Add(stream);
47 | }
48 | }
49 | }
50 | }
51 | AGTA3Script[] scripts = new AGTA3Script[streams.Count];
52 | for (int i = 0; i < scripts.Length; i++)
53 | {
54 | scripts[i] = new SCM(game, streams[i]);
55 | }
56 | ret = new GTA3ScriptFiles(game, scripts);
57 | }
58 | catch (Exception e)
59 | {
60 | Console.Error.WriteLine(e);
61 | foreach (Stream stream in streams)
62 | {
63 | stream.Dispose();
64 | }
65 | }
66 | streams.Clear();
67 | }
68 | }
69 | return ret;
70 | }
71 |
72 | ///
73 | /// Open IR2 file
74 | ///
75 | /// Path
76 | /// Game
77 | /// IR2 if successful, otherwise "null"
78 | public static IR2 OpenIR2(string path, EGame game)
79 | {
80 | IR2 ret = null;
81 | if (path != null)
82 | {
83 | if (File.Exists(path))
84 | {
85 | ret = new IR2(game, File.Open(path, FileMode.Open, FileAccess.Read));
86 | }
87 | }
88 | return ret;
89 | }
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3ScriptCommand.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// GTA3Script sharp namespace
3 | ///
4 | namespace GTA3ScriptSharp
5 | {
6 | ///
7 | /// GTA3Script command class
8 | ///
9 | public struct GTA3ScriptCommand
10 | {
11 | ///
12 | /// GTA3Script operation code
13 | ///
14 | public readonly ushort OpCode;
15 |
16 | ///
17 | /// GTA3Script operation code arguments
18 | ///
19 | public readonly object[] Arguments;
20 |
21 | ///
22 | /// Constructor
23 | ///
24 | /// Operation code
25 | /// Arguments
26 | public GTA3ScriptCommand(ushort opCode, object[] arguments)
27 | {
28 | OpCode = opCode;
29 | Arguments = arguments;
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3ScriptExecutionException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.Serialization;
3 |
4 | ///
5 | /// GTA3Script sharp namespace
6 | ///
7 | namespace GTA3ScriptSharp
8 | {
9 | ///
10 | /// GTA3Script execution exception
11 | ///
12 | public class GTA3ScriptExecutionException : Exception
13 | {
14 | ///
15 | /// Default constructor
16 | ///
17 | public GTA3ScriptExecutionException() : base()
18 | {
19 | // ...
20 | }
21 |
22 | ///
23 | /// Constructor
24 | ///
25 | /// Message
26 | public GTA3ScriptExecutionException(string message) : base(message)
27 | {
28 | // ...
29 | }
30 |
31 | ///
32 | /// Constructor
33 | ///
34 | /// Message
35 | /// Inner exception
36 | public GTA3ScriptExecutionException(string message, Exception innerException) : base(message, innerException)
37 | {
38 | // ...
39 | }
40 |
41 | ///
42 | /// Constructor
43 | ///
44 | /// Serialization information
45 | /// Streaming context
46 | protected GTA3ScriptExecutionException(SerializationInfo info, StreamingContext context) : base(info, context)
47 | {
48 | // ...
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3ScriptFiles.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | ///
4 | /// GTA3Script sharp namespace
5 | ///
6 | namespace GTA3ScriptSharp
7 | {
8 | ///
9 | /// GTA3Script files class
10 | ///
11 | public class GTA3ScriptFiles : IDisposable
12 | {
13 | ///
14 | /// Game
15 | ///
16 | private EGame game;
17 |
18 | ///
19 | /// Scripts
20 | ///
21 | private AGTA3Script[] scripts;
22 |
23 | ///
24 | /// Scripts
25 | ///
26 | public AGTA3Script[] Scripts
27 | {
28 | get
29 | {
30 | return ((scripts == null) ? scripts : (new AGTA3Script[0]));
31 | }
32 | }
33 |
34 | ///
35 | /// Constructor
36 | ///
37 | /// Game
38 | /// Scripts
39 | internal GTA3ScriptFiles(EGame game, AGTA3Script[] scripts)
40 | {
41 | this.game = game;
42 | this.scripts = scripts;
43 | }
44 |
45 | ///
46 | /// Dispose
47 | ///
48 | public void Dispose()
49 | {
50 | if (scripts != null)
51 | {
52 | foreach (AGTA3Script script in scripts)
53 | {
54 | if (script != null)
55 | {
56 | script.Dispose();
57 | }
58 | }
59 | scripts = null;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3ScriptGTAIIIRuntime.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | ///
4 | /// GTA3Script sharp namespace
5 | ///
6 | namespace GTA3ScriptSharp
7 | {
8 | ///
9 | /// GTA3Script GTA III runtime class
10 | ///
11 | public class GTA3ScriptGTAIIIRuntime : AGTA3ScriptRuntime
12 | {
13 | ///
14 | /// Default constructor
15 | ///
16 | public GTA3ScriptGTAIIIRuntime() : base()
17 | {
18 | /*// Go to the label if the condition result is true.
19 | Patch(0x4C, null, typeof(void), (runtime, arguments) =>
20 | {
21 | // TODO
22 | throw new NotImplementedException();
23 | }, typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue));
24 |
25 | AddKeyword(0x4D, "ELSE_GOTO");
26 |
27 | Patch(0x4D, (runtime, args) =>
28 | {
29 | throw new NotImplementedException();
30 | }, null, "ELSE_JUMP", "ELSE_GOTO", "JF");
31 |
32 | Patch(0x4E, (runtime, args) =>
33 | {
34 | throw new NotImplementedException();
35 | }, null, "END_THREAD");
36 |
37 | Patch(0x4F, (runtime, args) =>
38 | {
39 | throw new NotImplementedException();
40 | }, null, "CREATE_THREAD");
41 |
42 | Patch(0x50, (runtime, args) =>
43 | {
44 | throw new NotImplementedException();
45 | }, null, "GOSUB");
46 |
47 | Patch(0x51, (runtime, args) =>
48 | {
49 | throw new NotImplementedException();
50 | }, null, "RETURN");
51 |
52 | Patch(0x53, (runtime, args) =>
53 | {
54 | throw new NotImplementedException();
55 | }, null, "CREATE_PLAYER");
56 |
57 | Patch(0x54, (runtime, args) =>
58 | {
59 | throw new NotImplementedException();
60 | }, null, "GET_PLAYER_COORDINATES");
61 |
62 | Patch(0x55, (runtime, args) =>
63 | {
64 | throw new NotImplementedException();
65 | }, null, "SET_PLAYER_COORDINATES");
66 |
67 | Patch(0x56, (runtime, args) =>
68 | {
69 | throw new NotImplementedException();
70 | }, null, "IS_PLAYER_IN_AREA_2D");
71 |
72 | Patch(0x57, (runtime, args) =>
73 | {
74 | throw new NotImplementedException();
75 | }, null, "IS_PLAYER_IN_AREA_3D");
76 |
77 | Patch(0x9A, (runtime, args) =>
78 | {
79 | throw new NotImplementedException();
80 | }, null, "CREATE_CHAR");
81 |
82 | Patch(0x9B, (runtime, args) =>
83 | {
84 | throw new NotImplementedException();
85 | }, null, "DESTROY_ACTOR");
86 |
87 | Patch(0x9C, (runtime, args) =>
88 | {
89 | throw new NotImplementedException();
90 | }, null, "ACTOR_WANDER_DIR");
91 |
92 | Patch(0x9F, (runtime, args) =>
93 | {
94 | throw new NotImplementedException();
95 | }, null, "ACTOR_SET_IDLE");
96 |
97 | Patch(0xBE, (runtime, args) =>
98 | {
99 | throw new NotImplementedException();
100 | }, null, "TEXT_CLEAR_ALL");
101 |
102 | Patch(0xC0, (runtime, args) =>
103 | {
104 | throw new NotImplementedException();
105 | }, null, "SET_CURRENT_TIME");
106 |
107 | Patch(0xC2, (runtime, args) =>
108 | {
109 | throw new NotImplementedException();
110 | }, null, "IS_SPHERE_ONSCREEN");
111 |
112 | Patch(0xC3, (runtime, args) =>
113 | {
114 | throw new NotImplementedException();
115 | }, null, "ENTER_DEBUGMODE");
116 |
117 | Patch(0xC4, (runtime, args) =>
118 | {
119 | throw new NotImplementedException();
120 | }, null, "EXIT_DEBUGMODE");
121 |
122 | Patch(0xD6, (runtime, args) =>
123 | {
124 | throw new NotImplementedException();
125 | }, null, "IF");
126 |
127 | Patch(0xD7, (runtime, args) =>
128 | {
129 | throw new NotImplementedException();
130 | }, null, "CREATE_THREAD_WB", "CREATE_THREAD_NO_PARAMS");
131 |
132 | Patch(0xD8, (runtime, args) =>
133 | {
134 | throw new NotImplementedException();
135 | }, null, "MISSION_CLEANUP");
136 |
137 | Patch(0xDB, (runtime, args) =>
138 | {
139 | throw new NotImplementedException();
140 | }, null, "IS_ACTOR_IN_CAR");
141 |
142 | Patch(0xDC, (runtime, args) =>
143 | {
144 | throw new NotImplementedException();
145 | }, null, "IS_PLAYER_DRIVING");
146 |
147 | Patch(0xDD, (runtime, args) =>
148 | {
149 | throw new NotImplementedException();
150 | }, null, "IS_ACTOR_DRIVING_VEHICLE_TYPE");
151 |
152 | Patch(0xDE, (runtime, args) =>
153 | {
154 | throw new NotImplementedException();
155 | }, null, "IS_PLAYER_DRIVING_VEHICLE_TYPE");
156 |
157 | Patch(0xDF, (runtime, args) =>
158 | {
159 | throw new NotImplementedException();
160 | }, null, "IS_ACTOR_DRIVING");
161 |
162 | Patch(0x107, (runtime, args) =>
163 | {
164 | throw new NotImplementedException();
165 | }, null, "CREATE_OBJECT");
166 |
167 | Patch(0x108, (runtime, args) =>
168 | {
169 | throw new NotImplementedException();
170 | }, null, "DESTROY_OBJECT");
171 |
172 | Patch(0x10D, (runtime, args) =>
173 | {
174 | throw new NotImplementedException();
175 | }, null, "SET_PLAYER_WANTED_LEVEL");
176 |
177 | Patch(0x10E, (runtime, args) =>
178 | {
179 | throw new NotImplementedException();
180 | }, null, "SET_PLAYER_MINIMUM_WANTED_LEVEL");
181 |
182 | Patch(0x111, (runtime, args) =>
183 | {
184 | throw new NotImplementedException();
185 | }, null, "SET_WB_CHECK_TO");
186 |
187 | Patch(0x112, (runtime, args) =>
188 | {
189 | throw new NotImplementedException();
190 | }, null, "WASTED_OR_BUSTED");
191 |
192 | Patch(0x114, (runtime, args) =>
193 | {
194 | throw new NotImplementedException();
195 | }, null, "GIVE_ACTOR_WEAPON_AMMO");
196 |
197 | Patch(0x117, (runtime, args) =>
198 | {
199 | throw new NotImplementedException();
200 | }, null, "IS_PLAYER_WASTED");
201 |
202 | Patch(0x118, (runtime, args) =>
203 | {
204 | throw new NotImplementedException();
205 | }, null, "IS_ACTOR_DEAD");
206 |
207 | Patch(0x119, (runtime, args) =>
208 | {
209 | throw new NotImplementedException();
210 | }, null, "IS_CAR_WRECKED");
211 |
212 | Patch(0x11A, (runtime, args) =>
213 | {
214 | throw new NotImplementedException();
215 | }, null, "SET_ACTOR_THREAT_SEARCH");
216 |
217 | Patch(0x11C, (runtime, args) =>
218 | {
219 | throw new NotImplementedException();
220 | }, null, "SET_ACTOR_OBJ_NO_OBJ");
221 |
222 | Patch(0x121, (runtime, args) =>
223 | {
224 | throw new NotImplementedException();
225 | }, null, "IS_PLAYER_IN_ZONE");
226 |
227 | Patch(0x122, (runtime, args) =>
228 | {
229 | throw new NotImplementedException();
230 | }, null, "IS_PLAYER_PRESSING_HORN");
231 |
232 | Patch(0x123, (runtime, args) =>
233 | {
234 | throw new NotImplementedException();
235 | }, null, "HAS_ACTOR_SPOTTED_PLAYER");
236 |
237 | Patch(0x129, (runtime, args) =>
238 | {
239 | throw new NotImplementedException();
240 | }, null, "CREATE_ACTOR_INSIDE_CAR");
241 |
242 | Patch(0x130, (runtime, args) =>
243 | {
244 | throw new NotImplementedException();
245 | }, null, "IS_PLAYER_BUSTED");
246 |
247 | Patch(0x135, (runtime, args) =>
248 | {
249 | throw new NotImplementedException();
250 | }, null, "SET_CAR_DOOR_LOCK");
251 |
252 | Patch(0x137, (runtime, args) =>
253 | {
254 | throw new NotImplementedException();
255 | }, null, "IS_CAR_MODEL");
256 |
257 | Patch(0x14B, (runtime, args) =>
258 | {
259 | throw new NotImplementedException();
260 | }, null, "CREATE_CAR_GENERATOR");
261 |
262 | Patch(0x14C, (runtime, args) =>
263 | {
264 | throw new NotImplementedException();
265 | }, null, "SET_CAR_GENERATOR_CARS_TO_GENERATE");
266 |
267 | Patch(0x14C, (runtime, args) =>
268 | {
269 | throw new NotImplementedException();
270 | }, null, "TEXT_PAGER");
271 |
272 | Patch(0x14E, (runtime, args) =>
273 | {
274 | throw new NotImplementedException();
275 | }, null, "START_TIMER_AT");
276 |
277 | Patch(0x14F, (runtime, args) =>
278 | {
279 | throw new NotImplementedException();
280 | }, null, "STOP_TIMER");
281 |
282 | Patch(0x151, (runtime, args) =>
283 | {
284 | throw new NotImplementedException();
285 | }, null, "REMOVE_STATUS_TEXT");
286 |
287 | Patch(0x152, (runtime, args) =>
288 | {
289 | throw new NotImplementedException();
290 | }, null, "SET_ZONE_CAR_INFO");
291 |
292 | Patch(0x154, (runtime, args) =>
293 | {
294 | throw new NotImplementedException();
295 | }, null, "IS_ACTOR_IN_ZONE");
296 |
297 | Patch(0x157, (runtime, args) =>
298 | {
299 | throw new NotImplementedException();
300 | }, null, "CAMERA_ON_PLAYER");
301 |
302 | Patch(0x158, (runtime, args) =>
303 | {
304 | throw new NotImplementedException();
305 | }, null, "CAMERA_ON_VEHICLE");
306 |
307 | Patch(0x159, (runtime, args) =>
308 | {
309 | throw new NotImplementedException();
310 | }, null, "CAMERA_ON_PED");
311 |
312 | Patch(0x15A, (runtime, args) =>
313 | {
314 | throw new NotImplementedException();
315 | }, null, "RESTORE_CAMERA");
316 |
317 | Patch(0x16A, (runtime, args) =>
318 | {
319 | throw new NotImplementedException();
320 | }, null, "FADE");
321 |
322 | Patch(0x16B, (runtime, args) =>
323 | {
324 | throw new NotImplementedException();
325 | }, null, "FADING");
326 |
327 | Patch(0x16C, (runtime, args) =>
328 | {
329 | throw new NotImplementedException();
330 | }, null, "RESTART_IF_WASTED_AT");
331 |
332 | Patch(0x16D, (runtime, args) =>
333 | {
334 | throw new NotImplementedException();
335 | }, null, "RESTART_IF_BUSTED_AT");
336 |
337 | Patch(0x173, (runtime, args) =>
338 | {
339 | throw new NotImplementedException();
340 | }, null, "SET_ACTOR_Z_ANGLE");
341 |
342 | Patch(0x177, (runtime, args) =>
343 | {
344 | throw new NotImplementedException();
345 | }, null, "SET_OBJECT_Z_ANGLE");
346 |
347 | Patch(0x1B4, (runtime, args) =>
348 | {
349 | throw new NotImplementedException();
350 | }, null, "SET_PLAYER_CONTROL");
351 |
352 | Patch(0x1B6, (runtime, args) =>
353 | {
354 | throw new NotImplementedException();
355 | }, null, "SET_WEATHER");
356 |
357 | Patch(0x1B9, (runtime, args) =>
358 | {
359 | throw new NotImplementedException();
360 | }, null, "SET_ACTOR_ARMED_WEAPON");
361 |
362 | Patch(0x1C2, (runtime, args) =>
363 | {
364 | throw new NotImplementedException();
365 | }, null, "REMOVE_REFERENCES_TO_ACTOR");
366 |
367 | Patch(0x1C3, (runtime, args) =>
368 | {
369 | throw new NotImplementedException();
370 | }, null, "REMOVE_REFERENCES_TO_CAR");
371 |
372 | Patch(0x1C4, (runtime, args) =>
373 | {
374 | throw new NotImplementedException();
375 | }, null, "REMOVE_REFERENCES_TO_OBJECT");
376 |
377 | Patch(0x1F0, (runtime, args) =>
378 | {
379 | throw new NotImplementedException();
380 | }, null, "SET_MAX_WANTED_LEVEL_TO");
381 |
382 | Patch(0x23C, (runtime, args) =>
383 | {
384 | throw new NotImplementedException();
385 | }, null, "LOAD_SPECIAL_ACTOR");
386 |
387 | Patch(0x247, (runtime, args) =>
388 | {
389 | throw new NotImplementedException();
390 | }, null, "REQUEST_MODEL");
391 |
392 | Patch(0x248, (runtime, args) =>
393 | {
394 | throw new NotImplementedException();
395 | }, null, "IS_MODEL_AVAILABLE");
396 |
397 | Patch(0x249, (runtime, args) =>
398 | {
399 | throw new NotImplementedException();
400 | }, null, "RELEASE_MODEL");
401 |
402 | Patch(0x256, (runtime, args) =>
403 | {
404 | throw new NotImplementedException();
405 | }, null, "IS_PLAYER_DEFINED");
406 |
407 | Patch(0x2A3, (runtime, args) =>
408 | {
409 | throw new NotImplementedException();
410 | }, null, "TOGGLE_WIDESCREEN");
411 |
412 | Patch(0x2AC, (runtime, args) =>
413 | {
414 | throw new NotImplementedException();
415 | }, null, "SET_CAR_IMMUNITIES");
416 |
417 | Patch(0x2EB, (runtime, args) =>
418 | {
419 | throw new NotImplementedException();
420 | }, null, "RESTORE_CAMERA_WITH_JUMPCUT");
421 |
422 | Patch(0x317, (runtime, args) =>
423 | {
424 | throw new NotImplementedException();
425 | }, null, "INCREMENT_MISSION_ATTEMPTS");
426 |
427 | Patch(0x34F, (runtime, args) =>
428 | {
429 | throw new NotImplementedException();
430 | }, null, "DESTROY_ACTOR_WITH_FADE");
431 |
432 | Patch(0x35F, (runtime, args) =>
433 | {
434 | throw new NotImplementedException();
435 | }, null, "GIVE_ARMOUR_TO_ACTOR");
436 |
437 | Patch(0x38B, (runtime, args) =>
438 | {
439 | throw new NotImplementedException();
440 | }, null, "LOAD_REQUESTED_MODELS");
441 |
442 | Patch(0x394, (runtime, args) =>
443 | {
444 | throw new NotImplementedException();
445 | }, null, "PLAY_MUSIC");
446 |
447 | Patch(0x39E, (runtime, args) =>
448 | {
449 | throw new NotImplementedException();
450 | }, null, "SET_ACTOR_CANT_BE_DRAGGED_OUT_OF_CAR");
451 |
452 | Patch(0x3A3, (runtime, args) =>
453 | {
454 | throw new NotImplementedException();
455 | }, null, "IS_ACTOR_MALE");
456 |
457 | Patch(0x3A4, (runtime, args) =>
458 | {
459 | throw new NotImplementedException();
460 | }, null, "THREAD");
461 |
462 | Patch(0x3CF, (runtime, args) =>
463 | {
464 | throw new NotImplementedException();
465 | }, null, "LOAD_WAV");
466 |
467 | Patch(0x3D0, (runtime, args) =>
468 | {
469 | throw new NotImplementedException();
470 | }, null, "HAS_WAV_LOADED");
471 |
472 | Patch(0x3D1, (runtime, args) =>
473 | {
474 | throw new NotImplementedException();
475 | }, null, "PLAY_WAV");
476 |
477 | Patch(0x3D7, (runtime, args) =>
478 | {
479 | throw new NotImplementedException();
480 | }, null, "SET_WAV_LOCATION");
481 |
482 | Patch(0x3DE, (runtime, args) =>
483 | {
484 | throw new NotImplementedException();
485 | }, null, "SET_PED_DENSITY");
486 |
487 | Patch(0x3E4, (runtime, args) =>
488 | {
489 | throw new NotImplementedException();
490 | }, null, "SET_TEXT_DRAW_ALIGN_RIGHT");
491 |
492 | Patch(0x3E6, (runtime, args) =>
493 | {
494 | throw new NotImplementedException();
495 | }, null, "REMOVE_TEXT_BOX");
496 |
497 | Patch(0x3EE, (runtime, args) =>
498 | {
499 | throw new NotImplementedException();
500 | }, null, "IS_PLAYER_CONTROLLABLE");
501 |
502 | Patch(0x3F0, (runtime, args) =>
503 | {
504 | throw new NotImplementedException();
505 | }, null, "ENABLE_TEXT_DRAW");
506 |
507 | Patch(0x40D, (runtime, args) =>
508 | {
509 | throw new NotImplementedException();
510 | }, null, "CLEAR_MISSION_AUDIO");
511 |
512 | Patch(0x417, (runtime, args) =>
513 | {
514 | throw new NotImplementedException();
515 | }, null, "START_MISSION");
516 |
517 | Patch(0x41D, (runtime, args) =>
518 | {
519 | throw new NotImplementedException();
520 | }, null, "SET_CAMERA_NEAR_CLIP");
521 |
522 | Patch(0x580, (runtime, args) =>
523 | {
524 | throw new NotImplementedException();
525 | }, null, "SET_CHAR_OBJ_BUY_ICE_CREAM");*/
526 |
527 |
528 | // TODO
529 | }
530 | }
531 | }
532 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3ScriptGTALibertyCityStoriesRuntime.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// GTA3Script sharp namespace
3 | ///
4 | namespace GTA3ScriptSharp
5 | {
6 | ///
7 | /// GTA3Script GTA Liberty City Stories runtime class
8 | ///
9 | public class GTA3ScriptGTALibertyCityStoriesRuntime : AGTA3ScriptRuntime
10 | {
11 | ///
12 | /// Default constructor
13 | ///
14 | public GTA3ScriptGTALibertyCityStoriesRuntime()
15 | {
16 | // TODO
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3ScriptGTASanAndreasRuntime.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | ///
3 | /// GTA3Script sharp namespace
4 | ///
5 | namespace GTA3ScriptSharp
6 | {
7 | ///
8 | /// GTA3Script GTA San Andreas runtime class
9 | ///
10 | public class GTA3ScriptGTASanAndreasRuntime : AGTA3ScriptRuntime
11 | {
12 | ///
13 | /// Default constructor
14 | ///
15 | public GTA3ScriptGTASanAndreasRuntime()
16 | {
17 | /*Patch(0x1, (runtime, args) =>
18 | {
19 | throw new NotImplementedException();
20 | }, null, "WAIT");
21 |
22 | Patch(0x2, (runtime, args) =>
23 | {
24 | throw new NotImplementedException();
25 | }, null, "GOTO", "JUMP");
26 |
27 | Patch(0x3, (runtime, args) =>
28 | {
29 | throw new NotImplementedException();
30 | }, null, "SHAKE_CAMERA");
31 |
32 | Patch(0x4D, (runtime, args) =>
33 | {
34 | throw new NotImplementedException();
35 | }, null, "ELSE_JUMP", "ELSE_GOTO", "JF");
36 |
37 | Patch(0x4E, (runtime, args) =>
38 | {
39 | throw new NotImplementedException();
40 | }, null, "END_THREAD");
41 |
42 | Patch(0x4F, (runtime, args) =>
43 | {
44 | throw new NotImplementedException();
45 | }, null, "CREATE_THREAD");
46 |
47 | Patch(0x50, (runtime, args) =>
48 | {
49 | throw new NotImplementedException();
50 | }, null, "GOSUB");
51 |
52 | Patch(0x51, (runtime, args) =>
53 | {
54 | throw new NotImplementedException();
55 | }, null, "RETURN");
56 |
57 | Patch(0x53, (runtime, args) =>
58 | {
59 | throw new NotImplementedException();
60 | }, null, "CREATE_PLAYER");
61 |
62 | Patch(0x9A, (runtime, args) =>
63 | {
64 | throw new NotImplementedException();
65 | }, null, "CREATE_CHAR");
66 |
67 | Patch(0x9B, (runtime, args) =>
68 | {
69 | throw new NotImplementedException();
70 | }, null, "DESTROY_ACTOR");
71 |
72 | Patch(0xBE, (runtime, args) =>
73 | {
74 | throw new NotImplementedException();
75 | }, null, "TEXT_CLEAR_ALL");
76 |
77 | Patch(0xC0, (runtime, args) =>
78 | {
79 | throw new NotImplementedException();
80 | }, null, "SET_CURRENT_TIME");
81 |
82 | Patch(0xC2, (runtime, args) =>
83 | {
84 | throw new NotImplementedException();
85 | }, null, "IS_SPHERE_ONSCREEN");
86 |
87 | Patch(0xD6, (runtime, args) =>
88 | {
89 | throw new NotImplementedException();
90 | }, null, "IF");
91 |
92 | Patch(0xD7, (runtime, args) =>
93 | {
94 | throw new NotImplementedException();
95 | }, null, "CREATE_THREAD_WB", "CREATE_THREAD_NO_PARAMS");
96 |
97 | Patch(0xD8, (runtime, args) =>
98 | {
99 | throw new NotImplementedException();
100 | }, null, "MISSION_CLEANUP");
101 |
102 | Patch(0xDB, (runtime, args) =>
103 | {
104 | throw new NotImplementedException();
105 | }, null, "IS_ACTOR_IN_CAR");
106 |
107 | Patch(0xDD, (runtime, args) =>
108 | {
109 | throw new NotImplementedException();
110 | }, null, "IS_ACTOR_DRIVING_CAR_WITH_MODEL");
111 |
112 | Patch(0xDF, (runtime, args) =>
113 | {
114 | throw new NotImplementedException();
115 | }, null, "IS_ACTOR_DRIVING");
116 |
117 | Patch(0x107, (runtime, args) =>
118 | {
119 | throw new NotImplementedException();
120 | }, null, "CREATE_OBJECT");
121 |
122 | Patch(0x108, (runtime, args) =>
123 | {
124 | throw new NotImplementedException();
125 | }, null, "DESTROY_OBJECT");
126 |
127 | Patch(0x10D, (runtime, args) =>
128 | {
129 | throw new NotImplementedException();
130 | }, null, "SET_PLAYER_WANTED_LEVEL");
131 |
132 | Patch(0x10E, (runtime, args) =>
133 | {
134 | throw new NotImplementedException();
135 | }, null, "SET_PLAYER_MINIMUM_WANTED_LEVEL");
136 |
137 | Patch(0x111, (runtime, args) =>
138 | {
139 | throw new NotImplementedException();
140 | }, null, "SET_WB_CHECK_TO");
141 |
142 | Patch(0x112, (runtime, args) =>
143 | {
144 | throw new NotImplementedException();
145 | }, null, "WASTED_OR_BUSTED");
146 |
147 | Patch(0x114, (runtime, args) =>
148 | {
149 | throw new NotImplementedException();
150 | }, null, "GIVE_ACTOR_WEAPON_AMMO");
151 |
152 | Patch(0x117, (runtime, args) =>
153 | {
154 | throw new NotImplementedException();
155 | }, null, "IS_PLAYER_WASTED");
156 |
157 | Patch(0x118, (runtime, args) =>
158 | {
159 | throw new NotImplementedException();
160 | }, null, "IS_ACTOR_DEAD");
161 |
162 | Patch(0x119, (runtime, args) =>
163 | {
164 | throw new NotImplementedException();
165 | }, null, "IS_CAR_WRECKED");
166 |
167 | Patch(0x122, (runtime, args) =>
168 | {
169 | throw new NotImplementedException();
170 | }, null, "IS_PLAYER_PRESSING_HORN");
171 |
172 | Patch(0x129, (runtime, args) =>
173 | {
174 | throw new NotImplementedException();
175 | }, null, "CREATE_ACTOR_INSIDE_CAR");
176 |
177 | Patch(0x137, (runtime, args) =>
178 | {
179 | throw new NotImplementedException();
180 | }, null, "IS_CAR_MODEL");
181 |
182 | Patch(0x14B, (runtime, args) =>
183 | {
184 | throw new NotImplementedException();
185 | }, null, "CREATE_CAR_GENERATOR");
186 |
187 | Patch(0x14C, (runtime, args) =>
188 | {
189 | throw new NotImplementedException();
190 | }, null, "SET_CAR_GENERATOR_CARS_TO_GENERATE");
191 |
192 | Patch(0x14E, (runtime, args) =>
193 | {
194 | throw new NotImplementedException();
195 | }, null, "START_TIMER_AT");
196 |
197 | Patch(0x14F, (runtime, args) =>
198 | {
199 | throw new NotImplementedException();
200 | }, null, "STOP_TIMER");
201 |
202 | Patch(0x151, (runtime, args) =>
203 | {
204 | throw new NotImplementedException();
205 | }, null, "REMOVE_STATUS_TEXT");
206 |
207 | Patch(0x154, (runtime, args) =>
208 | {
209 | throw new NotImplementedException();
210 | }, null, "IS_ACTOR_IN_ZONE");
211 |
212 | Patch(0x158, (runtime, args) =>
213 | {
214 | throw new NotImplementedException();
215 | }, null, "CAMERA_ON_VEHICLE");
216 |
217 | Patch(0x159, (runtime, args) =>
218 | {
219 | throw new NotImplementedException();
220 | }, null, "CAMERA_ON_PED");
221 |
222 | Patch(0x15A, (runtime, args) =>
223 | {
224 | throw new NotImplementedException();
225 | }, null, "RESTORE_CAMERA");
226 |
227 | Patch(0x16A, (runtime, args) =>
228 | {
229 | throw new NotImplementedException();
230 | }, null, "FADE");
231 |
232 | Patch(0x16B, (runtime, args) =>
233 | {
234 | throw new NotImplementedException();
235 | }, null, "FADING");
236 |
237 | Patch(0x16C, (runtime, args) =>
238 | {
239 | throw new NotImplementedException();
240 | }, null, "RESTART_IF_WASTED_AT");
241 |
242 | Patch(0x16D, (runtime, args) =>
243 | {
244 | throw new NotImplementedException();
245 | }, null, "RESTART_IF_BUSTED_AT");
246 |
247 | Patch(0x173, (runtime, args) =>
248 | {
249 | throw new NotImplementedException();
250 | }, null, "SET_ACTOR_Z_ANGLE");
251 |
252 | Patch(0x177, (runtime, args) =>
253 | {
254 | throw new NotImplementedException();
255 | }, null, "SET_OBJECT_Z_ANGLE");
256 |
257 | Patch(0x1B4, (runtime, args) =>
258 | {
259 | throw new NotImplementedException();
260 | }, null, "SET_PLAYER_CAN_MOVE");
261 |
262 | Patch(0x1B6, (runtime, args) =>
263 | {
264 | throw new NotImplementedException();
265 | }, null, "SET_WEATHER");
266 |
267 | Patch(0x1B9, (runtime, args) =>
268 | {
269 | throw new NotImplementedException();
270 | }, null, "SET_ACTOR_ARMED_WEAPON");
271 |
272 | Patch(0x1C2, (runtime, args) =>
273 | {
274 | throw new NotImplementedException();
275 | }, null, "REMOVE_REFERENCES_TO_ACTOR");
276 |
277 | Patch(0x1C3, (runtime, args) =>
278 | {
279 | throw new NotImplementedException();
280 | }, null, "REMOVE_REFERENCES_TO_CAR");
281 |
282 | Patch(0x1C4, (runtime, args) =>
283 | {
284 | throw new NotImplementedException();
285 | }, null, "REMOVE_REFERENCES_TO_OBJECT");
286 |
287 | Patch(0x1F0, (runtime, args) =>
288 | {
289 | throw new NotImplementedException();
290 | }, null, "SET_MAX_WANTED_LEVEL_TO");
291 |
292 | Patch(0x1F5, (runtime, args) =>
293 | {
294 | throw new NotImplementedException();
295 | }, null, "GET_PLAYER_ACTOR");
296 |
297 | Patch(0x23C, (runtime, args) =>
298 | {
299 | throw new NotImplementedException();
300 | }, null, "LOAD_SPECIAL_ACTOR");
301 |
302 | Patch(0x247, (runtime, args) =>
303 | {
304 | throw new NotImplementedException();
305 | }, null, "LOAD_MODEL");
306 |
307 | Patch(0x248, (runtime, args) =>
308 | {
309 | throw new NotImplementedException();
310 | }, null, "IS_MODEL_AVAILABLE");
311 |
312 | Patch(0x249, (runtime, args) =>
313 | {
314 | throw new NotImplementedException();
315 | }, null, "RELEASE_MODEL");
316 |
317 | Patch(0x256, (runtime, args) =>
318 | {
319 | throw new NotImplementedException();
320 | }, null, "IS_PLAYER_DEFINED");
321 |
322 | Patch(0x2A3, (runtime, args) =>
323 | {
324 | throw new NotImplementedException();
325 | }, null, "ENABLE_WIDESCREEN");
326 |
327 | Patch(0x2AC, (runtime, args) =>
328 | {
329 | throw new NotImplementedException();
330 | }, null, "SET_CAR_IMMUNITIES");
331 |
332 | Patch(0x2EB, (runtime, args) =>
333 | {
334 | throw new NotImplementedException();
335 | }, null, "RESTORE_CAMERA_WITH_JUMPCUT");
336 |
337 | Patch(0x317, (runtime, args) =>
338 | {
339 | throw new NotImplementedException();
340 | }, null, "INCREMENT_MISSION_ATTEMPTS");
341 |
342 | Patch(0x34F, (runtime, args) =>
343 | {
344 | throw new NotImplementedException();
345 | }, null, "DESTROY_ACTOR_WITH_FADE");
346 |
347 | Patch(0x35F, (runtime, args) =>
348 | {
349 | throw new NotImplementedException();
350 | }, null, "GIVE_ARMOUR_TO_ACTOR");
351 |
352 | Patch(0x38B, (runtime, args) =>
353 | {
354 | throw new NotImplementedException();
355 | }, null, "LOAD_REQUESTED_MODELS");
356 |
357 | Patch(0x394, (runtime, args) =>
358 | {
359 | throw new NotImplementedException();
360 | }, null, "PLAY_MUSIC");
361 |
362 | Patch(0x39E, (runtime, args) =>
363 | {
364 | throw new NotImplementedException();
365 | }, null, "SET_ACTOR_CANT_BE_DRAGGED_OUT_OF_CAR");
366 |
367 | Patch(0x3A3, (runtime, args) =>
368 | {
369 | throw new NotImplementedException();
370 | }, null, "IS_ACTOR_MALE");
371 |
372 | Patch(0x3A4, (runtime, args) =>
373 | {
374 | throw new NotImplementedException();
375 | }, null, "THREAD");
376 |
377 | Patch(0x3CF, (runtime, args) =>
378 | {
379 | throw new NotImplementedException();
380 | }, null, "LOAD_WAV");
381 |
382 | Patch(0x3D0, (runtime, args) =>
383 | {
384 | throw new NotImplementedException();
385 | }, null, "HAS_WAV_LOADED");
386 |
387 | Patch(0x3D1, (runtime, args) =>
388 | {
389 | throw new NotImplementedException();
390 | }, null, "PLAY_WAV");
391 |
392 | Patch(0x3D7, (runtime, args) =>
393 | {
394 | throw new NotImplementedException();
395 | }, null, "SET_WAV_LOCATION");
396 |
397 | Patch(0x3DE, (runtime, args) =>
398 | {
399 | throw new NotImplementedException();
400 | }, null, "SET_PED_DENSITY");
401 |
402 | Patch(0x3E4, (runtime, args) =>
403 | {
404 | throw new NotImplementedException();
405 | }, null, "SET_TEXT_DRAW_ALIGN_RIGHT");
406 |
407 | Patch(0x3E6, (runtime, args) =>
408 | {
409 | throw new NotImplementedException();
410 | }, null, "REMOVE_TEXT_BOX");
411 |
412 | Patch(0x3EE, (runtime, args) =>
413 | {
414 | throw new NotImplementedException();
415 | }, null, "IS_PLAYER_CONTROLLABLE");
416 |
417 | Patch(0x3F0, (runtime, args) =>
418 | {
419 | throw new NotImplementedException();
420 | }, null, "ENABLE_TEXT_DRAW");
421 |
422 | Patch(0x3FE, (runtime, args) =>
423 | {
424 | throw new NotImplementedException();
425 | }, null, "SET_ACTOR_MONEY");
426 |
427 | Patch(0x40D, (runtime, args) =>
428 | {
429 | throw new NotImplementedException();
430 | }, null, "UNLOAD_WAV");
431 |
432 | Patch(0x417, (runtime, args) =>
433 | {
434 | throw new NotImplementedException();
435 | }, null, "START_MISSION");
436 |
437 | Patch(0x41D, (runtime, args) =>
438 | {
439 | throw new NotImplementedException();
440 | }, null, "SET_CAMERA_NEAR_CLIP");
441 |
442 | Patch(0x459, (runtime, args) =>
443 | {
444 | throw new NotImplementedException();
445 | }, null, "END_THREAD_NAMED");
446 |
447 | Patch(0x4BB, (runtime, args) =>
448 | {
449 | throw new NotImplementedException();
450 | }, null, "SELECT_INTERIOR");
451 |
452 | Patch(0x4ED, (runtime, args) =>
453 | {
454 | throw new NotImplementedException();
455 | }, null, "LOAD_ANIMATION");
456 |
457 | Patch(0x56D, (runtime, args) =>
458 | {
459 | throw new NotImplementedException();
460 | }, null, "IS_ACTOR_DEFINED");
461 |
462 | Patch(0x56E, (runtime, args) =>
463 | {
464 | throw new NotImplementedException();
465 | }, null, "IS_CAR_DEFINED");
466 |
467 | Patch(0x580, (runtime, args) =>
468 | {
469 | throw new NotImplementedException();
470 | }, null, "SET_CHAR_OBJ_BUY_ICE_CREAM");
471 |
472 | Patch(0x0750, (runtime, args) =>
473 | {
474 | throw new NotImplementedException();
475 | }, null, "SET_OBJECT_VISIBILITY");
476 |
477 | Patch(0x08A8, (runtime, args) =>
478 | {
479 | throw new NotImplementedException();
480 | }, null, "SET_MARKERS_TO_LONG_DISTANCE");
481 |
482 | Patch(0x0A92, (runtime, args) =>
483 | {
484 | throw new NotImplementedException();
485 | }, null, "CREATE_CUSTOM_THREAD");
486 |
487 | Patch(0x0A93, (runtime, args) =>
488 | {
489 | throw new NotImplementedException();
490 | }, null, "END_CUSTOM_THREAD");
491 |
492 | Patch(0x0A94, (runtime, args) =>
493 | {
494 | throw new NotImplementedException();
495 | }, null, "START_CUSTOM_MISSION");
496 |
497 | Patch(0x0A95, (runtime, args) =>
498 | {
499 | throw new NotImplementedException();
500 | }, null, "ENABLE_THREAD_SAVING");
501 |
502 | Patch(0x0A99, (runtime, args) =>
503 | {
504 | throw new NotImplementedException();
505 | }, null, "CHDIR");
506 |
507 | Patch(0x0AA0, (runtime, args) =>
508 | {
509 | throw new NotImplementedException();
510 | }, null, "GOSUB_IF_FALSE");
511 |
512 | Patch(0x0AA1, (runtime, args) =>
513 | {
514 | throw new NotImplementedException();
515 | }, null, "RETURN_IF_FALSE");
516 |
517 | Patch(0x0AA9, (runtime, args) =>
518 | {
519 | throw new NotImplementedException();
520 | }, null, "IS_GAME_VERSION_ORIGINAL");
521 |
522 | Patch(0x0AAB, (runtime, args) =>
523 | {
524 | throw new NotImplementedException();
525 | }, null, "FILE_EXISTS");
526 |
527 | Patch(0x0AB0, (runtime, args) =>
528 | {
529 | throw new NotImplementedException();
530 | }, null, "KEY_PRESSED");
531 |
532 | Patch(0x0AB1, (runtime, args) =>
533 | {
534 | throw new NotImplementedException();
535 | }, null, "CALL_SCM_FUNC");
536 |
537 | Patch(0x0AB2, (runtime, args) =>
538 | {
539 | throw new NotImplementedException();
540 | }, null, "RET");
541 |
542 | Patch(0x0ABA, (runtime, args) =>
543 | {
544 | throw new NotImplementedException();
545 | }, null, "END_CUSTOM_THREAD_NAMED");
546 |
547 | Patch(0x0ADC, (runtime, args) =>
548 | {
549 | throw new NotImplementedException();
550 | }, null, "TEST_CHEAT");
551 |
552 | Patch(0x0ADF, (runtime, args) =>
553 | {
554 | throw new NotImplementedException();
555 | }, null, "ADD_DYNAMIC_GXT_ENTRY");
556 |
557 | Patch(0x0AE0, (runtime, args) =>
558 | {
559 | throw new NotImplementedException();
560 | }, null, "REMOVE_DYNAMIC_GXT_ENTRY");
561 |
562 | Patch(0x0AE4, (runtime, args) =>
563 | {
564 | throw new NotImplementedException();
565 | }, null, "DIRECTORY_EXISTS");
566 |
567 | Patch(0x0AE5, (runtime, args) =>
568 | {
569 | throw new NotImplementedException();
570 | }, null, "CREATE_DIRECTORY");
571 |
572 | Patch(0x0AE9, (runtime, args) =>
573 | {
574 | throw new NotImplementedException();
575 | }, null, "POP_FLOAT");*/
576 |
577 |
578 | // TODO
579 | }
580 | }
581 | }
582 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3ScriptGTAViceCityRuntime.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | ///
3 | /// GTA3Script sharp namespace
4 | ///
5 | namespace GTA3ScriptSharp
6 | {
7 | ///
8 | /// GTA3Script GTA Vice City runtime class
9 | ///
10 | public class GTA3ScriptGTAViceCityRuntime : AGTA3ScriptRuntime
11 | {
12 | ///
13 | /// Default constructor
14 | ///
15 | public GTA3ScriptGTAViceCityRuntime()
16 | {
17 | /*// Go to the label if the condition result is true.
18 | Patch(0x4C, null, typeof(void), (runtime, arguments) =>
19 | {
20 | // TODO
21 | throw new NotImplementedException();
22 | }, typeof(GTA3ScriptReferenceValue), typeof(GTA3ScriptReferenceValue));
23 |
24 | AddKeyword(0x4D, "ELSE_GOTO");
25 |
26 | Patch(0x4D, (runtime, args) =>
27 | {
28 | throw new NotImplementedException();
29 | }, null, "ELSE_JUMP", "ELSE_GOTO", "JF");
30 |
31 | Patch(0x4E, (runtime, args) =>
32 | {
33 | throw new NotImplementedException();
34 | }, null, "END_THREAD");
35 |
36 | Patch(0x4F, (runtime, args) =>
37 | {
38 | throw new NotImplementedException();
39 | }, null, "CREATE_THREAD");
40 |
41 | Patch(0x50, (runtime, args) =>
42 | {
43 | throw new NotImplementedException();
44 | }, null, "GOSUB");
45 |
46 | Patch(0x51, (runtime, args) =>
47 | {
48 | throw new NotImplementedException();
49 | }, null, "RETURN");
50 |
51 | Patch(0x53, (runtime, args) =>
52 | {
53 | throw new NotImplementedException();
54 | }, null, "CREATE_PLAYER");
55 |
56 | Patch(0x54, (runtime, args) =>
57 | {
58 | throw new NotImplementedException();
59 | }, null, "GET_PLAYER_COORDINATES");
60 |
61 | Patch(0x55, (runtime, args) =>
62 | {
63 | throw new NotImplementedException();
64 | }, null, "SET_PLAYER_COORDINATES");
65 |
66 | Patch(0x56, (runtime, args) =>
67 | {
68 | throw new NotImplementedException();
69 | }, null, "IS_PLAYER_IN_AREA_2D");
70 |
71 | Patch(0x57, (runtime, args) =>
72 | {
73 | throw new NotImplementedException();
74 | }, null, "IS_PLAYER_IN_AREA_3D");
75 |
76 | Patch(0x9A, (runtime, args) =>
77 | {
78 | throw new NotImplementedException();
79 | }, null, "CREATE_CHAR");
80 |
81 | Patch(0x9B, (runtime, args) =>
82 | {
83 | throw new NotImplementedException();
84 | }, null, "DESTROY_ACTOR");
85 |
86 | Patch(0x9C, (runtime, args) =>
87 | {
88 | throw new NotImplementedException();
89 | }, null, "ACTOR_WANDER_DIR");
90 |
91 | Patch(0x9F, (runtime, args) =>
92 | {
93 | throw new NotImplementedException();
94 | }, null, "ACTOR_SET_IDLE");
95 |
96 | Patch(0xBE, (runtime, args) =>
97 | {
98 | throw new NotImplementedException();
99 | }, null, "TEXT_CLEAR_ALL");
100 |
101 | Patch(0xC0, (runtime, args) =>
102 | {
103 | throw new NotImplementedException();
104 | }, null, "SET_CURRENT_TIME");
105 |
106 | Patch(0xC2, (runtime, args) =>
107 | {
108 | throw new NotImplementedException();
109 | }, null, "IS_SPHERE_ONSCREEN");
110 |
111 | Patch(0xC3, (runtime, args) =>
112 | {
113 | throw new NotImplementedException();
114 | }, null, "ENTER_DEBUGMODE");
115 |
116 | Patch(0xC4, (runtime, args) =>
117 | {
118 | throw new NotImplementedException();
119 | }, null, "EXIT_DEBUGMODE");
120 |
121 | Patch(0xD6, (runtime, args) =>
122 | {
123 | throw new NotImplementedException();
124 | }, null, "IF");
125 |
126 | Patch(0xD7, (runtime, args) =>
127 | {
128 | throw new NotImplementedException();
129 | }, null, "CREATE_THREAD_WB", "CREATE_THREAD_NO_PARAMS");
130 |
131 | Patch(0xD8, (runtime, args) =>
132 | {
133 | throw new NotImplementedException();
134 | }, null, "MISSION_CLEANUP");
135 |
136 | Patch(0xDB, (runtime, args) =>
137 | {
138 | throw new NotImplementedException();
139 | }, null, "IS_ACTOR_IN_CAR");
140 |
141 | Patch(0xDC, (runtime, args) =>
142 | {
143 | throw new NotImplementedException();
144 | }, null, "IS_PLAYER_DRIVING");
145 |
146 | Patch(0xDD, (runtime, args) =>
147 | {
148 | throw new NotImplementedException();
149 | }, null, "IS_ACTOR_DRIVING_VEHICLE_TYPE");
150 |
151 | Patch(0xDE, (runtime, args) =>
152 | {
153 | throw new NotImplementedException();
154 | }, null, "IS_PLAYER_DRIVING_VEHICLE_TYPE");
155 |
156 | Patch(0xDF, (runtime, args) =>
157 | {
158 | throw new NotImplementedException();
159 | }, null, "IS_ACTOR_DRIVING");
160 |
161 | Patch(0x107, (runtime, args) =>
162 | {
163 | throw new NotImplementedException();
164 | }, null, "CREATE_OBJECT");
165 |
166 | Patch(0x108, (runtime, args) =>
167 | {
168 | throw new NotImplementedException();
169 | }, null, "DESTROY_OBJECT");
170 |
171 | Patch(0x10D, (runtime, args) =>
172 | {
173 | throw new NotImplementedException();
174 | }, null, "SET_PLAYER_WANTED_LEVEL");
175 |
176 | Patch(0x10E, (runtime, args) =>
177 | {
178 | throw new NotImplementedException();
179 | }, null, "SET_PLAYER_MINIMUM_WANTED_LEVEL");
180 |
181 | Patch(0x111, (runtime, args) =>
182 | {
183 | throw new NotImplementedException();
184 | }, null, "SET_WB_CHECK_TO");
185 |
186 | Patch(0x112, (runtime, args) =>
187 | {
188 | throw new NotImplementedException();
189 | }, null, "WASTED_OR_BUSTED");
190 |
191 | Patch(0x114, (runtime, args) =>
192 | {
193 | throw new NotImplementedException();
194 | }, null, "GIVE_ACTOR_WEAPON_AMMO");
195 |
196 | Patch(0x117, (runtime, args) =>
197 | {
198 | throw new NotImplementedException();
199 | }, null, "IS_PLAYER_WASTED");
200 |
201 | Patch(0x118, (runtime, args) =>
202 | {
203 | throw new NotImplementedException();
204 | }, null, "IS_ACTOR_DEAD");
205 |
206 | Patch(0x119, (runtime, args) =>
207 | {
208 | throw new NotImplementedException();
209 | }, null, "IS_CAR_WRECKED");
210 |
211 | Patch(0x11A, (runtime, args) =>
212 | {
213 | throw new NotImplementedException();
214 | }, null, "SET_ACTOR_THREAT_SEARCH");
215 |
216 | Patch(0x11C, (runtime, args) =>
217 | {
218 | throw new NotImplementedException();
219 | }, null, "SET_ACTOR_OBJ_NO_OBJ");
220 |
221 | Patch(0x121, (runtime, args) =>
222 | {
223 | throw new NotImplementedException();
224 | }, null, "IS_PLAYER_IN_ZONE");
225 |
226 | Patch(0x122, (runtime, args) =>
227 | {
228 | throw new NotImplementedException();
229 | }, null, "IS_PLAYER_PRESSING_HORN");
230 |
231 | Patch(0x123, (runtime, args) =>
232 | {
233 | throw new NotImplementedException();
234 | }, null, "HAS_ACTOR_SPOTTED_PLAYER");
235 |
236 | Patch(0x129, (runtime, args) =>
237 | {
238 | throw new NotImplementedException();
239 | }, null, "CREATE_ACTOR_INSIDE_CAR");
240 |
241 | Patch(0x130, (runtime, args) =>
242 | {
243 | throw new NotImplementedException();
244 | }, null, "IS_PLAYER_BUSTED");
245 |
246 | Patch(0x135, (runtime, args) =>
247 | {
248 | throw new NotImplementedException();
249 | }, null, "SET_CAR_DOOR_LOCK");
250 |
251 | Patch(0x137, (runtime, args) =>
252 | {
253 | throw new NotImplementedException();
254 | }, null, "IS_CAR_MODEL");
255 |
256 | Patch(0x14B, (runtime, args) =>
257 | {
258 | throw new NotImplementedException();
259 | }, null, "CREATE_CAR_GENERATOR");
260 |
261 | Patch(0x14C, (runtime, args) =>
262 | {
263 | throw new NotImplementedException();
264 | }, null, "SET_CAR_GENERATOR_CARS_TO_GENERATE");
265 |
266 | Patch(0x14D, (runtime, args) =>
267 | {
268 | throw new NotImplementedException();
269 | }, null, "TEXT_PAGER");
270 |
271 | Patch(0x14E, (runtime, args) =>
272 | {
273 | throw new NotImplementedException();
274 | }, null, "START_TIMER_AT");
275 |
276 | Patch(0x14F, (runtime, args) =>
277 | {
278 | throw new NotImplementedException();
279 | }, null, "STOP_TIMER");
280 |
281 | Patch(0x151, (runtime, args) =>
282 | {
283 | throw new NotImplementedException();
284 | }, null, "REMOVE_STATUS_TEXT");
285 |
286 | Patch(0x152, (runtime, args) =>
287 | {
288 | throw new NotImplementedException();
289 | }, null, "SET_ZONE_CAR_INFO");
290 |
291 | Patch(0x154, (runtime, args) =>
292 | {
293 | throw new NotImplementedException();
294 | }, null, "IS_ACTOR_IN_ZONE");
295 |
296 | Patch(0x157, (runtime, args) =>
297 | {
298 | throw new NotImplementedException();
299 | }, null, "CAMERA_ON_PLAYER");
300 |
301 | Patch(0x158, (runtime, args) =>
302 | {
303 | throw new NotImplementedException();
304 | }, null, "CAMERA_ON_VEHICLE");
305 |
306 | Patch(0x159, (runtime, args) =>
307 | {
308 | throw new NotImplementedException();
309 | }, null, "CAMERA_ON_PED");
310 |
311 | Patch(0x15A, (runtime, args) =>
312 | {
313 | throw new NotImplementedException();
314 | }, null, "RESTORE_CAMERA");
315 |
316 | Patch(0x16A, (runtime, args) =>
317 | {
318 | throw new NotImplementedException();
319 | }, null, "FADE");
320 |
321 | Patch(0x16B, (runtime, args) =>
322 | {
323 | throw new NotImplementedException();
324 | }, null, "FADING");
325 |
326 | Patch(0x16C, (runtime, args) =>
327 | {
328 | throw new NotImplementedException();
329 | }, null, "RESTART_IF_WASTED_AT");
330 |
331 | Patch(0x16D, (runtime, args) =>
332 | {
333 | throw new NotImplementedException();
334 | }, null, "RESTART_IF_BUSTED_AT");
335 |
336 | Patch(0x173, (runtime, args) =>
337 | {
338 | throw new NotImplementedException();
339 | }, null, "SET_ACTOR_Z_ANGLE");
340 |
341 | Patch(0x177, (runtime, args) =>
342 | {
343 | throw new NotImplementedException();
344 | }, null, "SET_OBJECT_Z_ANGLE");
345 |
346 | Patch(0x1B4, (runtime, args) =>
347 | {
348 | throw new NotImplementedException();
349 | }, null, "SET_PLAYER_FROZEN");
350 |
351 | Patch(0x1B6, (runtime, args) =>
352 | {
353 | throw new NotImplementedException();
354 | }, null, "SET_WEATHER");
355 |
356 | Patch(0x1B9, (runtime, args) =>
357 | {
358 | throw new NotImplementedException();
359 | }, null, "SET_ACTOR_ARMED_WEAPON");
360 |
361 | Patch(0x1C2, (runtime, args) =>
362 | {
363 | throw new NotImplementedException();
364 | }, null, "REMOVE_REFERENCES_TO_ACTOR");
365 |
366 | Patch(0x1C3, (runtime, args) =>
367 | {
368 | throw new NotImplementedException();
369 | }, null, "REMOVE_REFERENCES_TO_CAR");
370 |
371 | Patch(0x1C4, (runtime, args) =>
372 | {
373 | throw new NotImplementedException();
374 | }, null, "REMOVE_REFERENCES_TO_OBJECT");
375 |
376 | Patch(0x1F0, (runtime, args) =>
377 | {
378 | throw new NotImplementedException();
379 | }, null, "SET_MAX_WANTED_LEVEL_TO");
380 |
381 | Patch(0x23C, (runtime, args) =>
382 | {
383 | throw new NotImplementedException();
384 | }, null, "LOAD_SPECIAL_ACTOR");
385 |
386 | Patch(0x247, (runtime, args) =>
387 | {
388 | throw new NotImplementedException();
389 | }, null, "REQUEST_MODEL");
390 |
391 | Patch(0x248, (runtime, args) =>
392 | {
393 | throw new NotImplementedException();
394 | }, null, "IS_MODEL_AVAILABLE");
395 |
396 | Patch(0x249, (runtime, args) =>
397 | {
398 | throw new NotImplementedException();
399 | }, null, "RELEASE_MODEL");
400 |
401 | Patch(0x256, (runtime, args) =>
402 | {
403 | throw new NotImplementedException();
404 | }, null, "IS_PLAYER_DEFINED");
405 |
406 | Patch(0x2A3, (runtime, args) =>
407 | {
408 | throw new NotImplementedException();
409 | }, null, "ENABLE_WIDESCREEN");
410 |
411 | Patch(0x2AC, (runtime, args) =>
412 | {
413 | throw new NotImplementedException();
414 | }, null, "SET_CAR_IMMUNITIES");
415 |
416 | Patch(0x2EB, (runtime, args) =>
417 | {
418 | throw new NotImplementedException();
419 | }, null, "RESTORE_CAMERA_WITH_JUMPCUT");
420 |
421 | Patch(0x317, (runtime, args) =>
422 | {
423 | throw new NotImplementedException();
424 | }, null, "INCREMENT_MISSION_ATTEMPTS");
425 |
426 | Patch(0x34F, (runtime, args) =>
427 | {
428 | throw new NotImplementedException();
429 | }, null, "DESTROY_ACTOR_WITH_FADE");
430 |
431 | Patch(0x35F, (runtime, args) =>
432 | {
433 | throw new NotImplementedException();
434 | }, null, "GIVE_ARMOUR_TO_ACTOR");
435 |
436 | Patch(0x38B, (runtime, args) =>
437 | {
438 | throw new NotImplementedException();
439 | }, null, "LOAD_REQUESTED_MODELS");
440 |
441 | Patch(0x394, (runtime, args) =>
442 | {
443 | throw new NotImplementedException();
444 | }, null, "PLAY_MUSIC");
445 |
446 | Patch(0x39E, (runtime, args) =>
447 | {
448 | throw new NotImplementedException();
449 | }, null, "SET_ACTOR_CANT_BE_DRAGGED_OUT_OF_CAR");
450 |
451 | Patch(0x3A3, (runtime, args) =>
452 | {
453 | throw new NotImplementedException();
454 | }, null, "IS_ACTOR_MALE");
455 |
456 | Patch(0x3A4, (runtime, args) =>
457 | {
458 | throw new NotImplementedException();
459 | }, null, "THREAD");
460 |
461 | Patch(0x3CF, (runtime, args) =>
462 | {
463 | throw new NotImplementedException();
464 | }, null, "LOAD_WAV");
465 |
466 | Patch(0x3D0, (runtime, args) =>
467 | {
468 | throw new NotImplementedException();
469 | }, null, "HAS_WAV_LOADED");
470 |
471 | Patch(0x3D1, (runtime, args) =>
472 | {
473 | throw new NotImplementedException();
474 | }, null, "PLAY_WAV");
475 |
476 | Patch(0x3D7, (runtime, args) =>
477 | {
478 | throw new NotImplementedException();
479 | }, null, "SET_WAV_LOCATION");
480 |
481 | Patch(0x3DE, (runtime, args) =>
482 | {
483 | throw new NotImplementedException();
484 | }, null, "SET_PED_DENSITY");
485 |
486 | Patch(0x3E4, (runtime, args) =>
487 | {
488 | throw new NotImplementedException();
489 | }, null, "SET_TEXT_DRAW_ALIGN_RIGHT");
490 |
491 | Patch(0x3E6, (runtime, args) =>
492 | {
493 | throw new NotImplementedException();
494 | }, null, "REMOVE_TEXT_BOX");
495 |
496 | Patch(0x3EE, (runtime, args) =>
497 | {
498 | throw new NotImplementedException();
499 | }, null, "IS_PLAYER_CONTROLLABLE");
500 |
501 | Patch(0x3F0, (runtime, args) =>
502 | {
503 | throw new NotImplementedException();
504 | }, null, "ENABLE_TEXT_DRAW");
505 |
506 | Patch(0x3FE, (runtime, args) =>
507 | {
508 | throw new NotImplementedException();
509 | }, null, "SET_ACTOR_MONEY");
510 |
511 | Patch(0x40D, (runtime, args) =>
512 | {
513 | throw new NotImplementedException();
514 | }, null, "UNLOAD_WAV");
515 |
516 | Patch(0x417, (runtime, args) =>
517 | {
518 | throw new NotImplementedException();
519 | }, null, "START_MISSION");
520 |
521 | Patch(0x41D, (runtime, args) =>
522 | {
523 | throw new NotImplementedException();
524 | }, null, "SET_CAMERA_NEAR_CLIP");
525 |
526 | Patch(0x459, (runtime, args) =>
527 | {
528 | throw new NotImplementedException();
529 | }, null, "END_THREAD_NAMED");
530 |
531 | Patch(0x4BB, (runtime, args) =>
532 | {
533 | throw new NotImplementedException();
534 | }, null, "SELECT_INTERIOR");
535 |
536 | Patch(0x4ED, (runtime, args) =>
537 | {
538 | throw new NotImplementedException();
539 | }, null, "LOAD_ANIMATION");
540 |
541 | Patch(0x53D, (runtime, args) =>
542 | {
543 | throw new NotImplementedException();
544 | }, null, "CLEAR_CHAR_WAIT_STATE");
545 |
546 | Patch(0x56D, (runtime, args) =>
547 | {
548 | throw new NotImplementedException();
549 | }, null, "IS_ACTOR_DEFINED");
550 |
551 | Patch(0x580, (runtime, args) =>
552 | {
553 | throw new NotImplementedException();
554 | }, null, "SET_CHAR_OBJ_BUY_ICE_CREAM");*/
555 |
556 |
557 | // TODO
558 | }
559 | }
560 | }
561 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3ScriptGTAViceCityStoriesRuntime.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// GTA3Script sharp namespace
3 | ///
4 | namespace GTA3ScriptSharp
5 | {
6 | ///
7 | /// GTA3Script GTA Vice City Stories runtime class
8 | ///
9 | public class GTA3ScriptGTAViceCityStoriesRuntime : AGTA3ScriptRuntime
10 | {
11 | ///
12 | /// Default constructor
13 | ///
14 | public GTA3ScriptGTAViceCityStoriesRuntime()
15 | {
16 | // TODO
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3ScriptInstruction.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | ///
4 | /// GTA3Script sharp namespace
5 | ///
6 | namespace GTA3ScriptSharp
7 | {
8 | ///
9 | /// GTA3Script instruction class
10 | ///
11 | public class GTA3ScriptInstruction
12 | {
13 | ///
14 | /// GTA3Script instruction on call event
15 | ///
16 | public event GTA3ScriptOpCodeCallDelegate OnCall;
17 |
18 | ///
19 | /// GTA3Script instruction argument types
20 | ///
21 | private Type[] argumentTypes;
22 |
23 | ///
24 | /// GTA3Script instruction argument types
25 | ///
26 | internal Type[] ArgumentTypes
27 | {
28 | get
29 | {
30 | if (argumentTypes != null)
31 | {
32 | argumentTypes = new Type[0];
33 | }
34 | return argumentTypes.Clone() as Type[];
35 | }
36 | }
37 |
38 | ///
39 | /// Constructor
40 | ///
41 | /// GTA3Script operation instruction types
42 | /// GTA3Script instruction on call event
43 | public GTA3ScriptInstruction(Type[] argumentTypes, GTA3ScriptOpCodeCallDelegate onCall)
44 | {
45 | this.argumentTypes = argumentTypes;
46 | OnCall = onCall;
47 | }
48 |
49 | ///
50 | /// Invoke operation code
51 | ///
52 | /// GTA3Script runtime
53 | /// GTA3Script operation instruction
54 | public void Invoke(AGTA3ScriptRuntime runtime, object[] arguments)
55 | {
56 | OnCall(runtime, arguments);
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3ScriptLoadException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.Serialization;
3 |
4 | ///
5 | /// GTA3Script sharp namespace
6 | ///
7 | namespace GTA3ScriptSharp
8 | {
9 | ///
10 | /// GTA3Script load exception
11 | ///
12 | public class GTA3ScriptLoadException : Exception
13 | {
14 | ///
15 | /// Default constructor
16 | ///
17 | public GTA3ScriptLoadException() : base()
18 | {
19 | // ...
20 | }
21 |
22 | ///
23 | /// Constructor
24 | ///
25 | /// Message
26 | public GTA3ScriptLoadException(string message) : base(message)
27 | {
28 | // ...
29 | }
30 |
31 | ///
32 | /// Constructor
33 | ///
34 | /// Message
35 | /// Inner exception
36 | public GTA3ScriptLoadException(string message, Exception innerException) : base(message, innerException)
37 | {
38 | // ...
39 | }
40 |
41 | ///
42 | /// Constructor
43 | ///
44 | /// Serialization information
45 | /// Streaming context
46 | protected GTA3ScriptLoadException(SerializationInfo info, StreamingContext context) : base(info, context)
47 | {
48 | // ...
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3ScriptOpCodeCallDelegate.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// GTA3Script sharp namespace
3 | ///
4 | namespace GTA3ScriptSharp
5 | {
6 | ///
7 | /// GTA3Script operation code call delegate
8 | ///
9 | /// GTA3Script runtime
10 | /// Command arguments
11 | public delegate void GTA3ScriptOpCodeCallDelegate(AGTA3ScriptRuntime runtime, object[] args);
12 | }
13 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3ScriptReferenceArray.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// GTA3Script sharp namespace
3 | ///
4 | namespace GTA3ScriptSharp
5 | {
6 | ///
7 | /// GTA3Script reference array structure
8 | ///
9 | public struct GTA3ScriptReferenceArray
10 | {
11 | ///
12 | /// Reference array type
13 | ///
14 | public readonly EReferenceType Type;
15 |
16 | ///
17 | /// Array offset
18 | ///
19 | public readonly ushort Offset;
20 |
21 | ///
22 | /// Is array global
23 | ///
24 | public readonly bool IsGlobal;
25 |
26 | ///
27 | /// Array index variable
28 | ///
29 | public readonly ushort IndexVariable;
30 |
31 | ///
32 | /// Array size
33 | ///
34 | public readonly byte Size;
35 |
36 | ///
37 | /// Array element type
38 | ///
39 | public readonly byte ElementType;
40 |
41 | ///
42 | /// Is array index global variable
43 | ///
44 | public readonly bool IsIndexGlobalVariable;
45 |
46 | ///
47 | /// Constructor
48 | ///
49 | /// Reference array type
50 | /// Array offset
51 | /// Is array global
52 | /// Array index variable
53 | /// Array size
54 | /// Array element type
55 | /// Is array index global variable
56 | public GTA3ScriptReferenceArray(EReferenceType type, ushort offset, bool isGlobal, ushort indexVariable, byte size, byte elementType, bool isIndexGlobalVariable)
57 | {
58 | Type = type;
59 | Offset = offset;
60 | IsGlobal = isGlobal;
61 | IndexVariable = indexVariable;
62 | Size = size;
63 | ElementType = elementType;
64 | IsIndexGlobalVariable = isIndexGlobalVariable;
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3ScriptReferenceValue.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// GTA3Script sharp namespace
3 | ///
4 | namespace GTA3ScriptSharp
5 | {
6 | ///
7 | /// GTA3Script reference value structure
8 | ///
9 | public struct GTA3ScriptReferenceValue
10 | {
11 | ///
12 | /// Reference value type
13 | ///
14 | public readonly EReferenceType Type;
15 |
16 | ///
17 | /// Value offset
18 | ///
19 | public readonly ushort Offset;
20 |
21 | ///
22 | /// Is value global
23 | ///
24 | public readonly bool IsGlobal;
25 |
26 | ///
27 | /// Constructor
28 | ///
29 | /// Reference value type
30 | /// Offset
31 | /// Is global
32 | public GTA3ScriptReferenceValue(EReferenceType type, ushort offset, bool isGlobal)
33 | {
34 | Type = type;
35 | Offset = offset;
36 | IsGlobal = isGlobal;
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3ScriptRuntimeProvider.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// GTA3Script sharp namespace
3 | ///
4 | namespace GTA3ScriptSharp
5 | {
6 | ///
7 | /// GTA2Script runtime provider
8 | ///
9 | public static class GTA3ScriptRuntimeProvider
10 | {
11 | ///
12 | /// Create GTA3Script runtime
13 | ///
14 | /// Game
15 | /// GTA3Script runtime if successful, otherwise "null"
16 | public static AGTA3ScriptRuntime CreateRuntime(EGame game)
17 | {
18 | AGTA3ScriptRuntime ret = null;
19 | switch (game)
20 | {
21 | case EGame.GTAIII:
22 | ret = new GTA3ScriptGTAIIIRuntime();
23 | break;
24 | case EGame.GTAViceCity:
25 | ret = new GTA3ScriptGTAViceCityRuntime();
26 | break;
27 | case EGame.GTASanAndreas:
28 | ret = new GTA3ScriptGTASanAndreasRuntime();
29 | break;
30 | case EGame.GTALibertyCityStories:
31 | ret = new GTA3ScriptGTALibertyCityStoriesRuntime();
32 | break;
33 | case EGame.GTAViceCityStories:
34 | ret = new GTA3ScriptGTAViceCityStoriesRuntime();
35 | break;
36 | }
37 | return ret;
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3ScriptSharp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {7F11278E-944D-4688-B3D6-08FB38D6E2F7}
8 | Library
9 | Properties
10 | GTA3ScriptSharp
11 | GTA3ScriptSharp
12 | v3.5
13 | 512
14 | true
15 |
16 |
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 | false
25 |
26 |
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 | libs\IMGSharp.dll
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/GTA3ScriptStreamedScriptData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | ///
3 | /// GTA3Script sharp namespace
4 | ///
5 | namespace GTA3ScriptSharp
6 | {
7 | ///
8 | /// GTA3Script streamed script data
9 | ///
10 | internal struct GTA3ScriptStreamedScriptData : IComparable
11 | {
12 | ///
13 | /// File name
14 | ///
15 | public readonly string FileName;
16 |
17 | ///
18 | /// File offset
19 | ///
20 | public readonly uint FileOffset;
21 |
22 | ///
23 | /// Script size
24 | ///
25 | public readonly uint ScriptSize;
26 |
27 | ///
28 | /// Constructor
29 | ///
30 | /// File name
31 | /// File offset
32 | /// Script size
33 | internal GTA3ScriptStreamedScriptData(string fileName, uint fileOffset, uint scriptSize)
34 | {
35 | FileName = fileName;
36 | FileOffset = fileOffset;
37 | ScriptSize = scriptSize;
38 | }
39 |
40 | ///
41 | /// Compare to
42 | ///
43 | /// Other
44 | /// Comparison result
45 | public int CompareTo(GTA3ScriptStreamedScriptData other)
46 | {
47 | return FileOffset.CompareTo(other.FileOffset);
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/IR2.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 |
3 | ///
4 | /// GTA3Script sharp namespace
5 | ///
6 | namespace GTA3ScriptSharp
7 | {
8 | ///
9 | /// IR2 class
10 | ///
11 | public class IR2 : AGTA3Script
12 | {
13 | ///
14 | /// Constructor
15 | ///
16 | /// Game
17 | /// Stream
18 | internal IR2(EGame game, Stream stream) : base(game, stream)
19 | {
20 | // ...
21 | }
22 |
23 | ///
24 | /// Constructor
25 | ///
26 | /// Game
27 | /// Stream
28 | /// Dispose stream on dispose
29 | internal IR2(EGame game, Stream stream, bool disposeStreamOnDispose) : base(game, stream, disposeStreamOnDispose)
30 | {
31 | // ...
32 | }
33 |
34 | ///
35 | /// Load GTA3Script to GTA3Script runtime
36 | ///
37 | /// GTA3Script runtime
38 | internal override void LoadToRuntime(AGTA3ScriptRuntime runtime)
39 | {
40 | throw new System.NotImplementedException();
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // Allgemeine Informationen über eine Assembly werden über die folgenden
6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
7 | // die einer Assembly zugeordnet sind.
8 | [assembly: AssemblyTitle("GTA3ScriptSharp")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("GTA3ScriptSharp")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
18 | // für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
19 | // COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
20 | [assembly: ComVisible(false)]
21 |
22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
23 | [assembly: Guid("7f11278e-944d-4688-b3d6-08fb38d6e2f7")]
24 |
25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
26 | //
27 | // Hauptversion
28 | // Nebenversion
29 | // Buildnummer
30 | // Revision
31 | //
32 | // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
33 | // indem Sie "*" wie unten gezeigt eingeben:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/SC.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | ///
5 | /// GTA3Script sharp namespace
6 | ///
7 | namespace GTA3ScriptSharp
8 | {
9 | ///
10 | /// SC class
11 | ///
12 | public class SC : AGTA3Script
13 | {
14 | ///
15 | /// Constructor
16 | ///
17 | /// Game
18 | /// Stream
19 | internal SC(EGame game, Stream stream) : base(game, stream)
20 | {
21 | // ...
22 | }
23 |
24 | ///
25 | /// Constructor
26 | ///
27 | /// Game
28 | /// Stream
29 | /// Dispose stream on dispose
30 | internal SC(EGame game, Stream stream, bool disposeStreamOnDispose) : base(game, stream, disposeStreamOnDispose)
31 | {
32 | // ...
33 | }
34 |
35 | ///
36 | /// Load GTA3Script to GTA3Script runtime
37 | ///
38 | /// GTA3Script Runtime
39 | internal override void LoadToRuntime(AGTA3ScriptRuntime runtime)
40 | {
41 | throw new NotImplementedException();
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/GTA3ScriptSharp/libs/IMGSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BigETI/GTA3ScriptSharp/211ff0c9a058dfcee4c596c8d60aef8cad9684a9/GTA3ScriptSharp/libs/IMGSharp.dll
--------------------------------------------------------------------------------
/GTA3ScriptSharpTest/GTA3ScriptSharpTest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Debug
7 | AnyCPU
8 | {96D9A01E-5DD4-4119-B023-73653473899D}
9 | Library
10 | Properties
11 | GTA3ScriptSharpTest
12 | GTA3ScriptSharpTest
13 | v4.5
14 | 512
15 | {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
16 | 15.0
17 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
18 | $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages
19 | False
20 | UnitTest
21 |
22 |
23 |
24 |
25 | true
26 | full
27 | false
28 | bin\Debug\
29 | DEBUG;TRACE
30 | prompt
31 | 4
32 |
33 |
34 | pdbonly
35 | true
36 | bin\Release\
37 | TRACE
38 | prompt
39 | 4
40 |
41 |
42 |
43 | ..\GTA3ScriptSharp\bin\Debug\GTA3ScriptSharp.dll
44 |
45 |
46 | ..\GTA3ScriptSharp\libs\IMGSharp.dll
47 |
48 |
49 | ..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll
50 |
51 |
52 | ..\packages\MSTest.TestFramework.1.3.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/GTA3ScriptSharpTest/GTA3ScriptUnitTest.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.TestTools.UnitTesting;
2 |
3 | ///
4 | /// GTA3Script sharp test namespace
5 | ///
6 | namespace GTA3ScriptSharpTest
7 | {
8 | ///
9 | /// GTA3Script unit test class
10 | ///
11 | [TestClass]
12 | public class GTA3ScriptUnitTest
13 | {
14 | ///
15 | /// Test GTA3Script runtime
16 | ///
17 | [TestMethod]
18 | public void TestGTA3ScriptRuntime()
19 | {
20 | // TODO
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/GTA3ScriptSharpTest/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | [assembly: AssemblyTitle("GTA3ScriptSharpTest")]
6 | [assembly: AssemblyDescription("")]
7 | [assembly: AssemblyConfiguration("")]
8 | [assembly: AssemblyCompany("")]
9 | [assembly: AssemblyProduct("GTA3ScriptSharpTest")]
10 | [assembly: AssemblyCopyright("Copyright © 2019")]
11 | [assembly: AssemblyTrademark("")]
12 | [assembly: AssemblyCulture("")]
13 |
14 | [assembly: ComVisible(false)]
15 |
16 | [assembly: Guid("96d9a01e-5dd4-4119-b023-73653473899d")]
17 |
18 | // [assembly: AssemblyVersion("1.0.*")]
19 | [assembly: AssemblyVersion("1.0.0.0")]
20 | [assembly: AssemblyFileVersion("1.0.0.0")]
21 |
--------------------------------------------------------------------------------
/GTA3ScriptSharpTest/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # GTA3Script sharp
2 |
3 | ## Description
4 | GTA3Script sharp is a library to disassemble, compile or run GTA III, GTA Vice City, GTA San Andreas, GTA Liberty City Stories and GTA Vice City Stories scripts.
5 | This library contains an interface to create GTA3Script runtimes.
6 |
7 | ## Notes
8 | This library has not been finished yet.
9 |
10 | Stay tuned for more updates!
--------------------------------------------------------------------------------
/docs/opcodes/iii_keywords.md:
--------------------------------------------------------------------------------
1 | # GTA III keywords
2 | - ***0001*** = *WAIT*
3 | - ***0002*** = *GOTO*
4 | - ***0002*** = *JUMP*
5 | - ***0003*** = *SHAKE_CAMERA*
6 | - ***004D*** = *ELSE_JUMP*
7 | - ***004D*** = *ELSE_GOTO*
8 | - ***004D*** = *JF*
9 | - ***004E*** = *END_THREAD*
10 | - ***004F*** = *CREATE_THREAD*
11 | - ***0050*** = *GOSUB*
12 | - ***0051*** = *RETURN*
13 | - ***0053*** = *CREATE_PLAYER*
14 | - ***0054*** = *GET_PLAYER_COORDINATES*
15 | - ***0055*** = *SET_PLAYER_COORDINATES*
16 | - ***0056*** = *IS_PLAYER_IN_AREA_2D*
17 | - ***0057*** = *IS_PLAYER_IN_AREA_3D*
18 | - ***009A*** = *CREATE_CHAR*
19 | - ***009B*** = *DESTROY_ACTOR*
20 | - ***009C*** = *ACTOR_WANDER_DIR*
21 | - ***009F*** = *ACTOR_SET_IDLE*
22 | - ***00BE*** = *TEXT_CLEAR_ALL*
23 | - ***00C0*** = *SET_CURRENT_TIME*
24 | - ***00C2*** = *IS_SPHERE_ONSCREEN*
25 | - ***00C3*** = *ENTER_DEBUGMODE*
26 | - ***00C4*** = *EXIT_DEBUGMODE*
27 | - ***00D6*** = *IF*
28 | - ***00D7*** = *CREATE_THREAD_WB*
29 | - ***00D7*** = *CREATE_THREAD_NO_PARAMS*
30 | - ***00D8*** = *MISSION_CLEANUP*
31 | - ***00DB*** = *IS_ACTOR_IN_CAR*
32 | - ***00dc*** = *IS_PLAYER_DRIVING*
33 | - ***00DD*** = *IS_ACTOR_DRIVING_VEHICLE_TYPE*
34 | - ***00DE*** = *IS_PLAYER_DRIVING_VEHICLE_TYPE*
35 | - ***00DF*** = *IS_ACTOR_DRIVING*
36 | - ***0107*** = *CREATE_OBJECT*
37 | - ***0108*** = *DESTROY_OBJECT*
38 | - ***010D*** = *SET_PLAYER_WANTED_LEVEL*
39 | - ***010E*** = *SET_PLAYER_MINIMUM_WANTED_LEVEL*
40 | - ***0111*** = *SET_WB_CHECK_TO*
41 | - ***0112*** = *WASTED_OR_BUSTED*
42 | - ***0114*** = *GIVE_ACTOR_WEAPON_AMMO*
43 | - ***0117*** = *IS_PLAYER_WASTED*
44 | - ***0118*** = *IS_ACTOR_DEAD*
45 | - ***0119*** = *IS_CAR_WRECKED*
46 | - ***011A*** = *SET_ACTOR_THREAT_SEARCH*
47 | - ***011C*** = *SET_ACTOR_OBJ_NO_OBJ*
48 | - ***0121*** = *IS_PLAYER_IN_ZONE*
49 | - ***0122*** = *IS_PLAYER_PRESSING_HORN*
50 | - ***0123*** = *HAS_ACTOR_SPOTTED_PLAYER*
51 | - ***0129*** = *CREATE_ACTOR_INSIDE_CAR*
52 | - ***0130*** = *IS_PLAYER_BUSTED*
53 | - ***0135*** = *SET_CAR_DOOR_LOCK*
54 | - ***0137*** = *IS_CAR_MODEL*
55 | - ***014B*** = *CREATE_CAR_GENERATOR*
56 | - ***014C*** = *SET_CAR_GENERATOR_CARS_TO_GENERATE*
57 | - ***014D*** = *TEXT_PAGER*
58 | - ***014E*** = *START_TIMER_AT*
59 | - ***014F*** = *STOP_TIMER*
60 | - ***0151*** = *REMOVE_STATUS_TEXT*
61 | - ***0152*** = *SET_ZONE_CAR_INFO*
62 | - ***0154*** = *IS_ACTOR_IN_ZONE*
63 | - ***0157*** = *CAMERA_ON_PLAYER*
64 | - ***0158*** = *CAMERA_ON_VEHICLE*
65 | - ***0159*** = *CAMERA_ON_PED*
66 | - ***015A*** = *RESTORE_CAMERA*
67 | - ***016A*** = *FADE*
68 | - ***016B*** = *FADING*
69 | - ***016C*** = *RESTART_IF_WASTED_AT*
70 | - ***016D*** = *RESTART_IF_BUSTED_AT*
71 | - ***0173*** = *SET_ACTOR_Z_ANGLE*
72 | - ***0177*** = *SET_OBJECT_Z_ANGLE*
73 | - ***01B4*** = *SET_PLAYER_CONTROL*
74 | - ***01B6*** = *SET_WEATHER*
75 | - ***01B9*** = *SET_ACTOR_ARMED_WEAPON*
76 | - ***01C2*** = *REMOVE_REFERENCES_TO_ACTOR*
77 | - ***01C3*** = *REMOVE_REFERENCES_TO_CAR*
78 | - ***01C4*** = *REMOVE_REFERENCES_TO_OBJECT*
79 | - ***01F0*** = *SET_MAX_WANTED_LEVEL_TO*
80 | - ***023C*** = *LOAD_SPECIAL_ACTOR*
81 | - ***0247*** = *REQUEST_MODEL*
82 | - ***0248*** = *IS_MODEL_AVAILABLE*
83 | - ***0249*** = *RELEASE_MODEL*
84 | - ***0256*** = *IS_PLAYER_DEFINED*
85 | - ***02A3*** = *TOGGLE_WIDESCREEN*
86 | - ***02AC*** = *SET_CAR_IMMUNITIES*
87 | - ***02EB*** = *RESTORE_CAMERA_WITH_JUMPCUT*
88 | - ***0317*** = *INCREMENT_MISSION_ATTEMPTS*
89 | - ***034F*** = *DESTROY_ACTOR_WITH_FADE*
90 | - ***035F*** = *GIVE_ARMOUR_TO_ACTOR*
91 | - ***038B*** = *LOAD_REQUESTED_MODELS*
92 | - ***0394*** = *PLAY_MUSIC*
93 | - ***039E*** = *SET_ACTOR_CANT_BE_DRAGGED_OUT_OF_CAR*
94 | - ***03A3*** = *IS_ACTOR_MALE*
95 | - ***03A4*** = *THREAD*
96 | - ***03CF*** = *LOAD_WAV*
97 | - ***03D0*** = *HAS_WAV_LOADED*
98 | - ***03D1*** = *PLAY_WAV*
99 | - ***03D7*** = *SET_WAV_LOCATION*
100 | - ***03DE*** = *SET_PED_DENSITY*
101 | - ***03E4*** = *SET_TEXT_DRAW_ALIGN_RIGHT*
102 | - ***03E6*** = *REMOVE_TEXT_BOX*
103 | - ***03EE*** = *IS_PLAYER_CONTROLLABLE*
104 | - ***03F0*** = *ENABLE_TEXT_DRAW*
105 | - ***040D*** = *CLEAR_MISSION_AUDIO*
106 | - ***0417*** = *START_MISSION*
107 | - ***041D*** = *SET_CAMERA_NEAR_CLIP*
108 | - ***0580*** = *SET_CHAR_OBJ_BUY_ICE_CREAM*
--------------------------------------------------------------------------------
/docs/opcodes/iii_opcodes.txt:
--------------------------------------------------------------------------------
1 | 0000: NOP
2 | 0001: wait 0 ms
3 | 0002: jump @MAIN_14396
4 | 0003: shake_camera 300
5 | 0004: $DEFAULT_WAIT_TIME = 250 // integer values
6 | 0005: $2 = 0.0625 // floating-point values
7 | 0006: 16@ = 0 // integer values
8 | 0007: 7@ = 0.0
9 | 0008: $754 += 1 // integer values
10 | 0009: $1123 += 1.75 // floating-point values
11 | 000A: 14@ += 1 // integer values
12 | 000B: 12@ += 3.0 // floating-point values
13 | 000C: $1122 -= 3 // integer values
14 | 000D: $430 -= 10.0 // floating-point values
15 | 000E: 0@ -= 1 // integer values
16 | 000F: 9@ -= 3.0 // floating-point values
17 | 0010: $JUMP_BONUS *= 180 // integer values
18 | 0011: $LAND_Z *= 100.0 // floating-point values
19 | 0012: 22@ *= 100
20 | 0013: 17@ *= -1.0 // floating-point values
21 | 0014: $JUMP_BONUS /= 3 // integer values
22 | 0015: $3 /= 2.0 // floating-point values
23 | 0016: 4@ /= 2
24 | 0017: 14@ /= 1000.0
25 | 0018: $65 > 17 // integer values
26 | 0019: 16@ > 1440000 // integer values
27 | 001A: 19 > $65 // integer values
28 | 001B: 6000 > 16@ // integer values
29 | 001C: $DODO_FLIGHTTIME > $DODO_FLIGHTTIME_RECORD // integer values
30 | 001D: 27@ > 33@ // (int)
31 | 001F: 17@ > $1480 // integer values
32 | 0020: $430 > -9.9999 // floating-point values
33 | 0022: 10.0 > $430 // floating-point values
34 | 0024: $CURRENT_Z > $HEIGHEST_Z // floating-point values only
35 | 0025: 3@ > 6@ // (float)
36 | 0026: $TEMPVAR_FLOAT_1 > 513@ // (float)
37 | 0028: $65 >= 9 // integer values
38 | 0029: 17@ >= 20000 // integer values
39 | 002A: 5 >= $65 // integer values
40 | 002B: 5000 >= 16@ // integer values
41 | 002C: $VAR >= $VAR2 // (int)
42 | 002D: 43@ >= 271@ // (int)
43 | 002E: $INTEGER_GLOBAL >= 131@ // (int)
44 | 0031: 42@ >= 0.05 // floating-point values
45 | 0033: -0.05 >= 42@ // floating-point values
46 | 0034: $8276 >= $8278 // (float)
47 | 0035: 98@ >= 50@ // (float)
48 | 0036: $FLOAT_1 >= 181@ // (float)
49 | 0037: 189@ >= $FLOAT_2 // (float)
50 | 0038: $ONMISSION == 0 // integer values
51 | 0039: 1@ == 1 // integer values
52 | 003A: $1290 == $PARAMEDIC_PEOPLE_TO_SAVE_THIS_LEVEL // integer values and handles
53 | 003B: 18@ == 21@ // (int)
54 | 003C: $TEMP_INT == 6@ // (int)
55 | 0042: $1090 == 1016.0 // floating-point values
56 | 0044: $3499 == $3507 // (float)
57 | 0045: 85@ == 69@ // (float)
58 | 0046: $var == 0@ // (float)
59 | 004C: jump_if_true @mythread
60 | 004D: jump_if_false @MAIN_14291
61 | 004E: end_thread
62 | 004F: create_thread @NONAME_4
63 | 0050: gosub @C_CARP_1474
64 | 0051: return
65 | 0053: $PLAYER_CHAR = create_player #NULL at 811.875 -939.9374 35.75
66 | 0054: store_player $PLAYER_CHAR position_to $1347 $1348 $1349
67 | 0055: put_player $PLAYER_CHAR at 888.5625 -308.3749 -99.9999
68 | 0056: player $PLAYER_CHAR 0 -229.9999 255.0 -209.9999 275.0
69 | 0057: player $PLAYER_CHAR sphere 0 in_cube_cornerA 1066.5625 -403.4999 14.0 cornerB 1072.75 -393.9999 18.0
70 | 0058: $JUMP_BONUS += $JUMP_ROTATION // integer values
71 | 0059: $773 += $774 // floating-point values
72 | 005A: 3@ += 1@ // (int)
73 | 005B: 4@ += 17@ // (float)
74 | 005C: 17@ += $1029 // (int)
75 | 005D: 20@ += $TEMPVAR_FLOAT_1 // (float)
76 | 005E: $1923 += 25@ // (int)
77 | 005F: $TEMPVAR_FLOAT_3 += 18@ // (float)
78 | 0060: $DODO_FLIGHTTIME -= $DODO_TAKEOFFTIME // integer values
79 | 0061: $773 -= $772 // floating-point values
80 | 0062: 13@ -= 11@ // (int)
81 | 0063: 18@ -= 6@ // (float)
82 | 0064: 3@ -= $TEMP_INT // (int)
83 | 0065: 20@ -= $FLOAT_1 // (float)
84 | 0066: $6681 -= 171@ // (int)
85 | 0068: $JUMP_BONUS *= $JUMP_MULTIPLY // integer values
86 | 0069: $766 *= $766 // floating-point values
87 | 006A: 3@ *= 5@ // (int)
88 | 006B: 8@ *= 9@ // (float)
89 | 0070: $1293 /= $PARAMEDIC_PEOPLE_TO_SAVE_THIS_LEVEL // integer values
90 | 0071: $1363 /= $1365 // floating-point values
91 | 0079: $var+= frame_delta_time * 6.325 // (float)
92 | 0079: 0@ += frame_delta_time * -1.325 // (float)
93 | 007A: $float += frame_delta_time * $float2 // (float)
94 | 007B: 0@ += frame_delta_time * 1@ // (float)
95 | 007C: 3@ += frame_delta_time * $var // (float)
96 | 007D: $TEMPVAR_FLOAT_1 += frame_delta_time * 2@ // (float)
97 | 007E: $float -= frame_delta_time * 0.01 // floating-point values
98 | 007F: 1@ -= frame_delta_time * 1.0 // (float)
99 | 0080: $float -= frame_delta_time * $float2 // (float)
100 | 0081: 0@ -= frame_delta_time * 0@ // (float)
101 | 0082: 9@ -= frame_delta_time * $float // (float)
102 | 0083: $18 -= frame_delta_time * 3@ // (float)
103 | 0084: $JUMP_BONUS = $JUMP_FLIPS // integer values and handles
104 | 0085: 1@ = 0@ // (int)
105 | 0086: $3 = $2 // floating-point values only
106 | 0087: 1@ = 0@ // (float)
107 | 0088: $float = 0@ // floating-point values only
108 | 0089: 9@ = $float // floating-point values only
109 | 008A: $int = 0@ // (int)
110 | 008B: 1@ = $INT // (int)
111 | 008C: $JUMP_ROTATION = float_to_integer $775
112 | 008D: $LAND_Z = integer_to_float $JUMP_DIST
113 | 008E: 0@ = float $var to_integer
114 | 008F: 1@ = integer $int to_float
115 | 0090: $int = float 12@ to_integer
116 | 0091: $float = integer 4@ to_float
117 | 0092: 0@ = float 0@ to_integer
118 | 0093: 1@ = integer 2@ to_float
119 | 0094: make $var absolute_integer
120 | 0095: make 9@ absolute_integer
121 | 0096: make $float absolute_float
122 | 0097: make 0@ absolute_float
123 | 0098: 0@ = random_float_in_ranges_0.0_to_1.0
124 | 0099: $3260 = random_integer_0-to-65535
125 | 009A: $CHAR_GUNSHOPOWNER = create_actor_pedtype 21 model #SPECIAL04 at 1070.75 -396.9374 14.1875
126 | 009B: destroy_actor_instantly $CHAR_GUNSHOPOWNER
127 | 009C: set_actor $FACTORY_TRIAD1 wander_direction 0
128 | 009F: set_actor $WASTED_HELP_MEDIC idle
129 | 00A0: store_actor $PATIENT1 position_to $1355 $1356 $1357
130 | 00A1: put_actor $1484 at 1204.1875 -801.8749 13.6875
131 | 00A2: actor $RAY1_WITNESS alive
132 | 00A3: actor $CURLY_BOB 0 1538.0 -740.9999 1304.0 -900.9999
133 | 00A4: actor $SALVATORE 0 1428.75 -186.9999 50.0 1442.5 -179.8749 53.0
134 | 00A5: $CAR_PORTLAND_IMPORT = create_car $VAR_PORTLAND_IMPORT_TYPE at 1504.0625 -680.0624 12.0625
135 | 00A6: destroy_car $CAR_PORTLAND_IMPORT
136 | 00A7: car $WASTED_HELP_AMBULANCE drive_to 1023.0 -479.9999 19.6875
137 | 00A8: set_car $WASTED_HELP_AMBULANCE to_psycho_driver
138 | 00A9: set_car $BUSTED_HELP_ENFORCER to_normal_driver
139 | 00AA: store_car $735 position_to $CURRENT_X $CURRENT_Y $CURRENT_Z
140 | 00AB: put_car $VIGILANTE_CRIMINALS_CAR at $1436 $1437 $1438
141 | 00AC: car $FRANK1_PARTY_CAR1 on_land
142 | 00AD: set_car $WASTED_HELP_AMBULANCE max_speed_to 40.0
143 | 00AE: unknown_set_car $WASTED_HELP_AMBULANCE to_ignore_traffic_lights 2
144 | 00AF: set_car $LUIGI4_PIMP_CAR driver_behaviour_to 11
145 | 00B0: car $CAR_PORTLAND_IMPORT 0 1496.75 -686.1874 1523.25 -666.7499
146 | 00B1: car $CAR_WITH_CORPSE 0 1135.75 55.5 -0.9999 1149.75 46.25 30.0
147 | 00BA: show_text_styled GXT "GXT" time 1000 style 2 // Text
148 | 00BB: show_text_lowpriority GXT 'GXT' time 3000 flag 1 // Text
149 | 00BC: show_text_highpriority GXT 'GXT' time 1000 flag 1 // Text
150 | 00BD: show_text_mediumpriority GXT 'GXT' time 4000 flag 1
151 | 00BE: text_clear_all
152 | 00BF: $65 = current_time_hours, $66 = current_time_minutes
153 | 00C0: set_current_time 12 0
154 | 00C1: $ASUKA1_MINS_TO_SALVATORE_LEAVES = minutes_to_current_time $ASUKA1_SALVATORE_LEAVING_TIME_HOURS $ASUKA1_SALVATORE_LEAVING_TIME_MINS
155 | 00C2: sphere_onscreen 1@ 2@ 3@ radius 5.0
156 | 00C3: enter_debugmode
157 | 00C4: exit_debugmode
158 | 00C5: true
159 | 00C6: return_false
160 | 00D6: if
161 | 00D7: create_thread @HJ // without extra params
162 | 00D8: mission_cleanup
163 | 00D9: $VIGILANTE_CRIMINALS_CAR = actor $CRIMINAL_FOR_VIGILANTE car // add to mission cleanup
164 | 00DA: $PLAYER_CAR = player $PLAYER_CHAR car
165 | 00DB: actor $WASTED_HELP_MEDIC in_car $WASTED_HELP_AMBULANCE
166 | 00DC: player $PLAYER_CHAR driving $1483
167 | 00DD: actor $hActor driving_vehicle_type #AMBULAN
168 | 00DE: player $PLAYER_CHAR driving_vehicle_type #TOYZ
169 | 00DF: actor $PATIENT1 driving
170 | 00E0: player $PLAYER_CHAR driving
171 | 00E1: player 0 pressed_button 19
172 | 00E2: get_player 0 key 15 state_to 4@
173 | 00E3: player $PLAYER_CHAR 0 1140.25 50.0625 radius 20.0 20.0
174 | 00E4: player $PLAYER_CHAR 0 811.875 -939.9374 radius 3.5 3.5
175 | 00E5: player $PLAYER_CHAR 0 940.375 -933.6874 radius 4.0 4.0
176 | 00E6: player $PLAYER_CHAR stopped $10 1529.0 -823.9999 radius 3.0 4.0
177 | 00E7: player $PLAYER_CHAR stopped 0 1440.625 -181.3749 radius 1.0 1.0
178 | 00E8: player $PLAYER_CHAR stopped 0 906.0 -424.9999 radius 4.0 4.0
179 | 00E9: player $PLAYER_CHAR 0 $CRIMINAL_FOR_VIGILANTE radius 150.0 150.0
180 | 00EA: player $PLAYER_CHAR 0 $3276 radius 40.0 40.0
181 | 00EB: player $PLAYER_CHAR 0 $MISTY_CHAR radius 20.0 20.0
182 | 00EC: actor $PATIENT1 0 $PARAMEDIC_CREATE_PATIENT_X $PARAMEDIC_CREATE_PATIENT_Y radius 25.0 25.0
183 | 00ED: actor $1484 sphere 0 1204.1875 -801.8749 radius 0.5 0.5
184 | 00EE: actor $SALVATORE 0 1371.0 -283.8749 radius 50.0 50.0
185 | 00EF: actor $FRANK3_8BALL sphere 1 1529.0 -823.9999 radius 3.0 4.0
186 | 00F0: actor $MARIA stopped 0 1440.5 -179.1249 radius 1.0 1.0
187 | 00F1: actor $PLAYER_ACTOR sphere 0 near_point 340.0 200.0 stopped_in_car
188 | 00F2: actor $Actor1 near_actor $Actor2 radius 30.0 30.0 sphere 0
189 | 00F3: actor $Actor1 near_actor_on_foot $Actor2 radius 3.0 3.0 sphere 0
190 | 00F4: actor 1@ near_actor $PLAYER_ACTOR radius 6.0 6.0 sphere 0 in_car
191 | 00F5: player $PLAYER_CHAR 0 1014.0 -119.9999 5.0 radius 5.0 5.0 5.0
192 | 00F6: player $PLAYER_CHAR 0 1224.5625 -840.2499 15.0 radius 1.0 1.0 2.0
193 | 00F7: player $PLAYER_CHAR sphere 0 near_point_in_car 793.125 -929.9374 42.125 radius 4.0 2.0 3.0
194 | 00F9: player $PLAYER_CHAR stopped 0 1224.5625 -840.2499 15.0 radius 1.0 1.0 2.0
195 | 00FA: player $PLAYER_CHAR stopped 1 $PARAMEDIC_CHECKPOINT_X $PARAMEDIC_CHECKPOINT_Y $PARAMEDIC_CHECKPOINT_Z radius 6.0 6.0 2.0
196 | 00FB: player $PLAYER_CHAR 0 $LUIGI2_DEALER radius 10.0 10.0 10.0
197 | 00FC: player $PLAYER_CHAR 0 $LUIGI5_PROSTITUTE1 on_foot radius 8.0 8.0 2.0
198 | 00FD: player $PLAYER_CHAR 0 $PATIENT1 in_car radius 10.0 10.0 2.0
199 | 00FE: actor $FRANK3_CARTEL4 0 1517.5 -940.5624 18.375 radius 0.5 0.5 2.0
200 | 00FF: actor $1498 0 1209.375 -807.1874 14.0 radius 4.0 4.0 4.0
201 | 0100: actor $actor near_point_in_car 1@ 2@ 3@ radius 5.0 5.0 5.0 sphere 0
202 | 0102: actor $actor stopped_near_point_on_foot 0@ 1@ 2@ radius 1.0 1.0 2.0 sphere 0
203 | 0103: actor $PLAYER_ACTOR in_sphere -1577.942 52.6333 16.3281 radius 4.0 4.0 6.0 sphere 0 stopped_in_car
204 | 0104: actor $PLAYER_ACTOR near_actor 1@ radius 15.0 15.0 15.0 sphere 0
205 | 0105: actor $PLAYER_ACTOR near_actor 2@ radius 5.0 5.0 2.0 sphere 0 on_foot
206 | 0106: actor $PLAYER_ACTOR near_actor 1@ radius 15.0 15.0 15.0 sphere 0 in_car
207 | 0107: $JOEY2_NOODLE_STAND = create_object #NOODLESBOX at 975.0 -719.9999 14.0
208 | 0108: destroy_object $1118
209 | 0109: player $PLAYER_CHAR money += $JUMP_BONUS
210 | 010A: player $PLAYER_CHAR money > 499999
211 | 010B: $money = player $player_char money
212 | 010C: change_player_into_rc_buggy $PLAYER_CHAR at $1162 $1163 $1164 180.0
213 | 010D: set_player $PLAYER_CHAR wanted_level_to $1149
214 | 010E: set_player $PLAYER_CHAR minimum_wanted_level_to 1
215 | 010F: player $PLAYER_CHAR wanted_level > 0
216 | 0110: clear_player $PLAYER_CHAR wanted_level
217 | 0111: set_wasted_busted_check_to 1
218 | 0112: wasted_or_busted
219 | 0113: set_player $PLAYER_CHAR car_weapon 6 ammo_to 10
220 | 0114: set_actor $actor weapon 11 add_ammo 1000
221 | 0117: player $PLAYER_CHAR wasted
222 | 0118: actor $CHAR_GUNSHOPOWNER dead
223 | 0119: car $735 wrecked
224 | 011A: set_actor $FACTORY_TRIAD1 search_threat 1
225 | 011C: actor $PLAYER_ACTOR clear_objective
226 | 011D: unknown 0
227 | 0121: player $PLAYER_CHAR in_zone 'ZONE'
228 | 0123: actor $ASUKA1_MAFIA9 spotted_player $PLAYER_CHAR
229 | 0126: actor $JOEY4_TRIAD1 walking
230 | 0129: $BUSTED_HELP_COP_1 = create_actor 4 #COP in_car $BUSTED_HELP_POLICECAR_1 driverseat
231 | 012A: put_player $PLAYER_CHAR at 1454.5625 -189.4999 55.0 and_remove_from_car
232 | 0130: player $PLAYER_CHAR busted
233 | 0135: set_car $1497 door_lock 2
234 | 0137: car $735 id == #DODO
235 | 0149: car $1483 crushed_by_car_crusher
236 | 014B: $JOEY_BFINJECTION = init_car_generator #BFINJECT color -1 -1 force_spawn 0 alarm 100 door_lock 0 min_delay 0 max_delay 10000 at 930.875 -267.6249 -99.9999 angle 340.0
237 | 014C: set_parked_car_generator $JOEY_BFINJECTION cars_to_generate_to 0
238 | 014D: text_pager 'DIAB1_A' 140 2 0
239 | 014E: start_timer_at $COUNTDOWN_TIME1
240 | 014F: stop_timer $COUNTDOWN_TIME1
241 | 0151: remove_status_text $RC_BUGGY_KILLS
242 | 0157: camera_on_player $PLAYER_CHAR mode 15 transition 2
243 | 0158: camera_on_vehicle $USJ_CAR 15 switchstyle 2
244 | 0159: camera_on_ped $8BALL_CHAR 15 switchstyle 2
245 | 015A: restore_camera
246 | 015C: set_zone_gang_info 'CITYZON' 1 12 0 0 0 0 0 0 0 20
247 | 015D: set_gamespeed 0.25
248 | 015F: set_camera_position 884.5 -305.3124 13.5 rotation 0.0 0.0 0.0
249 | 0160: point_camera 885.25 -305.8124 13.0 switchstyle 2
250 | 0161: tie_marker $DIABLO1_CHEETAH1_MARKER to_car $DIABLO1_CHEETAH1 color 0 visibility 1
251 | 0162: tie_marker $KENJI5_YARDIE1_MARKER to_actor $KENJI5_YARDIE1 1 3
252 | 0164: disable_marker $LUIGI_MISSION_MARKER
253 | 0165: set_marker $3881 color_to 4
254 | 0166: set_marker $2341 brightness_to 1
255 | 0167: $2341 = create_marker_at $DIABLO1_NEXT_CHECKPOINT_X $DIABLO1_NEXT_CHECKPOINT_Y $DIABLO1_NEXT_CHECKPOINT_Z color 5 flag 2
256 | 0168: show_on_radar $2341 2
257 | 0169: set_fade_color 0 0 0
258 | 016A: fade 0 0 ms
259 | 016B: fading
260 | 016C: restart_if_wasted at 1144.25 -596.8749 13.875 90.0
261 | 016D: restart_if_busted at 1143.875 -675.1874 -99.9999 90.0
262 | 016E: override_next_restart at 811.875 -939.9374 35.75 angle 180.0
263 | 016F: create_particle 3 0.0 1.0 0 255 0 0 at 1270.8125 -1107.6874 11.0625
264 | 0171: set_player $PLAYER_CHAR z_angle_to 180.0
265 | 0172: $2068 = actor $MARIA z_angle
266 | 0173: set_actor $CHAR_GUNSHOPOWNER z_angle_to 170.0
267 | 0174: $772 = car $735 z_angle
268 | 0175: set_car $CAR_PORTLAND_IMPORT z_angle_to 90.0
269 | 0176: $430 = object $13 z_angle
270 | 0177: set_object $MISTY_DOOR2 z_angle_to 180.0
271 | 0178: player $PLAYER_CHAR picked_up_object $4102
272 | 017A: set_player $PLAYER_CHAR weapon 7 ammo_to 0
273 | 017B: set_actor $actor weapon 9 ammo_to 1
274 | 0180: set_on_mission_flag_to $ONMISSION
275 | 0181: on_mission_for 12 flag = $ON_MISSION_FOR_8BALL
276 | 0182: contact 12 base_brief = 1000
277 | 0185: car $TAXI_MISSION_CAR health >= 500
278 | 0186: $FIRE_MISSION_MARKER = create_marker_above_car $FIRE_MISSION_CAR
279 | 0187: $1307 = create_marker_above_actor $PATIENT1
280 | 0188: $2624 = create_marker_above_object $ASUKA4_FAKETARGET1
281 | 0189: $66 = unknown_create_checkpoint_at 240.4 -1280.2 10.0
282 | 018A: $OFFROAD_CHECKPOINT_1 = create_checkpoint_at $OFFROAD_CHECKPOINT_1_X $OFFROAD_CHECKPOINT_1_Y $OFFROAD_CHECKPOINT_1_Z
283 | 018B: show_on_radar $PORTLAND_SAVE_MARKER 2
284 | 018C: play_sound 94 at 0.0 0.0 0.0
285 | 018D: $111 = create_sound 41 at 850.75 -663.6874 15.0
286 | 018E: stop_sound $131
287 | 0191: remove_vehicle $car from_flipped_check
288 | 0192: set_actor $PATIENT1 objective_to_stand_still
289 | 0193: set_actor $PED_FOR_TAXIMISSION objective_to_act_like_ped
290 | 0194: set_actor $JOEY2_TRIAD1 objective_to_guard_point 976.0625 -715.2499 14.1875
291 | 0197: player $PLAYER_CHAR 0 1089.875 -223.8749 1084.5 -228.4999
292 | 019B: player $PLAYER_CHAR stopped 0 1089.875 -223.8749 1084.5 -228.4999
293 | 019C: player $PLAYER_CHAR 0 891.1875 -309.6874 7.6875 899.25 -303.2499 12.6875
294 | 019D: player $PLAYER_CHAR 0 1339.5625 -459.4999 49.0 1332.75 -462.7499 53.0
295 | 01A0: player $PLAYER_CHAR stopped 0 839.1875 -667.3749 14.0 842.0625 -673.8749 17.0
296 | 01A1: actor $PLAYER_ACTOR sphere 0 in_rectangle_cornerA 0@ 1@ cornerB 2@ 3@ on_foot
297 | 01A2: actor $PLAYER_ACTOR sphere 0 in_rectangle_cornerA 82@ 83@ cornerB 84@ 85@ in_car
298 | 01A3: actor $ACTOR sphere 0 in_rectangle_cornerA 1364.0625 -614.4999 1473.75 cornerB -560.1874
299 | 01A4: actor $PLAYER_ACTOR sphere 0 in_rectangle_cornerA 1@ 2@ cornerB 3@ 4@ stopped_on_foot
300 | 01A5: actor $PLAYER_ACTOR sphere 0 in_rectangle_cornerA 2@ 3@ cornerB 4@ 5@ stopped_in_car
301 | 01A8: actor $LUIGI5_PROSTITUTE1 stopped 0 1003.5 -882.9999 13.875 996.75 -876.3749 18.0
302 | 01AA: actor $PLAYER_ACTOR sphere 0 in_cube_cornerA 1@ 2@ 3@ cornerB 4@ 5@ 6@ stopped_in_car
303 | 01AB: car $3721 stopped 0 -1049.1249 -77.4374 -1037.1874 -69.1249
304 | 01AC: car $1483 stopped 0 1135.75 55.5 -0.9999 1149.75 46.25 9.0
305 | 01AD: car $BUSTED_HELP_ENFORCER sphere 0 near_point 1133.0 -668.9999 radius 3.0 3.0
306 | 01AE: car $FRANK1_ENFORCER1 stopped 0 1252.0 -1085.9999 18.0 18.0
307 | 01AF: car $FRANK1_ENFORCER1 0 $2068 $2069 $2070 radius 2.0 2.0 2.0
308 | 01B0: car $1497 stopped 0 1195.5625 -804.9999 13.6875 radius 4.0 4.0 4.0
309 | 01B1: give_player $PLAYER_CHAR weapon 4 ammo 20
310 | 01B2: give_actor $CHAR_GUNSHOPOWNER weapon 4 ammo 999
311 | 01B4: set_player $PLAYER_CHAR control 0
312 | 01B5: force_weather 0
313 | 01B6: set_weather 3
314 | 01B7: release_weather
315 | 01B8: set_player $PLAYER_CHAR armed_weapon_to 4
316 | 01B9: set_actor $TONI_CIPRIANI armed_weapon_to 0
317 | 01BB: store_object $TRIAD_FISH_FACTORY_GATE position_to $1090 $1091 $1092
318 | 01BC: put_object $AIRPORT_DOOR1 at -770.3749 -599.2499 11.8125
319 | 01BD: $DODO_TAKEOFFTIME = current_time_in_ms
320 | 01BE: set_actor $8BALL_CHAR to_look_at_spot 811.875 -939.9374 35.75
321 | 01C0: $1149 = player $PLAYER_CHAR wanted_level
322 | 01C1: car $VIGILANTE_CRIMINALS_CAR stopped
323 | 01C2: remove_references_to_actor $FACTORY_TRIAD1 // Like turning an actor into a random pedestrian
324 | 01C3: remove_references_to_car $CAR_PORTLAND_IMPORT
325 | 01C4: remove_references_to_object $LUIGI5_POLICE_BALL_SIGN // This object will now disappear when the player looks away
326 | 01C5: remove_actor_from_mission_cleanup_list $hActor
327 | 01C6: remove_car_from_mission_cleanup_list $hCar
328 | 01C7: remove_object_from_mission_cleanup_list $PLAYER_DOOR
329 | 01C8: $LUIGI4_PIMP = create_actor_pedtype 4 model #PIMP in_car $LUIGI4_PIMP_CAR passenger_seat 0
330 | 01C9: actor $MEAT4_CARLOS kill_actor $1526
331 | 01CA: actor $CHAR_GUNSHOPOWNER kill_player $PLAYER_CHAR
332 | 01CB: actor $3818 kill_actor $3854
333 | 01CC: actor $CRIMINAL_FOR_VIGILANTE kill_player $PLAYER_CHAR
334 | 01CE: actor $CRIMINAL_FOR_VIGILANTE avoid_player $PLAYER_CHAR
335 | 01D0: actor $LUIGI2_PROSTITUTE1 avoid_player $PLAYER_CHAR
336 | 01D1: actor $MARIA follow_actor $CHICO_DRUGDEALER
337 | 01D2: actor $LUIGI3_MISTY follow_player $PLAYER_CHAR
338 | 01D3: actor $PATIENT1 leave_car $PARAMEDIC_MISION_CAR
339 | 01D4: actor $BUSTED_HELP_SWAT_2 go_to_car $BUSTED_HELP_ENFORCER and_enter_it_as_a_passenger
340 | 01D5: actor $WASTED_HELP_MEDIC go_to_and_drive_car $WASTED_HELP_AMBULANCE
341 | 01D9: actor $CRIMINAL_FOR_VIGILANTE destroy_car $1427
342 | 01DE: tie_actor $TONI4_TRIAD4 to_actor $TONI4_TRIAD1
343 | 01DF: tie_actor $MISTY_CHAR to_player $PLAYER_CHAR
344 | 01E0: clear_leader $MEAT4_CARLOS
345 | 01E1: set_actor $FRANK3_CARTEL3 follow_route 0 3
346 | 01E2: add_route_point 0 at 1533.875 -925.9999 -99.9999
347 | 01E3: text_1number_styled "GXT" number 27@ time 5000 style 1
348 | 01E5: show_text_1number_highpriority GXT 'LOW_38' number 271@ time 5000 flag 1 // ~s~You need $~1~ to compete.
349 | 01E7: remove_forbidden_for_cars_cube 824.875 -633.7499 13.0 845.25 -693.7499 18.0
350 | 01E8: create_forbidden_for_cars_cube 619.5625 -911.4999 45.0 834.25 -954.4999 32.0
351 | 01E9: $1286 = car $PARAMEDIC_MISION_CAR num_passengers
352 | 01EA: $1285 = car $PARAMEDIC_MISION_CAR max_passengers
353 | 01EB: set_car_density_to 0.0
354 | 01EC: make_car 0@ very_heavy 1
355 | 01ED: clear_actor $8BALL_CHAR threat_search
356 | 01EE: activate_crane 1570.25 -675.3749 1638.6875 -687.0624 1647.875 -700.0624 1571.0625 -696.4999 16.0 0.0
357 | 01EF: deactivate_crane 1570.25 -675.3749
358 | 01F0: set_max_wanted_level_to 4
359 | 01F3: car $735 airborne
360 | 01F4: car $VIGILANTE_CRIMINALS_CAR flipped
361 | 01F5: $PLAYER_ACTOR = create_emulated_actor_from_player $PLAYER_CHAR
362 | 01F6: cancel_override_restart
363 | 01F7: set_player $PLAYER_CHAR ignored_by_cops_state_to 1
364 | 01F9: init_rampage_gxt 'RAMPAGE' weapon 5 time_limit 30000 targets 30 target_models #CABBIE #TAXI #CABBIE #TAXI completed_text 1
365 | 01FA: $FLAG_RAMPAGE_STATUS = rampage_status
366 | 01FB: $769 = square_root $768
367 | 01FC: player $PLAYER_CHAR near_car $3101 radius 20.0 20.0 0
368 | 01FD: player $PLAYER_CHAR near_car_on_foot $3721 radius 15.0 15.0 0
369 | 0202: actor $3738 near_car $3721 radius 40.0 40.0 sphere 0
370 | 0203: actor $ASUKA1_MAFIA11 near_car_on_foot $2494 radius 4.0 4.0 unknown 0
371 | 0204: actor $ASUKA1_MAFIA1 near_car_in_car $2498 radius 10.0 10.0 unknown 0
372 | 0208: $PATIENT_Z_ANGLE = random_float 0.0 359.875
373 | 0209: $1301 = random_int_in_ranges 0 2
374 | 020A: set_car $CAR_PORTLAND_IMPORT door_status_to 1
375 | 020B: explode_car $FIRE_MISSION_CAR
376 | 020C: create_explosion 5 at 965.75 -1111.8749 15.5
377 | 020D: car $735 flipped
378 | 020E: actor $MEAT4_CARLOS look_at_actor $1526
379 | 020F: actor $PED_FOR_TAXIMISSION look_at_player $PLAYER_CHAR
380 | 0210: player $PLAYER_CHAR look_at_actor $MARIA
381 | 0211: actor $PATIENT1 walk_to $PARAMEDIC_INSIDE_HOSPITAL_X $PARAMEDIC_INSIDE_HOSPITAL_Y
382 | 0213: $98 = create_pickup #COLT45 type 6 at 1068.5 -400.7499 15.1875
383 | 0214: pickup $WASTED_INFO_PICKUP picked_up
384 | 0215: destroy_pickup $WASTED_INFO_PICKUP
385 | 0216: set_car $TAXI_MISSION_CAR taxi_available_light_to 1
386 | 0217: text_styled "GXT" time 3000 style 1
387 | 0218: text_1number_styled 'REWARD' $vigilante_bonus 6000 ms 6 // REWARD $~1~
388 | 0219: $PORTLAND_HIDEOUT_GARAGE = create_garage 16 from 891.25 -311.0624 7.6875 898.375 -315.4999 12.6875
389 | 021B: set_garage $LUIGIS_LOCKUP_GARAGE to_accept_car $LUIGI2_DEALER_CAR
390 | 021C: car_inside_garage $KENJI_LOCKUP_GARAGE
391 | 021D: set_free_bomb_shop_to 1
392 | 0220: car $car_handle has_car_bomb
393 | 0221: set_player $PLAYER_CHAR apply_brakes_to_car 0
394 | 0222: set_player $PLAYER_CHAR health_to 100
395 | 0223: set_actor $RAY2_PHIL health_to 5
396 | 0224: set_car $PARAMEDIC_MISION_CAR health_to $PARAMEDIC_CAR_HEALTH
397 | 0226: $JOEY2_CHUNKY_HEALTH = actor $CHUNKY_LEE_CHONG health
398 | 0227: $1283 = car $PARAMEDIC_MISION_CAR health
399 | 0228: car $LIPSFORELLI_CAR bomb_status == 5
400 | 0229: set_car $EIGHT_CAR color_to 58 1
401 | 022A: remove_forbidden_for_peds_cube 1609.75 -615.1874 9.0 1557.75 -673.3749 20.0
402 | 022B: create_forbidden_for_peds_cube 659.5625 200.0 -24.9999 945.75 147.5 5.0
403 | 022C: set_actor $BUSTED_HELP_SWAT_2 to_look_at_actor $BUSTED_HELP_DIABLO
404 | 022D: set_actor $CHAR_GUNSHOPOWNER to_look_at_player $PLAYER_CHAR
405 | 022E: set_player $PLAYER_CHAR to_look_at_actor $TONI_CIPRIANI
406 | 022F: set_actor $BUSTED_HELP_SWAT_1 stop_looking
407 | 0230: set_player $PLAYER_CHAR stop_looking
408 | 0231: enable_second_police_heli 0
409 | 0235: set_gang 1 models_to #MODEL #MODEL
410 | 0236: set_gang 0 car_to #MAFIA
411 | 0237: set_gang 0 primary_weapon_to 2 secondary_weapon_to 2
412 | 0239: actor $8BALL_CHAR run_to 892.6875 -308.5624
413 | 023C: load_special_actor 'model' as 1
414 | 0240: unknown $4102 1
415 | 0241: player $player_char in_remote_mode
416 | 0242: set_car $BLOWFISH_GARBAGE_TRUCK bomb_status_to 1
417 | 0243: set_actor $CHAR_GUNSHOPOWNER ped_stats_to 16
418 | 0244: set_cutscene_pos -537.3749 1051.1875 36.875
419 | 0245: set_actor $8BALL_CHAR walk_style_to 9
420 | 0247: request_model #GANG03
421 | 0248: model #SENTINEL available
422 | 0249: release_model #GANG03
423 | 024A: $PHONE_DIABLOS = create_phone_at 937.875 -230.0624
424 | 024C: text_phone $phone_ray1 'AM4_1A'
425 | 024E: disable_phone $PHONE_MARTY
426 | 024F: create_corona 1.0 5 0 with_color 0 200 200 at_point $OFFROAD_CHECKPOINT_1_X $OFFROAD_CHECKPOINT_1_Y $OFFROAD_CHECKPOINT_1_Z
427 | 0250: create_light_at 780.5 -942.8749 39.0 RGB_values 235 255 250
428 | 0253: save_current_time
429 | 0255: set_critical_mission_restart_at 811.875 -939.9374 35.75 angle 180.0
430 | 0256: player $PLAYER_CHAR defined
431 | 0291: unknown_actor $CRIMINAL_FOR_VIGILANTE unknown_behavior_flag 1
432 | 0293: $CURRENT_CONTROLS = get_controller_mode
433 | 0294: set_car $LIPSFORELLI_CAR resprayable 0
434 | 0296: unload_special_actor 4
435 | 0297: clear_rampage_kills
436 | 0298: $RC_BUGGY_KILLS = rampage_kills #DIABLOS
437 | 0299: activate_garage $WITSEC_HOUSE_GARAGE
438 | 029B: $PLAYER_DOOR = init_object #PLAYERSDOOR at 890.875 -307.6874 8.75
439 | 029C: $USJ_CAR stopped
440 | 029F: player $PLAYER_CHAR stopped
441 | 02A0: actor $FRANK1_PARTY_PERSON1 stopped
442 | 02A1: (unknown) 3500 1
443 | 02A2: create_particle 4 0 at 791.625 -936.8749 38.3125
444 | 02A3: toggle_widescreen 0
445 | 02A7: $LUIGI_MISSION_MARKER = create_icon_marker_and_sphere 13 at 892.75 -425.7499 13.875
446 | 02A8: $P_AND_S_MARKER = create_marker 18 at 925.0 -359.4999 -99.9999
447 | 02A9: set_actor $PATIENT1 immune_to_nonplayer 1
448 | 02AA: set_car $FIRE_MISSION_CAR immune_to_nonplayer 1
449 | 02AB: set_actor $JOEY4_TRIAD1 immunities BP 1 FP 1 EP 1 CP 1 MP 1
450 | 02AC: set_car $JOEY3_VAN immunities BP 1 FP 1 EP 1 CP 1 MP 1
451 | 02B3: player $PLAYER_CHAR in_cube 1247.5625 -821.9999 12.0 1253.9375 -814.9999 18.0 radius 14.0 sphere 0
452 | 02B4: player $PLAYER_CHAR in_cube_on_foot 1466.1875 -174.9999 50.0 1452.875 -172.0624 60.0 radius 11.5625 sphere 0
453 | 02B9: deactivate_garage $WITSEC_HOUSE_GARAGE
454 | 02BC: set_cop_behaviour 0
455 | 02BF: car $735 sunk
456 | 02C0: set $PARAMEDIC_CREATE_PATIENT_X $PARAMEDIC_CREATE_PATIENT_Y $PARAMEDIC_CREATE_PATIENT_Z to_ped_path_coords_closest_to $PARAMEDIC_PATIENT_RANDOM_X $PARAMEDIC_PATIENT_RANDOM_Y $1349
457 | 02C1: set $1394 $1395 $1396 to_car_path_coords_closest_to $1387 $1388 $1393
458 | 02C2: car $BUSTED_HELP_ENFORCER drive_to_point 1133.0 -668.9999 15.0
459 | 02C3: create_donkey_mags 0
460 | 02C5: $2433 = donkey_mags_picked_up
461 | 02C6: remove_pickup_items_from_ground
462 | 02C7: scatter_platinum 90 at -1079.9999 -163.1874 -99.9999 100.0
463 | 02C8: $4207 = platinum_pieces_in_car
464 | 02C9: remove_platinum_from_car
465 | 02CA: car $LUIGI4_PIMP_CAR bounding_sphere_visible
466 | 02CB: actor $RAY1_WITNESS bounding_sphere_visible
467 | 02CD: call @NONAME_79_67 @NONAME_79_67
468 | 02CE: $3196 = ground_z $3194 $3195 $3196
469 | 02CF: $1978 = create_fire_at 966.0 -1111.7499 13.75
470 | 02D0: fire $hFire extinguished
471 | 02D1: remove_fire $hFire
472 | 02D3: boat $ASUKA3_REPORTER_BOAT drive_to 744.75 -350.0624 0.0
473 | 02D4: unknown_turn_off_car $FRANK4_BOAT engine
474 | 02D5: player $PLAYER_CHAR firing_weapons_in_rectangle 1610.5625 -614.5624 1340.875 -1074.4999 0
475 | 02D7: player $PLAYER_CHAR currentweapon == 2
476 | 02D8: actor $PLAYER_ACTOR current_weapon == 1
477 | 02D9: donkey_mags_picked_up = none
478 | 02DB: set_boat $ASUKA3_REPORTER_BOAT speed_to 48.0
479 | 02DD: get_random_actor $ped_for_taximission in_zone 'IND_ZON'
480 | 02DE: player $PLAYER_CHAR driving_taxi_vehicle
481 | 02DF: unknown_player $PLAYER_CHAR
482 | 02E0: actor $hActor firing_weapon
483 | 02E1: $3315 = create_cash_pickup 20000 at 238.9375 -993.6874 21.0
484 | 02E2: set_actor $ASUKA2_MAFIA4 weapon_accuracy_to 70
485 | 02E3: $USJ_CAR_SPEED = car $USJ_CAR speed
486 | 02E5: $CUTSCENE_PLAYER = create_cutscene_object #SPECIAL04
487 | 02E6: set_cutscene_anim $cutscene_player 'PLAYER'
488 | 02E7: start_cutscene
489 | 02E8: $CUT_SCENE_TIME = cutscenetime
490 | 02EA: end_cutscene
491 | 02EB: restore_camera_with_jumpcut
492 | 02EC: put_hidden_package_at 1105.25 -1019.9999 25.0625
493 | 02ED: set_total_hidden_packages_to 100
494 | 02EF: projectile_in_cube 376.0625 -445.1874 28.0625 380.0625 -441.1874 31.6875
495 | 02F1: unknown_create_gta3_exploding_barrel_at $3194 $3195 $3196
496 | 02F2: actor $hActor model == #MODEL
497 | 02F3: load_object #CUTOBJ01 'CS_BAN'
498 | 02F4: create_cutscene_actor $INTRO_CATALINA from_head #CUTOBJ05 and_body $INTRO_CATALINAS_BODY
499 | 02F6: $972 = sine $981
500 | 02F7: $973 = cosine $981
501 | 02F8: get_car $RAY4_GHOST Z_angle_sine_to $3203
502 | 02F9: get_car $RAY4_GHOST Z_angle_cosine_to $3204
503 | 02FA: garage $PORTLAND_IE_GARAGE change_to_type 19
504 | 02FB: create_crusher_crane 1119.75 51.75 1135.75 56.0625 1149.75 46.25 1143.0 59.875 5.0 180.0
505 | 02FF: show_text_3numbers GXT 'GXT' numbers 1 2 3 time 3000 flag 1
506 | 0302: show_text_4numbers GXT "GXT" numbers 1 2 3 4 time 3000 flag 1
507 | 0308: show_text_6numbers GXT 'GXT' numbers 1 2 3 4 5 6 time 5000 flag 5
508 | 030C: progress_made += 1
509 | 030D: set_total_mission_points_to 154
510 | 030E: save_jump_distance $769
511 | 030F: save_jump_height $HEIGHEST_Z
512 | 0310: save_jump_flips $JUMP_FLIPS
513 | 0311: save_jump_rotation $JUMP_ROTATION
514 | 0312: save_jump_type 1
515 | 0313: increment_unique_jumps_found
516 | 0314: set_total_unique_jumps_to 20
517 | 0315: increment_taxi_dropoffs
518 | 0316: save_taxi_earnings_from $TOTAL_TAXI_EARNINGS
519 | 0317: increment_mission_attempts
520 | 0318: set_latest_mission_passed 'GXT'
521 | 0319: set_actor $PATIENT1 running 1
522 | 031A: remove_all_fires
523 | 031D: actor $4215 hit_by_weapon 1
524 | 031E: vehicle $CAR hit_by_weapon 39
525 | 0321: kill_actor $PATIENT1
526 | 0323: enable_boat $FRANK4_BOAT anchor 1
527 | 0325: $1367 = create_car $FIRE_MISSION_CAR fire
528 | 0327: $2494 = create_random_car_with_actors -1 in_area 900.4375 -431.8749 905.75 -419.9374
529 | 0329: garage $PORTLAND_PAYNSPRAY_GARAGE respray_done
530 | 032A: set_behind_camera_mode_to 0
531 | 032B: $602 = create_weapon_pickup #AK47 14 ammo 60 at 1249.0 -858.4999 20.5625
532 | 032C: car $BUSTED_HELP_POLICECAR_2 ram $BUSTED_HELP_DIABLOCAR
533 | 032D: car $3727 block $3721
534 | 0330: set_player $PLAYER_CHAR infinite_run_to 1
535 | 0331: set_player $PLAYER_CHAR fast_reload 1
536 | 0332: set_actor $PATIENT1 bleeding_to 1
537 | 0335: set_free_paynspray_to 1
538 | 0336: set_player $PLAYER_CHAR visible 0
539 | 0339: objects_in_cube 870.375 -309.8749 6.0 865.1875 -314.6874 12.0 0 1 1 1 1
540 | 033A: create_incoming_cessna
541 | 033B: incoming_cessna_landed
542 | 033C: incoming_cessna_destroyed
543 | 033F: set_text_draw_letter_width_height 0.75 1.0
544 | 0340: set_text_draw_color 190 190 190 $1122
545 | 0341: set_text_draw_align_justify 1
546 | 0342: set_text_draw_centered 1
547 | 0343: set_text_linewidth 320.0
548 | 0344: set_text_draw_linewidth 580.0 for_centered_text
549 | 0345: enable_text_draw_background 1
550 | 0346: set_text_draw_background_color 0 0 0 $1122
551 | 0348: enable_text_draw_proportional 1
552 | 0349: text_draw_style = 0
553 | 034A: portland_complete
554 | 034B: staunton_complete
555 | 034C: shoreside_complete
556 | 034D: rotate_object $FUZZBALL_DOOR1 from_angle 180.0 to_angle 10.0 flag 0
557 | 034E: move_object $AIRPORT_DOOR1 to -770.3749 -597.8124 11.8125 speed 0.0625 0.0625 0.0625 collision_check 0
558 | 034F: destroy_actor_with_fade $PATIENT1 // The actor fades away like a ghost
559 | 0350: set_actor $CHAR_GUNSHOPOWNER stay_in_place 1
560 | 0351: gore_enabled
561 | 0353: refresh_actor $PLAYER_ACTOR
562 | 0354: set_up_chase_scene 1.0
563 | 0355: clean_up_chase_scene
564 | 0358: start_drug_drop_off
565 | 0359: drop_off_cessna_shot_down
566 | 035A: find_drop_off_plane_coords $3440 $3441 $3442
567 | 035B: $3422 = create_drop_off_package $3440 $3441 $3442
568 | 035C: place_object $3095 relative_to_car $3101 offset 0.25 -1.6874 -0.0624
569 | 035D: make_object $FAKETARGET1 targetable
570 | 035F: set_actor $CHUNKY_LEE_CHONG armour_to 100
571 | 0360: open_garage $PORTLAND_IE_GARAGE
572 | 0361: close_garage $PORTLAND_IE_GARAGE
573 | 0362: remove_actor $ASUKA3_REPORTER from_car_and_place_at 547.25 -778.3749 -99.9999
574 | 0363: toggle_model_render_at 1027.25 -933.7499 15.0 radius 50.0 object #INDHELIX_BARRIER 0
575 | 0365: set_actor $PED_FOR_TAXIMISSION objective_to-29
576 | 0366: (unknown) $3943
577 | 0367: init_gta3_rampage 'PAGE_00' 7 120000 $var_rampage_amount7 #GANG09 #GANG10 #PLAYERSDOOR #PLAYERSDOOR 0
578 | 0368: create_ev_crane 1570.25 -675.3749 1565.6875 -686.4999 1576.75 -706.5624 1639.875 -696.6874 26.0 0.0
579 | 0369: put_player $PLAYER_CHAR in_car $JOEY4_LIMO
580 | 036A: put_actor $CRIMINAL_FOR_VIGILANTE in_car $VIGILANTE_CRIMINALS_CAR
581 | 036D: text_2numbers_styled "GXT" numbers 2@ 3@ time 3000 style 1
582 | 0372: set_actor $CHICO_DRUGDEALER anim 0 wait_state_time 100 ms
583 | 0373: set_camera_directly_behind_player
584 | 0374: set_motion_blur 5
585 | 0376: $PATIENT1 = create_random_actor $PARAMEDIC_CREATE_PATIENT_X $PARAMEDIC_CREATE_PATIENT_Y $PARAMEDIC_CREATE_PATIENT_Z
586 | 0377: set_actor $CRIMINAL_FOR_VIGILANTE steal_any_car
587 | 037F: give_player_detonator
588 | 0381: throw_object $1983 distance -9.9999 6.0 18.0
589 | 0382: set_object $3095 collision_detection 0
590 | 038B: load_requested_models
591 | 038C: object $3095 scatter 0.0 0.0 16.0
592 | 038D: draw_texture 17 position $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 size 20@ 19@ RGBA 128 128 128 255
593 | 038F: load_texture "DOWN" as 1 // Load dictionary with 0390 first
594 | 0390: load_txd_dictionary 'LD_BEAT'
595 | 0391: release_textures
596 | 0392: object $1983 toggle_in_moving_list 1
597 | 0394: play_music 1
598 | 0395: clear_area 1 at 888.5625 -308.3749 range -99.9999 1.0
599 | 0396: 1 useless_flag
600 | 0397: car $WASTED_HELP_AMBULANCE siren = 1
601 | 0399: create_forbidden_for_peds_angled_cube 1222.875 -838.3749 13.5 1256.25 -804.8749 16.0 angle 58.0
602 | 039C: set_car $LUIGI4_PIMP_CAR watertight 1
603 | 039D: scatter_particles 19 1.0 0 0 0 0 at $1123 $1124 $1125 $1126 $1127 $1128
604 | 039E: (unknown) $1484 1
605 | 039F: car $DIABLO1_CHEETAH1 race_to $DIABLO1_NEXT_CHECKPOINT_X_FOR_CHEETAH1 $DIABLO1_NEXT_CHECKPOINT_Y_FOR_CHEETAH1
606 | 03A2: set_car $JOEY4_LIMO status 0
607 | 03A3: is_actor $PATIENT1 male
608 | 03A4: name_thread 'MAIN'
609 | 03A5: set_garage $SECURICAR_GARAGE type_to 7 118
610 | 03A6: get_drug_plane_coords $4099 $4100 $4101
611 | 03A7: save_int_to_debug_file 1
612 | 03A8: save_float_to_debug_file 1.0
613 | 03A9: save_newline_to_debug_file
614 | 03AA: play_suspect_last_seen_at $1436 $1437 $1438
615 | 03AB: set_car $FORELLI_CAR1 strong 1
616 | 03AC: clear_route 0
617 | 03AD: set_rubbish 0
618 | 03AE: remove_objects_from_cube 804.0 -947.9999 30.0 765.125 -924.3124 50.0
619 | 03AF: set_streaming 0
620 | 03B1: garage $SALVATORES_GARAGE door_closed
621 | 03B2: start_catalina_flyby
622 | 03B3: catalina_take_off
623 | 03B4: remove_catalina_heli
624 | 03B5: catalina_shot_down
625 | 03B6: replace_model_at 1027.25 -933.7499 15.0 radius 50.0 from #INDHELIX_BARRIER to #LOD_LAND014
626 | 03B7: process_cut_scene_only 0
627 | 03B8: clear_weapons_from_player $PLAYER_CHAR
628 | 03B9: create_catalinas_chopper $CAT1_CHOPPER
629 | 03BA: clear_cars_from_cube 266.8125 -610.8749 30.375 306.25 -479.8749 34.8125
630 | 03BB: set_garage $SALVATORES_GARAGE door_type_to_swing_open
631 | 03BC: $1607 = create_sphere 925.0625 -350.4999 9.25 2.5
632 | 03BD: destroy_sphere $1607
633 | 03BE: catalina_heli_drop_explosives_on_player
634 | 03BF: set_player $PLAYER_CHAR ignored_by_everyone_to 1
635 | 03C0: $hCar = actor $hActor car
636 | 03C1: $735 = player $PLAYER_CHAR car_no_save
637 | 03C5: create_random_car_for_carpark 311.5 -510.2499 28.0625 91.0
638 | 03C6: current_island == 1
639 | 03C7: set_sensitivity_to_crime_to 0.5
640 | 03C8: set_camera_directly_before_player
641 | 03C9: car $LIPSFORELLI_CAR damaged
642 | 03CA: object $13 exists
643 | 03CB: set_camera -559.6249 1030.5 40.0
644 | 03CC: car $FRANK2_TAXI add_to_stuck_car_check 5.0 = 30000
645 | 03CD: car $FRANK2_TAXI remove_from_stuck_car_check
646 | 03CE: car $FRANK2_TAXI stuck
647 | 03CF: load_wav 'DOOR_1'
648 | 03D0: wav_loaded
649 | 03D1: play_wav
650 | 03D2: wav_ended
651 | 03D3: point $1436 $1437 $1438 get_nearby_vector $1436 $1437 $1438 $1445
652 | 03D4: garage $PORTLAND_IE_GARAGE contains_neededcar 1
653 | 03D5: remove_text 'GXT'
654 | 03D6: remove_styled_text "GXT"
655 | 03D7: set_wav_location $2074 $2075 $2076
656 | 03D8: show_save_screen
657 | 03D9: save_done
658 | 03DA: set_garage $PORTLAND_IE_GARAGE camera_follows_player
659 | 03DC: $LUIGI2_BAT_MARKER = create_marker_above_pickup $LUIGI2_BAT_PICKUP
660 | 03DD: pickup $LUIGI4_COLT45_PICKUP show_on_radar 20 $1637
661 | 03DE: set_pedestrians_density_multiplier_to 0.0
662 | 03DF: all_random_peds #PIMP
663 | 03E0: draw_text_behind_textures 0
664 | 03E1: $VAR_NUM_HIDDEN_PACKAGES_FOUND = packages_found
665 | 03E2: actor $DIABLO1_RACE_TIME exit_car
666 | 03E3: set_texture_to_be_drawn_antialiased 1
667 | 03E4: set_text_draw_align_right 0
668 | 03E5: show_text_box 'TEXT'
669 | 03E6: remove_text_box
670 | 03E7: flash_hud 4
671 | 03EA: generate_cars_around_camera 1
672 | 03EB: clear_small_messages_only
673 | 03EC: ev_crane_collected_all_cars
674 | 03ED: set_car $VIGILANTE_CRIMINALS_CAR not_damaged_when_upside_down 1
675 | 03EE: player $PLAYER_CHAR controllable
676 | 03EF: player $PLAYER_CHAR make_safe
677 | 03F0: enable_text_draw 1
678 | 03F1: pedtype 12 add_threat 1
679 | 03F2: pedgroup 8 remove_threat 1
680 | 03F3: get_car $EIGHT_CAR color $1581 $1582
681 | 03F4: set_all_cars_can_be_damaged 1
682 | 03F7: load_island_data 0
683 | 03F8: (unknown) $3248
684 | 03F9: make_actors $LUIGI2_DEALER $LUIGI2_PROSTITUTE1 converse_in -1 ms
685 | 03FB: set_car $ASUKA5_TANNER_CAR stays_on_current_island 1
686 | 03FC: set_actor $MARIA stays_on_current_island 0
687 | 03FD: save_offroad_time $386
688 | 03FE: save_offroadII_time $387
689 | 03FF: save_offroadIII_time $388
690 | 0400: save_mayhem_time $389
691 | 0401: increment_people_saved_in_ambulance
692 | 0402: increment_criminals_stopped
693 | 0403: save_highest_ambulance_level $PARAMEDIC_MISSION_LEVEL
694 | 0404: increment_fires_extinguished
695 | 0405: enable_phone $PHONE_MARTY
696 | 0406: save_dodo_flight_time $DODO_FLIGHTTIME
697 | 0407: time_taken_defuse_mission = $4199
698 | 0408: set_total_rampages_to 20
699 | 0409: blow_up_rc_buggy
700 | 040A: remove_car_from_chase 2
701 | 040D: clear_mission_audio
702 | 0410: override_gang_model 6 0
703 | 0411: set_actor $ASUKA1_MAFIA14 use_pednode_seek 1
704 | 0413: enable $PLAYER_CHAR get_out_of_jail_free 1
705 | 0417: start_mission INTRO // Intro Movie
706 | 0418: set_object $1106 draw_last 1
707 | 0419: $RAY1_WITNESS_CAR = player $PLAYER_CHAR weapon 11 ammo
708 | 041A: 41@ = actor $PLAYER_ACTOR weapon 9 ammo
709 | 041C: make_actor $CHAR_GUNSHOPOWNER say 103
710 | 041D: set_camera_near_clip 2.5
711 | 041E: set_radio_station 0 0
712 | 041F: override_hospital 2
713 | 0420: override_police_station 2
714 | 0421: toggle_rain 1
715 | 0422: garage_contain_car $LUIGIS_LOCKUP_GARAGE $LUIGI2_DEALER_CAR
716 | 0424: metric
717 | 0426: create_save_cars_between_levels_cube 619.5625 -911.4999 45.0 834.25 -954.4999 32.0
718 | 0428: set_car $VIGILANTE_CRIMINALS_CAR avoid_level_transitions 1
719 | 042A: ped_threat_exists 8 1
720 | 042B: clear_peds_from_cube 1164.25 -888.8124 10.0 1291.75 -811.6874 20.0
721 | 042C: set_total_missions_to 73
722 | 042D: $JUMP_DIST = metric_to_imperial $JUMP_DIST
723 | 042E: downdate_integer_stat 4 to 0@
724 | 042F: save_record 1 $RC1_RECORD
725 | 0431: car $CAR passenger_seat_free 0
726 | 0433: set_actor $CRIMINAL_FOR_VIGILANTE criminal_flag 1
727 | 0434: show_credits
728 | 0435: end_credits
729 | 0436: reached_end_of_credits
730 | 0437: scatter_particle 5 0.0 at $1123 $1124 $1125 $1126 $1127 $1128
731 | 0438: set_actor $MARIA ignore_level_transitions 1
732 | 043A: start_boat_foam_animation
733 | 043B: update_boat $165 foam_animation
734 | 043C: set_game_sounds_fade 0
735 | 043D: unknown_set_play_intro_flag 1
736 | 043F: play_cutscene_music
737 | 0440: stop_cutscene_music
738 | 0441: $car_model = car $hCar model
739 | 0442: player $PLAYER_CHAR in_car $4166
740 | 0444: create_fire_audio $2963 1
741 | 0445: are_car_cheats_used
742 | 0446: set_actor $actor dismemberment_possible 0
743 | 0447: (unknown) $PLAYER_CHAR
744 | 0448: actor $actor in_car $car
745 | 0449: actor $PLAYER_ACTOR in_a_car
746 | 044C: change_to_island 2
747 | 044D: load_splash 'NEWS'
748 | 044E: car $3721 level 1
749 | 044F: (unknown) $LIPSFORELLI_CAR 1
750 | 0450: car $3812 warp_to_player
751 | 0451: load_end_of_game_audio
752 | 0452: enable_player_control_camera
753 | 045B: draw_text_2numbers 320.0 390.0 GXT 'TIME' numbers 0@ 1@ // ~1~:~1~
754 | 0477: set_car 5@ action 6 time 200
755 | 0494: get_joystick 0 data_to $MOVE_AXIS_X $MOVE_AXIS_Y $SPECIAL_AXIS_X $SPECIAL_AXIS_Y
756 | 04F0: is_actor_waiting_for_world_collision $CAR
757 | 04F1: is_car_waiting_for_world_collision $CAR
758 | 05DC: end_custom_thread
759 | 05DD: end_custom_thread_named 'KEN1'
760 | 05DE: create_custom_thread 'ct.s'
761 | 05DF: write_memory 0xA10B2E size 1 value 0 virtual_protect 0
762 | 05E0: 0@ = read_memory 1@ size 4 virtual_protect 0
763 | 05E1: call 0x55BFC0 num_params 3 pop 3 0 0 0@
764 | 05E2: call_function 0x4BC1E0 num_params 0 pop 0 0@
765 | 05E3: call_method 0x4DF240 struct 0@ num_params 3 pop 3 0.0 0.0 0.0
766 | 05E4: call_function_method 0x5BAA80 struct 0@ num_params 0 pop 0 1@
767 | 05E5: 0@ = game_version
768 | 05E6: 0@ = actor 0@ struct
769 | 05E7: 0@ = car 0@ struct
770 | 05E8: 0@ = object 0@ struct
771 | 05E9: 0@ = ped_struct 0@ handle
772 | 05EA: 0@ = vehicle_struct 0@ handle
773 | 05EB: 0@ = object_struct 0@ handle
774 | 05EC: 0@ = current_thread_pointer
775 | 05ED: 0@ = thread 'MAIN' pointer
776 | 05EE: key_pressed 0x20 // VK_...
777 | 05EF: 3@ = random_actor_near_point 0@ 1@ 2@ in_radius 10.0 find_next 1 pass_deads 0 //IF and SET
778 | 05F0: 3@ = random_vehicle_near_point 0@ 1@ 2@ in_radius 10.0 find_next 1 pass_wrecked 0 //IF and SET
779 | 05F1: 3@ = random_object_near_point 0@ 1@ 2@ in_radius 10.0 find_next 1 //IF and SET
780 | 05F2: 0@ = pop_float
781 | 05F3: 0@ = 2 exp 0.5 //all floats
782 | 05F4: 0@ = log 0@ base 2 // all floats
783 | 05F5: call_scm_func @func params_count 0
784 | 05F6: ret 0
785 |
--------------------------------------------------------------------------------
/docs/opcodes/sa_keywords.md:
--------------------------------------------------------------------------------
1 | # GTA San Andreas keywords*
2 | - ***0001*** = *WAIT*
3 | - ***0002*** = *GOTO*
4 | - ***0002*** = *JUMP*
5 | - ***0003*** = *SHAKE_CAMERA*
6 | - ***004D*** = *ELSE_JUMP*
7 | - ***004D*** = *ELSE_GOTO*
8 | - ***004D*** = *JF*
9 | - ***004E*** = *END_THREAD*
10 | - ***004F*** = *CREATE_THREAD*
11 | - ***0050*** = *GOSUB*
12 | - ***0051*** = *RETURN*
13 | - ***0053*** = *CREATE_PLAYER*
14 | - ***009A*** = *CREATE_CHAR*
15 | - ***009B*** = *DESTROY_ACTOR*
16 | - ***00BE*** = *TEXT_CLEAR_ALL*
17 | - ***00C0*** = *SET_CURRENT_TIME*
18 | - ***00C2*** = *IS_SPHERE_ONSCREEN*
19 | - ***00D6*** = *IF*
20 | - ***00D7*** = *CREATE_THREAD_WB*
21 | - ***00D7*** = *CREATE_THREAD_NO_PARAMS*
22 | - ***00D8*** = *MISSION_CLEANUP*
23 | - ***00DB*** = *IS_ACTOR_IN_CAR*
24 | - ***00DD*** = *IS_ACTOR_DRIVING_CAR_WITH_MODEL*
25 | - ***00DF*** = *IS_ACTOR_DRIVING*
26 | - ***0107*** = *CREATE_OBJECT*
27 | - ***0108*** = *DESTROY_OBJECT*
28 | - ***010D*** = *SET_PLAYER_WANTED_LEVEL*
29 | - ***010E*** = *SET_PLAYER_MINIMUM_WANTED_LEVEL*
30 | - ***0111*** = *SET_WB_CHECK_TO*
31 | - ***0112*** = *WASTED_OR_BUSTED*
32 | - ***0114*** = *GIVE_ACTOR_WEAPON_AMMO*
33 | - ***0117*** = *IS_PLAYER_WASTED*
34 | - ***0118*** = *IS_ACTOR_DEAD*
35 | - ***0119*** = *IS_CAR_WRECKED*
36 | - ***0122*** = *IS_PLAYER_PRESSING_HORN*
37 | - ***0129*** = *CREATE_ACTOR_INSIDE_CAR*
38 | - ***0137*** = *IS_CAR_MODEL*
39 | - ***014B*** = *CREATE_CAR_GENERATOR*
40 | - ***014C*** = *SET_CAR_GENERATOR_CARS_TO_GENERATE*
41 | - ***014E*** = *START_TIMER_AT*
42 | - ***014F*** = *STOP_TIMER*
43 | - ***0151*** = *REMOVE_STATUS_TEXT*
44 | - ***0154*** = *IS_ACTOR_IN_ZONE*
45 | - ***0158*** = *CAMERA_ON_VEHICLE*
46 | - ***0159*** = *CAMERA_ON_PED*
47 | - ***015A*** = *RESTORE_CAMERA*
48 | - ***015F*** = *SET_CAMERA_POSITION*
49 | - ***016A*** = *FADE*
50 | - ***016B*** = *FADING*
51 | - ***016C*** = *RESTART_IF_WASTED_AT*
52 | - ***016D*** = *RESTART_IF_BUSTED_AT*
53 | - ***0173*** = *SET_ACTOR_Z_ANGLE*
54 | - ***0177*** = *SET_OBJECT_Z_ANGLE*
55 | - ***01B4*** = *SET_PLAYER_CAN_MOVE*
56 | - ***01B6*** = *SET_WEATHER*
57 | - ***01B9*** = *SET_ACTOR_ARMED_WEAPON*
58 | - ***01C2*** = *REMOVE_REFERENCES_TO_ACTOR*
59 | - ***01C3*** = *REMOVE_REFERENCES_TO_CAR*
60 | - ***01C4*** = *REMOVE_REFERENCES_TO_OBJECT*
61 | - ***01F0*** = *SET_MAX_WANTED_LEVEL_TO*
62 | - ***01F5*** = *GET_PLAYER_ACTOR*
63 | - ***023C*** = *LOAD_SPECIAL_ACTOR*
64 | - ***0247*** = *LOAD_MODEL*
65 | - ***0248*** = *IS_MODEL_AVAILABLE*
66 | - ***0249*** = *RELEASE_MODEL*
67 | - ***0256*** = *IS_PLAYER_DEFINED*
68 | - ***02A3*** = *ENABLE_WIDESCREEN*
69 | - ***02AC*** = *SET_CAR_IMMUNITIES*
70 | - ***02EB*** = *RESTORE_CAMERA_WITH_JUMPCUT*
71 | - ***0317*** = *INCREMENT_MISSION_ATTEMPTS*
72 | - ***034F*** = *DESTROY_ACTOR_WITH_FADE*
73 | - ***035F*** = *GIVE_ARMOUR_TO_ACTOR*
74 | - ***038B*** = *LOAD_REQUESTED_MODELS*
75 | - ***0394*** = *PLAY_MUSIC*
76 | - ***039E*** = *SET_ACTOR_CANT_BE_DRAGGED_OUT_OF_CAR*
77 | - ***03A3*** = *IS_ACTOR_MALE*
78 | - ***03A4*** = *THREAD*
79 | - ***03CF*** = *LOAD_WAV*
80 | - ***03D0*** = *HAS_WAV_LOADED*
81 | - ***03D1*** = *PLAY_WAV*
82 | - ***03D7*** = *SET_WAV_LOCATION*
83 | - ***03DE*** = *SET_PED_DENSITY*
84 | - ***03E4*** = *SET_TEXT_DRAW_ALIGN_RIGHT*
85 | - ***03E6*** = *REMOVE_TEXT_BOX*
86 | - ***03EE*** = *IS_PLAYER_CONTROLLABLE*
87 | - ***03F0*** = *ENABLE_TEXT_DRAW*
88 | - ***03FE*** = *SET_ACTOR_MONEY*
89 | - ***040D*** = *UNLOAD_WAV*
90 | - ***0417*** = *START_MISSION*
91 | - ***041D*** = *SET_CAMERA_NEAR_CLIP*
92 | - ***0459*** = *END_THREAD_NAMED*
93 | - ***04BB*** = *SELECT_INTERIOR*
94 | - ***04ED*** = *LOAD_ANIMATION*
95 | - ***056D*** = *IS_ACTOR_DEFINED*
96 | - ***056E*** = *IS_CAR_DEFINED*
97 | - ***0580*** = *SET_CHAR_OBJ_BUY_ICE_CREAM*
98 | - ***0750*** = *SET_OBJECT_VISIBILITY*
99 | - ***08A8*** = *SET_MARKERS_TO_LONG_DISTANCE*
100 | - ***0A92*** = *CREATE_CUSTOM_THREAD*
101 | - ***0A93*** = *END_CUSTOM_THREAD*
102 | - ***0A94*** = *START_CUSTOM_MISSION*
103 | - ***0A95*** = *ENABLE_THREAD_SAVING*
104 | - ***0A99*** = *CHDIR*
105 | - ***0AA0*** = *GOSUB_IF_FALSE*
106 | - ***0AA1*** = *RETURN_IF_FALSE*
107 | - ***0AA9*** = *IS_GAME_VERSION_ORIGINAL*
108 | - ***0AAB*** = *FILE_EXISTS*
109 | - ***0AB0*** = *KEY_PRESSED*
110 | - ***0AB1*** = *CALL_SCM_FUNC*
111 | - ***0AB2*** = *RET*
112 | - ***0ABA*** = *END_CUSTOM_THREAD_NAMED*
113 | - ***0ADC*** = *TEST_CHEAT*
114 | - ***0ADF*** = *ADD_DYNAMIC_GXT_ENTRY*
115 | - ***0AE0*** = *REMOVE_DYNAMIC_GXT_ENTRY*
116 | - ***0AE4*** = *DIRECTORY_EXISTS*
117 | - ***0AE5*** = *CREATE_DIRECTORY*
118 | - ***0AE9*** = *POP_FLOAT*
--------------------------------------------------------------------------------
/docs/opcodes/vc_keywords.md:
--------------------------------------------------------------------------------
1 | # GTA Vice City keywords*
2 | - ***0001*** = *WAIT*
3 | - ***0002*** = *GOTO*
4 | - ***0002*** = *JUMP*
5 | - ***0003*** = *SHAKE_CAMERA*
6 | - ***004D*** = *ELSE_JUMP*
7 | - ***004D*** = *ELSE_GOTO*
8 | - ***004D*** = *JF*
9 | - ***004E*** = *END_THREAD*
10 | - ***004F*** = *CREATE_THREAD*
11 | - ***0050*** = *GOSUB*
12 | - ***0051*** = *RETURN*
13 | - ***0053*** = *CREATE_PLAYER*
14 | - ***0054*** = *GET_PLAYER_COORDINATES*
15 | - ***0055*** = *SET_PLAYER_COORDINATES*
16 | - ***0056*** = *IS_PLAYER_IN_AREA_2D*
17 | - ***0057*** = *IS_PLAYER_IN_AREA_3D*
18 | - ***009A*** = *CREATE_CHAR*
19 | - ***009B*** = *DESTROY_ACTOR*
20 | - ***009C*** = *ACTOR_WANDER_DIR*
21 | - ***009F*** = *ACTOR_SET_IDLE*
22 | - ***00BE*** = *TEXT_CLEAR_ALL*
23 | - ***00C0*** = *SET_CURRENT_TIME*
24 | - ***00C2*** = *IS_SPHERE_ONSCREEN*
25 | - ***00C3*** = *ENTER_DEBUGMODE*
26 | - ***00C4*** = *EXIT_DEBUGMODE*
27 | - ***00D6*** = *IF*
28 | - ***00D7*** = *CREATE_THREAD_WB*
29 | - ***00D7*** = *CREATE_THREAD_NO_PARAMS*
30 | - ***00D8*** = *MISSION_CLEANUP*
31 | - ***00DB*** = *IS_ACTOR_IN_CAR*
32 | - ***00dc*** = *IS_PLAYER_DRIVING*
33 | - ***00DD*** = *IS_ACTOR_DRIVING_VEHICLE_TYPE*
34 | - ***00DE*** = *IS_PLAYER_DRIVING_VEHICLE_TYPE*
35 | - ***00DF*** = *IS_ACTOR_DRIVING*
36 | - ***0107*** = *CREATE_OBJECT*
37 | - ***0108*** = *DESTROY_OBJECT*
38 | - ***010D*** = *SET_PLAYER_WANTED_LEVEL*
39 | - ***010E*** = *SET_PLAYER_MINIMUM_WANTED_LEVEL*
40 | - ***0111*** = *SET_WB_CHECK_TO*
41 | - ***0112*** = *WASTED_OR_BUSTED*
42 | - ***0114*** = *GIVE_ACTOR_WEAPON_AMMO*
43 | - ***0117*** = *IS_PLAYER_WASTED*
44 | - ***0118*** = *IS_ACTOR_DEAD*
45 | - ***0119*** = *IS_CAR_WRECKED*
46 | - ***011A*** = *SET_ACTOR_THREAT_SEARCH*
47 | - ***011C*** = *SET_ACTOR_OBJ_NO_OBJ*
48 | - ***0121*** = *IS_PLAYER_IN_ZONE*
49 | - ***0122*** = *IS_PLAYER_PRESSING_HORN*
50 | - ***0123*** = *HAS_ACTOR_SPOTTED_PLAYER*
51 | - ***0129*** = *CREATE_ACTOR_INSIDE_CAR*
52 | - ***0130*** = *IS_PLAYER_BUSTED*
53 | - ***0135*** = *SET_CAR_DOOR_LOCK*
54 | - ***0137*** = *IS_CAR_MODEL*
55 | - ***014B*** = *CREATE_CAR_GENERATOR*
56 | - ***014C*** = *SET_CAR_GENERATOR_CARS_TO_GENERATE*
57 | - ***014D*** = *TEXT_PAGER*
58 | - ***014E*** = *START_TIMER_AT*
59 | - ***014F*** = *STOP_TIMER*
60 | - ***0151*** = *REMOVE_STATUS_TEXT*
61 | - ***0152*** = *SET_ZONE_CAR_INFO*
62 | - ***0154*** = *IS_ACTOR_IN_ZONE*
63 | - ***0157*** = *CAMERA_ON_PLAYER*
64 | - ***0158*** = *CAMERA_ON_VEHICLE*
65 | - ***0159*** = *CAMERA_ON_PED*
66 | - ***015A*** = *RESTORE_CAMERA*
67 | - ***016A*** = *FADE*
68 | - ***016B*** = *FADING*
69 | - ***016C*** = *RESTART_IF_WASTED_AT*
70 | - ***016D*** = *RESTART_IF_BUSTED_AT*
71 | - ***0173*** = *SET_ACTOR_Z_ANGLE*
72 | - ***0177*** = *SET_OBJECT_Z_ANGLE*
73 | - ***01B4*** = *SET_PLAYER_FROZEN*
74 | - ***01B6*** = *SET_WEATHER*
75 | - ***01B9*** = *SET_ACTOR_ARMED_WEAPON*
76 | - ***01C2*** = *REMOVE_REFERENCES_TO_ACTOR*
77 | - ***01C3*** = *REMOVE_REFERENCES_TO_CAR*
78 | - ***01C4*** = *REMOVE_REFERENCES_TO_OBJECT*
79 | - ***01F0*** = *SET_MAX_WANTED_LEVEL_TO*
80 | - ***023C*** = *LOAD_SPECIAL_ACTOR*
81 | - ***0247*** = *REQUEST_MODEL*
82 | - ***0248*** = *IS_MODEL_AVAILABLE*
83 | - ***0249*** = *RELEASE_MODEL*
84 | - ***0256*** = *IS_PLAYER_DEFINED*
85 | - ***02A3*** = *ENABLE_WIDESCREEN*
86 | - ***02AC*** = *SET_CAR_IMMUNITIES*
87 | - ***02EB*** = *RESTORE_CAMERA_WITH_JUMPCUT*
88 | - ***0317*** = *INCREMENT_MISSION_ATTEMPTS*
89 | - ***034F*** = *DESTROY_ACTOR_WITH_FADE*
90 | - ***035F*** = *GIVE_ARMOUR_TO_ACTOR*
91 | - ***038B*** = *LOAD_REQUESTED_MODELS*
92 | - ***0394*** = *PLAY_MUSIC*
93 | - ***039E*** = *SET_ACTOR_CANT_BE_DRAGGED_OUT_OF_CAR*
94 | - ***03A3*** = *IS_ACTOR_MALE*
95 | - ***03A4*** = *THREAD*
96 | - ***03CF*** = *LOAD_WAV*
97 | - ***03D0*** = *HAS_WAV_LOADED*
98 | - ***03D1*** = *PLAY_WAV*
99 | - ***03D7*** = *SET_WAV_LOCATION*
100 | - ***03DE*** = *SET_PED_DENSITY*
101 | - ***03E4*** = *SET_TEXT_DRAW_ALIGN_RIGHT*
102 | - ***03E6*** = *REMOVE_TEXT_BOX*
103 | - ***03EE*** = *IS_PLAYER_CONTROLLABLE*
104 | - ***03F0*** = *ENABLE_TEXT_DRAW*
105 | - ***03FE*** = *SET_ACTOR_MONEY*
106 | - ***040D*** = *UNLOAD_WAV*
107 | - ***0417*** = *START_MISSION*
108 | - ***041D*** = *SET_CAMERA_NEAR_CLIP*
109 | - ***0459*** = *END_THREAD_NAMED*
110 | - ***04BB*** = *SELECT_INTERIOR*
111 | - ***04ED*** = *LOAD_ANIMATION*
112 | - ***053D*** = *CLEAR_CHAR_WAIT_STATE*
113 | - ***056D*** = *IS_ACTOR_DEFINED*
114 | - ***0580*** = *SET_CHAR_OBJ_BUY_ICE_CREAM*
--------------------------------------------------------------------------------