Decompiled Tomb Raider Source Code Reveals Loads Of Vulgar Words (NSFW)

Imagine you're a programmer, working on a video game almost two decades ago. No one outside the studio is ever going to see your code, so you can name methods and write comments however you like, right? Uh... maybe don't bet the house on that, especially if you were involved with Tomb Raider: Chronicles in the late 90s, because someone's decompiling that bad boy today. Insert obligatory language warning here.

The currently decompiled source code can be found on GitHub, if you'd like to trawl through it yourself. Otherwise, a number of Reddit users on /r/programming have already found a couple of unsavoury gems.

RECT* fuckmyanalpassage;

char bullshitbollox;

extern void DisplayStatsUCunt();

And of course:

struct PHD_3DPOS bum_view;

You click any of the above code segments to visit them directly in the source.

How is this possible? It's true that a lot of the original flavour of source code is lost when it's compiled into binary form, however, the people working on the decompilation got a little help:

Basically approx. a year ago, someone uploaded a .zip on the forums that contained a bunch of leaked PSX SDK tools, and internal dev files from Core Design. That included beta versions of TR4 and 5, alongside with debug symbols that contained functions, variables (globals and locals) and struct defs.

So, if you're currently coding a game, maybe think twice about the language you're using. And I'm not talking about the programming language.

TOMB5 [GitHub, via Reddit]


Comments

    Really, who cares what the name stuff. The amount of times I've rage googled something with profanity filled queries would shock most people. Example "How to beat shitty fucking can't boss on [insert game/level].

      I remember exploring the GTA Model files and finding 'fuckedcar' at the bottom of what I assumed was the list of damage taken models

      Many games force me to google "(thing) is bullshit" just because I want to see who else got mad at something I hate.

    So they didn't find the rude words by decompiling the released product: instead it comes from leaked debug symbols.

    It may offer some insight into why some developers are hesitant to release the source code to their obsolete games or engines: in many cases it isn't as simple as just pushing it to Github: they need to read through it all for this kind of shit.

      Although most of those words were found in the symbols, some can actually be found in the final product. When the classic TR games were shipped, they didn't remove all of the debug messages (that require a special in-house tool to be read) from the final binary. Thus, by scanning for strings in the .exe file you can find some NSFW messages.

    Working with guys doing scripting in the Neverwinter Nights Enhanced Item. You'd be suprised what you find under the // comments in the scripting.

    Adults swear at work, coders included.

      I swear casually all the time, I just don't put it in my code. You gotta have some standards for quality and professionalism in your work. It's like being asked to make a cake and writing 'fuck flour' in icing on top - sure, it's technically what they asked for ('a cake'), but odds are it's not what they want and they tend to remember that stuff when pay review/contract extension/references for future work comes around.

        I also think it depends on the workplace though. I understand you or your workplace have different standards and that's absolutely fine, but theirs might be a little looser than yours, which is probably why it made it through code review and into the game. If they are allowed to code like that, more power to them IMO. I don't see anything wrong with them coding at their standards, which judging by the work they've put out, seems to work pretty good.

          Of course, that's what I meant by 'odds are'. If the company's fine with that, go for it. I'd still leave it out personally. Even swearing aside, half those names are just bad coding because they're not descriptive.

        I think it's more like writing "fuck flour" in icing before icing over it.

          That would be true if it were the end user in the analogy, who only sees the surface. But for the company, the code is the product we (developers) sell to them, and they see every layer of it.

    Also, it feels a bit suss that they're claiming the decompiled code is MIT licensed. Even though the result of decompilation won't be identical to the original source, surely Square Enix still owns the copyright on it.

      Indeed. As you have mentioned, SE still owns the copyright on all TR-related code, but as of now we haven't received any DMCA or similar, so we keep working on it. The license was put there on GitHub before the project had become what it is now, and we haven't bothered to change it yet.

    Am I the only one that doesn’t give a shit? Like... I feel this is akin to getting a copy of an early draft of a book and being upset 30 years later that they used words I didn’t like or the phrasing they used when they got frustrated or We’re exhausted whilst creating.

Join the discussion!

Trending Stories Right Now