forked from anixart-mod/patcher
Перенос добавления ресурсов в соответствующие патчи
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import struct
|
||||
|
||||
|
||||
def get_smali_lines(file: str) -> list[str]:
|
||||
lines = []
|
||||
with open(file, "r", encoding="utf-8") as smali:
|
||||
@@ -51,6 +54,7 @@ def replace_smali_method_body(
|
||||
|
||||
return new_content
|
||||
|
||||
|
||||
def find_and_replace_smali_line(
|
||||
lines: list[str], search: str, replace: str
|
||||
) -> list[str]:
|
||||
@@ -58,3 +62,8 @@ def find_and_replace_smali_line(
|
||||
if line.find(search) >= 0:
|
||||
lines[index] = lines[index].replace(search, replace)
|
||||
return lines
|
||||
|
||||
|
||||
def float_to_hex(f):
|
||||
b = struct.pack(">f", f)
|
||||
return b.hex()
|
||||
|
||||
Reference in New Issue
Block a user