Made the RAM Counter display a more accurate RAM count, which now properly formats. It can go up to EB because idk Fixed the Base Game splash position Made the RAM counter toggleable, and added a Peak RAM counter too, both toggleable in Options Added 1 new option to the secret debug menu Added back note types and events for Troll Mode Going to a section that doesn't exist yet now automatically makes that section, and it now makes a section if the JSON you loaded doesn't actually have a section loaded.
46 lines
1.1 KiB
Haxe
46 lines
1.1 KiB
Haxe
package external.memory;
|
|
|
|
#if cpp
|
|
/**
|
|
* Memory class to properly get accurate memory counts
|
|
* for the program.
|
|
* @author Leather128 (Haxe) - David Robert Nadeau (Original C Header)
|
|
*/
|
|
@:buildXml('<include name="../../../../source/external/memory/build.xml" />')
|
|
@:include("memory.h")
|
|
extern class Memory {
|
|
/**
|
|
* Returns the peak (maximum so far) resident set size (physical
|
|
* memory use) measured in bytes, or zero if the value cannot be
|
|
* determined on this OS.
|
|
*/
|
|
@:native("getPeakRSS")
|
|
public static function getPeakUsage():Float;
|
|
|
|
/**
|
|
* Returns the current resident set size (physical memory use) measured
|
|
* in bytes, or zero if the value cannot be determined on this OS.
|
|
*/
|
|
@:native("getCurrentRSS")
|
|
public static function getCurrentUsage():Float;
|
|
}
|
|
#else
|
|
/**
|
|
* If you are not running on a CPP Platform, the code just will not work properly, sorry!
|
|
* @author Leather128
|
|
*/
|
|
class Memory {
|
|
/**
|
|
* (Non cpp platform)
|
|
* Returns 0.
|
|
*/
|
|
public static function getPeakUsage():Float return 0.0;
|
|
|
|
/**
|
|
* (Non cpp platform)
|
|
* Returns 0.
|
|
*/
|
|
public static function getCurrentUsage():Float return 0.0;
|
|
}
|
|
#end
|