Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package sys
  2. {
  3.     import flash.utils.Endian;
  4.     import flash.utils.ByteArray;
  5.    
  6. public class ShitDS {
  7.     [Embed(source = "../res/levels/J2MElvl.001", mimeType = "application/octet-stream")]
  8.     private static var lvl_001:Class;
  9.     [Embed(source = "../res/levels/J2MElvl.002", mimeType = "application/octet-stream")]
  10.     private static var lvl_002:Class;
  11.     [Embed(source = "../res/levels/J2MElvl.003", mimeType = "application/octet-stream")]
  12.     private static var lvl_003:Class;
  13.     [Embed(source = "../res/levels/J2MElvl.004", mimeType = "application/octet-stream")]
  14.     private static var lvl_004:Class;
  15.     [Embed(source = "../res/levels/J2MElvl.005", mimeType = "application/octet-stream")]
  16.     private static var lvl_005:Class;
  17.     [Embed(source = "../res/levels/J2MElvl.006", mimeType = "application/octet-stream")]
  18.     private static var lvl_006:Class;
  19.     [Embed(source = "../res/levels/J2MElvl.007", mimeType = "application/octet-stream")]
  20.     private static var lvl_007:Class;
  21.     [Embed(source = "../res/levels/J2MElvl.008", mimeType = "application/octet-stream")]
  22.     private static var lvl_008:Class;
  23.     [Embed(source = "../res/levels/J2MElvl.009", mimeType = "application/octet-stream")]
  24.     private static var lvl_009:Class;
  25.     [Embed(source = "../res/levels/J2MElvl.010", mimeType = "application/octet-stream")]
  26.     private static var lvl_010:Class;
  27.     [Embed(source = "../res/levels/J2MElvl.011", mimeType = "application/octet-stream")]
  28.     private static var lvl_011:Class;
  29.    
  30.     [Embed(source = "../res/sounds/pickup.snd",  mimeType = "application/octet-stream")]
  31.     private static var snd_pickup:Class;        
  32.     [Embed(source = "../res/sounds/pop.snd",     mimeType = "application/octet-stream")]
  33.     private static var snd_pop:Class;            
  34.     [Embed(source = "../res/sounds/up.snd",      mimeType = "application/octet-stream")]
  35.     private static var snd_up:Class;
  36.    
  37.     [Embed(source = "../res/icons/bouncesplash.png", mimeType = "application/octet-stream")]
  38.     private static var gfx_bouncesplash:Class;
  39.     [Embed(source = "../res/icons/icon.png",         mimeType = "application/octet-stream")]
  40.     private static var gfx_icon:Class;
  41.     [Embed(source = "../res/icons/nokiagames.png",   mimeType = "application/octet-stream")]
  42.     private static var gfx_nokiagames:Class;
  43.     [Embed(source = "../res/icons/objects_nm.png",   mimeType = "application/octet-stream")]
  44.     private static var gfx_objectsnm:Class;
  45.    
  46.     private static var
  47.         levels:Array = [lvl_001, lvl_002, lvl_003, lvl_004, lvl_005, lvl_006, lvl_007, lvl_008, lvl_009, lvl_010, lvl_011],
  48.         sounds:Array = [snd_pickup, snd_pop, snd_up],
  49.         graphs:Array = [gfx_bouncesplash, gfx_icon, gfx_nokiagames, gfx_objectsnm];
  50.    
  51.     public static var
  52.         TYPE_LVL:int = 0,
  53.         TYPE_SND:int = 1,
  54.         TYPE_GFX:int = 2;
  55.     public static var
  56.         SND_PICKUP:int = 0,
  57.         SND_POP:int    = 1,
  58.         SND_UP:int     = 2;
  59.     public static var
  60.         GFX_BOUNCESPLASH:int = 0,
  61.         GFX_ICON:int         = 1,
  62.         GFX_NOKIAGAMES:int   = 2,
  63.         GFX_OBJECTSNM:int    = 3;
  64.    
  65.    
  66.     public function ShitDS() { }
  67.    
  68.     public static function getFile(type:int, num:int):ByteArray {
  69.         var ba:ByteArray;
  70.        
  71.         switch(type) {
  72.             case TYPE_LVL: new levels[num](); break;
  73.             case TYPE_SND: new sounds[num](); break;
  74.             case TYPE_GFX: new graphs[num](); break;
  75.         }
  76.         ba.endian = Endian.LITTLE_ENDIAN;
  77.         return ba;
  78.     }
  79. }
  80.  
  81. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement