diff --git a/SotnApi/SotnApi/AlucardApi.cs b/SotnApi/SotnApi/AlucardApi.cs
index 91b3942..adeb3fc 100644
--- a/SotnApi/SotnApi/AlucardApi.cs
+++ b/SotnApi/SotnApi/AlucardApi.cs
@@ -944,6 +944,18 @@ public uint ShineTimer
}
}
+ public uint CurseTimer
+ {
+ get
+ {
+ return memAPI.ReadByte(Timers.Curse);
+ }
+ set
+ {
+ memAPI.WriteByte(Timers.Curse, value);
+ }
+ }
+
public string GetSelectedItemName()
{
string item;
diff --git a/SotnApi/SotnApi/Constants/Addresses/Game.cs b/SotnApi/SotnApi/Constants/Addresses/Game.cs
index ceadc32..85e632c 100644
--- a/SotnApi/SotnApi/Constants/Addresses/Game.cs
+++ b/SotnApi/SotnApi/Constants/Addresses/Game.cs
@@ -51,6 +51,6 @@ public static class Game
public static long ActorsStart = 0x07650C;
public static long VramMapStart = 0x08AE80;
public static long SeedStart = 0x1A78B4;
- public static long PresetStart = 0x1A78E1;
+ public static long PresetStart = 0x1A78D4;
}
}
diff --git a/SotnApi/SotnApi/Constants/Values/Game/Actors.cs b/SotnApi/SotnApi/Constants/Values/Game/Actors.cs
index d6f4679..f8e2186 100644
--- a/SotnApi/SotnApi/Constants/Values/Game/Actors.cs
+++ b/SotnApi/SotnApi/Constants/Values/Game/Actors.cs
@@ -16,7 +16,7 @@ public static class Actors
public static int PaletteOffset = 0x16;
public static int ColorMode = 0x18;
public static int ItemIndexOffset = 0x30;
- public static int HitboxTypeOffset = 0x3A;
+ public static int EnemyNameIndex = 0x3A;
public static int HitboxAutoToggleOffset = 0x3C;
public static int HpOffset = 0x3E;
public static int DamageOffset = 0x40;
diff --git a/SotnApi/SotnApi/GameApi.cs b/SotnApi/SotnApi/GameApi.cs
index b08bcd5..b53aa87 100644
--- a/SotnApi/SotnApi/GameApi.cs
+++ b/SotnApi/SotnApi/GameApi.cs
@@ -1,4 +1,5 @@
using System;
+using System.Text.RegularExpressions;
using BizHawk.Client.Common;
using SotnApi.Constants.Addresses;
using SotnApi.Constants.Values.Game;
@@ -50,11 +51,11 @@ public Character CurrentCharacter
}
}
- public uint SecondCastle
+ public bool SecondCastle
{
get
{
- return memAPI.ReadByte(Game.SecondCastle);
+ return memAPI.ReadByte(Game.SecondCastle) > 0;
}
}
@@ -181,7 +182,10 @@ public string ReadSeedName()
public string ReadPresetName()
{
- return ReadString(Game.PresetStart).Trim();
+ string preset = ReadString(Game.PresetStart).Trim();
+ string pattern = @" ([a-z.]{4,10}) ";
+ Match match = Regex.Match(preset, pattern, RegexOptions.IgnoreCase);
+ return match.Value.Trim();
}
private string ReadString(long address)
diff --git a/SotnApi/SotnApi/Interfaces/IAlucardApi.cs b/SotnApi/SotnApi/Interfaces/IAlucardApi.cs
index 84ae67d..64fd4b1 100644
--- a/SotnApi/SotnApi/Interfaces/IAlucardApi.cs
+++ b/SotnApi/SotnApi/Interfaces/IAlucardApi.cs
@@ -77,6 +77,7 @@ public interface IAlucardApi
uint DefencePotionTimer { get; set; }
uint InvincibilityTimer { get; set; }
uint ShineTimer { get; set; }
+ uint CurseTimer { get; set; }
void ClearInventory();
string GetSelectedItemName();
diff --git a/SotnApi/SotnApi/Interfaces/IGameApi.cs b/SotnApi/SotnApi/Interfaces/IGameApi.cs
index a07ab72..0075805 100644
--- a/SotnApi/SotnApi/Interfaces/IGameApi.cs
+++ b/SotnApi/SotnApi/Interfaces/IGameApi.cs
@@ -2,31 +2,97 @@
namespace SotnApi.Interfaces
{
+ ///
+ /// Controls
+ ///
public interface IGameApi
{
+ ///
+ /// The current Status of the game.
+ ///
+ ///
+ /// MainMenu
+ ///
+ ///
+ /// InGame
+ ///
uint Status { get; }
+ ///
+ /// Returns the currently selected category in the menu.
+ ///
MainMenuCategory CurrentMainMenuCategory { get; }
///
/// The current character, but prologue Richter still counts as Alucard.
///
Character CurrentCharacter { get; }
+ ///
+ /// Index for the current area or subarea.
+ ///
uint Area { get; }
+ ///
+ /// Room for the current room or subroom.
+ ///
uint Room { get; }
- uint SecondCastle { get; }
+ ///
+ /// True if the player is in the second castle.
+ ///
+ bool SecondCastle { get; }
+ ///
+ /// Zone Byte1.
+ ///
uint Zone { get; }
+ ///
+ /// Zone Byte2.
+ ///
uint Zone2 { get; }
+ ///
+ /// True of the game is in the process of loading a new area.
+ ///
bool IsLoading { get; }
+ ///
+ /// True of the game is in the process of loading a new screen.
+ ///
bool InTransition { get; }
+ ///
+ /// Checks if the item equip menu is currently open.
+ ///
bool EquipMenuOpen();
+ ///
+ /// Checks if the relic equip menu is currently open.
+ ///
bool RelicMenuOpen();
+ ///
+ /// Checks if it is currently possible for the player to access the menu.
+ ///
bool CanMenu();
+ ///
+ /// Sets an address value to zero.
+ ///
void ClearByte(long address);
+ ///
+ /// Checks if the game is in Alucard mode.
+ ///
bool InAlucardMode();
+ ///
+ /// Checks if the menu si currently open.
+ ///
bool IsInMenu();
+ ///
+ /// Overwrites a string in the game.
+ ///
void OverwriteString(long address, string text);
+ ///
+ /// Reads the start menu string, where the Randomizer preset is stored.
+ ///
string ReadPresetName();
+ ///
+ /// Reads the start menu string, where the Randomizer seed is stored.
+ ///
string ReadSeedName();
+ ///
+ /// Enables all the bosses in the game, even if they have been defeated.
+ ///
void RespawnBosses();
}
}
\ No newline at end of file
diff --git a/SotnApi/SotnApi/Interfaces/IRenderingApi.cs b/SotnApi/SotnApi/Interfaces/IRenderingApi.cs
index 94704cb..b218c80 100644
--- a/SotnApi/SotnApi/Interfaces/IRenderingApi.cs
+++ b/SotnApi/SotnApi/Interfaces/IRenderingApi.cs
@@ -1,9 +1,21 @@
namespace SotnApi.Interfaces
{
+ ///
+ /// Manipulates VRAM elements.
+ ///
public interface IRenderingApi
{
+ ///
+ /// Colors a room on the map as a 3x3 square with borders.
+ ///
void ColorMapRoom(uint row, uint col, uint color, uint borderColor);
+ ///
+ /// Colors a location on the map as a 2x2 square.
+ ///
void ColorMapLocation(uint row, uint col, uint color);
+ ///
+ /// Checks if a room on the minimap is rendered.
+ ///
bool RoomIsRendered(uint row, uint col);
}
}
\ No newline at end of file
diff --git a/SotnApi/SotnApi/SotnApi.xml b/SotnApi/SotnApi/SotnApi.xml
index 6611afc..dc29c52 100644
--- a/SotnApi/SotnApi/SotnApi.xml
+++ b/SotnApi/SotnApi/SotnApi.xml
@@ -68,11 +68,137 @@
Alucard backdash deceleration rate.
+
+
+ Controls
+
+
+
+
+ The current Status of the game.
+
+
+ MainMenu
+
+
+ InGame
+
+
+
+
+ Returns the currently selected category in the menu.
+
+
The current character, but prologue Richter still counts as Alucard.
+
+
+ Index for the current area or subarea.
+
+
+
+
+ Room for the current room or subroom.
+
+
+
+
+ True if the player is in the second castle.
+
+
+
+
+ Zone Byte1.
+
+
+
+
+ Zone Byte2.
+
+
+
+
+ True of the game is in the process of loading a new area.
+
+
+
+
+ True of the game is in the process of loading a new screen.
+
+
+
+
+ Checks if the item equip menu is currently open.
+
+
+
+
+ Checks if the relic equip menu is currently open.
+
+
+
+
+ Checks if it is currently possible for the player to access the menu.
+
+
+
+
+ Sets an address value to zero.
+
+
+
+
+ Checks if the game is in Alucard mode.
+
+
+
+
+ Checks if the menu si currently open.
+
+
+
+
+ Overwrites a string in the game.
+
+
+
+
+ Reads the start menu string, where the Randomizer preset is stored.
+
+
+
+
+ Reads the start menu string, where the Randomizer seed is stored.
+
+
+
+
+ Enables all the bosses in the game, even if they have been defeated.
+
+
+
+
+ Manipulates VRAM elements.
+
+
+
+
+ Colors a room on the map as a 3x3 square with borders.
+
+
+
+
+ Colors a location on the map as a 2x2 square.
+
+
+
+
+ Checks if a room on the minimap is rendered.
+
+
A live entity object rendered in-game. Enemies, projectiles, items, hitboxes, interactable objects.