private bool expand_package(string identity, int offset, int eob /*end of block*/, wzproperty host) { string type = reader.transit_string(offset); int index = wzproperty.index_of_type(type); wzproperty property = new wzproperty(identity, index, reader.position, null, host, reader); host.append(identity, property); switch (index) { case 0: return(expand_shape2d_Convex2D(offset, eob, property)); case 1: return(expand_shape2d_vector2d(property)); case 2: return(expand_sound_dx8(eob, property)); case 3: return(expand_property(offset, property)); case 4: return(expand_canvas(offset, property)); case 5: return(expand_uol(offset, property)); default: break; } return(false); }
private bool expand_block(int offset, wzproperty host) { object data; string identity = reader.transit_string(offset); int type = reader.read <byte>(); int position = reader.position; switch (type) { case 0x00: data = null; break; case 0x02: goto case 0x0b; case 0x03: goto case 0x13; case 0x04: data = reader.upack <float>(); break; case 0x05: data = reader.read <double>(); break; case 0x08: data = reader.transit_string(offset); break; case 0x09: return(expand_package(identity, offset, reader.read <int>() + reader.position, host)); case 0x0b: data = reader.read <short>(); break; case 0x13: data = reader.upack <int>(); break; case 0x14: data = reader.upack <long>(); break; default: return(false); } host.append(identity, new wzproperty(identity, type + 6, position, data, host, reader)); return(true); }