Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Sonic+Miscellaneous.cpp : Defines the exported functions for the DLL application.
- //
- #include "stdafx.h"
- #include "SADXModLoader.h"
- #include "functions.h"
- bool just_untransformed = false;
- bool gauge2_lv1 = false;
- bool gauge2_lv2 = false;
- bool gauge2_full = false;
- bool sonic_gameplay = false;
- int Gauge;
- int Gauge2;
- ////////////////////// HUD //////////////////////////////////////////////////////////////////////////
- enum HUDTextureIndex
- {
- HUD_gauge, HUD_rings_lives, HUD_score_timer,
- };
- static NJS_TEXNAME HUD_TEXNAME[8];
- static NJS_TEXLIST HUD_TEXLIST = { arrayptrandlength(HUD_TEXNAME) }; //MY OWN HUD STUFF
- static NJS_TEXANIM HUD_TEXANIM[] = {
- // w, h, cx, cy, u1, v1, u2, v2, texid, attr
- // u2 and v2 must be 0xFF
- { 24, 16, 0, 0, 0, 0, 0xFF, 0xFF, HUD_gauge, 0 },
- { 24, 24, 0, 0, 0, 0, 0xFF, 0xFF, HUD_rings_lives, 0 },
- { 24, 24, 0, 0, 0, 0, 0xFF, 0xFF, HUD_score_timer, 0 }
- };
- NJS_SPRITE HUD_SPRITE = { { 0.0f, 0.0f, 0.0f }, 1.0f, 1.0f, 0, &HUD_TEXLIST, HUD_TEXANIM };//the three numbers in the brackets are X, Y, and Z position, then X and Y scaling, rotation, texlist, and texanim
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////
- extern "C"
- {
- __declspec(dllexport) ModInfo SADXModInfo = { ModLoaderVer };
- __declspec(dllexport) void Init(const char *path, const HelperFunctions &helperFunctions)
- {
- Sonic_Init(path, helperFunctions);
- Miscellaneous_Init(path, helperFunctions);
- }
- __declspec(dllexport) void OnInput()
- {
- Sonic_OnInput();
- //Miscellaneous_OnInput();
- }
- __declspec(dllexport) void OnFrame()
- {
- //if (ControllerPointers[0]->PressedButtons & Buttons_Y)
- //{
- // sonic_gameplay = true;
- //}
- //if (ControllerPointers[0]->PressedButtons & Buttons_B)
- //{
- // sonic_gameplay = false;
- //}
- //if (sonic_gameplay)
- //{
- // Sonic_OnFrame();
- //}
- Sonic_OnFrame();
- Miscellaneous_OnFrame();
- if (GetCharacterObject(0) && GetCharacterID(0) == Characters_Sonic && MetalSonicFlag == 0)
- {
- njDrawSprite2D_Queue(&HUD_SPRITE, HUD_gauge, -1, 0, (QueuedModelFlagsB)0);
- }
- //HUD *******************************************************************************************************************************************
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement