Comments (7)
I think this might have something to do with weird string null-terminators. I'm being told I can't open a handle to a section due to this..
from sh3redux.
So it would seem that loading everything from arc.arc is accurate (as seen in attached log.txt). Therefore this MUST have something to do with actually finding the file in the map, but I can't see anything wrong with the code for it..??
Also note that it complains of multiple files of the same name.
log.txt
from sh3redux.
More strange behaviour, attempting to print out keys and indexes results in this each step. I'm surprised it loads anything when I put a different file name in, this is super weird.
EDIT: Okay, I've done a bit more probing, and it seems like there's an error with c_sections
. Stepping through after a call to section.Load() returns a map with the keys all the same.
EDIT EDIT: Okay, there is a serious problem here. The map seems to fuck itself right after the for loop where we map the file name to it's index (section.cpp, line 66-77). When I try to search for the file in the map right after it is inserted, it can't find it. This couldn't possibly be a bug in the c++ runtime, could it??
from sh3redux.
More strange behaviour, attempting to print out keys and indexes results in this each step. I'm surprised it loads anything when I put a different file name in, this is super weird.
You're not iterating over the map here, since you don't increment it
.
Try
for(auto i : candidate.fileList)
{
std::printf("Path: %s, index: %d\n", i.first.c_str(), i.second);
}
While I'm also getting warnings about duplicates, at least the file "data/eff_tex/fire00_tr.pic" is correctly detected to be in section "tex" and "data/tmp/us11.map" to be in section "bgus". Which file are you trying to load that is mapped to the wrong section?
I'm looking further into the duplicate warnings ATM.
from sh3redux.
You're not iterating over the map here, since you don't increment it.
Lol, I just realised that when I opened the project again after a few drinks.. Alcohol goes in and code comes out I guess..
Which file are you trying to load that is mapped to the wrong section?
Most files. They end up dumping _CATALOG.VIX
for some reason, I'm not sure. That or they fail to open at all and just silently fail (returning ARC_FILE_NOT_FOUND).
It would seem that LoadFile()
isn't detecting files in the map correctly. I'm not too up to date with STL stuff like iterators, so I'm not too sure if there are any issues.
from sh3redux.
#69 with the following patch does the right thing for me, i.e. first opens "tex.arc" and then "bgus.arc":
diff --git a/source/main.cpp b/source/main.cpp
index 9be0896..e23c033 100644
--- a/source/main.cpp
+++ b/source/main.cpp
@@ -71,11 +71,12 @@ int main(int argc, char** argv)
std::printf("%f\n", static_cast<double>(ret.y));
// sh3_config config;
-// sh3_arc arc;
+ sh3_arc arc;
//
// arc.Load();
-// std::vector<uint8_t> data;
-// arc.LoadFile("data/eff_tex/fire00_tr.pic", data);
+ std::vector<uint8_t> data;
+ arc.LoadFile("data/eff_tex/fire00_tr.pic", data);
+ arc.LoadFile("data/tmp/us11.map", data);
//
// sh3_window* window = new sh3_window(640, 480, "SILENT HILL 3");
from sh3redux.
Those two files seem to work. Try opening data/bg/hu/hu22.kg2
and check the output. It loads _CATALOG.VIX
for some reason.
from sh3redux.
Related Issues (20)
- Useless warnings from gcc -Weffc++ HOT 4
- Provide default constructors and move constructors to source (*.cpp) files.
- overly careful numeric casts HOT 2
- Consider libfmt for Log HOT 5
- Create bugs folder to outline found compiler bugs HOT 4
- Reverse Engineering file formats HOT 15
- CMake include_directories Error HOT 17
- file format about silent hill2 HOT 3
- Problems with building( Cmake and Sdl2) HOT 29
- Include required libraries in repository HOT 4
- Switch from `cmake` to `premake5` HOT 7
- Game logic hardcoding HOT 3
- Is this project still active? HOT 1
- Could you talk about konami's skeletal animation format by Reverse Engineering?
- Breakdown swizzled 8bpp paletted texture data HOT 3
- Random questions to the developers HOT 2
- Weird input into vfile HOT 3
- Arc extraction produces wong output HOT 2
- CMakesLists.txt problems HOT 2
- Generic resource loading HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sh3redux.