Add initial client with crash map
13
.gitignore
vendored
@@ -1,13 +0,0 @@
|
||||
bin/
|
||||
.vscode/
|
||||
.DS_Store
|
||||
|
||||
# Resource file
|
||||
data/
|
||||
cfg.*.xml
|
||||
|
||||
# Certificates and keys
|
||||
*.p12
|
||||
*.pfx
|
||||
*.pem
|
||||
*.crt
|
||||
48
README.md
@@ -1,48 +0,0 @@
|
||||
# Tanki Online 2.0
|
||||
Source code repository for the latest build of the Tanki 2.0 demo, decompiled and deobfuscated.
|
||||

|
||||
|
||||
## Info and history
|
||||
See the [wiki page](https://github.com/MapMakersAndProgrammers/TankiOnline2.0DemoClient/wiki) for more detailed information and history about Tanki 2.0.
|
||||
|
||||
## Download
|
||||
The latest version can be downloaded from the [releases page](https://github.com/MapMakersAndProgrammers/TankiOnline2.0DemoClient/releases).
|
||||
### Original
|
||||
If you want the original or older versions made by AlternativaPlatform they can be found in our [Alternativa demo archive](https://github.com/MapMakersAndProgrammers/alternativa-demos/tree/master/alternativa/Tanki2.0). You can also play them from the Flashpoint Archive ([database entry](https://flashpointproject.github.io/flashpoint-database/search/#56237b92-f141-4e6e-a521-7bb00c905b3c), ID: `56237b92-f141-4e6e-a521-7bb00c905b3c`).
|
||||
|
||||
## Controls
|
||||
### Tank
|
||||
| Action | Key bind |
|
||||
|---------------|------------|
|
||||
| Move | arrow keys |
|
||||
| Rotate turret | `Z`, `X` |
|
||||
| Shoot | `space` |
|
||||
| Next tank | `enter` |
|
||||
### Camera
|
||||
| Action | Key bind |
|
||||
|--------------------------------------------------|------------------------|
|
||||
| Change camera vertical angle | `page up`, `page down` |
|
||||
| Cycle camera mode (fixed, freecam, orbit) | `\`, `M` |
|
||||
| Cycle freecam mode (view locked to tank, normal) | `N` |
|
||||
| Freecam move | `W`, `A`, `S`, `D` |
|
||||
| Freecam look | click and drag |
|
||||
| Freecam fly up, down | `E`, `C` |
|
||||
| Freecam sprint | `shift` |
|
||||
| Orbit look | click and drag |
|
||||
### Misc
|
||||
| Action | Key bind |
|
||||
|-----------------------------------------------|---------------------|
|
||||
| Toggle performance statistics | `G` |
|
||||
| Toggle antialiasing | `Q` |
|
||||
| Toggle console* | `ctrl`+`shift`+`K` |
|
||||
| Close console | `escape` |
|
||||
| Show "powered by AlternativaPlatform" message | `ctrl`+`shift`+`f1` |
|
||||
|
||||
*\* See [the wiki](https://github.com/MapMakersAndProgrammers/TankiOnline2.0DemoClient/wiki) for console commands*
|
||||
|
||||
## Build from source
|
||||
This repository uses the vscode [as3mxml](https://github.com/BowlerHatLLC/vscode-as3mxml) extension with the [Adobe AIR SDK](https://airsdk.harman.com/download) 51 from HARMAN, however the project should be able to build and run with any sdk that can target atleast flashplayer 11.
|
||||
|
||||
To build just run one of the actionscript build tasks from vscode, such as `compile release` or `compile debug`, which will output the game into the `bin/` folder. To run your built client you will need to download the game `data/` folder and `cfg.dxt1.xml` file from the latest Arena or Crash demos (v3) and place them next to `tanki2.swf`, you can find these files [here](https://github.com/MapMakersAndProgrammers/alternativa-demos/tree/master/alternativa/Tanki2.0).
|
||||
|
||||
To package the application you'll need a certificate file (project assumes `./certificate.p12`) and game resources (project assume `data/`, `cfg.dxt1.xml` in `./resources`).
|
||||
@@ -1,380 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<application xmlns="http://ns.adobe.com/air/application/51.1">
|
||||
|
||||
<!-- Adobe AIR Application Descriptor File Template.
|
||||
|
||||
Specifies parameters for identifying, installing, and launching AIR applications.
|
||||
|
||||
xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/3.5
|
||||
The last segment of the namespace specifies the version
|
||||
of the AIR runtime required for this application to run.
|
||||
|
||||
minimumPatchLevel - The minimum patch level of the AIR runtime required to run
|
||||
the application. Optional.
|
||||
-->
|
||||
|
||||
<!-- A universally unique application identifier. Must be unique across all AIR applications.
|
||||
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
|
||||
<id>TanksTestingTool</id>
|
||||
|
||||
<!-- Used as the filename for the application. Required. -->
|
||||
<filename>Tanki Online 2.0</filename>
|
||||
|
||||
<!-- Determines the architecture of the Windows captive app (non-Flash Builder workflows only)-->
|
||||
<architecture>64</architecture>
|
||||
|
||||
<!-- The name that is displayed in the AIR application installer.
|
||||
May have multiple values for each language. See samples or xsd schema file. Optional. -->
|
||||
<!-- <name></name> -->
|
||||
|
||||
<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.
|
||||
Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
|
||||
An updated version of application must have a versionNumber value higher than the previous version. Required for namespace >= 2.5 .
|
||||
For iOS Apps, this represents build number. -->
|
||||
<versionNumber>3</versionNumber>
|
||||
|
||||
<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users.
|
||||
For iOS Apps, this represents application version number and format should be (<0-999>.<0-999>.<0-999>).
|
||||
If this tag is not specified or the value is not according to the format, then this tag will be ignored
|
||||
and <versionNumber> will be used for application version number. Optional. -->
|
||||
<!-- <versionLabel></versionLabel> -->
|
||||
|
||||
<!-- Description, displayed in the AIR application installer.
|
||||
May have multiple values for each language. See samples or xsd schema file. Optional. -->
|
||||
<!-- <description></description> -->
|
||||
|
||||
<!-- Copyright information. Optional -->
|
||||
<!-- <copyright></copyright> -->
|
||||
|
||||
<!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 -->
|
||||
<!-- <publisherID></publisherID> -->
|
||||
|
||||
<!-- Opt-in to allow multiple instances of an AIR app to run concurrently on desktop platforms. Default false. -->
|
||||
<!-- <allowMultipleInstances></allowMultipleInstances> -->
|
||||
|
||||
<!-- Setting for whether to generate stack traces in release builds and whether to show file names and line numbers if these
|
||||
are available (for example in a debug SWF or one using the Flex -verbose-stacktraces option). 'none' means that no tracking
|
||||
of the stack will occur and no stack traces will be made available. 'standard' behaviour is to generate stack traces but
|
||||
not to include file/line numbers. 'verbose' will generate stack traces including file/line information if available.
|
||||
Omitting the option gives the previous behaviour which depends on the SWF version: versions 18 and above will include
|
||||
basic stack traces, versions 17 and below will not show stack traces. -->
|
||||
<!-- <stacktraces></stacktraces> -->
|
||||
|
||||
<!-- Settings for the application's initial window. Required. -->
|
||||
<initialWindow>
|
||||
<!-- The main SWF or HTML file of the application. Required. -->
|
||||
<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
|
||||
<content>bin/tanki2.swf</content>
|
||||
|
||||
<!-- The title of the main window. Optional. -->
|
||||
<title>Tanki Online 2.0</title>
|
||||
|
||||
<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
|
||||
<!-- <systemChrome></systemChrome> -->
|
||||
|
||||
<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
|
||||
<!-- <transparent></transparent> -->
|
||||
|
||||
<!-- Whether the window is initially visible. Optional. Default false. -->
|
||||
<visible>true</visible>
|
||||
|
||||
<!-- Whether the user can minimize the window. Optional. Default true. -->
|
||||
<!-- <minimizable></minimizable> -->
|
||||
|
||||
<!-- Whether the user can maximize the window. Optional. Default true. -->
|
||||
<!-- <maximizable></maximizable> -->
|
||||
|
||||
<!-- Whether the user can resize the window. Optional. Default true. -->
|
||||
<!-- <resizable></resizable> -->
|
||||
|
||||
<!-- Whether the application can set the stage quality to low/medium on desktops. Optional. Default false. -->
|
||||
<!-- <allowLowQuality></allowLowQuality> -->
|
||||
|
||||
<!-- The window's initial width in pixels. Optional. -->
|
||||
<width>1024</width>
|
||||
|
||||
<!-- The window's initial height in pixels. Optional. -->
|
||||
<height>768</height>
|
||||
|
||||
<!-- The window's initial x position. Optional. -->
|
||||
<x>0</x>
|
||||
|
||||
<!-- The window's initial y position. Optional. -->
|
||||
<y>0</y>
|
||||
|
||||
<!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. -->
|
||||
<!-- <minSize></minSize> -->
|
||||
|
||||
<!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. -->
|
||||
<!-- <maxSize></maxSize> -->
|
||||
|
||||
<!-- The aspect ratio of the app ("portrait" or "landscape" or "any"). Optional. Mobile only. Default is the natural orientation of the device -->
|
||||
<aspectRatio>landscape</aspectRatio>
|
||||
|
||||
<!-- Whether the app will begin auto-orienting on launch. Optional. Mobile only. Default false -->
|
||||
<autoOrients>false</autoOrients>
|
||||
|
||||
<!-- Whether the app will rotate with OS animation effects during auto-orient ("standard" or "none"). Optional. Mobile only. Default standard -->
|
||||
<!-- <orientationAnimation></orientationAnimation> -->
|
||||
|
||||
<!-- Whether the app launches in full screen. Optional. Mobile only. Default false -->
|
||||
<fullScreen>true</fullScreen>
|
||||
|
||||
<!-- The render mode for the app (either auto, cpu, gpu, or direct). Optional. Default auto -->
|
||||
<renderMode>direct</renderMode>
|
||||
|
||||
<!-- Whether the default direct mode rendering context allocates storage for depth and stencil buffers. Optional. Default false. -->
|
||||
<depthAndStencil>true</depthAndStencil>
|
||||
|
||||
<!-- Whether or not to pan when a soft keyboard is raised or lowered (either "pan" or "none"). Optional. Defaults "pan." -->
|
||||
<!-- <softKeyboardBehavior></softKeyboardBehavior> -->
|
||||
|
||||
<!-- Display Resolution for the app (either "standard" or "high"). Optional. Default "standard" -->
|
||||
<!-- <requestedDisplayResolution></requestedDisplayResolution> -->
|
||||
</initialWindow>
|
||||
|
||||
<!-- We recommend omitting the supportedProfiles element, -->
|
||||
<!-- which in turn permits your application to be deployed to all -->
|
||||
<!-- devices supported by AIR. If you wish to restrict deployment -->
|
||||
<!-- (i.e., to only mobile devices) then add this element and list -->
|
||||
<!-- only the profiles which your application does support. -->
|
||||
<!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> -->
|
||||
|
||||
<!-- Languages supported by application -->
|
||||
<!-- Only these languages can be specified -->
|
||||
<!-- Android Native uses "in" code for indonesean language, wherein native iOS uses "id" as its language code. -->
|
||||
<!-- We have added support of "id" in "in" code to support iOS with the same tag.-->
|
||||
<!-- <supportedLanguages>cs da de el en es fi fr in it iw ja ko ms nb nl pl pt ru sv th tr vi zh</supportedLanguages> -->
|
||||
|
||||
<!-- The subpath of the standard default installation location to use. Optional. -->
|
||||
<!-- <installFolder></installFolder> -->
|
||||
|
||||
<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
|
||||
<!-- <programMenuFolder></programMenuFolder> -->
|
||||
|
||||
<!-- The icon the system uses for the application. For at least one resolution,
|
||||
specify the path to a PNG file included in the AIR package. Optional. -->
|
||||
<icon>
|
||||
<image32x32>icons/icon32.png</image32x32>
|
||||
<image60x60>icons/icon60.png</image60x60>
|
||||
<image128x128>icons/icon128.png</image128x128>
|
||||
<image256x256>icons/icon256.png</image256x256>
|
||||
</icon>
|
||||
|
||||
<!-- Whether the application handles the update when a user double-clicks an update version
|
||||
of the AIR file (true), or the default AIR application installer handles the update (false).
|
||||
Optional. Default false. -->
|
||||
<!-- <customUpdateUI></customUpdateUI> -->
|
||||
|
||||
<!-- Whether the application can be launched when the user clicks a link in a web browser.
|
||||
Optional. Default false. -->
|
||||
<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
|
||||
|
||||
<!-- Listing of file types for which the application can register. Optional. -->
|
||||
<!-- <fileTypes> -->
|
||||
|
||||
<!-- Defines one file type. Optional. -->
|
||||
<!-- <fileType> -->
|
||||
|
||||
<!-- The name that the system displays for the registered file type. Required. -->
|
||||
<!-- <name></name> -->
|
||||
|
||||
<!-- The extension to register. Required. -->
|
||||
<!-- <extension></extension> -->
|
||||
|
||||
<!-- The description of the file type. Optional. -->
|
||||
<!-- <description></description> -->
|
||||
|
||||
<!-- The MIME content type. -->
|
||||
<!-- <contentType></contentType> -->
|
||||
|
||||
<!-- The icon to display for the file type. Optional. -->
|
||||
<!-- <icon>
|
||||
<image16x16></image16x16>
|
||||
<image32x32></image32x32>
|
||||
<image48x48></image48x48>
|
||||
<image128x128></image128x128>
|
||||
</icon> -->
|
||||
|
||||
<!-- </fileType> -->
|
||||
<!-- </fileTypes> -->
|
||||
|
||||
<!-- A preferred GPU type (either "discrete" or "integrated") in case the app utilizes GPU. Desktop only. Optional -->
|
||||
<!-- <gpuPreference></gpuPreference> -->
|
||||
|
||||
<!-- Options for configuring the Encrypted Local Storage behaviour (on all platforms). Optional. -->
|
||||
<!-- <encryptedLocalStorage> -->
|
||||
<!-- Whether to use any fallback to the earlier ELS key/data storage mechanisms. "never", "always" or "once".
|
||||
Optional. Default "always". If set to "once", this would enable data migration as long as all of this is
|
||||
performed within one launch of the application, as once a new ELS data store is present, the previous ones.
|
||||
would no longer be accessible. -->
|
||||
<!-- <fallbackMode></fallbackMode> -->
|
||||
<!-- Whether to use OS-specific/protected storage for the user's ELS key, or to use (obfuscated) file storage within
|
||||
a user's private filesystem area to store this. "os_store" or "file". Optional. Default "os_store". -->
|
||||
<!-- <storageMode></storageMode> -->
|
||||
<!-- </encryptedLocalStorage> -->
|
||||
|
||||
<!-- iOS specific capabilities -->
|
||||
<!-- <iPhone> -->
|
||||
<!-- A list of plist key/value pairs to be added to the application Info.plist -->
|
||||
<!-- <InfoAdditions>
|
||||
<![CDATA[
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<string>1</string>
|
||||
<string>2</string>
|
||||
</array>
|
||||
<key>UIStatusBarStyle</key>
|
||||
<string>UIStatusBarStyleBlackOpaque</string>
|
||||
<key>UIRequiresPersistentWiFi</key>
|
||||
<string>YES</string>
|
||||
]]>
|
||||
</InfoAdditions> -->
|
||||
<!-- A list of plist key/value pairs to be added to the application Entitlements.plist -->
|
||||
<!-- <Entitlements>
|
||||
<![CDATA[
|
||||
<key>keychain-access-groups</key>
|
||||
<array>
|
||||
<string></string>
|
||||
<string></string>
|
||||
</array>
|
||||
]]>
|
||||
</Entitlements> -->
|
||||
<!-- Display Resolution for the app (either "standard" or "high"). Optional. Default "standard" -->
|
||||
<!-- <requestedDisplayResolution></requestedDisplayResolution> -->
|
||||
<!-- Forcing Render Mode CPU for the devices mentioned. Optional -->
|
||||
<!-- <forceCPURenderModeForDevices></forceCPURenderModeForDevices> -->
|
||||
<!-- File containing line separated list of external swf paths. These swfs won't be
|
||||
packaged inside the application and corresponding stripped swfs will be output in
|
||||
externalStrippedSwfs folder. -->
|
||||
<!-- <externalSwfs></externalSwfs> -->
|
||||
<!-- Disable the ability of the application to display a custom keyboard (in case it contains keyloggers) -->
|
||||
<!-- <disableCustomKeyboard></disableCustomKeyboard> -->
|
||||
<!-- Disable the injection of the standard usage requests into the Info.plist file.
|
||||
Any necessary capabilities/descriptions should be added via InfoAdditions. -->
|
||||
<!-- <excludeDefaultUsageDescriptions></excludeDefaultUsageDescriptions> -->
|
||||
<!-- </iPhone> -->
|
||||
|
||||
<android>
|
||||
<!-- Specify Android specific tags that get passed to AndroidManifest.xml file. -->
|
||||
<!-- <manifestAdditions>
|
||||
<![CDATA[
|
||||
<manifest android:installLocation="auto">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||
<uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
|
||||
<application android:enabled="true">
|
||||
<activity android:excludeFromRecents="false">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
||||
]]>
|
||||
</manifestAdditions> -->
|
||||
<!-- End of the schema for adding the android specific tags in AndroidManifest.xml file -->
|
||||
<!-- Color depth for the app (either "32bit" or "16bit"). Optional. Default 16bit before namespace 3.0, 32bit after -->
|
||||
<!-- <colorDepth></colorDepth> -->
|
||||
<!-- Indicates if the app contains video or not. Necessary for ordering of video planes with graphics plane, especially in Jellybean - if you app does video this must be set to true - valid values are true or false -->
|
||||
<!-- <containsVideo></containsVideo> -->
|
||||
<!-- This app is also for Android TV (either "true" or "false"). Optional. Default is 'false' -->
|
||||
<!-- <supportsAndroidTV></supportsAndroidTV> -->
|
||||
<!-- Path to the image used for banner when the app is shown on TV. The banner should be a .png image of size 320*180.-->
|
||||
<!-- <banner></banner> -->
|
||||
<!-- Paths to alternative banner images when the app is shown on TV. Optional.-->
|
||||
<!-- <banner160x90></banner160x90> -->
|
||||
<!-- <banner240x135></banner240x135> -->
|
||||
<!-- <banner320x180></banner320x180> -->
|
||||
<!-- <banner480x270></banner480x270> -->
|
||||
<!-- <banner640x360></banner640x360> -->
|
||||
<!-- Indicates if webContents (HTML/CSS/JavaScript) can be inspected in browser. Optional . Default value is 'false' -->
|
||||
<!-- <webContentsDebuggingEnabled></webContentsDebuggingEnabled> -->
|
||||
|
||||
<!-- Indicates if disableMediaCodec is enabled or not. Optional . Default value is 'false' -->
|
||||
<!-- <disableMediaCodec></disableMediaCodec> -->
|
||||
<!-- Build using the legacy mechanism for APK files (default is false) -->
|
||||
<!-- <buildLegacyAPK></buildLegacyAPK> -->
|
||||
<!-- Add the "air." tag at the start of an Android application ID (default is true) -->
|
||||
<!-- <addAirToAppID>true</addAirToAppID> -->
|
||||
<!-- List of build architectures. This can be used to override an IDE by only including a single
|
||||
value e.g. <buildArchitectures>armv8</buildArchitectures> will results in an APK/bundle file
|
||||
that only contains armv8 binaries rather than the default (armv7) or whatever was requested on
|
||||
the command line. -->
|
||||
<!-- <buildArchitectures>armv7,armv8,x86,x64</buildArchitectures> -->
|
||||
<!-- This flag can be used to override the creation of an APK file requested by an IDE, forcing
|
||||
ADT to instead create an Android App Bundle. (Note the output file may still have the 'apk' extension) -->
|
||||
<!-- <createAppBundle>false</createAppBundle> -->
|
||||
<!-- A list of file extensions that should not be compressed when added into the APK/bundle file -->
|
||||
<!-- <uncompressedExtensions></uncompressedExtensions> -->
|
||||
<!-- Switch to the new font rendering mechanism (using JNI/Java) at a specified Android API level.
|
||||
Default is to change at API 31 (Android S) rather than use the old (native skia) mechanism -->
|
||||
<!-- <newFontRenderingFromAPI></newFontRenderingFromAPI> -->
|
||||
<!-- Prevent the runtime from accessing the device model (android.os.Build.MODEL). Default false. -->
|
||||
<!-- <preventDeviceModelAccess></preventDeviceModelAccess> -->
|
||||
<!-- Allow a webview to access local files via WebSettings.setAllowFileAccess(true). Default false. -->
|
||||
<!-- <webViewAllowFileAccess></webViewAllowFileAccess> -->
|
||||
<!-- Version options for specifying the version of multidex, gradle and gradle plug-in to use -->
|
||||
<!-- <multidexVersion></multidexVersion> -->
|
||||
<!-- <androidGradlePluginVersion></androidGradlePluginVersion> -->
|
||||
<!-- <gradleVersion></gradleVersion> -->
|
||||
<!-- Additional version options for specifying the Android build tools and compile SDK API versions to use -->
|
||||
<!-- <androidBuildToolsVersion></androidBuildToolsVersion> -->
|
||||
<!-- <androidCompileSdkVersion></androidCompileSdkVersion> -->
|
||||
<!-- Disables sensor access to prevent AIR from requesting input, orientation or telephony services unless
|
||||
access is later granted by adding an override file into the app storage. Default false. -->
|
||||
<!-- <disableSensorAccess></disableSensorAccess> -->
|
||||
<!-- Runs the AIR runtime in a separate, background thread rather than in the main Android UI thread.
|
||||
This should help prevent ANE issues, but may require some updates in other Android Java code
|
||||
(i.e. from AIR Native Extensions that may need some of their code to run on the UI thread).
|
||||
Default is false. -->
|
||||
<!-- <runtimeInBackgroundThread></runtimeInBackgroundThread> -->
|
||||
<!-- Switches File.browseXXX and file-based permissions to use the Storage Access Framework.
|
||||
Default value is (Android API level) 30 which equates to Android 11.0 (R) -->
|
||||
<!-- <storageAccessFrameworkFromAPI></storageAccessFrameworkFromAPI> -->
|
||||
<!-- Alters the style used for handling cut-out areas in different orientations. See Android documentation.
|
||||
Optional. Values can be "default", "always", "never" or "shortEdges". Default is "default". -->
|
||||
<displayCutoutMode>always</displayCutoutMode>
|
||||
<!-- Specifies a set of name/value properties that will be injected into the manifestPlaceholders section in an
|
||||
Android manifest file, so that user/app specific variables can be defined for third party SDKs. Optional. -->
|
||||
<!-- <manifestPlaceholders> -->
|
||||
<!-- <manifestPlaceholder>baseUrl: "dev.demoserver.com"</manifestPlaceholder> -->
|
||||
<!-- </manifestPlaceholders> -->
|
||||
|
||||
</android>
|
||||
<!-- A folder to include in the search for Android resources. Optional. -->
|
||||
<!-- <resdir></resdir> -->
|
||||
|
||||
<!-- macOS specific capabilities -->
|
||||
<!-- <macOS> -->
|
||||
<!-- A list of plist key/value pairs to be added to the application Info.plist -->
|
||||
<!-- <InfoAdditions>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</InfoAdditions> -->
|
||||
<!-- A list of plist key/value pairs to be added to the application Entitlements.plist -->
|
||||
<!-- <Entitlements>
|
||||
<![CDATA[
|
||||
]]>
|
||||
</Entitlements> -->
|
||||
<!-- </macOS> -->
|
||||
|
||||
<!-- Windows specific capabilities -->
|
||||
<!-- <windows> -->
|
||||
<!-- Option to use the Edge "WebView2" component rather than MSHTML (IE-based). Default false. Values true/false/exclusive -->
|
||||
<!-- <UseWebView2></UseWebView2> -->
|
||||
<!-- Maximum Direct3D API level to use. Set to '9' to ensure Direct3D 9 is used, or 0 to disable Direct3D. -->
|
||||
<!-- <maxD3D></maxD3D> -->
|
||||
<!-- </windows> -->
|
||||
|
||||
<!-- List of AIR Native Extensions to be loaded by the application -->
|
||||
<!-- Optional attribute 'delayLoad' can be used to delay the loading of the
|
||||
extension itself until it's requested via AS3 (ExtensionContext.loadExtension) -->
|
||||
<!-- <extensions>
|
||||
<extensionID>extension.id.to.load</extensionID>
|
||||
<extensionID delayLoad="true">extension.to.load.on.demand</extensionID>
|
||||
</extensions> -->
|
||||
|
||||
</application>
|
||||
@@ -1,55 +0,0 @@
|
||||
{
|
||||
"config": "air",
|
||||
"compilerOptions": {
|
||||
"source-path": [
|
||||
"src"
|
||||
],
|
||||
"output": "bin/tanki2.swf",
|
||||
"default-background-color": "#333333",
|
||||
"default-frame-rate": 100,
|
||||
"default-size": {
|
||||
"width": 1024,
|
||||
"height": 768
|
||||
},
|
||||
"swf-version": 13
|
||||
},
|
||||
"airOptions": {
|
||||
"output": "bin/TanksTestingTool.air",
|
||||
"signingOptions": {
|
||||
"storetype": "pkcs12",
|
||||
"keystore": "certificate.p12"
|
||||
},
|
||||
"windows": {
|
||||
"target": "bundle",
|
||||
"output": "bin/windows"
|
||||
},
|
||||
"files": [
|
||||
{
|
||||
"file": "resources/data",
|
||||
"path": "data"
|
||||
},
|
||||
{
|
||||
"file": "resources/cfg.dxt1.xml",
|
||||
"path": "cfg.dxt1.xml"
|
||||
},
|
||||
{
|
||||
"file": "resources/icons/icon32.png",
|
||||
"path": "icons/icon32.png"
|
||||
},
|
||||
{
|
||||
"file": "resources/icons/icon60.png",
|
||||
"path": "icons/icon60.png"
|
||||
},
|
||||
{
|
||||
"file": "resources/icons/icon128.png",
|
||||
"path": "icons/icon128.png"
|
||||
},
|
||||
{
|
||||
"file": "resources/icons/icon256.png",
|
||||
"path": "icons/icon256.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
"mainClass": "TanksTestingTool",
|
||||
"application": "TanksTestingTool-app.xml"
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
{
|
||||
"config": "airmobile",
|
||||
"compilerOptions": {
|
||||
"source-path": [
|
||||
"src"
|
||||
],
|
||||
"output": "bin/tanki2.swf",
|
||||
"default-background-color": "#333333",
|
||||
"default-frame-rate": 60,
|
||||
"swf-version": 13
|
||||
},
|
||||
"airOptions": {
|
||||
"android": {
|
||||
"output": "bin/TanksTestingTool.apk",
|
||||
"signingOptions": {
|
||||
"storetype": "pkcs12",
|
||||
"keystore": "certificate.p12"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
{
|
||||
"file": "resources/data",
|
||||
"path": "data"
|
||||
},
|
||||
{
|
||||
"file": "resources/cfg.dxt1.xml",
|
||||
"path": "cfg.dxt1.xml"
|
||||
},
|
||||
{
|
||||
"file": "resources/icons/icon32.png",
|
||||
"path": "icons/icon32.png"
|
||||
},
|
||||
{
|
||||
"file": "resources/icons/icon60.png",
|
||||
"path": "icons/icon60.png"
|
||||
},
|
||||
{
|
||||
"file": "resources/icons/icon128.png",
|
||||
"path": "icons/icon128.png"
|
||||
},
|
||||
{
|
||||
"file": "resources/icons/icon256.png",
|
||||
"path": "icons/icon256.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
"mainClass": "TanksTestingTool",
|
||||
"application": "TanksTestingTool-app.xml"
|
||||
}
|
||||
162
client/cfg.dxt1.xml
Normal file
@@ -0,0 +1,162 @@
|
||||
<config>
|
||||
<map url="data/dxt1/maps/crash-a3d.tara" skybox="Skybox Crash"/>
|
||||
|
||||
<kernelOptions>
|
||||
<!--<option name="fakeMap">true</option>-->
|
||||
<!--<option name="fakelight">true</option>-->
|
||||
</kernelOptions>
|
||||
|
||||
<!-- Fog
|
||||
<console-commands>
|
||||
fog_mode 1
|
||||
fog_near 10
|
||||
fog_far 25000
|
||||
fog_density 0.8
|
||||
fog_color 0xFFFFFF
|
||||
horizon_size 30000
|
||||
horizon_offset -5000
|
||||
</console-commands>
|
||||
-->
|
||||
<!-- atmosphere tint -->
|
||||
<console-commands>
|
||||
fog_mode 1
|
||||
fog_color 0x80c0ff
|
||||
fog_near 1260
|
||||
fog_far 30000
|
||||
fog_density 0.3
|
||||
horizon_size 30000
|
||||
horizon_offset -5000
|
||||
</console-commands>
|
||||
|
||||
<user>
|
||||
<xyz>-3822 1640 1000</xyz>
|
||||
<rotation>1 -0 -90</rotation>
|
||||
<hull>Wasp M2</hull>
|
||||
<turret>Smoky M2</turret>
|
||||
<coloring>0</coloring>
|
||||
</user>
|
||||
<tanks>
|
||||
<tank>
|
||||
<xyz>1430 -11005 2000</xyz>
|
||||
<rotation>-4 3 18</rotation>
|
||||
<hull>Viking M1</hull>
|
||||
<turret>Firebird M1</turret>
|
||||
<coloring>1</coloring>
|
||||
</tank>
|
||||
<tank>
|
||||
<xyz>-808 -2571 1000</xyz>
|
||||
<rotation>2 10 60</rotation>
|
||||
<hull>Mamont M3</hull>
|
||||
<turret>Thunder M3</turret>
|
||||
<coloring>2</coloring>
|
||||
</tank>
|
||||
</tanks>
|
||||
<effects>
|
||||
<fire scale="12" position="-6369 4054 1460"></fire>
|
||||
<fire scale="30" position="-9171 4214 3747"></fire>
|
||||
<fire scale="10" position="-5573 5322 2256"></fire>
|
||||
</effects>
|
||||
<colorings baseUrl="data/tanks/colormaps">
|
||||
<image file="flora.jpg"/>
|
||||
<image file="swamp.jpg"/>
|
||||
<image file="winter.jpg"/>
|
||||
</colorings>
|
||||
|
||||
<sounds baseUrl="data/sound/">
|
||||
<sound id="idle" file="engineidle.mp3"></sound>
|
||||
<sound id="smoky/shot" file="smoky/shot.mp3"></sound>
|
||||
<sound id="thunder/shot" file="thunder/shot.mp3"></sound>
|
||||
<sound id="flamethrower/shot" file="flamethrower/shot.mp3"></sound>
|
||||
<sound id="turret" file="turret.mp3"></sound>
|
||||
<sound id="startmoving" file="startmoving.mp3"></sound>
|
||||
<sound id="endmoving" file="endmoving.mp3"></sound>
|
||||
<sound id="move" file="move.mp3"></sound>
|
||||
</sounds>
|
||||
|
||||
<blobs>
|
||||
<blobs-category id="skybox">
|
||||
<blobs-group id="Skybox Crash" baseUrl="data/dxt1/skyboxes/crash">
|
||||
<blob id="left" file="left.png"/>
|
||||
<blob id="front" file="front.png"/>
|
||||
<blob id="right" file="right.png"/>
|
||||
<blob id="back" file="back.png"/>
|
||||
<blob id="top" file="top.png"/>
|
||||
<blob id="bottom" file="bottom.png"/>
|
||||
</blobs-group>
|
||||
</blobs-category>
|
||||
</blobs>
|
||||
|
||||
<textures baseUrl="data/dxt1/images/">
|
||||
<texture id="smoky/diffuse" url="smoky/smoky_diffuse.atf"/>
|
||||
<texture id="smoky/opacity" url="smoky/smoky_opacity.atf"/>
|
||||
|
||||
<texture id="firebird/diffuse" url="firebird/diffuse.atf"/>
|
||||
<texture id="firebird/opacity" url="firebird/opacity.atf"/>
|
||||
|
||||
<texture id="fire/diffuse" url="fire/fire_diffuse.atf"/>
|
||||
<texture id="fire/opacity" url="fire/fire_opacity.atf"/>
|
||||
|
||||
<texture id="left_01" url="reflection/left_01.jpg"/>
|
||||
<texture id="right_01" url="reflection/right_01.jpg"/>
|
||||
<texture id="back_01" url="reflection/back_01.jpg"/>
|
||||
<texture id="front_01" url="reflection/front_01.jpg"/>
|
||||
<texture id="top_01" url="reflection/top_01.jpg"/>
|
||||
<texture id="bottom_01" url="reflection/bottom_01.jpg"/>
|
||||
</textures>
|
||||
|
||||
<tankParts baseUrl="data/dxt1/tanks">
|
||||
<hull baseUrl="hulls/wasp/m2">
|
||||
<id>Wasp M2</id>
|
||||
<modelFile type="dae">main.dae</modelFile>
|
||||
<texture id="diffuse.atf">diffuse.atf</texture>
|
||||
<texture id="normalmap.atf">normalmap.atf</texture>
|
||||
<texture id="surface.atf">surface.atf</texture>
|
||||
<texture id="tracks_diffuse.atf">tracks_diffuse.atf</texture>
|
||||
<texture id="tracks_normalmap.atf">tracks_normalmap.atf</texture>
|
||||
<texture id="shadow.atf">shadow.atf</texture>
|
||||
</hull>
|
||||
<hull baseUrl="hulls/viking/m1">
|
||||
<id>Viking M1</id>
|
||||
<modelFile type="dae">main.dae</modelFile>
|
||||
<texture id="diffuse.atf">diffuse.atf</texture>
|
||||
<texture id="normalmap.atf">normalmap.atf</texture>
|
||||
<texture id="surface.atf">surface.atf</texture>
|
||||
<texture id="tracks_diffuse.atf">tracks_diffuse.atf</texture>
|
||||
<texture id="tracks_normalmap.atf">tracks_normalmap.atf</texture>
|
||||
<texture id="shadow.atf">shadow.atf</texture>
|
||||
</hull>
|
||||
<hull baseUrl="hulls/mamont/m3">
|
||||
<id>Mamont M3</id>
|
||||
<modelFile type="dae">main.dae</modelFile>
|
||||
<texture id="diffuse.atf">diffuse.atf</texture>
|
||||
<texture id="normalmap.atf">normalmap.atf</texture>
|
||||
<texture id="surface.atf">surface.atf</texture>
|
||||
<texture id="tracks_diffuse.atf">tracks_diffuse.atf</texture>
|
||||
<texture id="tracks_normalmap.atf">tracks_normalmap.atf</texture>
|
||||
<texture id="shadow.atf">shadow.atf</texture>
|
||||
</hull>
|
||||
|
||||
<turret baseUrl="turrets/smoky/m2">
|
||||
<id>Smoky M2</id>
|
||||
<modelFile type="a3d">turret.a3d</modelFile>
|
||||
<texture id="diffuse.atf">diffuse.atf</texture>
|
||||
<texture id="normalmap.atf">normalmap.atf</texture>
|
||||
<texture id="surface.atf">surface.atf</texture>
|
||||
</turret>
|
||||
<turret baseUrl="turrets/thunder/m3">
|
||||
<id>Thunder M3</id>
|
||||
<modelFile type="a3d">turret.a3d</modelFile>
|
||||
<texture id="diffuse.atf">diffuse.atf</texture>
|
||||
<texture id="normalmap.atf">normalmap.atf</texture>
|
||||
<texture id="surface.atf">surface.atf</texture>
|
||||
</turret>
|
||||
<turret baseUrl="turrets/firebird/m1">
|
||||
<id>Firebird M1</id>
|
||||
<modelFile type="a3d">turret.a3d</modelFile>
|
||||
<texture id="diffuse.atf">diffuse.atf</texture>
|
||||
<texture id="normalmap.atf">normalmap.atf</texture>
|
||||
<texture id="surface.atf">surface.atf</texture>
|
||||
</turret>
|
||||
</tankParts>
|
||||
|
||||
</config>
|
||||
BIN
client/data/dxt1/images/fire/fire_diffuse.atf
Normal file
BIN
client/data/dxt1/images/fire/fire_opacity.atf
Normal file
BIN
client/data/dxt1/images/firebird/diffuse.atf
Normal file
BIN
client/data/dxt1/images/firebird/opacity.atf
Normal file
BIN
client/data/dxt1/images/reflection/back_01.jpg
Normal file
|
After Width: | Height: | Size: 165 KiB |
BIN
client/data/dxt1/images/reflection/bottom_01.jpg
Normal file
|
After Width: | Height: | Size: 171 KiB |
BIN
client/data/dxt1/images/reflection/front_01.jpg
Normal file
|
After Width: | Height: | Size: 210 KiB |
BIN
client/data/dxt1/images/reflection/left_01.jpg
Normal file
|
After Width: | Height: | Size: 150 KiB |
BIN
client/data/dxt1/images/reflection/right_01.jpg
Normal file
|
After Width: | Height: | Size: 237 KiB |
BIN
client/data/dxt1/images/reflection/top_01.jpg
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
client/data/dxt1/images/smoky/smoky_diffuse.atf
Normal file
BIN
client/data/dxt1/images/smoky/smoky_opacity.atf
Normal file
BIN
client/data/dxt1/maps/crash-a3d.tara
Normal file
BIN
client/data/dxt1/skyboxes/crash/back.atf
Normal file
BIN
client/data/dxt1/skyboxes/crash/back.png
Normal file
|
After Width: | Height: | Size: 799 KiB |
BIN
client/data/dxt1/skyboxes/crash/bottom.atf
Normal file
BIN
client/data/dxt1/skyboxes/crash/bottom.png
Normal file
|
After Width: | Height: | Size: 216 KiB |
BIN
client/data/dxt1/skyboxes/crash/front.atf
Normal file
BIN
client/data/dxt1/skyboxes/crash/front.png
Normal file
|
After Width: | Height: | Size: 812 KiB |
BIN
client/data/dxt1/skyboxes/crash/left.atf
Normal file
BIN
client/data/dxt1/skyboxes/crash/left.png
Normal file
|
After Width: | Height: | Size: 818 KiB |
BIN
client/data/dxt1/skyboxes/crash/right.atf
Normal file
BIN
client/data/dxt1/skyboxes/crash/right.png
Normal file
|
After Width: | Height: | Size: 813 KiB |
BIN
client/data/dxt1/skyboxes/crash/top.atf
Normal file
BIN
client/data/dxt1/skyboxes/crash/top.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
client/data/dxt1/tanks/hulls/mamont/m3/diffuse.atf
Normal file
3546
client/data/dxt1/tanks/hulls/mamont/m3/main.dae
Normal file
BIN
client/data/dxt1/tanks/hulls/mamont/m3/normalmap.atf
Normal file
BIN
client/data/dxt1/tanks/hulls/mamont/m3/shadow.atf
Normal file
BIN
client/data/dxt1/tanks/hulls/mamont/m3/surface.atf
Normal file
BIN
client/data/dxt1/tanks/hulls/mamont/m3/tracks_diffuse.atf
Normal file
BIN
client/data/dxt1/tanks/hulls/mamont/m3/tracks_normalmap.atf
Normal file
BIN
client/data/dxt1/tanks/hulls/viking/m1/diffuse.atf
Normal file
5475
client/data/dxt1/tanks/hulls/viking/m1/main.dae
Normal file
BIN
client/data/dxt1/tanks/hulls/viking/m1/normalmap.atf
Normal file
BIN
client/data/dxt1/tanks/hulls/viking/m1/shadow.atf
Normal file
BIN
client/data/dxt1/tanks/hulls/viking/m1/surface.atf
Normal file
BIN
client/data/dxt1/tanks/hulls/viking/m1/tracks_diffuse.atf
Normal file
BIN
client/data/dxt1/tanks/hulls/viking/m1/tracks_normalmap.atf
Normal file
BIN
client/data/dxt1/tanks/hulls/wasp/m2/diffuse.atf
Normal file
3074
client/data/dxt1/tanks/hulls/wasp/m2/main.dae
Normal file
BIN
client/data/dxt1/tanks/hulls/wasp/m2/normalmap.atf
Normal file
BIN
client/data/dxt1/tanks/hulls/wasp/m2/shadow.atf
Normal file
BIN
client/data/dxt1/tanks/hulls/wasp/m2/surface.atf
Normal file
BIN
client/data/dxt1/tanks/hulls/wasp/m2/tracks_diffuse.atf
Normal file
BIN
client/data/dxt1/tanks/hulls/wasp/m2/tracks_normalmap.atf
Normal file
BIN
client/data/dxt1/tanks/turrets/firebird/m1/diffuse.atf
Normal file
BIN
client/data/dxt1/tanks/turrets/firebird/m1/normalmap.atf
Normal file
BIN
client/data/dxt1/tanks/turrets/firebird/m1/surface.atf
Normal file
BIN
client/data/dxt1/tanks/turrets/firebird/m1/turret.a3d
Normal file
BIN
client/data/dxt1/tanks/turrets/smoky/m2/diffuse.atf
Normal file
BIN
client/data/dxt1/tanks/turrets/smoky/m2/normalmap.atf
Normal file
BIN
client/data/dxt1/tanks/turrets/smoky/m2/surface.atf
Normal file
BIN
client/data/dxt1/tanks/turrets/smoky/m2/turret.a3d
Normal file
BIN
client/data/dxt1/tanks/turrets/thunder/m3/diffuse.atf
Normal file
BIN
client/data/dxt1/tanks/turrets/thunder/m3/normalmap.atf
Normal file
BIN
client/data/dxt1/tanks/turrets/thunder/m3/surface.atf
Normal file
BIN
client/data/dxt1/tanks/turrets/thunder/m3/turret.a3d
Normal file
BIN
client/data/sound/endmoving.mp3
Normal file
BIN
client/data/sound/engineidle.mp3
Normal file
BIN
client/data/sound/flamethrower/shot.mp3
Normal file
BIN
client/data/sound/move.mp3
Normal file
BIN
client/data/sound/smoky/shot.mp3
Normal file
BIN
client/data/sound/startmoving.mp3
Normal file
BIN
client/data/sound/thunder/shot.mp3
Normal file
BIN
client/data/sound/turret.mp3
Normal file
BIN
client/data/tanks/colormaps/flora.jpg
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
client/data/tanks/colormaps/glina.jpg
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
client/data/tanks/colormaps/swamp.jpg
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
client/data/tanks/colormaps/winter.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
client/tanki2.swf
Normal file
BIN
images/demo1.png
|
Before Width: | Height: | Size: 3.4 MiB |
44
index.html
Normal file
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Tanki Online 2.0</title>
|
||||
|
||||
<style>
|
||||
html, body, ruffle-player, #playerContainer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
background-color: black;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="playerContainer"></div>
|
||||
|
||||
<!-- Ruffle -->
|
||||
<script src="https://unpkg.com/@ruffle-rs/ruffle"></script>
|
||||
<script>
|
||||
window.onload = () => {
|
||||
console.log("Init");
|
||||
|
||||
window.RufflePlayer.config = {
|
||||
"autoplay" : "on",
|
||||
"splashScreen": false,
|
||||
"unmuteOverlay":"hidden",
|
||||
"base": "/client/",
|
||||
"logLevel": "info",
|
||||
"contextMenu": "off",
|
||||
"maxExecutionDuration": 360
|
||||
};
|
||||
const ruffle = window.RufflePlayer.newest();
|
||||
const player = ruffle.createPlayer();
|
||||
const playerContainer = document.getElementById("playerContainer");
|
||||
playerContainer.appendChild(player);
|
||||
player.load("client/tanki2.swf");
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
138
src/Preloader.as
@@ -1,138 +0,0 @@
|
||||
package
|
||||
{
|
||||
import alternativa.engine3d.resources.BitmapTextureResource;
|
||||
import alternativa.engine3d.resources.ExternalTextureResource;
|
||||
import alternativa.engine3d.resources.TextureResource;
|
||||
import flash.display.Bitmap;
|
||||
import flash.display.BitmapData;
|
||||
import flash.display.Shape;
|
||||
import flash.display.Sprite;
|
||||
import flash.display3D.Context3D;
|
||||
import flash.events.Event;
|
||||
|
||||
public class Preloader extends Sprite
|
||||
{
|
||||
private static const EmbedPreloader:Class = Preloader_EmbedPreloader;
|
||||
|
||||
private static const EmbedPreloaderA:Class = Preloader_EmbedPreloaderA;
|
||||
|
||||
private static const EmbedProgress:Class = Preloader_EmbedProgress;
|
||||
|
||||
private var area:Shape = new Shape();
|
||||
|
||||
private var name_1q:Bitmap = new EmbedPreloader();
|
||||
|
||||
private var name_Za:Bitmap = new EmbedPreloaderA();
|
||||
|
||||
private var progress:Bitmap = new EmbedProgress();
|
||||
|
||||
private var context:Context3D;
|
||||
|
||||
public var maps:Vector.<ExternalTextureResource>;
|
||||
|
||||
private var name_dH:int;
|
||||
|
||||
private var counter:int;
|
||||
|
||||
private var baseURL:String;
|
||||
|
||||
private var name_m:TextureResource = new BitmapTextureResource(new BitmapData(1,1,false,8355711));
|
||||
|
||||
private var name_UB:Number = 0.09803921568627451;
|
||||
|
||||
public function Preloader()
|
||||
{
|
||||
super();
|
||||
addChild(this.area);
|
||||
this.area.alpha = 1;
|
||||
this.progress.alpha = 1;
|
||||
this.name_1q.alpha = 1;
|
||||
addChild(this.name_1q);
|
||||
addChild(this.name_Za);
|
||||
addChild(this.progress);
|
||||
addEventListener(Event.ADDED_TO_STAGE,this.onAddToStage);
|
||||
addEventListener(Event.REMOVED_FROM_STAGE,this.onRemoveFromStage);
|
||||
this.progress.scaleX = 0.025;
|
||||
}
|
||||
|
||||
public function setProgress(param1:Number) : void
|
||||
{
|
||||
this.progress.scaleX = param1;
|
||||
if(this.progress.scaleX >= 1)
|
||||
{
|
||||
this.onComplete();
|
||||
}
|
||||
}
|
||||
|
||||
private function onComplete() : void
|
||||
{
|
||||
addEventListener(Event.ENTER_FRAME,this.onEnterFrame);
|
||||
}
|
||||
|
||||
public function addProgress(param1:Number) : void
|
||||
{
|
||||
this.progress.scaleX += param1;
|
||||
if(this.progress.scaleX > 0.5)
|
||||
{
|
||||
addEventListener(Event.ENTER_FRAME,this.onEnterFrameSwitch);
|
||||
}
|
||||
if(this.progress.scaleX >= 1)
|
||||
{
|
||||
this.onComplete();
|
||||
}
|
||||
}
|
||||
|
||||
private function onAddToStage(param1:Event) : void
|
||||
{
|
||||
stage.addEventListener(Event.RESIZE,this.onResize);
|
||||
this.onResize();
|
||||
}
|
||||
|
||||
private function onRemoveFromStage(param1:Event) : void
|
||||
{
|
||||
stage.removeEventListener(Event.RESIZE,this.onResize);
|
||||
}
|
||||
|
||||
private function onEnterFrame(param1:Event) : void
|
||||
{
|
||||
this.area.alpha -= this.name_UB;
|
||||
this.name_1q.alpha -= this.name_UB;
|
||||
this.progress.alpha -= this.name_UB;
|
||||
if(this.area.alpha <= 0)
|
||||
{
|
||||
removeEventListener(Event.ENTER_FRAME,this.onEnterFrame);
|
||||
if(parent != null)
|
||||
{
|
||||
parent.removeChild(this);
|
||||
dispatchEvent(new Event(Event.COMPLETE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function onEnterFrameSwitch(param1:Event) : void
|
||||
{
|
||||
this.name_Za.alpha -= this.name_UB * 1.5;
|
||||
if(this.name_Za.alpha <= 0)
|
||||
{
|
||||
removeEventListener(Event.ENTER_FRAME,this.onEnterFrameSwitch);
|
||||
}
|
||||
}
|
||||
|
||||
private function onResize(param1:Event = null) : void
|
||||
{
|
||||
this.area.graphics.clear();
|
||||
this.name_1q.x = Math.round(stage.stageWidth / 2 - this.name_1q.width / 2);
|
||||
this.name_1q.y = Math.round(stage.stageHeight / 2 - this.name_1q.height / 2) - 30;
|
||||
this.name_Za.x = this.name_1q.x;
|
||||
this.name_Za.y = this.name_1q.y;
|
||||
this.progress.x = this.name_1q.x + 2;
|
||||
this.progress.y = this.name_1q.y + 221;
|
||||
this.area.graphics.beginFill(0);
|
||||
this.area.graphics.drawRect(0,0,this.name_1q.x,stage.stageHeight);
|
||||
this.area.graphics.drawRect(this.name_1q.x,0,this.name_1q.width,this.name_1q.y);
|
||||
this.area.graphics.drawRect(this.name_1q.x + this.name_1q.width,0,stage.stageWidth - this.name_1q.width - this.name_1q.x,stage.stageHeight);
|
||||
this.area.graphics.drawRect(this.name_1q.x,this.name_1q.y + this.name_1q.height,this.name_1q.width,stage.stageHeight - this.name_1q.height - this.name_1q.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/16_Preloader_EmbedPreloader.png")]
|
||||
public class Preloader_EmbedPreloader extends BitmapAsset
|
||||
{
|
||||
public function Preloader_EmbedPreloader()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/13_Preloader_EmbedPreloaderA.png")]
|
||||
public class Preloader_EmbedPreloaderA extends BitmapAsset
|
||||
{
|
||||
public function Preloader_EmbedPreloaderA()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package
|
||||
{
|
||||
import mx.core.BitmapAsset;
|
||||
|
||||
[ExcludeClass]
|
||||
[Embed(source="/_assets/14_Preloader_EmbedProgress.png")]
|
||||
public class Preloader_EmbedProgress extends BitmapAsset
|
||||
{
|
||||
public function Preloader_EmbedProgress()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,298 +0,0 @@
|
||||
package
|
||||
{
|
||||
import alternativa.ClientConfigurator;
|
||||
import alternativa.engine3d.materials.A3DUtils;
|
||||
import alternativa.engine3d.materials.FogMode;
|
||||
import alternativa.engine3d.materials.TextureFormat;
|
||||
import alternativa.osgi.OSGi;
|
||||
import alternativa.osgi.service.console.IConsole;
|
||||
import alternativa.osgi.service.console.variables.ConsoleVar;
|
||||
import alternativa.osgi.service.console.variables.ConsoleVarFloat;
|
||||
import alternativa.osgi.service.console.variables.ConsoleVarInt;
|
||||
import alternativa.osgi.service.console.variables.ConsoleVarString;
|
||||
import alternativa.protocol.osgi.ProtocolActivator;
|
||||
import alternativa.startup.ConnectionParameters;
|
||||
import alternativa.startup.LibraryInfo;
|
||||
import alternativa.tanks.InitBattleTask;
|
||||
import alternativa.tanks.TankTestTask;
|
||||
import alternativa.tanks.config.Config;
|
||||
import alternativa.tanks.game.GameKernel;
|
||||
import alternativa.tanks.game.camera.AxisIndicator;
|
||||
import alternativa.tanks.game.camera.FreeCameraController;
|
||||
import alternativa.tanks.game.entities.map.MapMaterial;
|
||||
import alternativa.tanks.game.entities.map.VisibleLightMaterial;
|
||||
import alternativa.tanks.game.entities.tank.graphics.materials.GiShadowMaterial;
|
||||
import alternativa.tanks.game.entities.tank.graphics.materials.TankMaterial;
|
||||
import alternativa.tanks.game.entities.tank.graphics.materials.TankMaterial2;
|
||||
import alternativa.tanks.game.entities.tank.graphics.materials.TracksMaterial2;
|
||||
import alternativa.tanks.game.entities.tank.graphics.materials.TreesMaterial;
|
||||
import alternativa.tanks.game.subsystems.rendersystem.RenderSystem;
|
||||
import alternativa.utils.Properties;
|
||||
import flash.display.DisplayObject;
|
||||
import flash.display.Sprite;
|
||||
import flash.display.Stage3D;
|
||||
import flash.display.StageAlign;
|
||||
import flash.display.StageDisplayState;
|
||||
import flash.display.StageQuality;
|
||||
import flash.display.StageScaleMode;
|
||||
import flash.events.Event;
|
||||
import flash.events.FullScreenEvent;
|
||||
import flash.events.KeyboardEvent;
|
||||
import flash.ui.Keyboard;
|
||||
import platform.client.a3d.osgi.Activator;
|
||||
import platform.clients.fp10.libraries.alternativaprotocol.Activator;
|
||||
import tankshudDemo.TanksHudDemo;
|
||||
|
||||
[SWF(backgroundColor="#333333",frameRate="100",width="1024",height="768")]
|
||||
public class TanksTestingTool extends Sprite
|
||||
{
|
||||
public static var testTask:TankTestTask;
|
||||
|
||||
private var config:Config;
|
||||
|
||||
private var gameKernel:GameKernel;
|
||||
|
||||
private var name_6s:TanksHudDemo;
|
||||
|
||||
private var stage3D:Stage3D;
|
||||
|
||||
private var name_nZ:ClientConfigurator;
|
||||
|
||||
private var preloader:Preloader = new Preloader();
|
||||
|
||||
public function TanksTestingTool()
|
||||
{
|
||||
super();
|
||||
mouseEnabled = false;
|
||||
mouseChildren = false;
|
||||
this.initStage();
|
||||
this.initClient();
|
||||
this.initConsole();
|
||||
this.initOptionsSupport();
|
||||
VisibleLightMaterial.fadeRadius = 7000;
|
||||
VisibleLightMaterial.spotAngle = 140 * Math.PI / 180;
|
||||
VisibleLightMaterial.fallofAngle = 170 * Math.PI / 180;
|
||||
this.stage3D = stage.stage3Ds[0];
|
||||
this.stage3D.addEventListener(Event.CONTEXT3D_CREATE,this.onContextCreate);
|
||||
this.stage3D.requestContext3D();
|
||||
}
|
||||
|
||||
private function onContextCreate(param1:Event) : void
|
||||
{
|
||||
switch(A3DUtils.getSupportedTextureFormat(this.stage3D.context3D))
|
||||
{
|
||||
case TextureFormat.DXT1:
|
||||
this.loadConfig("cfg.dxt1.xml");
|
||||
break;
|
||||
case TextureFormat.ETC1:
|
||||
this.loadConfig("cfg.etc1.xml");
|
||||
break;
|
||||
case TextureFormat.PVRTC:
|
||||
this.loadConfig("cfg.pvrtc.xml");
|
||||
}
|
||||
}
|
||||
|
||||
private function initOptionsSupport() : void
|
||||
{
|
||||
new ConsoleVarInt("fog_mode",0,0,3,this.onFogSettingsChange);
|
||||
new ConsoleVarFloat("fog_near",0,0,1000000,this.onFogSettingsChange);
|
||||
new ConsoleVarFloat("fog_far",5000,0,1000000,this.onFogSettingsChange);
|
||||
new ConsoleVarFloat("fog_density",1,0,1,this.onFogSettingsChange);
|
||||
new ConsoleVarFloat("horizon_offset",0,-1000000,1000000,this.onFogSettingsChange);
|
||||
new ConsoleVarFloat("horizon_size",5000,0,1000000,this.onFogSettingsChange);
|
||||
new ConsoleVarString("fog_color","0x0",this.onFogSettingsChange);
|
||||
var _loc1_:IConsole = IConsole(OSGi.getInstance().getService(IConsole));
|
||||
_loc1_.setCommandHandler("fog_texture",this.onFogTextureChange);
|
||||
new ConsoleVarFloat("beam_distance",7000,0,1000000,this.onLightSettingsChange);
|
||||
new ConsoleVarFloat("beam_spot",140,0,180,this.onLightSettingsChange);
|
||||
new ConsoleVarFloat("beam_fallof",170,0,180,this.onLightSettingsChange);
|
||||
new ConsoleVarFloat("beam_fallof",170,0,180,this.onLightSettingsChange);
|
||||
new ConsoleVarFloat("camera_smoothing",20,0,200,this.onControllerSettingsChange);
|
||||
MapMaterial.fogMode = MapMaterial.DISABLED;
|
||||
TreesMaterial.fogMode = TreesMaterial.DISABLED;
|
||||
TankMaterial.fogMode = TankMaterial.DISABLED;
|
||||
TankMaterial2.fogMode = TankMaterial.DISABLED;
|
||||
GiShadowMaterial.fogMode = FogMode.DISABLED;
|
||||
TracksMaterial2.fogMode = FogMode.DISABLED;
|
||||
}
|
||||
|
||||
private function onControllerSettingsChange(param1:ConsoleVarFloat) : void
|
||||
{
|
||||
FreeCameraController.smoothing = param1.value;
|
||||
}
|
||||
|
||||
private function onLightSettingsChange(param1:ConsoleVar) : void
|
||||
{
|
||||
switch(param1.getName())
|
||||
{
|
||||
case "beam_distance":
|
||||
VisibleLightMaterial.fadeRadius = ConsoleVarFloat(param1).value;
|
||||
break;
|
||||
case "beam_spot":
|
||||
VisibleLightMaterial.spotAngle = ConsoleVarFloat(param1).value * Math.PI / 180;
|
||||
break;
|
||||
case "beam_fallof":
|
||||
VisibleLightMaterial.fallofAngle = ConsoleVarFloat(param1).value * Math.PI / 180;
|
||||
}
|
||||
}
|
||||
|
||||
private function onFogSettingsChange(param1:ConsoleVar) : void
|
||||
{
|
||||
var _loc3_:Number = NaN;
|
||||
var _loc4_:Number = NaN;
|
||||
var _loc5_:Number = NaN;
|
||||
var _loc6_:RenderSystem = this.gameKernel.getRenderSystem();
|
||||
switch(param1.getName())
|
||||
{
|
||||
case "fog_mode":
|
||||
_loc6_.setFogMode(ConsoleVarInt(param1).value);
|
||||
break;
|
||||
case "fog_near":
|
||||
_loc6_.setFogNear(ConsoleVarFloat(param1).value);
|
||||
break;
|
||||
case "fog_far":
|
||||
_loc6_.setFogFar(ConsoleVarFloat(param1).value);
|
||||
break;
|
||||
case "fog_density":
|
||||
_loc6_.setMaxFogDensity(ConsoleVarFloat(param1).value);
|
||||
break;
|
||||
case "horizon_size":
|
||||
_loc6_.setFogHorizonSize(ConsoleVarFloat(param1).value);
|
||||
break;
|
||||
case "horizon_offset":
|
||||
_loc6_.setFogHorizonOffset(ConsoleVarFloat(param1).value);
|
||||
break;
|
||||
case "fog_color":
|
||||
_loc6_.setFogColor(parseInt(ConsoleVarString(param1).value,16));
|
||||
}
|
||||
}
|
||||
|
||||
private function onFogTextureChange(param1:IConsole, param2:Array) : void
|
||||
{
|
||||
this.gameKernel.getRenderSystem().setFogTextureParams(param2.join(" "));
|
||||
}
|
||||
|
||||
private function initStage() : void
|
||||
{
|
||||
stage.scaleMode = StageScaleMode.NO_SCALE;
|
||||
stage.align = StageAlign.TOP_LEFT;
|
||||
stage.quality = StageQuality.LOW;
|
||||
}
|
||||
|
||||
private function initClient() : void
|
||||
{
|
||||
new OSGi();
|
||||
this.name_nZ = new ClientConfigurator();
|
||||
this.name_nZ.start(this,new Properties(loaderInfo.parameters),new Vector.<LibraryInfo>(),new ConnectionParameters(null,null,null),new Vector.<String>());
|
||||
new ProtocolActivator().start(OSGi.getInstance());
|
||||
new platform.clients.fp10.libraries.alternativaprotocol.Activator().start(OSGi.getInstance());
|
||||
new platform.client.a3d.osgi.Activator().start(OSGi.getInstance());
|
||||
}
|
||||
|
||||
private function initConsole() : void
|
||||
{
|
||||
var _loc1_:IConsole = IConsole(OSGi.getInstance().getService(IConsole));
|
||||
_loc1_.width = 100;
|
||||
_loc1_.alpha = 0.8;
|
||||
_loc1_.height = 30;
|
||||
}
|
||||
|
||||
private function loadConfig(param1:String) : void
|
||||
{
|
||||
addChild(this.preloader);
|
||||
this.config = new Config();
|
||||
this.config.addEventListener(Event.COMPLETE,this.onConfigLoadingComplete);
|
||||
this.config.load(param1,this.preloader);
|
||||
}
|
||||
|
||||
private function onConfigLoadingComplete(param1:Event) : void
|
||||
{
|
||||
this.initGame();
|
||||
this.initHUD();
|
||||
}
|
||||
|
||||
private function initHUD() : void
|
||||
{
|
||||
this.name_6s = new TanksHudDemo();
|
||||
stage.addChild(this.name_6s);
|
||||
this.name_6s.mouseChildren = true;
|
||||
this.name_6s.mouseEnabled = true;
|
||||
this.name_6s.addEventListener("CLICK_FULL_SCREEN_BUTTON",this.onClickFullScreenButton);
|
||||
this.name_6s.addEventListener("CLICK_NEXT_TANK_BUTTON",this.onClickNextTankButton);
|
||||
stage.addChild(this.preloader);
|
||||
stage.addEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDown);
|
||||
this.gameKernel.getRenderSystem().getCamera().diagramVerticalMargin = 85;
|
||||
this.gameKernel.getRenderSystem().getCamera().diagramHorizontalMargin = 12;
|
||||
this.onResize(null);
|
||||
}
|
||||
|
||||
private function onKeyDown(param1:KeyboardEvent) : void
|
||||
{
|
||||
var _loc2_:DisplayObject = null;
|
||||
if(param1.keyCode == Keyboard.G)
|
||||
{
|
||||
_loc2_ = this.gameKernel.getRenderSystem().getCameraDiagram();
|
||||
if(_loc2_.parent != null)
|
||||
{
|
||||
_loc2_.parent.removeChild(_loc2_);
|
||||
}
|
||||
else
|
||||
{
|
||||
stage.addChild(_loc2_);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function onClickFullScreenButton(param1:Event) : void
|
||||
{
|
||||
stage.displayState = this.name_6s.isFullScreen ? StageDisplayState.FULL_SCREEN : StageDisplayState.NORMAL;
|
||||
stage.addEventListener(FullScreenEvent.FULL_SCREEN,this.onFullScreenChange);
|
||||
}
|
||||
|
||||
private function onFullScreenChange(param1:Event) : void
|
||||
{
|
||||
stage.removeEventListener(FullScreenEvent.FULL_SCREEN,this.onFullScreenChange);
|
||||
this.name_6s.isFullScreen = stage.displayState != StageDisplayState.NORMAL;
|
||||
}
|
||||
|
||||
private function onClickNextTankButton(param1:Event) : void
|
||||
{
|
||||
if(testTask != null)
|
||||
{
|
||||
testTask.selectNextTank();
|
||||
}
|
||||
}
|
||||
|
||||
private function initGame() : void
|
||||
{
|
||||
this.gameKernel = new GameKernel(stage,this.config.options);
|
||||
this.gameKernel.getRenderSystem().setStage3D(this.stage3D);
|
||||
var _loc1_:InitBattleTask = new InitBattleTask(this.gameKernel,this.config,this,this.preloader);
|
||||
this.gameKernel.addTask(_loc1_);
|
||||
stage.addEventListener(Event.RESIZE,this.onResize);
|
||||
this.onResize(null);
|
||||
stage.addEventListener(Event.ENTER_FRAME,this.onEnterFrame);
|
||||
}
|
||||
|
||||
private function onEnterFrame(param1:Event) : void
|
||||
{
|
||||
this.gameKernel.tick();
|
||||
}
|
||||
|
||||
private function onResize(param1:Event) : void
|
||||
{
|
||||
var _loc2_:AxisIndicator = null;
|
||||
if(this.gameKernel != null)
|
||||
{
|
||||
this.gameKernel.getRenderSystem().setViewRect(0,0,stage.stageWidth,stage.stageHeight);
|
||||
_loc2_ = this.gameKernel.getRenderSystem().getAxisIndicator();
|
||||
_loc2_.y = stage.stageHeight - _loc2_.size;
|
||||
}
|
||||
if(this.name_6s != null)
|
||||
{
|
||||
this.name_6s.resize(stage.stageWidth,stage.stageHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 380 B |
|
Before Width: | Height: | Size: 498 B |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 235 B |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 240 B |
|
Before Width: | Height: | Size: 3.9 KiB |