Views: 20,056,109 |
Home
| Forums
| Uploader
| Wiki
| Object databases
| IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search |
04-26-24 06:49 AM |
Guest: |
0 users reading BCSV Editor | 1 bot |
Main - Archived forums - SMG hacking tools development - BCSV Editor | Hide post layouts | New reply |
Arisotura |
| ||
Star Mario in this room you have a pile of apple pies Level: 163 Posts: 631/9020 EXP: 56274860 Next: 212784 Since: 07-03-12 From: in a box Last post: 13 hours ago Last view: 13 hours ago |
Marionumber1 |
| ||
Wii U hacker Level: 55 Posts: 32/709 EXP: 1239480 Next: 74709 Since: 07-07-12 Last post: 2217 days ago Last view: 593 days ago |
I'm using the fixed keyword. |
Phantom Wings |
| ||
Normal user Level: 17 Posts: 3/46 EXP: 20482 Next: 4261 Since: 07-08-12 Last post: 3743 days ago Last view: 3743 days ago |
While heap memory and pointers may seem scary at first, you shouldn't knock them. Remember that these files have been specifically compiled for an environment that can use nothing but unsafe memory elements (RVL SDK is in C++). Marshalling data types from memory removes the need for excessive seeking and byte manipulation required when using streams. This also removes the need for dedicated read/write methods for each individual data type. Additionally, it allows you to use wrapper classes which removes the need for individually setting every field when reading in the more complex classes.
Anyways, MN1, if you're going to use unsafe memory in C#, you need the unsafe keyword either in the function declaration or the containing class declaration. You'll also need to go into the project properties and check "allow unsafe code" under build options. |
Marionumber1 |
| ||
Wii U hacker Level: 55 Posts: 33/709 EXP: 1239480 Next: 74709 Since: 07-07-12 Last post: 2217 days ago Last view: 593 days ago |
List<SByte> bytes = new List<SByte>();
String str; while (bcsvFile.ReadByte() != 0) { bcsvFile.Seek(stringOffset + strOffs + strCount, SeekOrigin.Begin); bytes.Add((SByte)bcsvFile.ReadByte()); strCount++; } unsafe { fixed (SByte* strData = bytes.ToArray()) { str = new String(strData, 0, bytes.ToArray().Length, System.Text.Encoding.GetEncoding("Shift-JIS")); } } this.data[i] = str; this.size[i] = (Byte)strCount; When I use this code, it works, but Japanese text is still displayed using ASCII characters. |
Phantom Wings |
| ||
Normal user Level: 17 Posts: 4/46 EXP: 20482 Next: 4261 Since: 07-08-12 Last post: 3743 days ago Last view: 3743 days ago |
Well, I tested your code with a string from the ObjectNameTable.tbl and it checks out on my end, here's the test code:
The input was from this file and the output was 天文台図書館. I might suggest that your computer doesn't support the Shift-JIS encoding, but if you've been using Anarchy and it has been displaying properly, then that likely isn't the case. |
Arisotura |
| ||
Star Mario in this room you have a pile of apple pies Level: 163 Posts: 641/9020 EXP: 56274860 Next: 212784 Since: 07-03-12 From: in a box Last post: 13 hours ago Last view: 13 hours ago |
Marionumber1 |
| ||
Wii U hacker Level: 55 Posts: 34/709 EXP: 1239480 Next: 74709 Since: 07-07-12 Last post: 2217 days ago Last view: 593 days ago |
Which version of .NET are you using, PhantomWings? The BCSV Editor is using .NET 3.5. |
Phantom Wings |
| ||
Normal user Level: 17 Posts: 5/46 EXP: 20482 Next: 4261 Since: 07-08-12 Last post: 3743 days ago Last view: 3743 days ago |
I'm using v3.5 SP1. I also retested the code segment up there just to make sure I didn't copy it wrong. It sounds like it's something in your system settings. |
Marionumber1 |
| ||
Wii U hacker Level: 55 Posts: 139/709 EXP: 1239480 Next: 74709 Since: 07-07-12 Last post: 2217 days ago Last view: 593 days ago |
Well, I guess that since I haven't updated this in a while, I'll release a new version. This one uses Shift-JIS code that doesn't seem to work on my PC, but PhantomWings says it does, so I'd appreciate people testing it and seeing if Japanese characters work.
https://www.dropbox.com/s/thc3rep4kvj1q32/BCSVE-v0.7.zip |
shibboleet |
| ||
Fire Mario DROP TABLE users; Level: 123 Posts: 1331/4661 EXP: 20892627 Next: 338639 Since: 07-07-12 Last post: 1350 days ago Last view: 362 days ago |
Works like a charm. Nice job, Marionumber1! (The weird clipping in the image was just a cropping fail.) ____________________ a |
shibboleet |
| ||
Fire Mario DROP TABLE users; Level: 123 Posts: 1772/4661 EXP: 20892627 Next: 338639 Since: 07-07-12 Last post: 1350 days ago Last view: 362 days ago |
hmm..I don't mean to bump but...
Was the download taken down on purpose? Because this is the version that ADDS stuff. https://kuribo64.net/get.php?id=2nm5EUidU21YhjHY Here's a new download if anybody wants it. ____________________ a |
Marionumber1 |
| ||
Wii U hacker Level: 55 Posts: 255/709 EXP: 1239480 Next: 74709 Since: 07-07-12 Last post: 2217 days ago Last view: 593 days ago |
What do you mean, ADDS? The version I posted has the ability to add entries. |
shibboleet |
| ||
Fire Mario DROP TABLE users; Level: 123 Posts: 1773/4661 EXP: 20892627 Next: 338639 Since: 07-07-12 Last post: 1350 days ago Last view: 362 days ago |
Ah. I didn't see the post above.
But can you still replace the link on the first post? ____________________ a |
Jesse |
|
shibboleet |
|
Main - Archived forums - SMG hacking tools development - BCSV Editor | Hide post layouts | New reply |
Page rendered in 0.027 seconds. (2048KB of memory used) MySQL - queries: 30, rows: 226/226, time: 0.011 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |