Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setPC()
- {
- data::titleData tmp;
- tmp.setExtdata(0xF000000B);
- if(fs::openArchive(tmp, ARCHIVE_SHARED_EXTDATA))
- {
- fs::fsfile playCoin(fs::getSaveArch(), "/gamecoin.dat", FS_OPEN_READ | FS_OPEN_WRITE);
- int coinAmount = 0;
- playCoin.seek(0x4, fs::seek_beg);
- coinAmount = playCoin.getByte() | playCoin.getByte() << 8;
- coinAmount = getInt("Enter a number between 0 and 300", coinAmount, 300);
- if(coinAmount != -1)
- {
- playCoin.seek(-2, fs::seek_cur);
- playCoin.putByte(coinAmount);
- playCoin.putByte(coinAmount >> 8);
- }
- fs::closeSaveArch();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement