|
|
@@ -0,0 +1,37 @@ |
|
|
|
#module \ |
|
|
|
Setting |
|
|
|
|
|
|
|
#define FILE_NAME ("setting.dat") |
|
|
|
|
|
|
|
; ユーザ ID |
|
|
|
#const USER_ID_OFFSET 0 |
|
|
|
#const USER_ID_SIZE 4 |
|
|
|
|
|
|
|
; ユーザのパスコード |
|
|
|
#const USER_PASSCODE_OFFSET (USER_ID_OFFSET + USER_ID_SIZE) |
|
|
|
#const USER_PASSCODE_SIZE 16 |
|
|
|
|
|
|
|
#deffunc local \ |
|
|
|
Load |
|
|
|
userId = 0 |
|
|
|
SDim userPasscode, USER_PASSCODE_SIZE |
|
|
|
|
|
|
|
Exist FILE_NAME |
|
|
|
If strSize < 0 { |
|
|
|
Return |
|
|
|
} |
|
|
|
|
|
|
|
BLoad FILE_NAME, userId, USER_ID_SIZE, USER_ID_OFFSET |
|
|
|
BLoad FILE_NAME, userPasscode, USER_PASSCODE_SIZE, USER_PASSCODE_OFFSET |
|
|
|
|
|
|
|
Return |
|
|
|
|
|
|
|
#deffunc local \ |
|
|
|
Save |
|
|
|
BSave FILE_NAME, userId, USER_ID_SIZE, USER_ID_OFFSET |
|
|
|
BSave FILE_NAME, userPasscode, USER_PASSCODE_SIZE, USER_PASSCODE_OFFSET |
|
|
|
|
|
|
|
Return |
|
|
|
|
|
|
|
#global |
|
|
|
|