mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-06-02 09:06:54 +02:00
Initial commit
This commit is contained in:
22
arm9/source/gui/AscendingStackVramManager.h
Normal file
22
arm9/source/gui/AscendingStackVramManager.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "StackVramManager.h"
|
||||
|
||||
/// @brief Stack vram manager that increases the stack pointer after an allocation.
|
||||
class AscendingStackVramManager : public StackVramManager
|
||||
{
|
||||
public:
|
||||
/// @brief Creates a new AscendingStackVramManager.
|
||||
AscendingStackVramManager() { }
|
||||
|
||||
/// @brief Creates a new AscendingStackVramManager.
|
||||
/// @param vramAddress Pointer to the start of the vram block to manage.
|
||||
explicit AscendingStackVramManager(vu16* vramAddress)
|
||||
: StackVramManager(vramAddress) { }
|
||||
|
||||
u32 Alloc(u32 length) override
|
||||
{
|
||||
u32 result = _offset;
|
||||
_offset += length;
|
||||
return result;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user