forked from openrs2/openrs2
parent
33955a57ad
commit
8dd5292cb2
@ -0,0 +1,5 @@ |
|||||||
|
package dev.openrs2.deob |
||||||
|
|
||||||
|
import dev.openrs2.asm.MemberRef |
||||||
|
|
||||||
|
data class ArgRef(val method: MemberRef, val index: Int) |
@ -0,0 +1,21 @@ |
|||||||
|
package dev.openrs2.deob.remap |
||||||
|
|
||||||
|
import dev.openrs2.deob.ArgRef |
||||||
|
import dev.openrs2.deob.util.map.NameMap |
||||||
|
|
||||||
|
class ArgumentMappingGenerator( |
||||||
|
private val nameMap: NameMap |
||||||
|
) { |
||||||
|
fun generate(): Map<ArgRef, String> { |
||||||
|
val argumentNames = mutableMapOf<ArgRef, String>() |
||||||
|
|
||||||
|
for ((methodRef, method) in nameMap.methods) { |
||||||
|
for ((index, name) in method.arguments) { |
||||||
|
val argument = ArgRef(methodRef, index) |
||||||
|
argumentNames[argument] = name |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
return argumentNames |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue