2006.09.19 Tuesday | 08:33

  SQL¤ÎÁë Build C++ ¥¢¥Ã¥×¥Ç¡¼¥È ¤Õ¤ë¤¤¤à¤«¤·

ver 2006/09/22


ver 2006/09/22
1) Batch Helper ºÇ¿·ÈǤò¥³¥Ô¡¼
2) ¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ëÆâ¤Îʸ»úÎ󸡺÷¤ò¥á¥Ë¥å¡¼¤«¤é¼Â¹Ô²Äǽ¤Ë
3) Option ÀßÄê¥Õ¥¡¥¤¥ë

ver 2006/09/14
1) MySQL ¤Ç VIEW ºîÀ®¥Ü¥¿¥ó¤òÍ­¸ú¤ËÊѹ¹
2) MySQL5 ¤ËÂбþ¤·¤¿¥á¥Ë¥å¡¼¤òÄɲÃ
3) ´û¸¥á¥Ë¥å¡¼¤Î¹¹¿·
4) PostgreSQL : ¥«¥é¥à¾ðÊó¥á¥Ë¥å¡¼¤òÄɲÃ



2006.09.15 Friday | 16:30

  ¡ÚEasy Game¡Û Script ¥Ð¡¼¥¸¥ç¥ó ¤Õ¤ë¤¤¤à¤«¤·

COM ¥³¥ó¥Ý¡¼¥Í¥ó¥È( ¥»¥Ã¥È¥¢¥Ã¥×ÍÑ¥¹¥¯¥ê¥×¥ÈƱº­ )
¡Ú2006/09/15 ¥Ð¡¼¥¸¥ç¥ó¡Û

<JOB>
<OBJECT id="Dx" progid="DxlibWrap.Game" />
<OBJECT id="WshShell" progid="WScript.Shell" />
<REFERENCE object="DxlibWrap.Game" />

<SCRIPT language="VBScript" src="Game.vbs"></SCRIPT>
<SCRIPT language=VBScript>

	strCurDir = WScript.ScriptFullName
	strCurDir = Replace( strCurDir, WScript.ScriptName, "" )

	Dx.WindowMode

	If Dx.Init = -1 Then
		Wscript.Quit
	End If

	Set MyGame = new Game
	Call MyGame(320,340,strCurDir & "\play.bmp")

' **********************************************************
' ¥á¥¤¥ó¥ë¡¼¥×( ¥¯¥é¥¹Æâ¤è¤ê¸Æ¤Ð¤ì¤ë )
' **********************************************************
Function MainLoop()

		If Dx.CheckHitKey(KEY_INPUT_LEFT) = 1 Then
			MyGame.x = MyGame.x - 3
		End If
		If Dx.CheckHitKey(KEY_INPUT_RIGHT) = 1 Then
			MyGame.x = MyGame.x + 3
		End If

		' ÉÁ²è
		MyGame.DrawPlay

End Function 

</SCRIPT>
</JOB>

³°Éô¥Õ¥¡¥¤¥ë(¥¯¥é¥¹)
Class Game 

	Public x,y,Handle

	Public Default Function InitSetting(px,py,strPath)

		Handle = Dx.LoadGraph( strPath )
		x = px : y = py

		Dx.SetDrawScreen (DX_SCREEN_BACK)

		Do
			' ¥¯¥ê¥¢
			Dx.ClearDrawScreen

			on error resume next
			Call MainLoop()
			on error goto 0

			' ΢²èÌ̤ÎÆâÍƤòɽ²èÌ̤ËÈ¿±Ç¤µ¤»¤ë
			Dx.ScreenFlip

			' Windows ¥·¥¹¥Æ¥à¤«¤é¤¯¤ë¾ðÊó¤ò½èÍý¤¹¤ë
			If Dx.ProcessMessage = -1 Then
				Exit Do
			End If

			If Dx.CheckHitKey(KEY_INPUT_ESCAPE) = 1 Then
				Exit Do
			End If
		
		Loop

		Dx.End

	End function

	Function DrawPlay()

		Call Dx.DrawGraph( x, y, Handle, 1 )

	End Function

End Class

¸½»þÅÀ¼ÂÁõ¥á¥½¥Ã¥É
[id(1), helpstring("ŽÒŽ¿Ž¯ŽÄŽÞ Init")] HRESULT Init([out,retval] int *pVal); [id(2), helpstring("ŽÒŽ¿Ž¯ŽÄŽÞ DxLib_End")] HRESULT End([out,retval] int *pVal); [id(3), helpstring("ŽÒŽ¿Ž¯ŽÄŽÞ ProcessMessage")] HRESULT ProcessMessage([out,retval] int *pVal); [id(4), helpstring("ŽÒŽ¿Ž¯ŽÄŽÞ WindowMode")] HRESULT WindowMode([out,retval] int *pVal); [id(5), helpstring("ŽÒŽ¿Ž¯ŽÄŽÞ DrawPixel")] HRESULT DrawPixel([in] int x ,[in] int y , [in] int Color,[out,retval] int *pVal); [id(6), helpstring("ŽÒŽ¿Ž¯ŽÄŽÞ WaitKey")] HRESULT WaitKey([out,retval] int *pVal); [id(7), helpstring("ŽÒŽ¿Ž¯ŽÄŽÞ LoadGraphScreen")] HRESULT LoadGraphScreen([in] int x , [in] int y ,[in] BSTR GraphName,[out,retval] int *pVal); [id(8), helpstring("ŽÒŽ¿Ž¯ŽÄŽÞ LoadGraph")] HRESULT LoadGraph([in] BSTR FileName,[out,retval] int *pVal); [id(9), helpstring("ŽÒŽ¿Ž¯ŽÄŽÞ GetScreenState")] HRESULT GetScreenState([in] int nType,[out,retval] int *pVal); [id(10), helpstring("ŽÒŽ¿Ž¯ŽÄŽÞ SetDrawScreen")] HRESULT SetDrawScreen([in] int DrawScreen,[out,retval] int *pVal); [id(11), helpstring("ŽÒŽ¿Ž¯ŽÄŽÞ ClearDrawScreen")] HRESULT ClearDrawScreen([out,retval] int *pVal); [id(12), helpstring("ŽÒŽ¿Ž¯ŽÄŽÞ ScreenFlip")] HRESULT ScreenFlip([out,retval] int *pVal); [id(13), helpstring("ŽÒŽ¿Ž¯ŽÄŽÞ CheckHitKey")] HRESULT CheckHitKey([in] int KeyCode,[out,retval] int *pVal); [id(14), helpstring("ŽÒŽ¿Ž¯ŽÄŽÞ GetJoypadInputState")] HRESULT GetJoypadInputState([in] int InputType,[out,retval] int *pVal); [id(15), helpstring("ŽÒŽ¿Ž¯ŽÄŽÞ WaitTimer")] HRESULT WaitTimer([in] int WaitTime,[out,retval] int *pVal); [id(16), helpstring("ŽÒŽ¿Ž¯ŽÄŽÞ DrawGraph")] HRESULT DrawGraph([in] int x,[in] int y,[in] int GrHandle,[in] int TransFlag ,[out,retval] int *pVal);
¼ÂÁõÄê¿ô
PAD_INPUT_DOWN = (0x00000001), PAD_INPUT_LEFT =(0x00000002), PAD_INPUT_RIGHT = (0x00000004), PAD_INPUT_UP = (0x00000008), PAD_INPUT_A = (0x00000010), PAD_INPUT_B = (0x00000020), PAD_INPUT_C = (0x00000040), PAD_INPUT_X = (0x00000080), PAD_INPUT_Y = (0x00000100), PAD_INPUT_Z = (0x00000200), PAD_INPUT_L = (0x00000400), PAD_INPUT_R = (0x00000800), PAD_INPUT_START = (0x00001000), PAD_INPUT_M = (0x00002000), PAD_INPUT_D = (0x00004000), PAD_INPUT_F = (0x00008000), PAD_INPUT_G = (0x00010000), PAD_INPUT_H = (0x00020000), PAD_INPUT_I = (0x00040000), PAD_INPUT_J = (0x00080000), PAD_INPUT_K = (0x00100000), PAD_INPUT_LL = (0x00200000), PAD_INPUT_N = (0x00400000), PAD_INPUT_O = (0x00800000), PAD_INPUT_P = (0x01000000), PAD_INPUT_RR = (0x02000000), PAD_INPUT_S = (0x04000000), PAD_INPUT_T = (0x08000000), PAD_INPUT_U = (0x10000000), PAD_INPUT_V = (0x20000000), PAD_INPUT_W = (0x40000000), PAD_INPUT_XX = (0x80000000) GETSCREEN_X = 0, GETSCREEN_Y = 1, GETSCREEN_COLOR = 2 DX_SCREEN_FRONT = (0xfffffffc), DX_SCREEN_BACK = (0xfffffffe) D_DIK_ESCAPE = (0x01), D_DIK_1 = (0x02), D_DIK_2 = (0x03), D_DIK_3 = (0x04), D_DIK_4 = (0x05), D_DIK_5 = (0x06), D_DIK_6 = (0x07), D_DIK_7 = (0x08), D_DIK_8 = (0x09), D_DIK_9 = (0x0A), D_DIK_0 = (0x0B), D_DIK_MINUS = (0x0C), D_DIK_EQUALS = (0x0D), D_DIK_BACK = (0x0E), D_DIK_TAB = (0x0F), D_DIK_LEFT = (0xCB), D_DIK_RIGHT = (0xCD) KEY_INPUT_ESCAPE = (D_DIK_ESCAPE), KEY_INPUT_0 = (D_DIK_0), KEY_INPUT_1 = (D_DIK_1), KEY_INPUT_2 = (D_DIK_2), KEY_INPUT_3 = (D_DIK_3), KEY_INPUT_4 = (D_DIK_4), KEY_INPUT_5 = (D_DIK_5), KEY_INPUT_6 = (D_DIK_6), KEY_INPUT_7 = (D_DIK_7), KEY_INPUT_8 = (D_DIK_8), KEY_INPUT_9 = (D_DIK_9), KEY_INPUT_MINUS = (D_DIK_MINUS), KEY_INPUT_EQUALS = (D_DIK_EQUALS), KEY_INPUT_BACK = (D_DIK_BACK), KEY_INPUT_TAB = (D_DIK_TAB), KEY_INPUT_LEFT = (D_DIK_LEFT), KEY_INPUT_RIGHT = (D_DIK_RIGHT)



2006.09.15 Friday | 12:03

  Java ¥æ¡¼¥¶´Ø¿ô ¤Õ¤ë¤¤¤à¤«¤·

package local;

public class Model {

	// Éôʬʸ»úÎó¼èÆÀ¥á¥½¥Ã¥É
	public String substr( String target, int start, int len )	{
		String ret;
		try {
			ret = target.substring( start, start + len );
		}
		catch ( Exception e ) {
			System.out.println( len + " :¤¬Ä¹¤¹¤®¤ë¤Î¤Ç"
			+ "»ØÄꤷ¤¿°ÌÃÖ¤è¤ê¤½¤Î¤Þ¤Þ¤òÊÖ¤·¤Þ¤¹");
			ret = target.substring( start );
		}
		return ret;
	}

}




2006.09.15 Friday | 11:59

  Java ²èÌ̹½À®¥Õ¥¡¥¤¥ë ¤Õ¤ë¤¤¤à¤«¤·

// *********************************************
// ¥á¥Ë¥å¡¼( 2 ) ¤Î½èÍý
// ¿·¤·¤¤ÆâÉô¥á¥½¥Ã¥É
// 2006/09/14
// ¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë½èÍý
// *********************************************
void Action_File() {
	// ­¡ ¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¼èÆÀ
	String sPath = (new File("")).getAbsolutePath() + "\\";
	Me.MsgOk( sPath );
	sPath += "conf.txt";

	// ­¢ ¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë¤òÆɤ߹þ¤ß
	String line = null;
	String st = null;
	int x = 0;
	int y = 0;
	try {

		BufferedReader inFile = new BufferedReader( new FileReader( sPath ) );

		while ( ( line = inFile.readLine() ) != null) {

			// ¥æ¡¼¥¶´Ø¿ô¤Ç¡¢Æ¬1¥Ð¥¤¥È¤ò¼èÆÀ
			st = uf.substr( line, 0, 1 );
			if ( st.equalsIgnoreCase( ";" ) ) {
				// ¹Ô¤ÎÀèƬ¤¬¥»¥ß¥³¥í¥ó¤Ê¤é¤Ð¡¢ÆɤßÈô¤Ð¤·
				continue;
			}
			// ¥æ¡¼¥¶´Ø¿ô¤Ç¡¢Æ¬5¥Ð¥¤¥È¤ò¼èÆÀ
			st = uf.substr( line, 0, 5 );
			if ( st.equalsIgnoreCase( "Title" ) ) {
				// ÀèƬ¤¬Title ¤Ê¤é¤Ð¡¢Title=¥Ç¡¼¥¿ ¤Î¥Ç¡¼¥¿¤ò¼èÆÀ
				st = line.substring( 6 );
				// ¼èÆÀ¤·¤¿¥Ç¡¼¥¿¤ò¥¦¥¤¥ó¥É¥¦¤Î¥¿¥¤¥È¥ëʸ»úÎó¤È¤¹¤ë
				Me.setTitle(st);
			}
			if ( st.equalsIgnoreCase( "SizeX" ) ) {
				st = line.substring( 6 );
				x = Integer.parseInt(st);
			}
			if ( st.equalsIgnoreCase( "SizeY" ) ) {
				st = line.substring( 6 );
				y = Integer.parseInt(st);
			}
			System.out.println( line );
		}

		inFile.close();

	}
	catch ( Exception e ) {
		System.out.println( "¥Õ¥¡¥¤¥ë¥¨¥é¡¼" );
		System.out.println( e.getMessage() );
	}

	if ( x != 0 && y != 0 ) {
		Me.setSize(x,y);
	}

}




2006.09.15 Friday | 00:02

  ¡ÚEasyGame¡Ûʸ»úÎóÆþÎÏ ¤Õ¤ë¤¤¤à¤«¤·

ver 060914 ¼«¸Ê²òÅà½ñ¸Ë( vc6 ¥×¥í¥¸¥§¥¯¥È )


±¦¤ÎSHIFT¥­¡¼¤Çʸ»úÎóÆþÎϥ⡼¥É¤Ë°Ü¹Ô
¤½¤³¤Ç¡¢COPY ¤ÈÆþÎϤ¹¤ë¤È²èÌÌ¥­¥ã¥×¥Á¥ã
Game ¥¯¥é¥¹¤Î InputBuffer ¤Ë¥Ç¡¼¥¿¤¬¥»¥Ã¥È¤µ¤ì¤ë
1¥ë¡¼¥×¤¬½ªÎ»¤¹¤ë¤È¡¢InputBuffer ¤Ï¶õ¤Ë¤Ê¤ë
ÆþÎÏÃͤˤè¤ë¡¢Ê¸»úÎóÃƤÎÆþ¤ìÂؤ¨¤ò¥á¥¤¥ó¦¤Ç¼ÂÁõ
¥æ¡¼¥¶´Ø¿ô¤È¤·¤Æ¡¢È¾³Ñʸ»úÎó¤Î¥«¥ó¥ÞÊÔ½¸¤òÉÕ²Ã
¥·¥ç¥Ã¥ÈËè¤Ë´Ø¿ô¤òʬΥ


Ǥ°Õ¸¶ÅÀ¤Ç²óž¤µ¤»¡¢¼Ð¤á¥µ¥¤¥ó¥«¡¼¥Ö¥Æ¥¹¥È




2006.09.14 Thursday | 01:18

  ¥á¥â¥ê¤òʸ»úÎóÇÛÎó¤È¤·¤Æ»È¤¦ ¤Õ¤ë¤¤¤à¤«¤·

´Á»ú
ɽ¼¨
¥Æ¥¹¥È
0012FF20
0012FF20
0012FF25
0012FF25
0012FF2A
0012FF2A


int main(int argc, char* argv[])
{
	char buff[80];

	char **a;

	a = (char **)buff;

	char buff2[80] = "´Á»ú\0ɽ¼¨\0¥Æ¥¹¥È";

	a[0] = buff2+0;
	a[1] = buff2+5;
	a[2] = buff2+10;

	printf( "%s\n", a[0]);
	printf( "%s\n", a[1]);
	printf( "%s\n", a[2]);

	printf( "%08X\n", a[0] );
	printf( "%08X\n", ((int *)buff)[0] );

	printf( "%08X\n", a[1] );
	printf( "%08X\n", ((int *)buff)[1] );

	printf( "%08X\n", a[2] );
	printf( "%08X\n", ((int *)buff)[2] );

	return 0;
}




<< 12/24 >>