Commit graph

508 commits

Author SHA1 Message Date
Nahuel Rocchetti
3d8db221bc refactor terrain types 2023-08-02 16:45:20 -03:00
Nahuel Rocchetti
ec9c97040c Clean up temperate terrain shader 2023-08-02 16:07:01 -03:00
Nahuel Rocchetti
b8b032b758 Merge branch 'master' of https://github.com/LazyDuchess/OpenTS2 2023-08-02 15:39:03 -03:00
Nahuel Rocchetti
456cb6d5ff Implement desert terrain shader 2023-08-02 15:38:51 -03:00
Ammar Askar
d31cda97ad Add texture to particle effects 2023-08-02 13:24:33 -04:00
Ammar Askar
8cd32935be Start trying to render effects 2023-08-02 12:50:01 -04:00
Ammar Askar
e3137704c2 Parse VisualEffects and read effect name to id map 2023-08-02 11:11:05 -04:00
Ammar Askar
5013177875 Parse water effects, refactor particle types into their own folder 2023-08-02 09:47:29 -04:00
Nahuel Rocchetti
368dda80d2 start prep terrain for new shaders 2023-08-02 03:54:12 -03:00
Ammar Askar
d2a8a78f85 Parse camera, model and screen effects 2023-08-02 00:28:55 -04:00
Ammar Askar
7c26ee3774 Parse sequence and sound effects 2023-08-01 23:53:35 -04:00
Ammar Askar
d55f2c1bd2 Parse decal effects 2023-08-01 23:30:31 -04:00
Ammar Askar
2bbda81f43 Parse meta-particle effects 2023-08-01 22:39:23 -04:00
Ammar Askar
6163150d6e Refactor to prepare for meta particles 2023-08-01 21:26:51 -04:00
Ammar Askar
7f32393fd2 Read the first section of swarm effects files.
This adds the first set of parsing code for particle effects in
swarm. We currently deserialize into a giant data structure like
the game but once we do meta-particles this should be refactored
with the common types to make it less ugly.
2023-08-01 18:39:52 -04:00
Nahuel Rocchetti
f58e8f216c Update Batching.cs 2023-08-01 19:38:49 -03:00
Ammar Askar
d6c79c6bf3 Fix capitalization in test file name 2023-08-01 15:43:06 -04:00
Ammar Askar
7f879a3116 Start adding code to read effects 2023-08-01 15:32:06 -04:00
Ammar Askar
27a9231d96 Store data from cDataListExtensions scenegraph blocks 2023-08-01 10:43:47 -04:00
Nahuel Rocchetti
2ec6920943 another batching refactor 2023-08-01 04:13:50 -03:00
Nahuel Rocchetti
cca1ae128b Batching rework and optimization 2023-08-01 03:42:47 -03:00
Nahuel Rocchetti
1c7589027c streamline batcher 2023-08-01 03:25:07 -03:00
Nahuel Rocchetti
c14cb74e51 Update Batching.cs 2023-08-01 02:54:06 -03:00
Nahuel Rocchetti
bbb56bbbb1 improve batching a little 2023-08-01 02:07:44 -03:00
Nahuel Rocchetti
46d1e658cd fix artifacts on road textures 2023-07-31 23:14:21 -03:00
Ammar Askar
ad19747dcc Whoops, fix wrong sign in imposter rotation 2023-07-31 21:42:57 -04:00
Nahuel Rocchetti
3fa7713514 Merge branch 'master' of https://github.com/LazyDuchess/OpenTS2 2023-07-31 22:39:45 -03:00
Ammar Askar
a32bed95ee Don't null pointer when scenegraph look ups fail 2023-07-31 21:32:10 -04:00
Nahuel Rocchetti
2ad821afbb Merge branch 'master' of https://github.com/LazyDuchess/OpenTS2 2023-07-31 22:26:25 -03:00
Nahuel Rocchetti
c674d91d21 batch lots 2023-07-31 22:24:04 -03:00
Ammar Askar
a7812ef513 Fix imposter positioning/rotation 2023-07-31 21:16:40 -04:00
Ammar Askar
f2fc1bd63d Store more lot info in LotInfoAsset 2023-07-31 21:16:40 -04:00
Nahuel Rocchetti
091259caa5 dummy out json on build 2023-07-31 16:45:06 -03:00
Nahuel Rocchetti
12ddd6e691 Batch roads 2023-07-31 16:39:13 -03:00
Nahuel Rocchetti
465024f9ef Batching works! 2023-07-31 16:27:39 -03:00
Nahuel Rocchetti
941b9281f7 batching poc 2023-07-31 13:44:57 -03:00
Nahuel Rocchetti
516f94805d Fix lot imposter terrain colors 2023-07-31 02:25:30 -03:00
Nahuel Rocchetti
530f6eda43 Use Stencil Buffer to render imposter terrain 2023-07-31 01:50:55 -03:00
Ammar Askar
16547d704d Handle stdMatDiffCoef in StandardMaterial 2023-07-30 22:50:44 -04:00
Ammar Askar
ed0db98e7e Don't render gmdc groups not listed in the shpe 2023-07-30 22:05:36 -04:00
Nahuel Rocchetti
1d4589a408 Disable z write on alpha blend shaders 2023-07-30 21:44:40 -03:00
Nahuel Rocchetti
4d724abc86 Match TS2 terrain triangulation, remove imposter depth bias for now 2023-07-30 21:29:40 -03:00
Ammar Askar
c2db4dca31 half-fix imposter rotation 2023-07-30 16:43:26 -04:00
Nahuel Rocchetti
14a0617a14
Merge pull request #43 from ammaraskar/full_scenegraph_render
Start rendering full scenegraph graphs with all objects
2023-07-30 15:41:44 -03:00
Ammar Askar
074d7773ca Start rendering full scenegraph graphs with all objects 2023-07-30 14:31:51 -04:00
Nahuel Rocchetti
f36ceeda8a remove terrain type log 2023-07-30 14:07:22 -03:00
Ammar Askar
9fb3468998 Store other scenegraph info needed to render full scenes 2023-07-30 12:59:12 -04:00
Ammar Askar
8fd0c1d0e0 Add a Scenegraph json dumper to make debugging easier 2023-07-30 12:59:12 -04:00
Nahuel Rocchetti
8ea2c05f6d Adjust imposter depth offset 2023-07-30 13:33:22 -03:00
Nahuel Rocchetti
52978b6960 terrain roughness 2023-07-30 04:36:20 -03:00
Nahuel Rocchetti
2a7c08829a Fix road triangles, shadows on road 2023-07-30 04:00:14 -03:00
Nahuel Rocchetti
f04c9d692f Rotate road pieces 2023-07-30 03:00:17 -03:00
Nahuel Rocchetti
eb966f07cd Start road work 2023-07-30 01:26:50 -03:00
Nahuel Rocchetti
c049130ca2 some comments 2023-07-30 00:47:38 -03:00
Nahuel Rocchetti
23d0931fbf Fix memory leaks in roads 2023-07-30 00:42:45 -03:00
Nahuel Rocchetti
0c2094fa53 fix imposter clipping, add consts for lots n hood sizes. 2023-07-30 00:33:10 -03:00
Ammar Askar
18bfa25ebe Fix tests 2023-07-29 21:25:50 -04:00
Ammar Askar
98e25ff34d Start rendering lot imposters in neighborhood view 2023-07-29 21:19:07 -04:00
Nahuel Rocchetti
42f97f4a51 adjust terrain tools 2023-07-29 21:58:51 -03:00
Nahuel Rocchetti
d165470021 Implement Unlit shaders for imposters 2023-07-29 21:15:59 -03:00
Nahuel Rocchetti
ca164af41f point filter some imposter textures 2023-07-29 20:54:10 -03:00
Nahuel Rocchetti
ce19152467 Refactor material system 2023-07-29 20:24:07 -03:00
Nahuel Rocchetti
d148117d15 dummy out compression. lot imposter test scene 2023-07-29 19:21:46 -03:00
Nahuel Rocchetti
13127b1137
Merge pull request #41 from ammaraskar/imposter_try
Start loading lot imposters
2023-07-29 18:12:35 -03:00
Ammar Askar
4a0b5b9cc2 Add codec to read lot info 2023-07-29 16:53:20 -04:00
Ammar Askar
c32541ba12 Remove more useless debug lines, fix 32 bit texture loading 2023-07-29 16:26:37 -04:00
Ammar Askar
2435117d96 Handle imposter materials and GMDC portions 2023-07-29 15:10:37 -04:00
Ammar Askar
06061f1d41 Remove old useless debug prints 2023-07-28 21:24:41 -04:00
Ammar Askar
a49242c413 Fix issues with scenegraph file names having wrong ResourceKeys 2023-07-28 21:07:57 -04:00
Ammar Askar
973679a5ab Start trying to load lot imposters 2023-07-28 15:31:50 -04:00
Nahuel Rocchetti
be6851464e replace scenegraph group id with variable where appropriate 2023-07-28 14:18:47 -03:00
Nahuel Rocchetti
6387334cf8 Merge branch 'master' of https://github.com/LazyDuchess/OpenTS2 2023-07-28 14:04:19 -03:00
Nahuel Rocchetti
9a5db9ea1c make hood rendering more accurate 2023-07-28 14:04:17 -03:00
Ammar Askar
8c05df8a6c Temporary ugly roads 2023-07-28 11:23:05 -04:00
Nahuel Rocchetti
7c9b8cac3c f2 smooth terrain tool 2023-07-28 04:29:04 -03:00
Nahuel Rocchetti
a9b19dc6e9 Fix mesh to floatarray conversion 2023-07-28 02:27:14 -03:00
Nahuel Rocchetti
bf76ce1c32 Update DBPFCompression.cs 2023-07-28 02:06:48 -03:00
Nahuel Rocchetti
4676f94211 revert compression changes 2023-07-28 02:05:06 -03:00
Nahuel Rocchetti
6bc5f9c37f revert compression changes 2023-07-28 01:57:28 -03:00
Nahuel Rocchetti
fb5a3361e9 Debug terrain editing 2023-07-28 01:14:05 -03:00
Nahuel Rocchetti
f74645bb30 Fix underwater fog in standardmaterial 2023-07-27 21:14:34 -03:00
Nahuel Rocchetti
159df4d1ac Adjust shores 2023-07-27 20:43:58 -03:00
Nahuel Rocchetti
28951e769b Water Reflections 2023-07-27 20:25:32 -03:00
Nahuel Rocchetti
e05d85a3c7 Cache terrain gameobject and textures 2023-07-27 17:29:41 -03:00
Nahuel Rocchetti
316b6ca209 shore adjustments 2023-07-27 17:23:59 -03:00
Nahuel Rocchetti
61b578cd4f Merge branch 'master' of https://github.com/LazyDuchess/OpenTS2 2023-07-27 16:58:37 -03:00
Nahuel Rocchetti
af89b84bed Pure shores 2023-07-27 16:58:34 -03:00
Nahuel Rocchetti
4c2f223765
Merge pull request #40 from ammaraskar/coord_fix
Add gameobject to transform from sims2 space to unity
2023-07-27 15:28:03 -03:00
Nahuel Rocchetti
ba96d61f60 Water placeholder 2023-07-27 15:27:32 -03:00
Ammar Askar
7e40192a3c
Merge branch 'master' into coord_fix 2023-07-27 14:21:40 -04:00
Ammar Askar
c9010e20ff Add gameobject to transform from sims2 space to unity
Previously we were using an ad-hoc system where we were rotating
meshes to -90 on the x-axis and applying a -1 scale to them. This
worked to show them properly but meant that because our coordinate
system was flipped all rotations from the game had to be inverted
from a right-hand system to a left-hand system.

This change introduces a simRotations object that all the meshes
sit under that takes raw rotations from the game. The parent game
object then converts these all at once into the unity space.

All rotations from the game should now be applied to this simRotations
object, we should likely move this ScenegraphResourceAsset generated
game object into a helper MonoBehavior to make this easier to use.
2023-07-27 14:17:30 -04:00
Nahuel Rocchetti
5b27d12282 TerrainType system 2023-07-27 15:11:54 -03:00
Nahuel Rocchetti
b3875625b8 use quaternion for rotation workaround 2023-07-27 12:14:45 -03:00
Ammar Askar
af8f67a56d Temporary fix for bridge orientation 2023-07-27 00:48:40 -04:00
Nahuel Rocchetti
b2995b769b
Merge pull request #39 from ammaraskar/scenegraph_txmt
Render bridges in neighborhood decorations
2023-07-26 23:29:05 -03:00
Ammar Askar
15b82057ad Render bridges used as neighborhood decorations 2023-07-26 22:00:52 -04:00
Nahuel Rocchetti
303a786589 i'm kinda dumb 2023-07-26 22:01:53 -03:00
Ammar Askar
8347e94fb3 Refactor some neighborhood decoration code 2023-07-26 20:56:46 -04:00
Nahuel Rocchetti
0acd2f6227 Delete lightmaps as needed 2023-07-26 21:51:22 -03:00
Nahuel Rocchetti
c1f53204f8 Height map shadows 2023-07-26 21:44:11 -03:00
Nahuel Rocchetti
c5eb3a1d7f Basic lightmap setup 2023-07-26 21:33:10 -03:00
Nahuel Rocchetti
d1785758f4
Merge pull request #38 from ammaraskar/scenegraph_txmt
Read cTransformNode blocks as part of Scenegraph collections.
2023-07-26 20:44:08 -03:00
Nahuel Rocchetti
d282ecf4c5 Fix typo, hood deco rotation 2023-07-26 20:19:19 -03:00
Ammar Askar
4e335f5db4 Read cTransformNode blocks as part of Scenegraph collections.
I assumed these cTransformNodes only existed as part of cResourceNode
but it looks like they can come up by themselves. Adding this now
allows all neighborhood decoration resources to be loaded.
2023-07-26 19:00:15 -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
Nahuel Rocchetti
9116713f60
Merge pull request #36 from ammaraskar/scenegraph_txmt
Start showing neighborhood prop decorations
2023-07-26 18:50:20 -03:00
Ammar Askar
e204d8475c Start showing neighborhood prop decorations 2023-07-26 17:08:56 -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
Nahuel Rocchetti
0590372988 update terrain shader epsilon 2023-07-26 14:33:01 -03:00
Nahuel Rocchetti
f850022951 Refactor resource management a little 2023-07-26 08:44:01 -03:00
Nahuel Rocchetti
a091cc8e61 Fix Scenegraph GC, Neighborhood Codec Test and GC Meshes 2023-07-26 08:07:48 -03:00
Ammar Askar
f9c1b104dc Start rendering flora decorations in the neighborhood 2023-07-25 23:44:51 -04:00
Ammar Askar
d7d20efaa2 Add code to render a scenegraph CRES object.
This adds utility functions to fully render out a CRES scenegraph
hierarchy from its model to its materials.
2023-07-25 22:42:03 -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
Nahuel Rocchetti
afa6d31e7b
Merge pull request #29 from ammaraskar/scenegraph_txmt
Make unity materials from TXMT files.
2023-07-18 18:58:56 -03:00
Ammar Askar
4a9baa86bd Add generated material to GetUnmanagedResources 2023-07-18 15:56:01 -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
838a642854 Make unity materials from TXMT files.
This adds the StandardMaterial TXMT from the game. We use a simple
Lambert surface shader to handle its rendering. Unfortunately since
there's no easy way in unity to make a surface shader with different
alpha modes based on the shader feature this means we need a shader
per each type of alpha mode: Opaque, CutOut and Blend.

This does lead to some duplicated code in the shaders in terms of the
properties but the body of the shader is stored in a common .cginc
file that gets pulled in with a #include
2023-07-18 11:22:15 -04:00
Nahuel Rocchetti
4dd3c17be3
Merge pull request #28 from ammaraskar/scenegraph_txmt
Add parsing for scenegraph material definitions.
2023-07-15 17:55:01 -03: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
d61c666797 Start loading other groups from GMDC models 2023-07-14 23:15:29 -04:00
Ammar Askar
e9931a40db Start reading elements section of GMDC 2023-07-14 20:44:34 -04:00
Nahuel Rocchetti
ea8a311f42 remove unused shader 2023-06-28 12:28:24 -03:00
Nahuel Rocchetti
1894d7cbee don't enter hood when it's the current one 2023-06-27 12:55:58 -03:00
Nahuel Rocchetti
59d8456a83 Grass texture variations 2023-06-26 23:04:32 -03:00
Nahuel Rocchetti
2d4e07485b terrain experiments 2023-06-26 15:23:10 -03:00
Nahuel Rocchetti
5b8ee0aad7 neighborhood textures 2023-06-25 18:59:34 -03:00
Nahuel Rocchetti
5827a5d87a more work on neighborhood shading 2023-06-25 14:12:04 -03:00
Nahuel Rocchetti
fa072d3688 Fix main menu ordering 2023-06-24 20:34:21 -03:00
Nahuel Rocchetti
46c6210764 Add in-game main menu. 2023-06-24 20:09:30 -03:00
Nahuel Rocchetti
fc0e857470 Basic Neighborhood Lighting 2023-06-24 19:54:16 -03:00
Nahuel Rocchetti
d558950971 Debug camera for neighborhood view 2023-06-24 03:26:27 -03:00
Nahuel Rocchetti
942c19536d load all packages for a neighborhood on enter 2023-06-23 13:35:54 -03:00
Nahuel Rocchetti
c612df08f2 UI magic numbers to consts 2023-06-08 03:27:39 -03:00
Nahuel Rocchetti
d85d49a11f Refactor Neighborhood renaming 2023-06-05 02:36:29 -03:00
Nahuel Rocchetti
6415f25db4 Clean up nhood chooser 2023-06-05 00:25:24 -03:00
Nahuel Rocchetti
3964359b3d Refactor neighborhoods to use NID file 2023-06-05 00:16:45 -03:00
Nahuel Rocchetti
9a2ebdba92 Add startup scene to build 2023-06-03 03:18:00 -03:00
Nahuel Rocchetti
42e8a751d0 workaround for text highlighting on select 2023-06-02 19:26:37 -03:00
Nahuel Rocchetti
0662760cab Fix Text Caret 2023-06-02 12:50:44 -03:00
Nahuel Rocchetti
5ce1b623e9 Fix DBPF Compression 2023-06-02 04:55:17 -03:00
Nahuel Rocchetti
8373eaec70 Fix main menu page count 2023-06-02 04:07:30 -03:00
Nahuel Rocchetti
91a7b92205 Fix DBPF writing, add neighborhood name/desc edit 2023-06-02 03:55:12 -03:00
Nahuel Rocchetti
7d6437e394 Refactor UI a little, clean up code. 2023-06-02 00:16:08 -03:00
Nahuel Rocchetti
504a613313 enable garbage collection for runtime UI textures 2023-06-01 22:13:46 -03:00
Nahuel Rocchetti
e20c418da6 Improve GC of unused assets 2023-06-01 18:51:08 -03:00
Nahuel Rocchetti
95a4bd67d4 Update MainMenu.cs 2023-06-01 18:43:00 -03:00
Nahuel Rocchetti
ea54b4f6d9 Make quit button work 2023-06-01 18:32:20 -03:00
Nahuel Rocchetti
63b71d1c79 Improve button click behavior 2023-06-01 17:33:10 -03:00
Nahuel Rocchetti
4740cbfbd4 Neighborhoods in main menu. 2023-06-01 04:15:18 -03:00
Nahuel Rocchetti
0b7133d406 enable reia 2023-06-01 00:51:49 -03:00
Nahuel Rocchetti
7c7e5cbd70 Fixes, mem management, ui refactors 2023-06-01 00:47:49 -03:00
Nahuel Rocchetti
9f2933bcea Memory management 2023-05-31 18:31:36 -03:00
Nahuel Rocchetti
e20852b226 Display Sims in main menu. 2023-05-31 12:54:46 -03:00
Nahuel Rocchetti
30a53fe113 fix reiaplayer dispose error 2023-05-31 11:58:13 -03:00
Nahuel Rocchetti
e9390fd2e1 Update StartupController.cs 2023-05-31 10:41:08 -03:00
Nahuel Rocchetti
dccffa1da7 Initial button support 2023-05-31 03:55:39 -03:00
Nahuel Rocchetti
e560fb62da Fix UI issues, anchor, main menu 2023-05-31 03:03:38 -03:00
Nahuel Rocchetti
dec3e50584 Update Filesystem.cs 2023-05-31 00:46:01 -03:00
Nahuel Rocchetti
61bcda1f67 Rename Filesystem method for clarity 2023-05-31 00:19:19 -03:00
Nahuel Rocchetti
12c532f77e Add cursor tests to UILayoutTest, fix cursor file search. 2023-05-31 00:16:37 -03:00
Nahuel Rocchetti
e58bc23597 Update IMGCodec.cs 2023-05-30 18:14:17 -03:00
Nahuel Rocchetti
95d0e24225 Update IMGCodec.cs 2023-05-30 18:07:31 -03:00
Nahuel Rocchetti
599f6f5e94 Fix UI Filtering 2023-05-30 15:16:50 -03:00
Nahuel Rocchetti
e66d1f2761 Update CursorController.cs 2023-05-30 09:51:14 -03:00
Nahuel Rocchetti
de746da2e4 Add sledgehammer cursor special case 2023-05-30 09:49:37 -03:00
Nahuel Rocchetti
86fdd1e04d Texture names 2023-05-30 09:24:14 -03:00
Nahuel Rocchetti
000a2a81d9 Set CursorController execution order 2023-05-29 23:47:55 -03:00
Nahuel Rocchetti
2b761841cb Add hourglass cursor 2023-05-29 23:46:53 -03:00
Nahuel Rocchetti
84cd70835c Implement Cursor Support 2023-05-29 23:40:42 -03:00
Nahuel Rocchetti
9f89df09bc Rename AssetController prefab 2023-05-29 19:23:31 -03:00
Nahuel Rocchetti
625e1a9e53 some comments 2023-05-29 19:21:23 -03:00
Nahuel Rocchetti
34bb967416 [UI] WIP Implement edge images 2023-05-29 13:54:03 -03:00
Nahuel Rocchetti
c6c89b4282 Text alignment 2023-05-28 23:37:31 -03:00
Nahuel Rocchetti
e253199b74 Improve UI parsing, fix some bugs 2023-05-28 23:05:26 -03:00
Nahuel Rocchetti
c55f1ff326 Localize Captions 2023-05-28 19:07:10 -03:00
Nahuel Rocchetti
595fce013b improve ui layout test 2023-05-28 18:09:56 -03:00
Nahuel Rocchetti
adef77d1ae remove setnativesize calls 2023-05-28 17:27:21 -03:00
Nahuel Rocchetti
0b8c7ec93b Add text and visibility properties 2023-05-28 16:57:51 -03:00
Nahuel Rocchetti
2e828e0b61 Text and animation UI elements 2023-05-28 16:09:20 -03:00
Nahuel Rocchetti
bb797ad81c Load all UI packages in UILayoutTest 2023-05-28 14:52:39 -03:00
Nahuel Rocchetti
3037c33c7e Implement UI Buttons 2023-05-28 14:08:48 -03:00
Nahuel Rocchetti
6d62b16daa Fix UI Rect incorrect width and height 2023-05-28 13:01:37 -03:00
Nahuel Rocchetti
6cf88d7fa0 add ui element factory, create elements with props 2023-05-28 10:30:19 -03:00
Nahuel Rocchetti
e3da360a0e UI Instantiation 2023-05-27 22:35:09 -03:00
Nahuel Rocchetti
84bd101cc4 Start work on UI Layout parsing 2023-05-27 18:28:24 -03:00
Nahuel Rocchetti
97354719ce Just move test scenes to tests folder 2023-05-27 08:57:50 -03:00
Nahuel Rocchetti
c4177bd72d clean up - comment 2023-04-05 20:07:01 -03:00
Nahuel Rocchetti
4165f558f4 [WIP] Use a Mesh for neighborhood terrain geometry. 2023-04-05 16:26:36 -03:00
Nahuel Rocchetti
19ef603b90
Merge branch 'master' into terrain 2023-03-02 19:54:50 -03: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
9b4dd0eeb0 Add loading of terrain geometry 2023-02-15 19:27:10 -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
808150f2df Fix typo (Perist -> Persist) 2023-02-04 18:18:40 -03:00
Nahuel Rocchetti
c78587ee99
Merge pull request #22 from ammaraskar/scenegraph_base
Implement Scenegraph parsing
2023-02-02 22:12:59 -03:00
Ammar Askar
7f3072ce19 Implement Scenegraph parsing 2023-02-02 20:05:02 -05:00
LazyDuchess
3e0abd9f48 Skip over unused fields in OBJD 2023-02-01 19:46:19 -03:00
LazyDuchess
1482af268f Clean up field iteration in OBJCodec. 2023-02-01 15:21:14 -03:00
LazyDuchess
c105d206a9 Fix properties 2023-02-01 15:05:08 -03:00
LazyDuchess
fff60b388b Make uint properties for GUIDs in OBJD. 2023-02-01 14:51:11 -03:00
LazyDuchess
3fc725a53e Make ResourceKey into a struct 2023-02-01 00:22:07 -03:00
berylliumquestion
f38ea4fe1e Removed unused using 2023-01-30 19:39:11 -05:00
berylliumquestion
e73031bccf Changed SortedList to string[] array 2023-01-30 19:29:55 -05:00
berylliumquestion
b093833116 Added the rest of variables as per OBJD specification. Made all of the ushort to make deserialization loop cleaner. 2023-01-30 18:03:30 -05:00
LazyDuchess
d91572c204 Added OpenTS2/Resource Key/From Filename menu item to Editor, to allow browsing for Instance IDs 2023-01-30 17:15:14 -03:00
LazyDuchess
845260b3dd Replace WavUtility with custom solution. 2023-01-27 03:34:11 -03:00
LazyDuchess
ade0f8f124 Workaround WavUtility being unable to parse EP8 splash music. 2023-01-27 01:40:02 -03:00
berylliumquestion
f7d0ff3ffc Removed deprecated and commented out code 2023-01-25 22:49:32 -05:00
berylliumquestion
d04cd31d35 Removed underlying cs file and associated meta file for deprecated StringSetTest scene 2023-01-25 19:04:07 -05:00
berylliumquestion
bb032eac48 Deprecated test removed 2023-01-24 18:46:10 -05:00
LazyDuchess
c5531b9e6e Implement test for saving compressed entries. 2023-01-20 18:45:55 -03:00
LazyDuchess
a0350dbe37 Refactor DBPFFile Changes system. 2023-01-20 18:00:39 -03:00
LazyDuchess
534f5153b2 Test asset editing and deletion. 2022-12-24 13:15:45 -03:00
LazyDuchess
293b1f7003 Don't clear cache for package when writing to file. 2022-12-24 12:21:22 -03:00
LazyDuchess
acacea9daa Refactor content system.
ContentManager -> ContentLoading
ContentProvider is now a Singleton.
2022-12-24 03:07:38 -03:00
LazyDuchess
8ceb48b0ec Test contentmanager. 2022-12-23 11:12:11 -03:00
LazyDuchess
e9170f9041 Remove unnecessary line of code. 2022-12-23 09:45:05 -03:00
LazyDuchess
e0bb4d61e3 Link Global TGIs to Internal TGI 2022-12-22 10:55:50 -03:00
LazyDuchess
1fd5df251c Fix comparison in DBPFFileSaveLoadTest 2022-12-22 10:24:55 -03:00
LazyDuchess
01a0891f75 Rename DBPFFile methods for clarity. 2022-12-22 09:36:22 -03:00
LazyDuchess
9fdaab0297 Add comments to DBPFFileTest 2022-12-22 09:33:45 -03:00
LazyDuchess
c7c04c5aed Clean up filesystem class, fix file changes in DBPFFile, Add DBPFFileTest 2022-12-22 09:16:51 -03:00
LazyDuchess
7af13d86e4 De-partialize AudioAsset. 2022-12-20 21:05:05 -03:00
LazyDuchess
51b9c14245 De-abstract Texture loading. 2022-12-20 21:02:06 -03:00
LazyDuchess
5bdf7ecb3e De-abstract Reia playback 2022-12-20 20:40:37 -03:00
LazyDuchess
ba8766d6dc Remove Logger and Color classes 2022-12-20 20:34:31 -03:00
LazyDuchess
0e66fbca39 Remove Playstation 2 code 2022-12-20 20:03:03 -03:00
LazyDuchess
1e7d10fce1 Remove using UnityEngine from ReiaFrame 2022-12-15 18:19:39 -03:00
LazyDuchess
a9879f8f6d Add a localization test. 2022-12-15 05:30:07 -03:00
LazyDuchess
d4b113f3ab ContentProvider: Comment GetEntry. 2022-12-15 04:32:31 -03:00
LazyDuchess
c359d7e7bc ContentProvider: GetFromResourceMap -> GetEntry 2022-12-15 04:29:04 -03:00
LazyDuchess
c44b8139cf Abstract Unity Reia frame reading. 2022-12-15 04:26:42 -03:00
LazyDuchess
5eba4383cc Make Logger.Assert public static and conditional. 2022-12-14 03:30:13 -03:00
LazyDuchess
25e539ee0b Abstract Debug.Assert to remove UnityEngine dependencies outside of OpenTS2.Engine.
OpenTS2.Engine.Core -> OpenTS2.Engine.
Small code style changes.
2022-12-14 02:59:14 -03:00
Ammar Askar
f8ea146b65 Add unit tests through unity test runner
As per the unity guide, this requires creating an assembly that
depends on the `nunit.framework.dll` reference. In order to
allow this testing assembly to access the code under the OpenTS2
folder, we create a `ScriptsAssembly` assembly that the `Tests`
assembly can depend on.

Unfortunately these tests can only be run through unity or the
Rider IDE but unless we want to do a clean separation of all the
Unity bits from the C# code this will likely be the easiest
option.
2022-12-07 18:20:25 -05:00
LazyDuchess
d0ded7444d Reia: Benchmark, minor optimization, Release build error fix 2022-12-06 03:30:36 -03:00
LazyDuchess
178a91e6b4 Reia: Support non-divisible by 32x32 resolutions. Add non-streamed mode.
DBPF: Fix exception when making changes to a DBPFFile with raw bytes and null Codec.
2022-12-05 23:14:01 -03:00
LazyDuchess
431ceee57d Reia: Add streamed playback, clean up unused Texture2Ds 2022-12-05 14:46:24 -03:00
LazyDuchess
85a281e56f Fix up Reia rendering, use stopwatch to calculate current frame 2022-12-05 03:16:48 -03:00
LazyDuchess
276dde2bcd [WIP] Implement Reia video playback 2022-12-04 21:39:41 -03:00
LazyDuchess
51915a9b03 Delete obsolete alfatest component and scene 2022-12-04 15:29:22 -03:00
Nahuel Rocchetti
0154328de2
Merge pull request #5 from ammaraskar/master
Read and use ALFA channels when present. Fixes #4
2022-12-03 10:27:37 -03:00
Ammar Askar
48bc001574 Read and use ALFA channels when present. Fixes #4 2022-12-03 00:56:17 -05:00
LazyDuchess
be1268d0d4 Code style, add CTSS type and link STRCodec to it, add checks to avoid errors on missing assets and strings. 2022-12-02 18:48:06 -03:00
LazyDuchess
01bb5deae5 get rid of Main Component as it's not used no more 2022-11-19 00:50:21 -03:00
LazyDuchess
122334b4ec Initialize all loaded assemblies on Main(), not just the game one. 2022-11-16 21:08:40 -03:00
LazyDuchess
e5553748a8 more style changes, remove unused code 2022-11-15 02:34:00 -03:00