fix: fix issues

- fix BMapBindings generator due to the rename of LIBCMO_EXPORT -> BMAP_EXPORT.
- fix relative path issue in Python scripts within CodeGen.
- remove all references to LIBCMO_PANIC. use exception instead to tell user they are fool.
- basically finish universal encoding tables. add lost encoding name.
This commit is contained in:
2024-08-17 23:29:08 +08:00
parent e682a87d25
commit 9903b61cac
12 changed files with 49 additions and 29 deletions

View File

@ -1,3 +1,4 @@
import os
def GetTmplDecl(svars: tuple[str]) -> str:
return f'CKFLOAT {", ".join(svars)};'
@ -151,7 +152,11 @@ struct {sname} {{
#{GetTmplOperAssignMove(sname, svars)}
if __name__ == '__main__':
with open('VxTypes.hpp', 'w', encoding='utf-8') as fs:
# get file path
self_path: str = os.path.dirname(__file__)
cpp_file: str = os.path.join(self_path, 'VxTypes.hpp')
# generate files
with open(cpp_file, 'w', encoding='utf-8') as fs:
fs.write(GetTmplVector('VxVector2', ('x', 'y', )))
fs.write(GetTmplVector('VxVector3', ('x', 'y', 'z', )))
fs.write(GetTmplVector('VxVector4', ('x', 'y', 'z', 'w', )))