Bonmarioinc / b3313-src

This is not at all affiliated with the Bonmario or RealitySoft brands.
3 stars 0 forks source link

DISCLAIMER

None of this has to do with the RealitySoft or Bonmario brands, this is a public archive of the source code of a game called b3313. If you fully acknowledge this, please continue browsing the files.

beeie real

Directory structure:

How to build Troll Engine

If you are a programmer and are wondering to yourself: "bro what the fuck, how do I do decomp in binary, it must be so complicated!"

... you would be correct! It is a near impossible task, only achievable by those with the sufficient knowledge to comprehend some new knowledge and follow a basic guide. (Humans, probably.)

What black magic is going on here?!

It is not exactly black magic, really. You must simply understand the basics of how C compilation works.

When you build a .c file, it does not immediately become an executable - it goes through an intermediary stage, the object file (.o). It is with the help of a linker that the .o files are then turned into an executable.

In our case, Armips is the linker; it handles references to each other's symbols (functions, variables) within the .o files. It does this while allowing us to import the data inside the .o file anywhere in the ROM.

Due to the consistency in how functions are generated by the compiler, as long as the parameters and return type are the same, it is possible to replace any function in the game with any other without causing any trouble!

Setup

  1. Set up a Linux environment in which you can build SM64 decomp. The rest of this guide will assume you are using a terminal within this Linux environment.
  2. In TrollEngine/tools, run make to build cc and n64graphics.

Compiling .c files to .o files

To turn your .c file into a .o file which can then be imported with armips:

  1. In TrollEngine, run sh build_all.sh (or one of the subcommands that each cover a specific group of directories).
  2. If you would like to add a new directory for building .c files in, feel free to edit one of the .sh files (or create a new one!).

Building

In TrollEngine, simply run sh click here to meet a cold armips in your area.sh. This will update Bee/b3313 silved.z64.

Make release ROMs unreadable

In order to prevent early release infants from extracting data from our ROM, we have done a small amount of trolling.

In TrollEngine, run sh shiftma.sh. A new ROM file will appear in the Bee directory, called b3313 shifted.z64.