two getthumbnail funs merget into one

This commit is contained in:
minjaesong
2023-07-11 19:52:56 +09:00
parent 64e05a4f17
commit 173f99f87d
6 changed files with 62 additions and 44 deletions

View File

@@ -447,12 +447,20 @@ removefile:
fa.close()
}
/**
* @return Save type (0b 0000 00ab)
* b: unset - full save; set - quicksave (only applicable to worlds -- quicksave just means the disk is in dirty state)
* a: set - generated by autosave
*/
fun getSaveMode(): Int {
val fa = RandomAccessFile(diskFile, "rwd")
fa.seek(49L)
return fa.read().also { fa.close() }
}
/**
* @return 1 if the savegame is player data, 2 if the savegame is world data, 0 otherwise
*/
fun getSaveKind(): Int {
val fa = RandomAccessFile(diskFile, "rwd")
fa.seek(50L)