Skip to content

Commit 952b648

Browse files
Guantol-LematConnorForan
authored andcommitted
VirtualRoomSetManager: Add Documentation
1 parent 41b327f commit 952b648

9 files changed

Lines changed: 166 additions & 54 deletions

File tree

repentogon/ImGuiFeatures/ConsoleMega.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include "UnifontSupport.h"
88
#include "Lang.h"
99
#include "../REPENTOGONOptions.h"
10-
#include "../Patches/VirtualRoomSets.h"
10+
#include "../VirtualRoomConfig/VirtualRoomSetManager.h"
1111

1212
#include <sstream>
1313
#include <cctype>

repentogon/LuaInterfaces/Room/LuaRoomConfig.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "Log.h"
33
#include "LuaCore.h"
44
#include "HookSystem.h"
5-
#include "../../Patches/VirtualRoomSets.h"
5+
#include "../../VirtualRoomConfig/VirtualRoomSetManager.h"
66

77
/*LUA_FUNCTION(Lua_GameGetRoomConfig) {
88
Game* game = lua::GetRawUserdata<Game*>(L, 1, lua::Metatables::GAME, "Game");

repentogon/LuaInterfaces/Room/LuaRoomConfigSet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "IsaacRepentance.h"
22
#include "LuaCore.h"
33
#include "HookSystem.h"
4-
#include "../../Patches/VirtualRoomSets.h"
4+
#include "../../VirtualRoomConfig/VirtualRoomSetManager.h"
55
#include "LuaRoomConfigSet.h"
66

77
LuaRoomConfigSet::Userdata::Userdata(RoomConfig_Stage& stage, int mode)

repentogon/LuaInterfaces/Room/LuaRoomConfigSet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "LuaCore.h"
2-
#include "../../Patches/VirtualRoomSets.h"
2+
#include "../../VirtualRoomConfig/VirtualRoomSetManager.h"
33

44
namespace LuaRoomConfigSet
55
{

repentogon/LuaInterfaces/Room/LuaRoomConfigStage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "IsaacRepentance.h"
22
#include "LuaCore.h"
33
#include "HookSystem.h"
4-
#include "../../Patches/VirtualRoomSets.h"
4+
#include "../../VirtualRoomConfig/VirtualRoomSetManager.h"
55
#include "LuaRoomConfigSet.h"
66

77
LUA_FUNCTION(Lua_RoomConfigStageGetBackdrop)

repentogon/Patches/GameStateManagement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <filesystem>
77
#include "ItemPoolManager.h"
8-
#include "VirtualRoomSets.h"
8+
#include "../VirtualRoomConfig/VirtualRoomSetManager.h"
99

1010
#include "../SaveStateManagement/EntitySaveStateManagement.h"
1111

repentogon/Patches/VirtualRoomSets.cpp renamed to repentogon/VirtualRoomConfig/VirtualRoomSetManager.cpp

Lines changed: 149 additions & 46 deletions
Large diffs are not rendered by default.

repentogon/Patches/VirtualRoomSets.h renamed to repentogon/VirtualRoomConfig/VirtualRoomSetManager.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "../RoomConfigUtility.h"
66
#include "../LogUtility.h"
77
#include "LuaCore.h"
8-
#include "GameStateManagement.h"
8+
#include "../Patches/GameStateManagement.h"
99

1010
#include <string>
1111
#include <vector>
@@ -45,21 +45,30 @@ class VirtualRoomSetManager
4545
// The lua functions are placed here since they are just details for the LUA API
4646
// rather than functionality of a VirtualRoomSet
4747

48+
/// @brief Adds the rooms stored in the passed table to the specified set.
49+
/// Places the return table on the Lua stack.
50+
/// @return number of return Lua values the function has pushed on the stack.
4851
static int Lua_AddLuaRooms(lua_State* L, VirtualRoomSet& virtualSet, int tableIdx);
52+
/// @brief Adds the rooms stored in the .stb to the specified set.
53+
/// Places the return table on the Lua stack.
54+
/// @param fileName is expected to correspond to file(s) found @ `<mod root>/content/rooms/<filename>`
55+
/// @return number of return Lua values the function has pushed on the stack.
4956
static int Lua_AddStbRooms(lua_State* L, VirtualRoomSet& virtualSet, const std::string& fileName);
5057
};
5158

5259
public:
5360
/// @brief Gets the vanilla set extension, using the vanilla RoomSet id.
5461
static VirtualRoomSet GetVanillaSet(uint32_t stageId, int mode);
5562
/// @brief Creates a new room set.
56-
static VirtualRoomSet CreateSet();
63+
// static VirtualRoomSet CreateSet();
5764
};
5865

5966
class VirtualRoomSet
6067
{
6168
friend class VirtualRoomSetManager;
69+
6270
using _VirtualRoomSet = VirtualRoomSetManager::detail::_VirtualRoomSet;
71+
public:
6372
using Iterator = _VirtualRoomSet::const_iterator;
6473

6574
private:

repentogon/VirtualRoomSet/detail/RoomManagement.h

Whitespace-only changes.

0 commit comments

Comments
 (0)