Interior Cells Case Insensitive

Everything about development and the OpenMW source code.
User avatar
Site Admin
Posts: 1193
Joined: 05 Aug 2011, 22:21
Location: Wroclaw, Poland

Interior Cells Case Insensitive

Post by lgromanowski » 13 Aug 2011, 20:43

jhooks1 wrote: It was on the roadmap that interior cells need to be able to be loaded regardless of case (e.g. the cell "Milk" could be loaded with COC "milk", COC "MIlk", etc).

I have accomplished this task by adding a comparator to the typedef map IntCells in reclists.hpp.

I will try to commit my changes soon.
Zini wrote: Tested. Works here. Thanks!

The title of this thread is a bit inaccurate though. This change affects exteriors as well as interiors, right?
Guest wrote: It doesn't at the moment, we have exterior cells indexed by an int.
COC Balmora does not work. If we index them by strings in the future the same comparator could be applied.
jhooks1 wrote: The guest post above was me, forgot to login.
Zini wrote: Works here. At least in one of my branches, but probably not added to Nico's repository yet.

Edit: Just had a look at the network graph. This feature has been in Nico's master branch for quite some time.
jhooks1 wrote: So nico's newest already had the case insensitive cell loading?
Apparently I had forked an older branch. Now I am trying to update to the newest with a lot of frustration. I keep on getting merge errors like error: Your local changes to "CMakeLists.txt" would be overwritten by merge. Aborting.

Github :x

What would be the easiest way to update my branch back to nico's latest, then apply my insensitivity reclist.hpp file if it is still relevant.
Zini wrote: These kind of problems shouldn't happen. You will have to investigate what is wrong, because any fix might cause even more problems. What does git status and git diff say?

Edit: If you really are desperate, you could wipe your local repository and try to clone it again from github. But it would be better, if you can find out first what went wrong. Are you on Windows? In this case I would check for line ending trouble.
jhooks1 wrote: I wiped my branch then updated to nico's latest. Now when I launch openmw it crashes when the mouse is moved. The error message is "ERROR: unknown Ogre handle: Unnamed_5

I am trying to figure this out, I am on windows btw.
Zini wrote: The crash shouldn't happen. At least not with the most up to date version. The reason for this problem is still unclear, but I added a workaround, that stopped OpenMW from crashing when it happened.

Did you configure the handling of line-endings in git? On Windows this is mandatory.

btw. As far as I can tell your old respository on github was perfectly okay. The problem seems to be of local nature (i.e. on your machine only), so deleting the public repository probably was not the best thing to do.
Greendogo wrote: Awesome news! Great job guys, can't wait to test it out in the new release!
jhooks1 wrote: Zini, I have tried both your newchar and master branches. I can get them to compile but once I run them they crash immediately after adding the bsas and loading the ESM. Visual Studio debugger launches saying "An unhandled win32 exception occurred in openmw.exe [4188]

Any ideas on what I am doing wrong?
Zini wrote: None at all. Is that still the same problem you had before? If not, then it sounds like a Windows-specific build problem and that is not something I can help you with.
jhooks1 wrote: Before, on nico's latest, the cell would show but when I moved the mouse it crashed. Now, on your latest, the program crashes and the cell never shows.

I may put linux on one of my machines and see if I have better luck with that.
Zini wrote: Okay, that sounds definitely like a Windows-specific build problem. Did mix up release- and debug-build? IIRC the Windows stuff reacts badly to that.
jhooks1 wrote: Hooray!!! I figured it out, I didn't have the resource folder setup right for your latest build lol. Stupid me.

Now I can get back to work on the case insensitivity problem which should be a quick fix since I had it working before.
jhooks1 wrote: I committed the new case insensitivity code. It should work for interiors and exteriors, try it out 8-) .
Zini wrote: Works mostly. But i found another problem, that I have completely missed before: The handling of non-English characters in names.

The other case-handling code (every name but cell names and also file names) does not consider this problem at all. Unless I am mistaken your code does consider this case, but only if the locale of the host machine matches the language of the master file. This is a rather unreasonable limitation, but I have no idea how to work around it.
best regards,