Commit graph

30 commits

Author SHA1 Message Date
Ammar Askar
3bcb9bc282 Fix reading of XOBJ files 2024-10-09 12:12:09 -04:00
Ammar Askar
53bfe6f3f6 Add Codec for ObjectSaveTypeTable (OBJT in SimsPE)
This is the file that is used by the OBJM in order to map
"save type"s to object guids so that their state can be
loaded
2024-10-03 23:54:41 -04:00
Nahuel Rocchetti
c05debaeaf Merge branch 'master' into lua 2023-08-28 14:54:30 -03:00
Ammar Askar
58ef199af7 Add tests for animations with multiple IK targets 2023-08-26 11:20:16 -04:00
Nahuel Rocchetti
e06d56ed83 Initial Lua implementation 2023-08-25 22:22:18 -03:00
Nahuel Rocchetti
aa65449f28 Fix stack overflow, test bhav infinite loop 2023-08-24 18:58:01 -03:00
Nahuel Rocchetti
b6581440fd Implement VM entity deletion 2023-08-24 10:56:51 -03:00
Nahuel Rocchetti
d4bf55e6d0 Fix interrupt, test interrupt 2023-08-22 02:38:32 -03:00
Nahuel Rocchetti
9710bc5f04 Implement gosub to private/global bhavs 2023-08-21 23:43:35 -03:00
Nahuel Rocchetti
8df3087498 VM: don't yield if continue callback ends in same tick. 2023-08-21 20:14:42 -03:00
Nahuel Rocchetti
4daccae598 Document data sources 2023-08-21 17:39:38 -03:00
Nahuel Rocchetti
f72520d0d2 Refactor VM exit codes, implement VM logic 2023-08-21 16:11:44 -03:00
Ammar Askar
a27a8deced Document more of the animation format 2023-08-14 12:34:01 -04:00
Ammar Askar
5393e5ec93 Start reading scenegraph animations 2023-08-11 00:32:42 -04:00
Ammar Askar
244263324f Add support for cAnimatable lot objects 2023-08-06 20:08:45 -04:00
Ammar Askar
43239e4392 Add basic support for loading OBJT/Lot Object assets 2023-08-06 17:37:07 -04:00
Ammar Askar
7f879a3116 Start adding code to read effects 2023-08-01 15:32:06 -04:00
Ammar Askar
98e25ff34d Start rendering lot imposters in neighborhood view 2023-07-29 21:19:07 -04:00
Ammar Askar
4a0b5b9cc2 Add codec to read lot info 2023-07-29 16:53:20 -04:00
Ammar Askar
b1702db774 Change vec2 to vec3 in neighborhood decoration deserialization.
Whoops, this was causing an error with deserialization. Also
finished up the TODO and added a neighborhood that actually
use this type of decoration.
2023-07-26 18:29:51 -04:00
Ammar Askar
9cda67d427 Fix index out of bounds in DXT3 conversion when width goes below 4 2023-07-26 17:03:59 -04:00
Ammar Askar
878e796b64 Start reading GMND, SHPE and RES scenegraph files.
This finishes out the basic structure needed to read all the
different file formats involved in models in scenegraph. While
we don't support animations/bones yet, all the pieces to go from
a RES file to having it be rendered in unity with materials is
now structured out.

Almost all the fields in the internal Scenegraph datastructures
have been reverse engineered, so this codebase is likely now the
best resource when it comes to parsing Scenegraph files.
2023-07-25 13:59:02 -04:00
Ammar Askar
2d439d9552 Add loading of neighborhood object XML files.
These are the files that assosciate the neighborhood GUIDs to the
models. This also adds a class to handle cGZPropertySetString
files since we will likely need to parse those more in the future.
2023-07-19 22:50:35 -04:00
Ammar Askar
fcb7484d80 Start loading neighborhood decorations 2023-07-19 00:55:55 -04:00
Ammar Askar
c70d2cfb9a Fix bug with loading non-square textures.
We had a case where loading textures of sizes like 32x16 could lead
to one of the dimensions width becoming 0 in the mip-loading loop.
Fix this by making sure the resolution is at least 1.
2023-07-18 12:00:51 -04:00
Ammar Askar
80acfe832b Add parsing for scenegraph material definitions.
This does not yet convert the material definitions to unity
materials. That will be done in a follow up as there are a
bunch of different properties that will need to be handled.
2023-07-15 11:34:48 -04:00
Ammar Askar
1caece4538 Add loading of GMDC static/bone bounding meshes
This only loads the last 2 sections of a GMDC file, where the
bounding meshes are stored as these are the simplest to import.
This lays out the basic framework for GMDC loading and adds a
little test file in the form of the utah teapot so we have a
copyright free asset to test against.
2023-02-28 17:19:14 -05:00
Ammar Askar
45794fbb6f Add support for deserializing Scenegraph LIFO blocks.
This adds the ability for ScenegraphTextureAsset to start pulling in
data from these LIFO blocks for larger images. ScenegraphTextureAsset
calls the provided ContentProvider to resolve the LIFO asset and then
uses the loaded data.
2023-02-13 22:39:51 -05:00
Ammar Askar
dc9ad7c755 Add deserialization of Scenegraph texture blocks.
This adds a few CC0 textures to the TestAssets folder to help test
the one format unity can't load natively, DXT3. Aside from that,
this is the first Scenegraph-codec and doesn't handle loading the
cLevelInfo/LIFO files that contain higher resolution textures.
2023-02-11 00:02:35 -05:00
LazyDuchess
8ceb48b0ec Test contentmanager. 2022-12-23 11:12:11 -03:00