Commit Graph

63 Commits

Author SHA1 Message Date
c18ff8f2e3 fix: fix various issues.
- fix convertion loss in CKCamera.
- bump up version to 0.3.0
- use CMake to generate version info header.
- fix annotation about Dassault ComputeCRC error.
- change member field initialization value in CKLight.
2024-12-31 17:48:24 +08:00
ead22d13ff fix: remove useless void in function parameter list
- according to c++ standard, single void in function parameter is equal to empty parameter list. for removing this syntax which may cause misunderstanding (becuase in C, they are different I guess), I replace all `(void)` to `()`.
2024-12-28 22:09:26 +08:00
86b27557c9 feat: add 4 new added classes in Unvirt.
- fix a fatal issue that make the output message from CKContext is empty.
- fix argument type error for CKCamera::GetAspect and CKCamera::SetAspect.
- add enums annotation and struct diaplay function in Unvirt for showing 4 new added classes.
2024-12-25 13:58:39 +08:00
eef3a352d9 feat: finish CKTargetCamera and CKTargetLight.
- finish all new added 4 classes, CKCamera, CKTargetCamera, CKLight, CKTargetLight. but no test.
2024-12-25 11:12:23 +08:00
b74f1b965c feat: finish CKCamera 2024-12-25 09:07:02 +08:00
c235524403 fix: fix 2 issues
- rename float to CKFLOAT in VxMatrix.
- move CKLightData struct to CKDefine.hpp because it not a private struct used by CKLight, but a CKRasterizer struct.
2024-12-25 08:28:42 +08:00
4bfc4782b5 refactor: refactor VxVector and its generator.
- refactor VxVector-like struct. split their declaration and implementatio because their implementation is too long. and occupy too much space in header.
- refactor VxVector struct generator. use jinja2 template engine, rather ran hand-written format string to make it is easy to read (although it still tough when first reading).
- add unary operator overloading for VxVector-like struct.
- add some VxMatrix functions which are essential to CKCamera.
- rename VxMatrix::ResetToIdentity to VxMatrix::SetIdentity to make it same as original Virtools SDK.
- the spaceship overloading with auto return value still may have bugs. please watch it carefully.
2024-12-24 23:37:04 +08:00
3eeb1f6cb6 feat: finish CKLight class.
- basically finish CKLight but no test now.
2024-12-24 10:59:19 +08:00
ff5a590cf4 feat: add basic layout for CKLight and CKCamera.
- add basic class layout and member function for CKLight and CKCamera.
- register CKLight and CKCamera in CKGlobals to let CK engine can recognize them.
- modify EnumsMigration to add new 2 enums for CKLight and CKCamera.
2024-12-23 22:21:50 +08:00
d29d40448b fix: fix CMake install path issue.
- fix the wrong reference in CMake script which install lib target into wrong directory.
- add file, change CMake script and modify header file for preparing develop of CKLight and CKCamera.
- fix doc typo.
2024-12-23 09:23:46 +08:00
e72102496b fix: update YYCC dependency
- move EnumsHelper into YYCC because it is widely used.
- rename all calling to EnumsHelper due to this modification.
- add version checker in code to make sure that user use correct YYCC library to compile.
- modify some include syntax because the include directory layout changes of YYCC.
- update CMake script to resolve the bug that we can not export LibCmo (thanks doyaGu and BLumia).
2024-11-03 19:05:27 +08:00
65861143bf fix: fix issues
- restore some CKGlobals behavior because it will cause runtime exception.
- move some classes from CmdHelper to UnvirtContext to make CmdHelper more common to use.
- output warning string when fail to get utf8 or ordinary string.
2024-08-27 11:25:53 +08:00
d74b4645f0 fix: fix build issue in Unvirt and LibCmo
- fix build issue in Unvirt and LibCmo
- due to we use UTF8 string. the accessible value generator in EnumsMigration need to be changed at the same time.
- remove string helper in Unvirt because we no longer need it.
2024-08-23 17:38:45 +08:00
e682a87d25 refactor: refactor project
- rename LIBCMO_DISABLE_COPY_MOVE -> YYCC_DEL_CLS_COPY_MOVE and LIBCMO_DEFAULT_COPY_MOVE -> YYCC_DEF_CLS_COPY_MOVE.
- fix Vector declaration generator. throw exception when operator[] face invalid index, instead of do fallback.
- rename VTAll.hpp -> VTInternal.hpp and VYUserAll -> VTAll.hpp for easy to understand.
- fix project name error in Doxygen template.
- replace all LIBCMO_OS_WIN32 to YYCC_OS == YYCC_OS_WINDOWS.
- fix some compile error (involving utf8 encoding) but not the final result.
- use correct way to include std-image library (use <> instead of "")
- finish documentation for VTUtils.hpp and VTEncoding.hpp.
2024-08-17 20:43:27 +08:00
a70e32a306 fix issues
- revert nullptr check for BMap::MeshTrans pointer getter.
- fix pointer return error of BMap::MeshTrans
- fix type hint error and variable name error in PyBMap
- fix CKMesh flag init value error
- improve empty material slots saving. add a nullptr entry if no slots to make sure virtools can load it.
2023-12-01 23:31:09 +08:00
74d8f02588 fix issues
- fix usage error of ckid getter in bmap wrapper.
- fix CKObject flag init value error.
- fix CKFileWriter writing empty object name error.
- regulate some statement.
2023-11-30 22:48:40 +08:00
7c6dd463bd fix issues
- fix nullptr name assignment error on CKObject.
- remove slot check for CKTexture::GetFileName in BMap. return nullptr, not throw error when no slot to get file name.
2023-11-15 23:05:21 +08:00
d8b7ace53d expose lit mode interface in CKMesh.
- provide lit mode and wrap mode getter and setter in CKMesh.
- add lost flags setter in CKMesh.
- show lit mode and wrap mode data in Unvirt.
- add interface for lit mode in BMap, because some old Ballance map use lit mode to light objects.
- expose a raw c callback when creating bmap to allow user decide how the log output by themselves.
- change python bindings for BMap interface changes.
2023-11-15 21:47:58 +08:00
9475e2abc5 fix x64 compile error. add arm support in IronPad 2023-10-29 12:36:03 +08:00
2bd0c980b5 add mesh interface functions 2023-10-08 20:56:29 +08:00
754a281655 add LoadImage wrapper in CKTexture 2023-10-08 10:42:07 +08:00
db23c9c952 finish CKGroup writer 2023-10-02 11:38:14 +08:00
db6263cb53 finish CKMaterial writer. add lost SetClassId for each writer 2023-10-02 11:32:18 +08:00
05c48c21f9 finish CKObject and CK3dEntity writer 2023-10-02 11:04:00 +08:00
9aa8b2b961 finish CKMesh writer
- fix some writing issue.
- create a internal object adder in CKFileWriter shared by AddObject and Ctor(copy Reader).
2023-10-02 09:16:45 +08:00
92f4271124 finish CKMesh writing (no test)
- finish CKMesh writing function
- remove useless CKMesh functions: material channels, vertex weight and face mask.
2023-10-01 23:48:55 +08:00
ee4b621cac fix saving issue
- fix CKStateChunk resize memory error.
- fix wrong CKBitmapHandler free position in CKBitmapData writer.
- fix init value error of CKFileWriter::m_DisableAddingFile when copying from reader.
- fix ReadString, WriteString error in CKStateChunk (forget NULL terminal)
- change CKPathManager resolve path order. Resolve temp path first, then resources folder.
- fix mixdata combine error when writing CKTexture.
2023-09-30 16:01:39 +08:00
abea66d6f0 fix including file error in CKFile. update reader -> writer method 2023-09-30 14:24:37 +08:00
eedd9bdb55 finish CKtexture writer
- finish CKTexture writer
- add std::enable_if for CKStateChunk::ReadIdent&WriteIdent to limit it in enum type.
- fix error function calling in CKBitmapData writer.
- let CKTexture reader mor formal for mipmap.
- fix CKStateChunk ReadBuffer redirect guideline.
- add a stupid height and width getter for CKBitmapData to serve CKTexture using.
2023-09-30 11:51:04 +08:00
94dadbfb1f write garbage for BMap dll 2023-09-23 15:55:57 +08:00
c0626eefee finish almost object output display 2023-09-22 22:31:51 +08:00
d37a552873 write some printer for ck class 2023-09-22 16:40:10 +08:00
ddf596faec create visitor for all existed CK class 2023-09-22 14:48:45 +08:00
81872053f0 finish PreDelete and CheckPreDeletion. now there is no problem when deleting object 2023-09-20 15:25:43 +08:00
a06f6a58c9 finish CKMesh remain reading and ctor 2023-09-20 14:42:44 +08:00
0a85832d63 update project 2023-09-20 13:13:08 +08:00
d66716acd7 write shit 2023-09-20 10:49:32 +08:00
69f702a6d2 add some CK3dEntity code 2023-09-19 22:32:07 +08:00
2d190ea30b finish BuildNormals 2023-09-19 15:20:40 +08:00
d381369ed6 now can read CKMesh without memory issue 2023-09-18 23:11:33 +08:00
678529a664 write some CKMesh 2023-09-18 21:06:34 +08:00
81d1e80d14 finish CKStateChunk refactor 2023-09-18 16:37:05 +08:00
c6608dec57 basically finish register. still have bug 2023-09-17 12:39:21 +08:00
230b18c0ba remove all raw char type ref in code 2023-09-17 10:38:46 +08:00
3c8266e7dd continue refactor project 2023-09-16 22:38:21 +08:00
1ddeeb3b68 refactor project 2023-09-16 18:31:25 +08:00
8f960604ca add some reading function 2023-09-15 17:03:36 +08:00
312c746279 add some functions 2023-09-15 16:15:07 +08:00
b499d907f7 prepare CKMesh 2023-09-15 13:21:49 +08:00
248b7e7385 finish material 2023-09-14 22:08:40 +08:00