Commit graph

104 commits

Author SHA1 Message Date
Atirut Wattanamongkol
027f2ccd53 Finish implementing Frame List 2022-12-04 17:35:40 +07:00
Atirut Wattanamongkol
492487029f Initial progress on RW Frame List 2022-12-04 17:16:17 +07:00
Atirut Wattanamongkol
27dfb870ac Merge branch 'collision' into main 2022-11-20 10:48:35 +07:00
Atirut Wattanamongkol
e03ab241dc Load all collisions 2022-11-20 07:31:12 +07:00
Atirut Wattanamongkol
6749bed6ea Implement mesh collision shape 2022-11-20 06:40:40 +07:00
Atirut Wattanamongkol
b6c10f6d94 Fully implement box collisions 2022-11-20 05:55:40 +07:00
Atirut Wattanamongkol
ecc662b1a7 Box collisions 2022-11-20 04:58:53 +07:00
Atirut Wattanamongkol
511e0a9efc Remove duplicate codes 2022-11-20 04:55:03 +07:00
Atirut Wattanamongkol
08def0a53e Sphere collisions 2022-11-20 04:45:58 +07:00
Atirut Wattanamongkol
da1e93b2bc Optimize StreamedMesh distance calculation 2022-11-20 04:09:58 +07:00
Atirut Wattanamongkol
4f0f1cd063 Implement window lights 2022-11-20 01:40:57 +07:00
Atirut Wattanamongkol
afa350dfa8 Half light render distance
This fixes a crash around Portland subway station
2022-11-20 01:26:43 +07:00
Atirut Wattanamongkol
3a94303144 Disable light shadows
Shadows are behaving a little weird so let's turn them off for now
2022-11-19 08:31:40 +07:00
Atirut Wattanamongkol
59b1e5cfcb Fully implement IDE lights 2022-11-19 08:08:01 +07:00
Atirut Wattanamongkol
9c71ce2128 Optimize Map Builder's spawn function
Maps now load pretty much instantly
2022-11-19 07:48:41 +07:00
Atirut Wattanamongkol
d460418a6a 2DFX lights stub 2022-11-19 05:39:07 +07:00
Atirut Wattanamongkol
b10b98176b Change how items are spawned 2022-11-19 05:06:08 +07:00
Atirut Wattanamongkol
99df35219e Implement the rest of chunk types 2022-11-19 04:19:19 +07:00
Atirut Wattanamongkol
dfc8da11f4 Some initial work 2022-11-19 03:56:48 +07:00
Atirut Wattanamongkol
fa9f2f6669 Remove extra indentation from streamed mesh alpha check 2022-11-19 03:41:05 +07:00
Atirut Wattanamongkol
0f70740ffd Remove unused mesh loading code from Map Builder 2022-11-19 03:37:09 +07:00
Atirut Wattanamongkol
493160e588 Remove generic.txd check from Map Builder 2022-11-19 03:32:43 +07:00
Atirut Wattanamongkol
ee23592645 Add support for additional CD images
Not fully tested with mods, use this `gta*.dat` directive at your own risk
2022-11-19 02:46:10 +07:00
Atirut Wattanamongkol
d3d499e48a Properly load mipmaps
This fix some textures failing to load after the rewrite
2022-11-19 02:45:26 +07:00
Atirut Wattanamongkol
e21d743b0d Improve asset loading 2022-11-18 11:36:05 +07:00
Atirut Wattanamongkol
2cbd6eb139 Mipmap stuff 2022-11-18 11:31:04 +07:00
Atirut Wattanamongkol
1fdbda65a0 Rewrite RW raster loader 2022-11-18 09:37:51 +07:00
Atirut Wattanamongkol
6680786540 Disable backface culling for all objects 2022-11-18 05:06:12 +07:00
Atirut Wattanamongkol
1e8976d332 Wait for threads to finish before exiting tree 2022-11-18 04:34:56 +07:00
Atirut Wattanamongkol
bf9adedcfe Fix subsequent map loads killing performance 2022-11-18 04:28:10 +07:00
Atirut Wattanamongkol
6814222af4 Improve handling of texture transparency
No more weird-looking manholes
2022-11-18 04:02:26 +07:00
Atirut Wattanamongkol
e4e3067841 Fix another rotation axis being wrong 2022-11-18 03:52:32 +07:00
Atirut Wattanamongkol
ebbaaf997a Make StreamedMesh thread a class member 2022-11-18 03:46:30 +07:00
Atirut Wattanamongkol
de0ab8708a Initial implementation 2022-11-18 03:10:21 +07:00
Atirut Wattanamongkol
f3b6e658ce Make Item Definition & Placement global classes 2022-11-18 01:52:29 +07:00
Atirut Wattanamongkol
9333bf54fa Implement multiple textures 2022-11-18 01:20:04 +07:00
Atirut Wattanamongkol
33d387d52b Make RWTexture properties easier to access 2022-11-17 22:17:12 +07:00
Atirut Wattanamongkol
ca4bac0423 Fix wrong rotation on train tracks, etc. 2022-11-17 21:24:10 +07:00
Atirut Wattanamongkol
acb90fc623 Load all geometries in a DFF file 2022-11-17 21:02:09 +07:00
Atirut Wattanamongkol
828a281a3a Add missing newline
Because GDSCript style™️
2022-11-17 20:11:01 +07:00
Atirut Wattanamongkol
aeb4249f5e Use alpha hash
This fixes the alpha sorting problem and also make trees cast shadow but also make some items grainy. Still not sure if I should use this in the long run.
2022-11-17 20:03:21 +07:00
Atirut Wattanamongkol
3c76567ee8 Detect alpha from item flags 2022-11-17 19:40:56 +07:00
Atirut Wattanamongkol
8d2963413a Ignore shadow items 2022-11-17 19:31:34 +07:00
Atirut Wattanamongkol
330b5a7af2 Disable face culling on transparent items 2022-11-17 19:31:18 +07:00
Atirut Wattanamongkol
4812a2c22c Alpha detection 2022-11-17 18:46:38 +07:00
Atirut Wattanamongkol
e52e49cb9f Break out of loop when the model texture is found 2022-11-17 18:30:21 +07:00
Atirut Wattanamongkol
2a2663ca32 Properly compare model and TXD texture name 2022-11-17 17:56:11 +07:00
Atirut Wattanamongkol
a2f8e7594d Fix wrong render distance token 2022-11-17 17:49:00 +07:00
Atirut Wattanamongkol
8bce57153e Set render distance 2022-11-17 17:48:50 +07:00
Atirut Wattanamongkol
8b559100e8 AssetLoader + some refactoring 2022-11-17 17:38:22 +07:00