Add in building model and other assets from bin and map stuff.

This commit is contained in:
sigonasr2 2025-08-23 17:46:27 -05:00
parent da75d4ef91
commit 8d298500ee
23 changed files with 326 additions and 4 deletions

1
.gitignore vendored
View File

@ -445,3 +445,4 @@ FodyWeavers.xsd
# End of https://www.toptal.com/developers/gitignore/api/visualstudio,c++
/CMakeFiles
/CMakeCache.txt
/assets/gfx/Cute RPG

14
Shep.tiled-project Normal file
View File

@ -0,0 +1,14 @@
{
"automappingRulesFile": "",
"commands": [
],
"compatibilityVersion": 1100,
"extensionsPath": "extensions",
"folders": [
"."
],
"properties": [
],
"propertyTypes": [
]
}

23
Shep.tiled-session Normal file
View File

@ -0,0 +1,23 @@
{
"Map/SizeTest": {
"height": 4300,
"width": 2
},
"activeFile": "",
"expandedProjectPaths": [
],
"fileStates": {
},
"last.imagePath": "J:/Shep/assets/gfx/Cute RPG/Cute RPG - Village/Cute RPG - Village/16x16",
"map.fixedSize": false,
"openFiles": [
],
"project": "Shep.tiled-project",
"recentFiles": [
],
"tileset.lastUsedFormat": "tsx",
"tileset.tileSize": {
"height": 16,
"width": 16
}
}

BIN
assets.lnk Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.10.2" name="Village" tilewidth="16" tileheight="16" tilecount="1024" columns="32">
<image source="../../../assets/gfx/Cute RPG/Cute RPG - Village/Cute RPG - Village/16x16/CuteRPG_Village.png" width="512" height="512"/>
</tileset>

View File

@ -0,0 +1,11 @@
# Exported from Wings 3D 2.3
newmtl building1
Ns 19.999999999999996
d 1.0
illum 2
Kd 1.0 1.0 1.0
Ka 0.0 0.0 0.0
Ks 0.19 0.19 0.19
Ke 0.0 0.0 0.0
map_Kd building1.png

View File

@ -0,0 +1,252 @@
# Exported from Wings 3D 2.3
mtllib building1.mtl
o Cube1
#51 vertices, 98 faces
v 0.33601152 0.0000000e+0 0.18690683
v -0.21332735 0.0000000e+0 7.00000000
v -0.21332735 2.00000000 0.0000000e+0
v -0.21332735 2.00000000 7.00000000
v 8.00000000 0.0000000e+0 0.0000000e+0
v 8.19005527 0.0000000e+0 7.00000000
v 8.00000000 2.00000000 0.0000000e+0
v 8.19005527 2.00000000 7.00000000
v 2.46259440 2.00000000 0.12382577
v 2.00000000 2.00000000 7.00000000
v 1.78667265 2.00000000 5.50000000
v 8.19005527 2.00000000 5.50000000
v 1.78667265 4.00000000 5.50000000
v 8.17841924 4.00000000 5.50000000
v 8.17841924 4.00000000 0.0000000e+0
v 1.78667265 4.00000000 0.0000000e+0
v 8.00000000 0.0000000e+0 6.80000000
v 7.80000000 0.0000000e+0 7.00000000
v 7.80000000 2.00000000 7.00000000
v 7.80000000 2.00000000 5.50000000
v 8.17841924 2.20000000 5.50000000
v 8.00000000 2.00000000 5.30000000
v 8.00000000 1.80000000 6.80000000
v 0.20000000 0.0000000e+0 7.00000000
v 0.33601152 0.0000000e+0 6.98690683
v 0.33601152 1.95653447 0.18690683
v 0.20000000 2.00000000 0.0000000e+0
v 0.20000000 2.00000000 7.00000000
v 2.20000000 2.00000000 5.50000000
v 2.00000000 2.00000000 5.70000000
v 2.46259440 2.00000000 5.42382577
v 2.20000000 4.00000000 5.50000000
v 2.20000000 4.00000000 0.0000000e+0
v 2.46259440 3.95549905 0.12382577
v 2.46259440 3.95549905 5.42382577
v 0.33601152 1.95653447 6.98690683
v 7.90803321 4.00000000 5.50000000
v 7.90803321 4.00000000 0.0000000e+0
v 8.00000000 3.90803321 0.0000000e+0
v 8.00000000 2.13496966 5.43496966
v 8.06335176 2.13333333 5.50000000
v 7.93496966 2.13496966 5.50000000
v 8.00000000 3.90803321 5.40803321
v 7.60788402 2.00000000 0.0000000e+0
v 7.60788402 2.00000000 5.30000000
v 7.60788402 1.80000000 6.80000000
v 7.60788402 0.0000000e+0 6.80000000
v 7.60788402 0.0000000e+0 0.0000000e+0
v 7.60788402 3.96904861 0.0000000e+0
v 7.60788402 3.96904861 5.40803321
v 7.60788402 2.13496966 5.43496966
vt 0.0000000e+0 5.8286709e-16
vt 0.0000000e+0 0.53658537
vt 0.0000000e+0 0.53658537
vt 0.0000000e+0 1.00000000
vt 1.0210364e-17 0.53209918
vt 2.7755576e-17 0.63414634
vt 2.7755576e-17 0.73170732
vt 2.2204460e-16 0.43902439
vt 4.7184479e-16 0.34146341
vt 1.8596236e-15 0.34146341
vt 4.4861847e-3 0.53658537
vt 9.7560976e-3 0.53658537
vt 9.7560976e-3 1.00000000
vt 9.7560976e-3 0.73170732
vt 9.7560976e-3 5.2458038e-16
vt 9.7560976e-3 0.34146341
vt 1.3058863e-2 0.63414634
vt 7.3170732e-2 0.63414634
vt 7.3170732e-2 0.64065041
vt 7.3170732e-2 0.64390244
vt 7.3170732e-2 0.73170732
vt 7.6342943e-2 0.64073023
vt 7.9471515e-2 0.73160196
vt 8.2926829e-2 0.63414634
vt 9.7560976e-2 0.0000000e+0
vt 9.7560976e-2 6.3414634e-2
vt 9.7560976e-2 7.3170732e-2
vt 9.7560976e-2 8.2926829e-2
vt 9.7560976e-2 0.34146341
vt 0.10731707 7.3170732e-2
vt 0.28292683 0.53658537
vt 0.28819674 1.00000000
vt 0.28819674 0.73170732
vt 0.29268293 1.00000000
vt 0.29268293 0.53658537
vt 0.29268293 0.73170732
vt 0.29268293 0.52682927
vt 0.29268293 0.43902439
vt 0.33227299 0.79004482
vt 0.33856541 0.74658724
vt 0.33903050 0.77603315
vt 0.34146341 0.53658537
vt 0.34146341 0.63414634
vt 0.34146341 0.63414634
vt 0.34146341 0.72195122
vt 0.34146341 0.72722113
vt 0.34146341 0.73170732
vt 0.34146341 0.53658537
vt 0.35121951 0.63414634
vt 0.35121951 0.53658537
vt 0.38048780 0.43902439
vt 0.38048780 7.3170732e-2
vt 0.38048780 4.2928624e-16
vt 0.39024390 0.43902439
vt 0.39024390 0.42926829
vt 0.39024390 0.34146341
vt 0.39024390 7.3170732e-2
vt 0.39024390 4.4408921e-16
vt 0.39024390 0.34146341
vt 0.39024390 0.34146341
vt 0.39024390 0.43902439
vt 0.39024390 0.52682927
vt 0.39024390 0.53658537
vt 0.39024390 0.0000000e+0
vt 0.39024390 9.7560976e-3
vt 0.39024390 0.43902439
vt 0.40000000 0.34146341
vt 0.40000000 2.0816682e-18
vt 0.40000000 0.43902439
vt 0.48780488 0.43902439
vt 0.60000000 0.63414634
vt 0.60843125 0.71845888
vt 0.60975610 0.63414634
vt 0.60975610 0.73170732
vt 0.62439024 0.53658537
vt 0.62966016 0.63414634
vt 0.63097413 0.54316925
vt 0.63414634 0.53658537
vt 0.63414634 0.54308943
vt 0.63414634 0.54634146
vt 0.63414634 0.63414634
vt 0.72195122 0.43902439
vt 0.73038247 0.52333693
vt 0.73170732 0.43902439
vt 0.73170732 0.53658537
vt 0.74884699 0.74010696
vt 0.74931208 0.76955287
vt 0.74953165 0.78345435
vt 0.77073171 8.1185059e-17
vt 0.77073171 0.34146341
vt 0.77073171 0.43902439
vt 0.78048780 0.34146341
vt 0.78048780 8.3266727e-17
vt 0.78048780 9.7560976e-3
vt 0.78048780 0.34146341
vt 0.78048780 0.43902439
g Cube1_building1
usemtl building1
s 1
f 1/56/ 9/38/ 5/9/
f 1/92/ 18/68/ 25/94/
f 1/61/ 36/83/ 26/62/
f 2/93/ 25/94/ 24/89/
f 2/60/ 28/69/ 4/66/
f 2/84/ 36/83/ 25/82/
f 3/10/ 28/15/ 27/16/
f 3/63/ 36/83/ 4/85/
f 4/1/ 28/15/ 3/10/
f 4/85/ 36/83/ 2/84/
f 5/9/ 9/38/ 7/8/
f 5/59/ 18/68/ 1/92/
f 5/42/ 44/43/ 48/42/
f 5/42/ 47/12/ 17/12/
f 6/64/ 18/68/ 17/65/
f 6/95/ 19/91/ 18/90/
f 6/3/ 23/17/ 8/6/
f 7/8/ 38/11/ 39/5/
f 7/43/ 39/46/ 44/43/
f 7/43/ 44/43/ 5/42/
f 8/96/ 19/91/ 6/95/
f 8/6/ 23/17/ 12/18/
f 9/38/ 26/55/ 27/51/
f 9/29/ 27/16/ 31/28/
f 9/44/ 35/72/ 34/45/
f 9/38/ 38/11/ 7/8/
f 10/70/ 18/90/ 19/91/
f 10/25/ 29/30/ 30/26/
f 10/25/ 30/26/ 28/15/
f 11/27/ 31/28/ 30/26/
f 11/48/ 32/49/ 13/43/
f 11/73/ 35/72/ 31/71/
f 12/57/ 19/53/ 8/58/
f 12/18/ 23/17/ 22/24/
f 12/18/ 40/22/ 41/19/
f 12/78/ 42/77/ 20/75/
f 13/7/ 32/14/ 16/4/
f 13/74/ 35/72/ 11/73/
f 14/36/ 38/32/ 37/33/
f 14/39/ 39/87/ 15/88/
f 14/21/ 40/22/ 43/23/
f 14/81/ 42/77/ 21/80/
f 15/34/ 38/32/ 14/36/
f 15/2/ 39/5/ 38/11/
f 16/4/ 32/14/ 33/13/
f 16/47/ 35/72/ 13/74/
f 17/65/ 18/68/ 5/59/
f 17/12/ 23/17/ 6/3/
f 17/12/ 47/12/ 23/17/
f 18/90/ 10/70/ 24/67/
f 19/53/ 29/30/ 10/25/
f 20/52/ 19/53/ 12/57/
f 20/52/ 29/30/ 19/53/
f 20/75/ 32/49/ 29/50/
f 21/20/ 40/22/ 14/21/
f 21/20/ 41/19/ 40/22/
f 22/24/ 40/22/ 12/18/
f 22/24/ 45/24/ 40/22/
f 23/17/ 45/24/ 22/24/
f 23/17/ 47/12/ 46/17/
f 24/89/ 25/94/ 18/68/
f 24/67/ 28/69/ 2/60/
f 25/82/ 36/83/ 1/61/
f 26/55/ 9/38/ 1/56/
f 26/62/ 36/83/ 3/63/
f 27/51/ 26/55/ 3/54/
f 28/69/ 24/67/ 10/70/
f 28/15/ 30/26/ 27/16/
f 29/50/ 32/49/ 11/48/
f 30/26/ 29/30/ 11/27/
f 31/28/ 27/16/ 30/26/
f 31/71/ 35/72/ 9/44/
f 32/49/ 20/75/ 37/76/
f 33/13/ 32/14/ 38/32/
f 33/31/ 34/37/ 16/35/
f 34/45/ 35/72/ 16/47/
f 34/37/ 38/11/ 9/38/
f 37/33/ 38/32/ 32/14/
f 37/76/ 42/77/ 14/81/
f 38/11/ 34/37/ 33/31/
f 39/87/ 50/40/ 49/86/
f 40/22/ 45/24/ 51/22/
f 40/22/ 50/23/ 43/23/
f 41/79/ 42/77/ 12/78/
f 42/77/ 37/76/ 20/75/
f 42/77/ 41/79/ 21/80/
f 43/41/ 39/87/ 14/39/
f 43/41/ 50/40/ 39/87/
f 44/43/ 49/46/ 45/24/
f 45/24/ 48/42/ 44/43/
f 46/17/ 45/24/ 23/17/
f 46/17/ 47/12/ 45/24/
f 48/42/ 45/24/ 47/12/
f 48/42/ 47/12/ 5/42/
f 49/46/ 44/43/ 39/46/
f 50/23/ 45/24/ 49/46/
f 51/22/ 45/24/ 50/23/
f 51/22/ 50/23/ 40/22/

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -68,10 +68,11 @@ public:
olc::mf4d matView;
olc::mf4d matProject;
olc::Renderable texCube,texSpace;
olc::Renderable texCube,texSpace,texBuilding;
olc::utils::hw3d::mesh meshFloorSpr;
olc::utils::hw3d::mesh meshSpr;
olc::utils::hw3d::mesh meshLightCube;
olc::utils::hw3d::mesh meshBuilding;
std::array<olc::vf3d, 64> cubes;
std::array<olc::vf3d, 3> lights;
@ -112,11 +113,20 @@ public:
CreateSpriteMesh();
CreateFloorSpriteMesh();
auto buildingLoad{hw3d::LoadObj("assets/models/building1.obj")};
if(!buildingLoad){
std::cout<<"Could not load Building!"<<std::endl;
throw;
}else{
meshBuilding=*buildingLoad;
}
// Why 2 cubes? the regular ones will have their vertex information recoloured
// Create texture (so we dont need to load anything)
texCube.Load("assets/gfx/nico-Trapper_512.png");
texSpace.Load("assets/gfx/space.png");
texBuilding.Load("assets/models/building1.png");
// Position cubes nicely
for(int x=0; x<8; x++)
@ -138,8 +148,8 @@ public:
hw3d::Camera3D_Orbit camera;
vf2d moved{};
vf3d pos{0,0,-10};
float rot{14};
vf3d pos{0,-3.04,-10};
float rot{28.9};
bool OnUserUpdate(float fElapsedTime) override
{
@ -213,7 +223,12 @@ public:
mf4d scale;
scale.scale(vf3d{3,3,3});
HW3D_DrawObject((matView * matWorld * scale).m, texSpace.Decal(), meshFloorSpr.layout, meshFloorSpr.pos, meshFloorSpr.uv, meshFloorSpr.col);
matWorld.translate(vf3d{0.5,0,1}+pos);
HW3D_SetCullMode(olc::CullMode::CW);
HW3D_DrawObject((matView * matWorld).m, texBuilding.Decal(), meshBuilding.layout, meshBuilding.pos, meshBuilding.uv, meshBuilding.col);
HW3D_SetCullMode(olc::CullMode::CCW);
// Draw light cubes
matWorld.translate(lights[0]+pos);
HW3D_DrawObject((matView * matWorld).m, nullptr, meshLightCube.layout, meshLightCube.pos, meshLightCube.uv, meshLightCube.col, olc::RED);

View File

@ -2148,6 +2148,8 @@ namespace olc
{
pSprite.release();
pSprite = nullptr;
std::cout<<"Could not load image "<<sFile<<std::endl;
throw;
return olc::rcode::NO_FILE;
}
}