Closed PiKeyAr closed 4 years ago
SAMDL's NJA export has some syntax issues that prevent it from working with KATANA SDK. Here are a few things I found:
Center and Radius lines uses decimal comma instead of decimal dot: Center 0,323703,0,57257,-0,022362, should be Center 0.323703,0.57257,-0.022362,
Center
Radius
Center 0,323703,0,57257,-0,022362,
Center 0.323703,0.57257,-0.022362,
The Model line includes the & character, which should be removed: Model &attach_00013B68, should be Model attach_00013B68,
Model
&
Model &attach_00013B68,
Model attach_00013B68,
OPosition, OAngle and OScale lines have an extra comma inside braces that causes errors: OPosition ( 0, 0, 0, ), should be OPosition ( 0, 0, 0 ),
OPosition
OAngle
OScale
OPosition ( 0, 0, 0, ),
OPosition ( 0, 0, 0 ),
Exported polygon data is formatted incorrectly. This is how it is exported now:
Strip(0x8000, 62), 0x8000u | 62, 9, 0, 10, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 296, 288, 297, 289, 298, 290, 299, 291, 300, 292, 301, 293, 302, 294, 303, 295, 552, 544, 553, 545, 554, 546, 555, 547, 556, 548, 557, 549, 558, 550, 559, 551, 808, 800, 809, 801, 810, 802, 811, 803, 812, 804, 813, 805,
And this is how it should look:
Strip(0x8000, 62), 9, 0, 10, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 296, 288, 297, 289, 298, 290, 299, 291, 300, 292, 301, 293, 302, 294, 303, 295, 552, 544, 553, 545, 554, 546, 555, 547, 556, 548, 557, 549, 558, 550, 559, 551, 808, 800, 809, 801, 810, 802, 811, 803, 812, 804, 813, 805,
I think it will work if the 0x8000u | 62 part is removed.
0x8000u | 62
For successful CodeWarrior compilation the following lines should be added at the bottom of the file to define the root object:
DEFAULT_START
DEFAULT_END
For comparison, here's the original NJA file used in one of the samples in the SDK: original.txt
And here's an SAMDL NJA export of the same model that I got by exporting the model from a compiled binary: samdl.txt
SAMDL's NJA export has some syntax issues that prevent it from working with KATANA SDK. Here are a few things I found:
Center
andRadius
lines uses decimal comma instead of decimal dot:Center 0,323703,0,57257,-0,022362,
should beCenter 0.323703,0.57257,-0.022362,
The
Model
line includes the&
character, which should be removed:Model &attach_00013B68,
should beModel attach_00013B68,
OPosition
,OAngle
andOScale
lines have an extra comma inside braces that causes errors:OPosition ( 0, 0, 0, ),
should beOPosition ( 0, 0, 0 ),
Exported polygon data is formatted incorrectly. This is how it is exported now:
And this is how it should look:
I think it will work if the
0x8000u | 62
part is removed.For successful CodeWarrior compilation the following lines should be added at the bottom of the file to define the root object:
ifndef DEFAULT_OBJECT_NAME
define DEFAULT_OBJECT_NAME object_name
endif
DEFAULT_END