@@ -1,7 +1,9 @@ | |||||
/hscl.ini | /hscl.ini | ||||
/main.ax | /main.ax | ||||
/main.cpp | /main.cpp | ||||
/main.html | |||||
/main.data | |||||
/obj | /obj | ||||
/modules/obj | /modules/obj | ||||
/modules/hscl.ini | /modules/hscl.ini | ||||
/hsp3dish.js |
@@ -1,5 +1,9 @@ | |||||
#include "hsp3dish.as" | #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_CC = 1 ; ゴートうの顔(閉眼,閉口) | ||||
#enum global BUFFER_GOATOH_FACE_CO ; (閉眼,開口) | #enum global BUFFER_GOATOH_FACE_CO ; (閉眼,開口) | ||||
@@ -28,25 +32,39 @@ | |||||
#ifdef _DEBUG | #ifdef _DEBUG | ||||
Screen 0, 540, 960 | |||||
; デバッグ時は assets ディレクトリを参照する. | ; デバッグ時は assets ディレクトリを参照する. | ||||
ChDir "assets" | ChDir "assets" | ||||
#endif ; not _DEBUG | #endif ; not _DEBUG | ||||
ViewCalc VPTYPE_2D, Double (gInfo_winX) / DISPLAY_WIDTH, Double (gInfo_winY) / DISPLAY_HEIGHT | |||||
; 背景 | ; 背景 | ||||
CelLoad "bg.jpg", BUFFER_BG | 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 | CelLoad "goatoh-head.png", BUFFER_GOATOH_HEAD | ||||
CelDiv BUFFER_GOATOH_HEAD, 0, 0, 77, 143 | |||||
CelLoad "goatoh-leg.png", BUFFER_GOATOH_LEG | CelLoad "goatoh-leg.png", BUFFER_GOATOH_LEG | ||||
CelDiv BUFFER_GOATOH_LEG, 0, 0, 48, 29 | |||||
CelLoad "goatoh-tail.png", BUFFER_GOATOH_TAIL | CelLoad "goatoh-tail.png", BUFFER_GOATOH_TAIL | ||||
CelDiv BUFFER_GOATOH_TAIL, 0, 0, 22, 33 | |||||
CelLoad "goatoh-tarso.png", BUFFER_GOATOH_TARSO | 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 | MMLoad "mumumumu.wav", SOUND_MUMUMUMU | ||||
@@ -61,9 +79,15 @@ | |||||
Repeat | Repeat | ||||
ReDraw False | ReDraw False | ||||
Pos 0, 0 | Pos 0, 0 | ||||
CelPut BUFFER_BG | |||||
CelPut BUFFER_BG, 0, Double (DISPLAY_HEIGHT) / 533, Double (DISPLAY_HEIGHT) / 533 | |||||
Draw@Goatoh Goatoh | 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 | ReDraw True | ||||
Await LOOP_INTERVAL | Await LOOP_INTERVAL | ||||
@@ -9,6 +9,8 @@ New \ | |||||
posX.insNum = p_initPosX | posX.insNum = p_initPosX | ||||
posY.insNum = p_initPosY | posY.insNum = p_initPosY | ||||
scale.insNum = 2. | |||||
; 角度 | ; 角度 | ||||
arg.insNum = 0. | arg.insNum = 0. | ||||
@@ -23,7 +25,7 @@ New \ | |||||
direction.insNum = p_initDirection | direction.insNum = p_initDirection | ||||
walking.insNum = True | |||||
walking.insNum = False | |||||
running.insNum = False | running.insNum = False | ||||
eating.insNum = False | eating.insNum = False | ||||
openingEyes.insNum = False | openingEyes.insNum = False | ||||
@@ -62,29 +64,29 @@ Eat \ | |||||
#deffunc local \ | #deffunc local \ | ||||
Draw \ | Draw \ | ||||
int p_insId | 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 | 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 | Interval@Goatoh p_insId | ||||
@@ -95,6 +97,10 @@ Interval \ | |||||
int p_insId | int p_insId | ||||
If walking.p_insId { | If walking.p_insId { | ||||
Walk@Goatoh p_insId | Walk@Goatoh p_insId | ||||
If frame.p_insId \ 150 == 30 { | |||||
MMPlay SOUND_MUMUMUMU | |||||
} | |||||
} | } | ||||
Else: If running.p_insId { | Else: If running.p_insId { | ||||
DoRun@Goatoh p_insId | DoRun@Goatoh p_insId | ||||