設定機能
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
#include "./modules/chat.mod.hsp"
|
#include "./modules/chat.mod.hsp"
|
||||||
#include "./modules/char.mod.hsp"
|
#include "./modules/char.mod.hsp"
|
||||||
#include "./modules/keyboard.mod.hsp"
|
#include "./modules/keyboard.mod.hsp"
|
||||||
|
#include "./modules/setting.mod.hsp"
|
||||||
|
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
@@ -76,6 +77,9 @@
|
|||||||
; ゴートうインスタンス生成
|
; ゴートうインスタンス生成
|
||||||
Goatoh = New@Goatoh (960, 800, DIRECTION_LEFT)
|
Goatoh = New@Goatoh (960, 800, DIRECTION_LEFT)
|
||||||
|
|
||||||
|
; 設定読込み
|
||||||
|
Load@Setting
|
||||||
|
|
||||||
; サウンド読込み
|
; サウンド読込み
|
||||||
MMLoad "mumumumu.wav", SOUND_MUMUMUMU
|
MMLoad "mumumumu.wav", SOUND_MUMUMUMU
|
||||||
MMLoad "MusMus-BGM-097.mp3", SOUND_BGM, MM_REPEAT
|
MMLoad "MusMus-BGM-097.mp3", SOUND_BGM, MM_REPEAT
|
||||||
@@ -101,7 +105,7 @@
|
|||||||
Draw@Char
|
Draw@Char
|
||||||
Draw@Keyboard
|
Draw@Keyboard
|
||||||
|
|
||||||
a = GetChar@Keyboard ()
|
Print GetChar@Keyboard () != False
|
||||||
text@Char.Text = text@Keyboard
|
text@Char.Text = text@Keyboard
|
||||||
ReDraw True
|
ReDraw True
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#module \
|
#module \
|
||||||
User
|
User
|
||||||
|
|
||||||
#define URL (CONFIG_SERVER_URL + "/make_user.php")
|
#define URL (CONFIG_SERVER_URL + "/create_user.php")
|
||||||
|
|
||||||
#defcfunc local \
|
#defcfunc local \
|
||||||
New
|
New
|
||||||
@@ -13,11 +13,11 @@ New
|
|||||||
Return insNum - 1
|
Return insNum - 1
|
||||||
|
|
||||||
#deffunc local \
|
#deffunc local \
|
||||||
Make \
|
Create \
|
||||||
int p_insId,\
|
int p_insId,\
|
||||||
local data
|
local l_data
|
||||||
HTTPLoad URL
|
HTTPLoad URL
|
||||||
HTTPInfo data
|
HTTPInfo l_data
|
||||||
|
|
||||||
id.p_insId = 0
|
id.p_insId = 0
|
||||||
pass.p_insId = ""
|
pass.p_insId = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user