diff --git a/android/.gitignore b/android/.gitignore index 22b35d9..e631853 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -1,7 +1,9 @@ /hscl.ini /main.ax /main.cpp +/main.html +/main.data /obj /modules/obj /modules/hscl.ini - +/hsp3dish.js \ No newline at end of file diff --git a/android/icon.png b/android/icon.png new file mode 100644 index 0000000..f3b3ae5 Binary files /dev/null and b/android/icon.png differ diff --git a/android/main.hsp b/android/main.hsp index c9b03ee..197ce2f 100644 --- a/android/main.hsp +++ b/android/main.hsp @@ -1,5 +1,9 @@ #include "hsp3dish.as" +; 画面サイズ +#const global DISPLAY_WIDTH 1080 +#const global DISPLAY_HEIGHT 1920 + ; バッファ #enum global BUFFER_GOATOH_FACE_CC = 1 ; ゴートうの顔(閉眼,閉口) #enum global BUFFER_GOATOH_FACE_CO ;       (閉眼,開口) @@ -28,25 +32,39 @@ #ifdef _DEBUG + Screen 0, 540, 960 + ; デバッグ時は assets ディレクトリを参照する. ChDir "assets" #endif ; not _DEBUG + ViewCalc VPTYPE_2D, Double (gInfo_winX) / DISPLAY_WIDTH, Double (gInfo_winY) / DISPLAY_HEIGHT + ; 背景 CelLoad "bg.jpg", BUFFER_BG - ; ゴートうバッファ - CelLoad "goatoh-face-closed-closed.png", BUFFER_GOATOH_FACE_CC - CelLoad "goatoh-face-closed-open.png", BUFFER_GOATOH_FACE_CO - CelLoad "goatoh-face-open-closed.png", BUFFER_GOATOH_FACE_OC - CelLoad "goatoh-face-open-open.png", BUFFER_GOATOH_FACE_OO + ; ゴートうの顔 + files = "goatoh-face-closed-closed.png", "goatoh-face-closed-open.png", "goatoh-face-open-closed.png", "goatoh-face-open-open.png" + ids = BUFFER_GOATOH_FACE_CC, BUFFER_GOATOH_FACE_CO, BUFFER_GOATOH_FACE_OC, BUFFER_GOATOH_FACE_OO + Repeat 4 + CelLoad files.cnt, ids.cnt + CelDiv ids.cnt, 0, 0, 100, 111 + Loop + CelLoad "goatoh-head.png", BUFFER_GOATOH_HEAD + CelDiv BUFFER_GOATOH_HEAD, 0, 0, 77, 143 + CelLoad "goatoh-leg.png", BUFFER_GOATOH_LEG + CelDiv BUFFER_GOATOH_LEG, 0, 0, 48, 29 + CelLoad "goatoh-tail.png", BUFFER_GOATOH_TAIL + CelDiv BUFFER_GOATOH_TAIL, 0, 0, 22, 33 + CelLoad "goatoh-tarso.png", BUFFER_GOATOH_TARSO + CelDiv BUFFER_GOATOH_TARSO, 0, 0, 97, 49 ; ゴートうインスタンス生成 - Goatoh = New@Goatoh (0., 0., DIRECTION_LEFT) + Goatoh = New@Goatoh (540, 800, DIRECTION_LEFT) ; サウンド読込み MMLoad "mumumumu.wav", SOUND_MUMUMUMU @@ -61,9 +79,15 @@ Repeat ReDraw False Pos 0, 0 - CelPut BUFFER_BG + CelPut BUFFER_BG, 0, Double (DISPLAY_HEIGHT) / 533, Double (DISPLAY_HEIGHT) / 533 Draw@Goatoh Goatoh + + Pos 0, 0 + Print StrF ("gInfo_winX: %4d", gInfo_winX) + Print StrF ("gInfo_winY: %4d", gInfo_winY) + Print StrF ("gInfo_dispX: %4d", gInfo_dispX) + Print StrF ("gInfo_dispY: %4d", gInfo_dispY) ReDraw True Await LOOP_INTERVAL diff --git a/android/modules/goatoh.mod.hsp b/android/modules/goatoh.mod.hsp index 1d0f84d..497038c 100644 --- a/android/modules/goatoh.mod.hsp +++ b/android/modules/goatoh.mod.hsp @@ -9,6 +9,8 @@ New \ posX.insNum = p_initPosX posY.insNum = p_initPosY + scale.insNum = 2. + ; 角度 arg.insNum = 0. @@ -23,7 +25,7 @@ New \ direction.insNum = p_initDirection - walking.insNum = True + walking.insNum = False running.insNum = False eating.insNum = False openingEyes.insNum = False @@ -62,29 +64,29 @@ Eat \ #deffunc local \ Draw \ int p_insId - Pos posX.p_insId, posY.p_insId - CelPut BUFFER_GOATOH_TAIL + Pos posX.p_insId - scale.p_insId * 50, posY.p_insId + scale.p_insId * 26 + CelPut BUFFER_GOATOH_LEG, 0, scale.p_insId, scale.p_insId - Pos posX.p_insId, posY.p_insId - CelPut BUFFER_GOATOH_TARSO + Pos posX.p_insId + scale.p_insId * 30, posY.p_insId + scale.p_insId * 26 + CelPut BUFFER_GOATOH_LEG, 0, scale.p_insId, scale.p_insId - Pos posX.p_insId, posY.p_insId - CelPut BUFFER_GOATOH_FACE_CC, 0, 1., 1., neckArg.p_insId + Pos posX.p_insId + scale.p_insId * 64, posY.p_insId - scale.p_insId * 12 + CelPut BUFFER_GOATOH_TAIL, 0, scale.p_insId, scale.p_insId Pos posX.p_insId, posY.p_insId - CelPut BUFFER_GOATOH_HEAD, 0, 1., 1., neckArg.p_insId + CelPut BUFFER_GOATOH_TARSO, 0, scale.p_insId, scale.p_insId - Pos posX.p_insId, posY.p_insId - CelPut BUFFER_GOATOH_LEG + Pos posX.p_insId - scale.p_insId * 30, posY.p_insId + scale.p_insId * 30 + CelPut BUFFER_GOATOH_LEG, 0, scale.p_insId, scale.p_insId - Pos posX.p_insId, posY.p_insId - CelPut BUFFER_GOATOH_LEG + Pos posX.p_insId + scale.p_insId * 50, posY.p_insId + scale.p_insId * 30 + CelPut BUFFER_GOATOH_LEG, 0, scale.p_insId, scale.p_insId - Pos posX.p_insId, posY.p_insId - CelPut BUFFER_GOATOH_LEG + Pos posX.p_insId - scale.p_insId * 64, posY.p_insId - scale.p_insId * 20 + CelPut BUFFER_GOATOH_HEAD, 0, scale.p_insId, scale.p_insId, neckArg.p_insId - Pos posX.p_insId, posY.p_insId - CelPut BUFFER_GOATOH_LEG + Pos posX.p_insId - scale.p_insId * 64, posY.p_insId - scale.p_insId * 20 + CelPut BUFFER_GOATOH_FACE_CC, 0, scale.p_insId, scale.p_insId, neckArg.p_insId Interval@Goatoh p_insId @@ -95,6 +97,10 @@ Interval \ int p_insId If walking.p_insId { Walk@Goatoh p_insId + + If frame.p_insId \ 150 == 30 { + MMPlay SOUND_MUMUMUMU + } } Else: If running.p_insId { DoRun@Goatoh p_insId