MCPcopy Index your code
hub / github.com/Hiro420/NikkeTools / write_code

Method write_code

UnLuac/src/unluac/parse/LFunctionType.java:91–107  ·  view source on GitHub ↗
(OutputStream out, BHeader header, LFunction object)

Source from the content-addressed store, hash-verified

89 }
90
91 protected void write_code(OutputStream out, BHeader header, LFunction object) throws IOException {
92 header.integer.write(out, header, new BInteger(object.code.length));
93 for(int i = 0; i < object.code.length; i++) {
94 int codepoint = object.code[i];
95 if(header.lheader.endianness == LHeader.LEndianness.LITTLE) {
96 out.write((byte)(0xFF & (codepoint)));
97 out.write((byte)(0xFF & (codepoint >> 8)));
98 out.write((byte)(0xFF & (codepoint >> 16)));
99 out.write((byte)(0xFF & (codepoint >> 24)));
100 } else {
101 out.write((byte)(0xFF & (codepoint >> 24)));
102 out.write((byte)(0xFF & (codepoint >> 16)));
103 out.write((byte)(0xFF & (codepoint >> 8)));
104 out.write((byte)(0xFF & (codepoint)));
105 }
106 }
107 }
108
109 protected void parse_constants(ByteBuffer buffer, BHeader header, LFunctionParseState s) {
110 if(header.debug) {

Callers 5

writeMethod · 0.80
writeMethod · 0.80
writeMethod · 0.80
writeMethod · 0.80
writeMethod · 0.80

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected