Fix some backwards compatibility #6

Closed
bigjango13 wants to merge 1 commits from (deleted):master into master
Contributor

The new API is wonderful, and it will surely lead to an untick in the number of mods made, however backwards compatibility currently suffers. It's harder to play mods compiled for a different versions when using the new API, due to preventable symbol lookup errors.

I understand that some things (like *_non_virtual) require the use of non-header code, however for many others it is unnecessary. This is a small change that fixes the backwards compatibility of methods, static properties, vtable base addresses, and virtual methods. The only things that still suffer from symbol lookup errors are *_non_virtual symbols (which probably always will), alloc_* functions, and dup_*_vtable functions (the functions could be fixed easily enough, although I thought that might be pushing my luck). It doesn't effect existing mods (Reborn or otherwise), it doesn't change the API in any noticeable way, but it make mods compiled with the new API easier to distribute.

The new API is wonderful, and it will surely lead to an untick in the number of mods made, however backwards compatibility currently suffers. It's harder to play mods compiled for a different versions when using the new API, due to preventable symbol lookup errors. I understand that some things (like `*_non_virtual`) require the use of non-header code, however for many others it is unnecessary. This is a small change that fixes the backwards compatibility of methods, static properties, vtable base addresses, and virtual methods. The only things that still suffer from symbol lookup errors are `*_non_virtual` symbols (which probably always will), `alloc_*` functions, and `dup_*_vtable` functions (the functions could be fixed easily enough, although I thought that might be pushing my luck). It doesn't effect existing mods (Reborn or otherwise), it doesn't change the API in any noticeable way, but it make mods compiled with the new API easier to distribute.
bigjango13 added 1 commit 2024-01-17 08:39:21 +00:00

One of the biggest changes I wanted to make with the new API was removing definitions from the minecraft.h file. Thus allowing the code to be more idiomatic, with declarations in the header file and definitions in the source file. While this does break backwards-compatibility, that was never a goal of the project anyways. Especially since most people will be running the latest version (because both Flathub and Pi-Apps auto-update).

One of the biggest changes I wanted to make with the new API was removing definitions from the `minecraft.h` file. Thus allowing the code to be more idiomatic, with declarations in the header file and definitions in the source file. While this does break backwards-compatibility, that was never a goal of the project anyways. Especially since most people will be running the latest version (because both Flathub and Pi-Apps auto-update).
TheBrokenRail closed this pull request 2024-01-20 08:28:54 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: minecraft-pi-reborn/symbol-processor#6
No description provided.