~sithlord48/hyne/master

« back to all changes in this revision

Viewing changes to SaveData.cpp

  • Committer: myst6re
  • Date: 2012-10-07 15:17:32 UTC
  • Revision ID: git-v1:08cd4dd8fb51ecba242eae16b59f2d6480b92e6f
Icon editor: can replace an icon by another from ff8.
BUG: SaveIconData::data always returns data with size=288, but with non-ff8 saves it's not the correct size.


git-svn-id: https://svn.code.sf.net/p/hyne/svn/trunk@28 c84c93af-c3a3-4a1d-84ff-4977ccd10b0c

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
        return _icon;
181
181
}
182
182
 
 
183
void SaveData::setSaveIcon(const SaveIconData &saveIconData)
 
184
{
 
185
        if(_icon.data() != saveIconData.data()) {
 
186
                _icon = saveIconData;
 
187
                _isModified = true;
 
188
        }
 
189
}
 
190
 
183
191
const HEADER &SaveData::descData() const
184
192
{
185
193
        return _descData;
368
376
        ret.append("\x81\x46", 2);// :
369
377
        ret.append(FF8Text::numToBiosText(Config::min(_mainData.misc2.game_time, _freqValue), 2));// MM
370
378
        ret.append(_header.right(66));
371
 
        ret.append(_icon.data());
 
379
        ret.append(_icon.data().leftJustified(288, '\0', true));
372
380
        ret.append((char *)&checksum, 2);
373
381
        ret.append("\xFF\x08", 2);
374
382
        ret.append((char *)&_descData, sizeof(_descData));