Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Texture Editor #11

Open
wants to merge 80 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
b9d8fd8
Texture Editor initial commit:
DronCode Jul 30, 2023
52a0418
Trying to fix conan build script in GitHub workflows
DronCode Jul 30, 2023
505cd30
Trying to fix build (added deps into cmake)
DronCode Jul 30, 2023
7a07f53
Trying to fix deploy script
DronCode Jul 30, 2023
5c28ce2
Another try to build it
DronCode Jul 30, 2023
8d6bf07
Fixed TEXWriter::write issue
DronCode Jul 30, 2023
7e6fb99
PRM reader by 2kpr ported & added to GameLib
DronCode Oct 7, 2023
4afa017
Trying to draw something... Need to complete MAT support to draw with…
DronCode Oct 7, 2023
405550b
Try fix build
DronCode Oct 7, 2023
482e5e8
Another fix
DronCode Oct 7, 2023
2657c65
Fix MAT file reader implementation. Not tested properly!
DronCode Oct 8, 2023
5f8ae49
Trash texturing v0
DronCode Oct 8, 2023
bed4650
Nice texturing & fixed bug in buffer preparation, but still have bug …
DronCode Oct 9, 2023
4a56c4f
Full material decompression support.
DronCode Oct 9, 2023
194edec
Add debug textures, move shader sources our of C++ code, partially fi…
DronCode Oct 10, 2023
54d6bfd
Fix shader loader
DronCode Oct 10, 2023
92cdfba
Finally fixed transforms, movement and few little bugs in camera control
DronCode Oct 10, 2023
2cf4b15
Bounding Boxes support
DronCode Oct 10, 2023
72cc846
Add RMC/RMI file support. Fix bug with leaked resources between levels.
DronCode Oct 11, 2023
13ebe2e
Refactored renderer, fixed UV
DronCode Oct 11, 2023
3ea52f7
Added support of bounding box rendering (rendering disabled, will ena…
DronCode Oct 11, 2023
db1b094
Implemented render list based renderer with sorting. But not all issu…
DronCode Oct 11, 2023
c45b1b9
Object selection from SceneTree widget
DronCode Oct 11, 2023
128b383
Fix some issues with alpha blending
DronCode Oct 12, 2023
3922e10
Add bounding boxes into RenderEntry to use it in object picking. Adde…
DronCode Oct 12, 2023
8851b54
Fixed PRM reader of VF_34 format. Also, trying to fix build on CI.
DronCode Oct 12, 2023
3d73b7b
Transform cache. Added support of variations and variation filtering.
DronCode Oct 12, 2023
e18e47c
Added ZGEOMREF path resolver.
DronCode Oct 12, 2023
e9e2123
Sync of textures between TEX and game preview.
DronCode Oct 12, 2023
4c6a1f9
Reversed PostMissionPF controller type. Fixed crash when no RMI/RMC t…
DronCode Oct 15, 2023
e99666f
Removed material tab from editor.
DronCode Oct 16, 2023
6fe8ad5
[EXPERIMENTAL] New render, trying to fix alpha blending. Need to opti…
DronCode Oct 18, 2023
6a482d3
Added texture cache for fast texture lookup.
DronCode Oct 19, 2023
9c6504c
Fixed transform calculation code.
DronCode Oct 21, 2023
0936f05
Trying to optimize rendering.
DronCode Dec 21, 2023
c358260
Fix missing include
DronCode Dec 21, 2023
2e58a97
Refactored camera class.
DronCode Dec 22, 2023
214e386
Fixed world transformation for bounding boxes.
DronCode Dec 23, 2023
722b634
Fixed bug with wrong left/right movement
DronCode Dec 23, 2023
32f5af9
Fixed issue with alpha objects on M13
DronCode Dec 23, 2023
4c32758
[PRE-PORTAL] Just backup before major changes in rendering pipeline
DronCode Dec 25, 2023
5b36691
Fixed bug with wrong matrix multiplication order (door bug)
DronCode Apr 13, 2024
f3d2546
Added partial rendering and mid-scene lookup for portals
DronCode Apr 13, 2024
17c4211
Small refactoring, added mid-room rendering (base) and fixed few bugs…
DronCode Apr 14, 2024
9bad07a
Added world picking v0.1 (no dynamic objects, debug switching view)
DronCode Apr 14, 2024
da53c90
World picking: added signal to widget, fixed few rendering issues wit…
DronCode Apr 14, 2024
9027bdd
Reversed some OCT entities.
DronCode Apr 16, 2024
b970de1
Reversed some stuff in some places
DronCode Apr 26, 2024
ffef3ff
Added base templates for script reversal.
DronCode Apr 26, 2024
68b6a1d
All base scripts marked
DronCode Apr 27, 2024
912c08e
M00 level control marked
DronCode Apr 27, 2024
941332d
Hideout all scripts marked
DronCode Apr 27, 2024
95c8165
Small markup changes
DronCode Apr 28, 2024
9a8efa6
Script replacement works well!
DronCode Apr 28, 2024
db5c0fd
Try fix build
DronCode Apr 28, 2024
0d33920
Try to fix build again...
DronCode Apr 28, 2024
47395dc
Refactored work with models.
DronCode May 1, 2024
7813c45
Fixed critical bug in SceneRenderWidget with broken reference.
DronCode May 1, 2024
927c5e9
Finished script selector dialog.
DronCode May 1, 2024
741a3d9
M13: Class merge
DronCode May 1, 2024
690ac53
Removed highlight of virtual properties.
DronCode May 2, 2024
2779275
Rendering of dynamic objects
DronCode Jun 6, 2024
29c3951
Fix CI: add support of 'scripts' folder
DronCode Jun 6, 2024
f7e57ca
Added far distance limitation to render queue (do not render far obje…
DronCode Jun 7, 2024
d3fecda
Removed BoundingBox caching to fix issues with object positioning & v…
DronCode Jun 8, 2024
17796bf
Code cleanup
DronCode Jun 8, 2024
973969e
Added levels drag & drop feature.
DronCode Jun 8, 2024
740026b
Fix regression: bad rendering on M13
DronCode Jun 8, 2024
31e93ce
M00: All scripts are reversed
DronCode Jun 8, 2024
fe767d3
Added LOC file support (read & write)
DronCode Jun 9, 2024
8e7036b
Added localization viewer
DronCode Jun 9, 2024
da6eb01
Fixed crash in extra checks.
DronCode Jun 9, 2024
f815aee
Implemented base editor & added key sort in serializer
DronCode Jun 9, 2024
9445d65
Added support of localized strings and custom tool to select localize…
DronCode Jun 9, 2024
a774f9a
Added support of M05 specific LOC tag
DronCode Jun 11, 2024
50927c3
Confirmed support of all levels to read & write (validation passed)
DronCode Jun 11, 2024
fa8e06b
Fixed transform propagation (again)
DronCode Jun 11, 2024
000b482
Added support of RenderDoc
DronCode Oct 2, 2024
96c6f01
CI: Switch actions/upload-artifact to v4
DronCode Oct 2, 2024
0b46894
Reversed colibits from GMS.
DronCode Oct 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 13 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.54.0
version: 2.0.9

- name: Make build folder and install Conan dependencies
run: |
mkdir build
conan install . -s build_type=Release --install-folder=build
conan profile detect --force
conan install . --output-folder=build --build=missing -s build_type=Release

- name: Generate projects
run: |
Expand All @@ -61,39 +62,21 @@ jobs:
- name: Move assets to distribution folder
run: |
mkdir dist
mv build/bin/BMEdit.exe dist
mv build/bin/d3dcompiler_47.dll dist
mv build/bin/opengl32sw.dll dist
mv build/bin/Qt6Core.dll dist
mv build/bin/Qt6Gui.dll dist
mv build/bin/Qt6OpenGL.dll dist
mv build/bin/Qt6OpenGLWidgets.dll dist
mv build/bin/Qt6Svg.dll dist
mv build/bin/Qt6Widgets.dll dist
mv build/bin/Qt63DCore.dll dist
mv build/bin/Qt63DRender.dll dist
mv build/bin/Qt63DInput.dll dist
mv build/bin/Qt63DAnimation.dll dist
mv build/bin/Qt63DExtras.dll dist
mv build/bin/Qt6Network.dll dist
mv build/bin/Qt6Concurrent.dll dist
mv build/bin/zip.dll dist
mv build/bin/translations dist/translations
mv build/bin/styles dist/styles
mv build/bin/platforms dist/platforms
mv build/bin/renderers dist/renderers
mv build/bin/sceneparsers dist/sceneparsers
mv build/bin/networkinformation dist/networkinformation
mv build/bin/tls dist/tls
mv build/bin/geometryloaders dist/geometryloaders
mv build/bin/imageformats dist/imageformats
mv build/bin/iconengines dist/iconengines
mv build/Release/BMEdit.exe dist
mv build/Release/*.dll dist
mv build/Release/styles dist/styles
mv build/Release/platforms dist/platforms
mv build/Release/networkinformation dist/networkinformation
mv build/Release/tls dist/tls
mv build/Release/imageformats dist/imageformats
mv build/Release/iconengines dist/iconengines
mv Assets/g1 dist/g1
mv Assets/scripts dist/scripts
mv Assets/TypesRegistry.json dist
mv README.md dist

- name: Upload build artifacts - BMEdit
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: "BMEdit"
path: dist
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ cmake-build-*
BMEdit/Editor/UI/UI/*.autosave
ThirdParty/zlib/zconf.h.included
Test
venv
venv
Notes.txt
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
[submodule "ThirdParty/fmt"]
path = ThirdParty/fmt
url = https://github.com/fmtlib/fmt
[submodule "ThirdParty/glm"]
path = ThirdParty/glm
url = https://github.com/g-truc/glm
3 changes: 2 additions & 1 deletion Assets/TypesRegistry.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,6 @@
"0x200458": "ZHFlowLnkObj",
"0x20045C": "ZMardiGrassHFlow",
"0x20045F": "ZHFlowM11"
}
},
"script_incs": "scripts"
}
8 changes: 4 additions & 4 deletions Assets/g1/CCheckInside.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"parent": "ZEventBase",
"kind": "TypeKind.COMPLEX",
"properties": [
{ "name": "property_2C", "typename": "ZGEOMREF", "offset": 44 },
{ "name": "property_30", "typename": "ZGEOMREF", ",offset": 48 },
{ "name": "property_34", "typename": "ZMsg", "offset": 52 },
{ "name": "property_36", "typename": "ZMsg", "offset": 54 },
{ "name": "rTarget", "typename": "ZGEOMREF", "offset": 44 },
{ "name": "rObserverActor", "typename": "ZGEOMREF", ",offset": 48 },
{ "name": "OnEnterMSG", "typename": "ZMsg", "offset": 52 },
{ "name": "OnLeaveMSG", "typename": "ZMsg", "offset": 54 },
{ "name": "property_38", "typename": "PRPOpCode.Bool", "offset": 56 },
{ "name": "property_39", "typename": "PRPOpCode.Bool", "offset": 57 },
{ "name": "property_3A", "typename": "PRPOpCode.Bool", "offset": 58 },
Expand Down
15 changes: 15 additions & 0 deletions Assets/g1/ECollisionMask.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"typename": "ECollisionMask",
"kind": "TypeKind.ENUM",
"enum": {
"COLIMASK_All" : 1,
"COLIMASK_Background": 2,
"COLIMASK_Shot": 4,
"COLIMASK_WaterGlass": 8,
"COLIMASK_NoWalk": 16,
"COLIMASK_Sight": 32,
"COLIMASK_Hero": 64,
"COLIMASK_Camera": 128,
"COLIMASK_NPC": 256
}
}
7 changes: 7 additions & 0 deletions Assets/g1/PostMissionPF.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"typename": "PostMissionPF",
"parent": "ZEventBase",
"kind": "TypeKind.COMPLEX",
"properties": [
]
}
2 changes: 1 addition & 1 deletion Assets/g1/ZAction.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"parent": "ZEventBase",
"kind": "TypeKind.COMPLEX",
"properties": [
{ "name": "ActionName", "typename": "PRPOpCode.String" },
{ "name": "ActionName", "typename": "ZLocalizedString" },
{ "name": "IsVisible", "typename": "PRPOpCode.Bool" },
{ "name": "ActionType", "typename": "ZAction.EActionType", "offset": 44 },
{ "name": "MessageID", "typename": "ZMsg", "offset": 48 },
Expand Down
3 changes: 2 additions & 1 deletion Assets/g1/ZGEOMREF.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"typename": "ZGEOMREF",
"kind": "TypeKind.ALIAS",
"alias": "PRPOpCode.String"
"alias": "PRPOpCode.String",
"editor": "SelectGeomTool"
}
2 changes: 1 addition & 1 deletion Assets/g1/ZGuardQuarterController.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"parent": "ZEventBase",
"kind": "TypeKind.COMPLEX",
"properties": [
{ "name": "property_DC", "typename": "ZGEOMREF", "offset": 220 }
{ "name": "rWeaponStorage", "typename": "ZGEOMREF", "offset": 220 }
]
}
2 changes: 1 addition & 1 deletion Assets/g1/ZHM3Actor.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"parent": "ZActor",
"properties": [
{
"name": "property_900",
"name": "rDisguise",
"offset": 2304,
"typename": "ZGEOMREF"
},
Expand Down
6 changes: 3 additions & 3 deletions Assets/g1/ZHM3ItemTemplateWeapon.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"typename": "ZHM3ItemTemplateWeapon.EHM3WeaponScope"
},
{
"name": "property_178",
"name": "rReloadAnim",
"offset": 372,
"typename": "PRPOpCode.String"
},
Expand All @@ -38,12 +38,12 @@
"typename": "PRPOpCode.String"
},
{
"name": "property_180",
"name": "rHoldAnim",
"offset": 380,
"typename": "PRPOpCode.String"
},
{
"name": "property_184",
"name": "rRecoilAnim",
"offset": 384,
"typename": "PRPOpCode.String"
},
Expand Down
4 changes: 2 additions & 2 deletions Assets/g1/ZHM3LevelControlM13.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{ "name": "rJournalistActor", "typename": "ZGEOMREF", "offset": 1540 },
{ "name": "property_608", "typename": "ZGEOMREF", "offset": 1544 },
{ "name": "rPriestActor", "typename": "ZGEOMREF", "offset": 1548 },
{ "name": "property_610", "typename": "ZGEOMREF", "offset": 1552 },
{ "name": "property_614", "typename": "ZGEOMREF", "offset": 1556 }
{ "name": "rHitmanDieCutSequence", "typename": "ZGEOMREF", "offset": 1552 },
{ "name": "rMoviePlayer", "typename": "ZGEOMREF", "offset": 1556 }
]
}
2 changes: 1 addition & 1 deletion Assets/g1/ZItem.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"parent": "ZGROUP",
"properties": [
{
"name": "property_4C",
"name": "rItemTemplate",
"offset": 76,
"typename": "ZGEOMREF"
},
Expand Down
6 changes: 3 additions & 3 deletions Assets/g1/ZItemTemplateWeapon.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"typename": "ZItemTemplateWeapon.WEAPONTYPE"
},
{
"name": "property_A4",
"name": "rAmmoTemplate",
"offset": 164,
"typename": "ZREFTAB32"
},
Expand Down Expand Up @@ -78,12 +78,12 @@
"typename": "PRPOpCode.Bool"
},
{
"name": "property_E0",
"name": "rModelStates",
"offset": 224,
"typename": "ZREFTAB32"
},
{
"name": "property_FC",
"name": "rFlash",
"offset": 252,
"typename": "ZGEOMREF"
},
Expand Down
6 changes: 6 additions & 0 deletions Assets/g1/ZLocalizedString.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"typename": "ZLocalizedString",
"kind": "TypeKind.ALIAS",
"alias": "PRPOpCode.String",
"editor": "SelectLocalizationKey"
}
6 changes: 4 additions & 2 deletions Assets/g1/ZROOM.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
"parent": "ZTreeGroup",
"properties": [
{
"name": "property_6C",
"name": "iNeighboursCount",
"__comment__": "I'm not sure about that. 6C and 84 sometimes same",
"offset": 108,
"typename": "PRPOpCode.Int32"
},
{
"name": "property_84",
"name": "iExitsCount",
"__comment__": "I'm not sure about that. 6C and 84 sometimes same",
"offset": 132,
"typename": "PRPOpCode.Int8"
},
Expand Down
6 changes: 6 additions & 0 deletions Assets/g1/ZScriptC.ScriptID.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"typename": "ZScriptC.ScriptID",
"kind": "TypeKind.ALIAS",
"alias": "PRPOpCode.String",
"editor": "SelectGameScript"
}
2 changes: 1 addition & 1 deletion Assets/g1/ZScriptC.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"kind": "TypeKind.COMPLEX",
"skip_unexposed_properties": true,
"properties": [
{ "name": "ScriptName", "typename": "PRPOpCode.String" }
{ "name": "ScriptName", "typename": "ZScriptC.ScriptID", "__note": "DO NOT MODIFY THIS NAME!!!" }
]
}
Loading
Loading