すくすくゴートうちゃん Android 版(黒歴史)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
3.0 KiB

  1. #include "hsp3dish.as"
  2. #include "config.hsp"
  3. ; 画面サイズ
  4. #const global DISPLAY_WIDTH 1080
  5. #const global DISPLAY_HEIGHT 1920
  6. ; バッファ
  7. #enum global BUFFER_GOATOH_FACE_CC = 1 ; ゴートうの顔(閉眼,閉口)
  8. #enum global BUFFER_GOATOH_FACE_CO ;       (閉眼,開口)
  9. #enum global BUFFER_GOATOH_FACE_OC ;       (開眼,閉口)
  10. #enum global BUFFER_GOATOH_FACE_OO ;       (開眼,開口)
  11. #enum global BUFFER_GOATOH_HEAD ; ゴートうの頭
  12. #enum global BUFFER_GOATOH_LEG ; ゴートうの脚
  13. #enum global BUFFER_GOATOH_TAIL ; ゴートうのしっぽ
  14. #enum global BUFFER_GOATOH_TARSO ; ゴートうの胴体
  15. #enum global BUFFER_NIZIKA ; ニジカ
  16. #enum global BUFFER_BG ; https://www.pakutaso.com/20190249044post-18819.html
  17. #enum global BUFFER_CHAR ; 文字セット
  18. ; サウンド
  19. #enum global SOUND_MUMUMUMU = 0 ; ムムムム
  20. #enum global SOUND_BGM ; 夕餉の街並み(Copyright: Musmus)
  21. #enum global SOUND_EATING_KUSA ; クサタベテル!!!
  22. ; 向き
  23. #enum global DIRECTION_LEFT = 1
  24. #enum global DIRECTION_RIGHT
  25. #const global FPS 30
  26. #const global LOOP_INTERVAL 1000 / FPS
  27. #include "./modules/goatoh.mod.hsp"
  28. #include "./modules/chat.mod.hsp"
  29. #include "./modules/char.mod.hsp"
  30. #include "./modules/keyboard.mod.hsp"
  31. #ifdef _DEBUG
  32. Screen 0, 540, 960
  33. ; デバッグ時は assets ディレクトリを参照する.
  34. ChDir "assets"
  35. #endif ; not _DEBUG
  36. Font MSGOTHIC, 96
  37. ViewCalc VPTYPE_2D, Double (gInfo_winX) / DISPLAY_WIDTH, Double (gInfo_winY) / DISPLAY_HEIGHT
  38. ; 背景
  39. CelLoad "bg.jpg", BUFFER_BG
  40. ; ゴートうの顔
  41. files = "goatoh-face-closed-closed.png", "goatoh-face-closed-open.png", "goatoh-face-open-closed.png", "goatoh-face-open-open.png"
  42. ids = BUFFER_GOATOH_FACE_CC, BUFFER_GOATOH_FACE_CO, BUFFER_GOATOH_FACE_OC, BUFFER_GOATOH_FACE_OO
  43. Repeat 4
  44. CelLoad files.cnt, ids.cnt
  45. CelDiv ids.cnt, 0, 0, 100, 111
  46. Loop
  47. CelLoad "goatoh-head.png", BUFFER_GOATOH_HEAD
  48. CelDiv BUFFER_GOATOH_HEAD, 0, 0, 77, 143
  49. CelLoad "goatoh-leg.png", BUFFER_GOATOH_LEG
  50. CelDiv BUFFER_GOATOH_LEG, 0, 0, 48, 29
  51. CelLoad "goatoh-tail.png", BUFFER_GOATOH_TAIL
  52. CelDiv BUFFER_GOATOH_TAIL, 0, 0, 22, 33
  53. CelLoad "goatoh-tarso.png", BUFFER_GOATOH_TARSO
  54. CelDiv BUFFER_GOATOH_TARSO, 0, 0, 97, 49
  55. CelLoad "font.png", BUFFER_CHAR
  56. CelDiv BUFFER_CHAR, 32, 35, 0, 0
  57. ; ゴートうインスタンス生成
  58. Goatoh = New@Goatoh (960, 800, DIRECTION_LEFT)
  59. ; サウンド読込み
  60. MMLoad "mumumumu.wav", SOUND_MUMUMUMU
  61. MMLoad "MusMus-BGM-097.mp3", SOUND_BGM, MM_REPEAT
  62. MMLoad "eating-kusa.wav", SOUND_EATING_KUSA
  63. ; BGM 再生
  64. MMPlay SOUND_BGM
  65. GMode GMODE_RGB0 ; アルファあり
  66. Show@Keyboard
  67. Pos 100, 100
  68. Text = New@Char ("")
  69. size@Char.Text = 240
  70. Repeat
  71. ReDraw False
  72. Pos 0, 0
  73. CelPut BUFFER_BG, 0, Double (DISPLAY_HEIGHT) / 533, Double (DISPLAY_HEIGHT) / 533
  74. Draw@Goatoh Goatoh
  75. Draw@Char
  76. Draw@Keyboard
  77. a = GetChar@Keyboard ()
  78. text@Char.Text = text@Keyboard
  79. ReDraw True
  80. Await LOOP_INTERVAL
  81. Loop