Skip to content

Commit

Permalink
Merge pull request #326 from Masgalor/nexus-lite
Browse files Browse the repository at this point in the history
Add basic compatibility with RaidcoreGG-Nexus
  • Loading branch information
AsherGlick authored Aug 21, 2024
2 parents 6f6062b + a0da407 commit ad795bd
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
1 change: 1 addition & 0 deletions burrito_link/deffile.def
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ EXPORTS
D3D11CoreCreateDevice
get_init_addr
get_release_addr
GetAddonDef
54 changes: 53 additions & 1 deletion burrito_link/dllmain.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <d3d11.h>
#include <stdio.h>
Expand Down Expand Up @@ -396,3 +396,55 @@ uintptr_t mod_release() {
extern __declspec(dllexport) void* get_release_addr() {
return mod_release;
}


////////////////////////////////////////////////////////////////////////////////
// Raidcore Nexus
//
// GetAddonDef()
//
//
//
// These function is present to allow nexus to recognize this dll as a addon.
// These function is the only function that is required all others are optional.
////////////////////////////////////////////////////////////////////////////////
struct AddonDefinition {
/* required */
signed int Signature; /* Raidcore Addon ID, set to random unqiue negative integer if not on Raidcore */
signed int APIVersion; /* Determines which AddonAPI struct revision the Loader will pass, use the NEXUS_API_VERSION define from Nexus.h */
const char* Name; /* Name of the addon as shown in the library */
struct AddonVersion {
signed short Major;
signed short Minor;
signed short Build;
signed short Revision;
} Version;
const char* Author; /* Author of the addon */
const char* Description; /* Short description */
void* Load; /* Pointer to Load Function of the addon */
void* Unload; /* Pointer to Unload Function of the addon. Not required if EAddonFlags::DisableHotloading is set. */
signed int Flags; /* Information about the addon */

/* update fallback */
signed int Provider; /* What platform is the the addon hosted on */
const char* UpdateLink; /* Link to the update resource */

} AddonDef;

extern __declspec(dllexport) struct AddonDefinition* GetAddonDef()
{
AddonDef.Signature = -1032686481;
AddonDef.APIVersion = 6; // taken from Nexus.h
AddonDef.Name = "Burrito Link";
AddonDef.Version.Major = 0;
AddonDef.Version.Minor = 0;
AddonDef.Version.Build = 0;
AddonDef.Version.Revision = 1;
AddonDef.Author = "AsherGlick";
AddonDef.Description = "Automatically provides the link for Burrito.";
AddonDef.Load = start_burrito_link_thread;
AddonDef.Unload = stop_burrito_link_thread;
AddonDef.Flags = 0;

return &AddonDef;
}

0 comments on commit ad795bd

Please sign in to comment.