hmm.en.txt

Last modified by John Stroy on 2012/07/08 22:47

Notes

English translation (via Google) of hmm.txt.

Contents

 
Standard Functions ☆☆☆ HMMINIT p1 Argument p1: Initialize mode. Sets the first bit of p1 and initializes DirectSound. Required to use the instruction of DS system. Sets the second bit of p1 and initializes DirectMusic. Required to use the instruction of DM system. Sets the third bit of p1 and initializes DirectInput. Required to use the instruction of DI system. Sets the fourth bit of p1 and initializes DirectDraw. Required to use the instruction of DD system. Sets the fifth bit of p1 and initializes DirectGraphics. Required to use the instruction of DG system.   Sets the sixth bit of p1 and initializes DirectShow. Required to use the instruction of DSH system. Return value (stat) Success:1 or HMM_OK Failure:0 or HMM_ERR Function Initializes this plugin. Call the function at the very start of its usage. Example) hmminit 3 ; Initializes DirectSound and DirectMusic. dsinit: dminit ; Does the same as above example and doesn't matter which method is used. ☆☆☆ HMMEND No Argument Return value (stat) 1 will always come back. Function Ends this plugin. When HSP ends, this line is called in automatically so there's no need to be constantly aware of this. ☆☆☆ HMMBITON p1, p2 Argument p1: Controls a certain integer type variable name you want. p2: Controls a certain bit number you want. Return value (stat) Always 1 Function Turns p2 bit of p1 variable into 1. Example) int a a = 0 HMMBITON a, 2 ;Turns 2nd bit into 1. if a == 4 : dialog "The 2nd bit has been set" HMMBITON a, 0 if a == 5 : dialog "The 0th bit has been set" stop ☆☆☆ HMMBITOFF p1, p2 Argument p1:Controls a certain integer type variable name you want. p2:Controls a certain bit number you want. Return value(stat) Always 1 Function Turns p2 bit of p1 variable into 0. ☆☆☆ HMMBITCHECK p1, p2 Argument p1: Checks a certain integer type variable name you want. p2: Checks a certain bit number you want. Return value (stat) When set at 1 When not set at 0 Function Checks if p2 bit of p1 variable is set. ☆☆☆ HMMGETFPS p1 Argument p1: Retains a frame rate you want in integer type variable name. Return value (stat) 1 is returned Function Obtains frame rate. ☆☆☆ HMMHITCHECK p1, p2, p3, p4, p5, p6, p7, p8, p9 Argument p1: Parameter entering in collision detection results. p2: Array variable 1 that checks certain collision detection you want. p3: Number you want to search for in actual array variable 1. p4: Parameter number required to configure a single character. p5: Collision detection you want to examine array variable 2. p6: Parameter number required to configure a single character. p7: Starts number search of array variable 2. p8: Ends number search of array variable 2. p9: Searches a target type value (Holds the same meaning as p3's parameter of ex_check of hspdx.dll) Return value Always 1 Function Same character of rectangle of collision detection is taken care of. キャラクター同士の矩形の当たり判定処理をします。 ここでいうキャラクターとは、最低でも表示座標と当たり判定の領域と検索タイプ値のデータが入っている1次元または2次元配列をさします。 1つのキャラで最低でも必要なパラメーターの内訳は表示座標x, y(Upper left side of the rectangle) Collision detection regarding rectangle's starting position: sx, sy. Collision detection regarding rectangle's width and height: w, h. 検索タイプ値typeの7ぐのパラメーターが必要になります。 配列1のキャラクターと配列2のキャラクターが当たっている場合は、p1に配列2のキャラクターの番号が帰ってきます。 当たりが1つもない場合はp1に-1が帰ります。 p9が0の時は配列2のキャラクター全てを検索します。 The question of it's usefullness is strange one, therefore only users who understands how to use the sample should apply this. Example) dim sb, 7, 16 /* Player Character's bullet. Changes the position of element number containing parameters used in collision detection. Where n is a character number (means numerical value, I'm guessing). sb.0.n Displays x coordinates. sb.1.n Displays y coordinates. sb.2.n The x coordinates of a rectangle starting position's collision detection. sb.3.n The y coordinates of a rectangle starting position's collision detection. sb.4.n Width of the rectangle's collision detection. sb.5.n Length of the rectangle's collision detection. sb.6.n Searches type value. */ dim ene, 7*32 /* Enemy The configuration parameters that can appear in seven to 32 animals Configurable parameters that can be registered from 7 which can go up to 32 enemies. Where n is a character number. ene.(7*n) Displays x coordinates. ene.(7*n+1) Displays y coordinates. ene.(7*n+2) The x coordinates of a rectangle starting position's collision detection. ene.(7*n+3) The y coordinates of a rectangle starting position's collision detection. ene.(7*n+4) Width of the rectangle's collision detection. ene.(7*n+5) Length of the rectangle's collision detection. ene.(7*n+6) Searches type value. */ ;Collision detection of PC's bullet and enemy. repeat 16 hmmhitcheck res, sb, 7, cnt, ene, 7, 0, 0 if res == -1 : continue ;If it comes here that means the PC's bullet has hit the enemy. break loop ☆☆☆ HHMMHITCHECKSETINDEX p1, p2, p3 Argument p1:表示x座標のパラメターが入っている要素番号 p2:当たり判定の矩形の開始位置x座標のパラメターが入っている要素番号 p3:検索タイプ値のパラメターが入っている要素番号 Return value Always 1 Function Changes the position of element number containing parameters used in collision detection. Example) hmmhitchecksetindex 5, 1, 0 dim sb, 7, 16 /* PC's bullet. Configurable number of parameters that can be discharged from 7 which can go up to 16 bullets. Where n is a character number. sb.0.n Searches type value. sb.1.n The x coordinates of a rectangle starting position's collision detection. sb.2.n The y coordinates of a rectangle starting position's collision detection. sb.3.n Width of the rectangle's collision detection. sb.4.n Length of the rectangle's collision detection. sb.5.n Displays x coordinates. sb.6.n Displays y coordinates. */