Thread: Class30_Sub2_Sub1_Sub2 Sprite loader

Results 1 to 3 of 3
  1. #1 Class30_Sub2_Sub1_Sub2 Sprite loader 
    Registered Member

    Join Date
    Dec 2009
    Posts
    1,142
    Thanks given
    275
    Thanks received
    169
    Rep Power
    164
    Class30_Sub2_Sub1_Sub2 = "Sprite" in MITB

    Anyways I need a loader like the Class30_Sub2_Sub1_Sub1 one so I can hardcode my mapback.

    Here is the one for Class30_Sub2_Sub1_Sub1:
    Code:
    	public Class30_Sub2_Sub1_Sub1(byte abyte0[], Component component) {
    		aBoolean1428 = false;
    		anInt1431 = -32357;
    		aBoolean1436 = true;
    		aBoolean1438 = false;
    		try {
    			Image image = Toolkit.getDefaultToolkit().createImage(abyte0);
    			MediaTracker mediatracker = new MediaTracker(component);
    			mediatracker.addImage(image, 0);
    			mediatracker.waitForAll();
    			anInt1440 = image.getWidth(component);
    			anInt1441 = image.getHeight(component);
    			anInt1444 = anInt1440;
    			anInt1445 = anInt1441;
    			anInt1442 = 0;
    			anInt1443 = 0;
    			anIntArray1439 = new int[anInt1440 * anInt1441];
    			PixelGrabber pixelgrabber = new PixelGrabber(image, 0, 0,
    					anInt1440, anInt1441, anIntArray1439, 0, anInt1440);
    			pixelgrabber.grabPixels();
    			return;
    		} catch (Exception _ex) {
    			System.out.println("Error converting jpg");
    		}
    		for (int i = 0; i < anIntArray1439.length; i++) {
    			anIntArray1439[i] += 0x1000000;
    		}
    	}
    I need it to work with this:

    Code:
    	public Class30_Sub2_Sub1_Sub2(Class44 class44, String s, int i) {
    		aBoolean1447 = false;
    		anInt1448 = 360;
    		aByte1449 = 3;
    		Class30_Sub2_Sub2 class30_sub2_sub2 = new Class30_Sub2_Sub2(class44
    				.method571(s + ".dat", null), 891);
    		Class30_Sub2_Sub2 class30_sub2_sub2_1 = new Class30_Sub2_Sub2(class44
    				.method571("index.dat", null), 891);
    		class30_sub2_sub2_1.anInt1406 = class30_sub2_sub2.method410();
    		anInt1456 = class30_sub2_sub2_1.method410();
    		anInt1457 = class30_sub2_sub2_1.method410();
    		int j = class30_sub2_sub2_1.method408();
    		anIntArray1451 = new int[j];
    		for (int k = 0; k < j - 1; k++)
    			anIntArray1451[k + 1] = class30_sub2_sub2_1.method412();
    
    		for (int l = 0; l < i; l++) {
    			class30_sub2_sub2_1.anInt1406 += 2;
    			class30_sub2_sub2.anInt1406 += class30_sub2_sub2_1.method410()
    					* class30_sub2_sub2_1.method410();
    			class30_sub2_sub2_1.anInt1406++;
    		}
    
    		anInt1454 = class30_sub2_sub2_1.method408();
    		anInt1455 = class30_sub2_sub2_1.method408();
    		anInt1452 = class30_sub2_sub2_1.method410();
    		anInt1453 = class30_sub2_sub2_1.method410();
    		int i1 = class30_sub2_sub2_1.method408();
    		int j1 = anInt1452 * anInt1453;
    		aByteArray1450 = new byte[j1];
    		if (i1 == 0) {
    			for (int k1 = 0; k1 < j1; k1++)
    				aByteArray1450[k1] = class30_sub2_sub2.method409();
    
    			return;
    		}
    		if (i1 == 1) {
    			for (int l1 = 0; l1 < anInt1452; l1++) {
    				for (int i2 = 0; i2 < anInt1453; i2++)
    					aByteArray1450[l1 + i2 * anInt1452] = class30_sub2_sub2
    							.method409();
    
    			}
    
    		}
    	}
    Also renamed is fine I can convert.

    Will rep/thanks if it really matters to you.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Yarnova's Avatar
    Join Date
    Jul 2007
    Age
    24
    Posts
    878
    Thanks given
    1
    Thanks received
    34
    Rep Power
    364
    Just pack your mapback into your cache till I release a tutorial on converting it to a fullcolor sprite.
    Also you got it backwards, MITB calls Class30_Sub2_Sub1_Sub1 "Background" and Class30_Sub2_Sub1_Sub2 "Sprite".
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Dec 2009
    Posts
    1,142
    Thanks given
    275
    Thanks received
    169
    Rep Power
    164
    Typo @ background & sprite.

    That's what I've been doing for my mapback, but now there's four images in the archive (gameframe switcher) and if I add any more I'll have a problem.
    Quote Originally Posted by Yarnova View Post
    Just pack your mapback into your cache till I release a tutorial on converting it to a fullcolor sprite.
    Do textures too
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •