mirror of
https://github.com/risingPhil/PokeMe64.git
synced 2026-09-10 01:35:30 -05:00
Implement TransferPakRTCReader and add a "Print Game Clock" menu option temporarily
This commit is contained in:
@@ -116,4 +116,6 @@ void askConfirmationWipeSave(void* context, const void* param);
|
||||
*/
|
||||
void resetRTC(void* context, const void* param);
|
||||
|
||||
void printClock(void* context, const void* param);
|
||||
|
||||
#endif
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
void render(RDPQGraphics& gfx, const Rectangle& sceneBounds) override;
|
||||
protected:
|
||||
private:
|
||||
char headerTextString_[128];
|
||||
uint8_t fontIdMainFont_;
|
||||
uint8_t fontMainFontStyleWhiteId_;
|
||||
sprite_t* logoLibDragon_;
|
||||
|
||||
@@ -32,6 +32,7 @@ private:
|
||||
void loadSaveMetadata();
|
||||
const char* getGameTypeString();
|
||||
|
||||
char pokeMe64String_[48];
|
||||
sprite_t* menu9SliceSprite_;
|
||||
TransferPakDetectionWidget tpakDetectWidget_;
|
||||
WidgetFocusChainSegment tpakDetectWidgetSegment_;
|
||||
|
||||
@@ -54,6 +54,11 @@ public:
|
||||
*/
|
||||
void switchGBROMBank(uint8_t bankIndex);
|
||||
|
||||
/**
|
||||
* @brief Returns whether we called setRAMEnabled(true) on this TransferPakManager instance before
|
||||
*/
|
||||
bool isRAMEnabled() const;
|
||||
|
||||
/**
|
||||
* @brief This function enables/disables gameboy RAM/RTC access.
|
||||
* WARNING: it switches to transfer pak bank 0
|
||||
@@ -110,6 +115,7 @@ protected:
|
||||
private:
|
||||
joypad_port_t port_;
|
||||
bool isPoweredOn_;
|
||||
bool ramEnabled_;
|
||||
uint8_t currentSRAMBank_;
|
||||
uint16_t readBufferBankOffset_;
|
||||
uint16_t writeBufferSRAMBankOffset_;
|
||||
|
||||
28
include/transferpak/TransferPakRTCReader.h
Normal file
28
include/transferpak/TransferPakRTCReader.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef _TRANSFERPAKRTCREADER_H
|
||||
#define _TRANSFERPAKRTCREADER_H
|
||||
|
||||
#include "RTCReader.h"
|
||||
|
||||
class TransferPakManager;
|
||||
|
||||
/**
|
||||
* @brief This class implements the IRTCReader interface specifically for the N64 Transfer Pak with libdragon
|
||||
*/
|
||||
class TransferPakRTCReader : public BaseRTCReader
|
||||
{
|
||||
public:
|
||||
TransferPakRTCReader(TransferPakManager& tpakManager);
|
||||
virtual ~TransferPakRTCReader();
|
||||
|
||||
/**
|
||||
* This function will grab the current values of the RTC chip and store them internally
|
||||
*
|
||||
* Use the getXYZ() functions to actually retrieve this data
|
||||
*/
|
||||
void latch() override;
|
||||
protected:
|
||||
private:
|
||||
TransferPakManager& tpakManager_;
|
||||
};
|
||||
|
||||
#endif
|
||||
8
include/version.h
Normal file
8
include/version.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef _VERSION_H
|
||||
#define _VERSION_H
|
||||
|
||||
#define POKEME64_VERSION_NUMBER "0.4"
|
||||
|
||||
const char* getPokeMe64VersionString();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user