mirror of
https://github.com/sigonasr2/hamster.git
synced 2025-04-16 05:49:17 -05:00
Added a missing comma to hamster color names. Force "PurpleRed" entries to be renamed to Purple on load.
This commit is contained in:
parent
bf63336733
commit
8365864f09
3
.gitignore
vendored
3
.gitignore
vendored
@ -31,4 +31,5 @@ vs-build
|
||||
/CMakeCache.txt
|
||||
/cmake_install.cmake
|
||||
/hamster.vcxproj.user
|
||||
PBData
|
||||
PBData
|
||||
/bin/Hamster Planet - Winx64-post-jam-fix.zip
|
||||
|
@ -3,7 +3,7 @@
|
||||
"height": 4300,
|
||||
"width": 2
|
||||
},
|
||||
"activeFile": "TreeTemplates.tmx",
|
||||
"activeFile": "StageI.tmx",
|
||||
"expandedProjectPaths": [
|
||||
"."
|
||||
],
|
||||
@ -13,30 +13,30 @@
|
||||
"expandedObjectLayers": [
|
||||
12
|
||||
],
|
||||
"scale": 0.75,
|
||||
"scale": 0.125,
|
||||
"selectedLayer": 1,
|
||||
"viewCenter": {
|
||||
"x": 843.3333333333335,
|
||||
"y": 2534
|
||||
"x": -1024,
|
||||
"y": 2756
|
||||
}
|
||||
},
|
||||
"StageII.tmx": {
|
||||
"expandedObjectLayers": [
|
||||
5
|
||||
],
|
||||
"scale": 0.5,
|
||||
"scale": 0.125,
|
||||
"selectedLayer": 1,
|
||||
"viewCenter": {
|
||||
"x": 1459,
|
||||
"y": 2331
|
||||
"x": -576,
|
||||
"y": 3084
|
||||
}
|
||||
},
|
||||
"StageIII.tmx": {
|
||||
"scale": 1.5,
|
||||
"scale": 0.5,
|
||||
"selectedLayer": 0,
|
||||
"viewCenter": {
|
||||
"x": 1337,
|
||||
"y": 1724.333333333333
|
||||
"x": 944,
|
||||
"y": 2501
|
||||
}
|
||||
},
|
||||
"StageIV.tmx": {
|
||||
@ -46,27 +46,30 @@
|
||||
"scale": 0.25,
|
||||
"selectedLayer": 3,
|
||||
"viewCenter": {
|
||||
"x": 1098,
|
||||
"y": 958
|
||||
"x": 1096,
|
||||
"y": 954
|
||||
}
|
||||
},
|
||||
"StageIX.tmx": {
|
||||
"expandedObjectLayers": [
|
||||
5
|
||||
],
|
||||
"scale": 0.5,
|
||||
"scale": 0.125,
|
||||
"selectedLayer": 1,
|
||||
"viewCenter": {
|
||||
"x": 1298,
|
||||
"y": 4551
|
||||
"x": 1312,
|
||||
"y": 3868
|
||||
}
|
||||
},
|
||||
"StageV.tmx": {
|
||||
"expandedObjectLayers": [
|
||||
5
|
||||
],
|
||||
"scale": 0.33,
|
||||
"selectedLayer": 0,
|
||||
"viewCenter": {
|
||||
"x": 1118.1818181818182,
|
||||
"y": 1783.3333333333333
|
||||
"x": 1118.1818181818185,
|
||||
"y": 2889.393939393939
|
||||
}
|
||||
},
|
||||
"StageVI.tmx": {
|
||||
@ -76,44 +79,47 @@
|
||||
"scale": 0.5,
|
||||
"selectedLayer": 2,
|
||||
"viewCenter": {
|
||||
"x": 490,
|
||||
"y": 1913
|
||||
"x": 488,
|
||||
"y": 1179
|
||||
}
|
||||
},
|
||||
"StageVII.tmx": {
|
||||
"scale": 2,
|
||||
"expandedObjectLayers": [
|
||||
3
|
||||
],
|
||||
"scale": 0.33,
|
||||
"selectedLayer": 1,
|
||||
"viewCenter": {
|
||||
"x": 808.75,
|
||||
"y": 934.75
|
||||
"x": 1169.69696969697,
|
||||
"y": 1207.5757575757575
|
||||
}
|
||||
},
|
||||
"StageVIII.tmx": {
|
||||
"expandedObjectLayers": [
|
||||
4
|
||||
],
|
||||
"scale": 1.5,
|
||||
"scale": 0.33,
|
||||
"selectedLayer": 4,
|
||||
"viewCenter": {
|
||||
"x": 568.9999999999999,
|
||||
"y": 1141
|
||||
"x": 1460.606060606061,
|
||||
"y": 904.5454545454545
|
||||
}
|
||||
},
|
||||
"StageX.tmx": {
|
||||
"expandedObjectLayers": [
|
||||
4
|
||||
],
|
||||
"scale": 1,
|
||||
"scale": 0.33,
|
||||
"selectedLayer": 3,
|
||||
"viewCenter": {
|
||||
"x": 1726,
|
||||
"y": 632.5
|
||||
"x": 1651.5151515151515,
|
||||
"y": 1153.030303030303
|
||||
}
|
||||
},
|
||||
"Terrain.tsx": {
|
||||
"dynamicWrapping": false,
|
||||
"scaleInDock": 1,
|
||||
"scaleInEditor": 2
|
||||
"scaleInDock": 2,
|
||||
"scaleInEditor": 3
|
||||
},
|
||||
"TestLevel.tmx": {
|
||||
"expandedObjectLayers": [
|
||||
@ -122,16 +128,16 @@
|
||||
"scale": 1,
|
||||
"selectedLayer": 2,
|
||||
"viewCenter": {
|
||||
"x": 516,
|
||||
"y": 577.5
|
||||
"x": 1600,
|
||||
"y": 1599.5
|
||||
}
|
||||
},
|
||||
"TreeTemplates.tmx": {
|
||||
"scale": 3,
|
||||
"selectedLayer": 0,
|
||||
"viewCenter": {
|
||||
"x": 251.83333333333334,
|
||||
"y": 165.16666666666663
|
||||
"x": 251.66666666666663,
|
||||
"y": 164.83333333333334
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -147,7 +153,17 @@
|
||||
"openFiles": [
|
||||
"TestLevel.tmx",
|
||||
"Terrain.tsx",
|
||||
"TreeTemplates.tmx"
|
||||
"TreeTemplates.tmx",
|
||||
"StageIV.tmx",
|
||||
"StageV.tmx",
|
||||
"StageVI.tmx",
|
||||
"StageVII.tmx",
|
||||
"StageVIII.tmx",
|
||||
"StageIX.tmx",
|
||||
"StageX.tmx",
|
||||
"StageI.tmx",
|
||||
"StageII.tmx",
|
||||
"StageIII.tmx"
|
||||
],
|
||||
"project": "HamsterGame.tiled-project",
|
||||
"property.type": "BGM",
|
||||
@ -156,9 +172,14 @@
|
||||
"Terrain.tsx",
|
||||
"TreeTemplates.tmx",
|
||||
"StageIV.tmx",
|
||||
"StageII.tmx",
|
||||
"StageV.tmx",
|
||||
"StageVI.tmx",
|
||||
"StageVII.tmx",
|
||||
"StageVIII.tmx",
|
||||
"StageIX.tmx",
|
||||
"StageX.tmx",
|
||||
"StageIII.tmx",
|
||||
"StageI.tmx"
|
||||
"StageII.tmx"
|
||||
],
|
||||
"tileset.lastUsedFormat": "tsx",
|
||||
"tileset.tileSize": {
|
||||
|
@ -27,7 +27,6 @@ bool HamsterGame::OnUserCreate(){
|
||||
for(const std::string&map:mapNameList){
|
||||
mapPBs[map]=std::numeric_limits<int>::max();
|
||||
}
|
||||
LoadPBs();
|
||||
audio.SetBackgroundPlay(true);
|
||||
|
||||
olc::GFX3D::ConfigureDisplay();
|
||||
@ -397,6 +396,7 @@ bool HamsterGame::OnUserUpdate(float fElapsedTime){
|
||||
if(!netInitialized){
|
||||
net.InitSession();
|
||||
netInitialized=true;
|
||||
LoadPBs();
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_idb_async_load("hamster",Game().bgmVolLabel.c_str(),&Game().bgmVol,[](void*arg,void*data,int length){
|
||||
@ -433,6 +433,7 @@ bool HamsterGame::OnUserUpdate(float fElapsedTime){
|
||||
std::cout<<rawMetadata<<std::endl;
|
||||
*((std::string*)(arg))=rawMetadata.substr(0,length);
|
||||
std::cout<<std::format("Success! Loaded Hamster Color {}",*((std::string*)(arg)))<<std::endl;
|
||||
if(*((std::string*)(arg))=="PurpleRed")*((std::string*)(arg))="Purple";
|
||||
HamsterGame::Game().net.SetColor(*((std::string*)(arg)));
|
||||
},
|
||||
[](void*arg){
|
||||
@ -731,6 +732,7 @@ void HamsterGame::LoadPBs(){
|
||||
}break;
|
||||
case 19:{
|
||||
file>>Game().hamsterColor;
|
||||
if(Game().hamsterColor=="PurpleRed")Game().hamsterColor="Purple";
|
||||
Game().net.SetColor(Game().hamsterColor);
|
||||
std::cout<<Game().hamsterColor<<std::endl;
|
||||
}break;
|
||||
|
@ -89,7 +89,7 @@ private:
|
||||
"Cyan",
|
||||
"Black",
|
||||
"Green",
|
||||
"Purple"
|
||||
"Purple",
|
||||
"Red",
|
||||
"Blue",
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user