final void method1680(s var_s, byte i, s var_s_179_, AbstractToolkit var_ha) {
	try {
	    anInt3131++;
	    int[][] is = (new int[maximumX]
			  [maximumY]);
	    if (i <= -122) {
		if (Class348_Sub24.anIntArray6878 == null
		    || (maximumY
			!= Class348_Sub24.anIntArray6878.length)) {
		    Class318_Sub9_Sub1.anIntArray8785
			= new int[maximumY];
		    Class348_Sub40_Sub6.anIntArray9135
			= new int[maximumY];
		    Class265.anIntArray4692
			= new int[maximumY];
		    Class348_Sub24.anIntArray6878
			= new int[maximumY];
		    Class348_Sub8.anIntArray6655
			= new int[maximumY];
		}
		for (int i_180_ = 0; maximumZ > i_180_;
		     i_180_++) {
		    for (int i_181_ = 0; maximumY > i_181_;
			 i_181_++) {
			Class348_Sub24.anIntArray6878[i_181_] = 0;
			Class348_Sub40_Sub6.anIntArray9135[i_181_] = 0;
			Class348_Sub8.anIntArray6655[i_181_] = 0;
			Class265.anIntArray4692[i_181_] = 0;
			Class318_Sub9_Sub1.anIntArray8785[i_181_] = 0;
		    }
		    for (int i_182_ = -5; i_182_ < maximumX;
			 i_182_++) {
			for (int i_183_ = 0;
			     ((maximumY ^ 0xffffffff)
			      < (i_183_ ^ 0xffffffff));
			     i_183_++) {
			    int i_184_ = i_182_ - -5;
			    if ((i_184_ ^ 0xffffffff)
				> (maximumX ^ 0xffffffff)) {
				int i_185_ = ((underlayIds[i_180_]
					       [i_184_][i_183_])
					      & 0xff);
				if ((i_185_ ^ 0xffffffff) < -1) {
				    Class22 class22
					= aClass183_3120
					      .method1380(true, -1 + i_185_);
				    Class348_Sub24.anIntArray6878[i_183_]
					+= ((Class22) class22).anInt341;
				    Class348_Sub40_Sub6.anIntArray9135[i_183_]
					+= ((Class22) class22).anInt332;
				    Class348_Sub8.anIntArray6655[i_183_]
					+= ((Class22) class22).anInt335;
				    Class265.anIntArray4692[i_183_]
					+= ((Class22) class22).anInt343;
				    Class318_Sub9_Sub1.anIntArray8785
					[i_183_]++;
				}
			    }
			    int i_186_ = i_182_ - 5;
			    if (i_186_ >= 0) {
				int i_187_ = 0xff & (underlayIds
						     [i_180_][i_186_][i_183_]);
				if (i_187_ > 0) {
				    Class22 class22
					= aClass183_3120
					      .method1380(true, -1 + i_187_);
				    Class348_Sub24.anIntArray6878[i_183_]
					-= ((Class22) class22).anInt341;
				    Class348_Sub40_Sub6.anIntArray9135[i_183_]
					-= ((Class22) class22).anInt332;
				    Class348_Sub8.anIntArray6655[i_183_]
					-= ((Class22) class22).anInt335;
				    Class265.anIntArray4692[i_183_]
					-= ((Class22) class22).anInt343;
				    Class318_Sub9_Sub1.anIntArray8785
					[i_183_]--;
				}
			    }
			}
			if (i_182_ >= 0) {
			    int i_188_ = 0;
			    int i_189_ = 0;
			    int i_190_ = 0;
			    int i_191_ = 0;
			    int i_192_ = 0;
			    for (int i_193_ = -5;
				 ((i_193_ ^ 0xffffffff)
				  > (maximumY
				     ^ 0xffffffff));
				 i_193_++) {
				int i_194_ = 5 + i_193_;
				if ((maximumY ^ 0xffffffff)
				    < (i_194_ ^ 0xffffffff)) {
				    i_190_ += (Class348_Sub8.anIntArray6655
					       [i_194_]);
				    i_189_ += (Class348_Sub40_Sub6
					       .anIntArray9135[i_194_]);
				    i_188_ += (Class348_Sub24.anIntArray6878
					       [i_194_]);
				    i_192_ += (Class318_Sub9_Sub1
					       .anIntArray8785[i_194_]);
				    i_191_ += Class265.anIntArray4692[i_194_];
				}
				int i_195_ = i_193_ + -5;
				if ((i_195_ ^ 0xffffffff) <= -1) {
				    i_191_ -= Class265.anIntArray4692[i_195_];
				    i_188_ -= (Class348_Sub24.anIntArray6878
					       [i_195_]);
				    i_190_ -= (Class348_Sub8.anIntArray6655
					       [i_195_]);
				    i_192_ -= (Class318_Sub9_Sub1
					       .anIntArray8785[i_195_]);
				    i_189_ -= (Class348_Sub40_Sub6
					       .anIntArray9135[i_195_]);
				}
				if ((i_193_ ^ 0xffffffff) <= -1 && i_191_ > 0
				    && i_192_ > 0)
				    is[i_182_][i_193_]
					= Class247.method1890(i_190_ / i_192_,
							      (byte) 66,
							      i_189_ / i_192_,
							      (256 * i_188_
							       / i_191_));
			    }
			}
		    }
		    if (!IOException_Sub1.aBoolean86)
			method1683(var_ha,
				   (i_180_ ^ 0xffffffff) != -1 ? null : var_s,
				   i_180_, (byte) 127, is,
				   aa_Sub1.aSArray5191[i_180_],
				   i_180_ != 0 ? null : var_s_179_);
		    else
			method1676(i_180_ != 0 ? null : var_s,
				   aa_Sub1.aSArray5191[i_180_], -26833,
				   i_180_ == 0 ? var_s_179_ : null, is, var_ha,
				   i_180_);
		    underlayIds[i_180_] = null;
		    overlayIds[i_180_] = null;
		    overlayShading[i_180_] = null;
		    overlayRotation[i_180_] = null;
		}
		if (!aBoolean3109) {
		    if ((IndexTable.anInt3720 ^ 0xffffffff) != -1)
			Class258_Sub3.method1968();
		    if (Class186.aBoolean2492)
			Class171.method1320();
		}
		for (int i_196_ = 0;
		     ((i_196_ ^ 0xffffffff)
		      > (maximumZ ^ 0xffffffff));
		     i_196_++)
		    aa_Sub1.aSArray5191[i_196_].YA();
	    }
	} catch (RuntimeException runtimeexception) {
	    throw Class348_Sub17.method2929
		      (runtimeexception,
		       ("sr.L(" + (var_s != null ? "{...}" : "null") + ',' + i
			+ ',' + (var_s_179_ != null ? "{...}" : "null") + ','
			+ (var_ha != null ? "{...}" : "null") + ')'));
	}
    }