mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-21 07:11:16 +00:00
Add Read for char*
This commit is contained in:
parent
1a2b2f1a20
commit
2bccf4edd3
@ -390,10 +390,7 @@ MxResult LegoGameState::Load(MxULong p_slot)
|
||||
|
||||
if (count) {
|
||||
for (MxS16 i = 0; i < count; i++) {
|
||||
MxS16 stateNameLength;
|
||||
storage.Read(stateNameLength);
|
||||
storage.Read(stateName, (MxULong) stateNameLength);
|
||||
stateName[stateNameLength] = 0;
|
||||
storage.Read(stateName);
|
||||
|
||||
LegoState* state = GetState(stateName);
|
||||
if (!state) {
|
||||
|
||||
@ -155,6 +155,15 @@ class LegoFile : public LegoStorage {
|
||||
return this;
|
||||
}
|
||||
|
||||
LegoStorage* Read(char* p_data)
|
||||
{
|
||||
LegoS16 length;
|
||||
Read(length);
|
||||
Read(p_data, length);
|
||||
p_data[length] = '\0';
|
||||
return this;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10034470
|
||||
LegoStorage* Read(MxString& p_data)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user