OpenNaja / cobra-tools

A suite of GUI tools for extracting and modifying OVL and OVS archives, as well as editing the associated in-house file formats. Also includes a model plugin for Blender. For downloads, guides, and FAQs visit:
https://opennaja.github.io/cobra-tools/
GNU General Public License v3.0
98 stars 26 forks source link

Enum-like default of bitflag and bug fix get_src_code #332

Closed Candoran2 closed 1 year ago

Candoran2 commented 1 year ago

Changes:

  1. Bitflags defaults can now be specified like enums. This is useful to support because in some languages, bitflags are enums, and it makes it easier to read.
  2. Enums can now be specified as integer literals. Somewhat of a side-effect of treating bitflags and enums the same in default specification, but I think it makes sense to support, because they are always integers.
  3. Bug fix to get_src_code. TackY ran into this because they had the nif somewhere in their path, which meant that, for example, Matrix44 was already chosen when the ms2 Matrix44 was encountered by the walk. As a side-effect, the execution of codegen.py is also much faster, because it no longer has to walk the entire source directory for every class.
HENDRIX-ZT2 commented 1 year ago

Clever to just take the source path directly! Long overdue haha