すくすくゴートうちゃん 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.

goatoh.mod.hsp 2.8 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. #module \
  2. Goatoh
  3. #enum LEG_LF = 0
  4. #enum LEG_RF
  5. #enum LEG_LH
  6. #enum LEG_RH
  7. #enum LEG_DIRECTION_FRONT = 1
  8. #enum LEG_DIRECTION_HIND
  9. #defcfunc local \
  10. New \
  11. double p_initPosX,\
  12. double p_initPosY,\
  13. int p_initDirection
  14. posX.insNum = p_initPosX
  15. posY.insNum = p_initPosY
  16. legArgs.LEG_LF.insNum = 0.
  17. legArgs.LEG_RF.insNum = 0.
  18. legArgs.LEG_LH.insNum = 0.
  19. legArgs.LEG_RH.insNum = 0.
  20. legDirections.LEG_LF.insNum = LEG_DIRECTION_FRONT
  21. legDirections.LEG_RF.insNum = LEG_DIRECTION_HIND
  22. legDirections.LEG_LH.insNum = LEG_DIRECTION_HIND
  23. legDirections.LEG_RH.insNum = LEG_DIRECTION_FRONT
  24. scale.insNum = 2.
  25. ; 角度
  26. arg.insNum = 0.
  27. ; 首の角度
  28. neckArg.insNum = 0.
  29. walkVel.insNum = 3.
  30. walkAcl.insNum = 0.
  31. runVel.insNum = 5.
  32. runVel.insNum = 0.
  33. direction.insNum = p_initDirection
  34. walking.insNum = False
  35. running.insNum = False
  36. eating.insNum = False
  37. openingEyes.insNum = False
  38. openingMouth.insNum = False
  39. frame.insNum = 0
  40. insNum++
  41. Return insNum - 1
  42. #deffunc local \
  43. Walk \
  44. int p_insId
  45. If direction.p_insId = DIRECTION_LEFT {
  46. posX.p_insId -= walkVel.p_insId * Cos (arg.p_insId)
  47. posY.p_insId -= walkVel.p_insId * Sin (arg.p_insId)
  48. }
  49. Else {
  50. posX.p_insId += walkVel.p_insId * Cos (arg.p_insId)
  51. posY.p_insId += walkVel.p_insId * Sin (arg.p_insId)
  52. }
  53. Return
  54. #deffunc local \
  55. DoRun \
  56. int p_insId
  57. Return
  58. #deffunc local \
  59. Eat \
  60. int p_insId
  61. Return
  62. #deffunc local \
  63. Draw \
  64. int p_insId
  65. Pos posX.p_insId - scale.p_insId * 50, posY.p_insId + scale.p_insId * 26
  66. CelPut BUFFER_GOATOH_LEG, 0, scale.p_insId, scale.p_insId
  67. Pos posX.p_insId + scale.p_insId * 30, posY.p_insId + scale.p_insId * 26
  68. CelPut BUFFER_GOATOH_LEG, 0, scale.p_insId, scale.p_insId
  69. Pos posX.p_insId + scale.p_insId * 64, posY.p_insId - scale.p_insId * 12
  70. CelPut BUFFER_GOATOH_TAIL, 0, scale.p_insId, scale.p_insId
  71. Pos posX.p_insId, posY.p_insId
  72. CelPut BUFFER_GOATOH_TARSO, 0, scale.p_insId, scale.p_insId
  73. Pos posX.p_insId - scale.p_insId * 30, posY.p_insId + scale.p_insId * 30
  74. CelPut BUFFER_GOATOH_LEG, 0, scale.p_insId, scale.p_insId
  75. Pos posX.p_insId + scale.p_insId * 50, posY.p_insId + scale.p_insId * 30
  76. CelPut BUFFER_GOATOH_LEG, 0, scale.p_insId, scale.p_insId
  77. Pos posX.p_insId - scale.p_insId * 64, posY.p_insId - scale.p_insId * 20
  78. CelPut BUFFER_GOATOH_HEAD, 0, scale.p_insId, scale.p_insId, neckArg.p_insId
  79. Pos posX.p_insId - scale.p_insId * 64, posY.p_insId - scale.p_insId * 20
  80. CelPut BUFFER_GOATOH_FACE_CC, 0, scale.p_insId, scale.p_insId, neckArg.p_insId
  81. Interval@Goatoh p_insId
  82. Return
  83. #deffunc local \
  84. Interval \
  85. int p_insId
  86. If walking.p_insId {
  87. Walk@Goatoh p_insId
  88. If frame.p_insId \ 150 == 30 {
  89. MMPlay SOUND_MUMUMUMU
  90. }
  91. }
  92. Else: If running.p_insId {
  93. DoRun@Goatoh p_insId
  94. }
  95. If eating.p_insId {
  96. Eat@Goatoh p_insId
  97. }
  98. frame.p_insId++
  99. Return
  100. #global