UDN
Search public documentation:
LogitechLCDSDKKR
English Translation
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
언리얼용 로지텍 게이밍 LCD SDK
문서 변경내역: Christophe Juncker 작성. 홍성진 번역.
개요
로지텍 게이밍 LCD SDK 로 게임과 같은 어플리케이션에서 LCD 가 지원되는 로지텍 게이밍 마우스와 키보드의 LCD 를 조절할 수 있습니다. DLLBine 를 사용해서 UDK 게임에 쉽게 통합시킬 수 있습니다. SDK 의 함수성 관련 자세한 내용은 로지텍 SDK 의 Doc\LogitechGamingLCDSDK.pdf 문서를 참고해 주시기 바랍니다.
UDKGame 에서 LCD SDK 작동하게 만들기
UDK 에 포함된 "UDKGame" 에서 로지텍 SDK 가 작동하도록 만드는 법을 단계별로 살펴보겠습니다. 이대로 자신의 게임에 적용해 주시면 됩니다.
단계
- UDK 다운로드 (http://www.unrealengine.com/udk/).
- 다음 두 개의 UnrealScript 파일을 만든 다음 UDK 의 Development\Src\MyMod\Classes 폴더에 복사합니다:
class TestDLLGameInfo extends GameInfo; defaultproperties { PlayerControllerClass=class'TestDLLPlayerController' }TestDLLPlayerController.uc
class TestDLLPlayerController extends PlayerController; DLLBind(LogitechLcd); dllimport final function bool LogiLcdInit(string friendlyName, int lcdType); dllimport final function bool LogiLcdIsConnected(int lcdType); dllimport final function bool LogiLcdIsButtonPressed(int button); dllimport final function bool LogiLcdUpdate(); dllimport final function bool LogiLcdShutdown(); dllimport final function bool LogiLcdMonoSetText(int lineNumber, string text); dllimport final function int LogiLcdColorSetBackgroundUDK(byte colorBitmap[2048], int arraySize); dllimport final function int LogiLcdColorResetBackgroundUDK(); dllimport final function int LogiLcdMonoSetBackgroundUDK(byte monoBitmap[2048], int arraySize); dllimport final function int LogiLcdMonoResetBackgroundUDK(); dllimport final function bool LogiLcdColorSetTitle(string text, int red , int green , int blue ); dllimport final function bool LogiLcdColorSetText(int lineNumber, string text, int red, int green, int blue); exec function LogitechLCDInit(string friendlyName, int lcdType) { local bool ret; ret = LogiLcdInit(friendlyName, lcdType); say("LogitechLCDInit return is: " $ret); } exec function LogitechLCDIsConnected(int lcdType) { local bool ret; ret = LogiLcdIsConnected(lcdType); say("LogitechLCDIsConnected return is: " $ret); } exec function LogitechLcdIsButtonPressed(int button) { local bool ret; ret = true; ret = LogiLcdIsButtonPressed(button); say("LogitechLcdIsButtonPressed return is: " $ret); } exec function LogitechLcdUpdate() { local bool ret; ret = LogiLcdUpdate(); say("LogitechLcdUpdate return is: " $ret); } exec function LogitechLcdShutdown() { LogiLcdShutdown(); say("LogitechLcd SDK shutting down..."); } exec function LogitechLcdMonoSetText(int lineNumber, string text) { local bool ret; ret = LogiLcdMonoSetText(lineNumber, text); say("LogitechLcdMonoSetBackground return is: " $ret); } exec function LogitechLcdColorSetPageBackGround(int blue, int green, int red, int alpha) { local int i; local int byteAdded; local byte pixelMatrix[2048]; byteAdded = 1; for(i=0; i<2048; i++) { if((i%4) == 0) pixelMatrix[i] = byte(blue); // blue if((i%4) == 1) pixelMatrix[i] = byte(green); // green if((i%4) == 2) pixelMatrix[i] = byte(red); // red if((i%4) == 3) pixelMatrix[i] = byte(alpha); // alpha } while(byteAdded > 0) { byteAdded = LogiLcdColorSetBackgroundUDK(pixelMatrix, 2048); } if (byteAdded == 0) say("Color page Background set successfully"); else say("Error setting color page background " $byteAdded); LogiLcdUpdate(); } exec function LogitechLcdMonoSetPageBackGround(int blackOrWhite) { local int byteAdded; local int i; local byte pixelMatrix[2048]; byteAdded = 1; for(i=0; i<2048; i++) { pixelMatrix[i] = blackOrWhite; } while(byteAdded > 0) { byteAdded = LogiLcdMonoSetBackgroundUDK(pixelMatrix, 2048); } if (byteAdded == 0) say("Mono page Background set successfully"); else say("Error setting mono page background " $byteAdded); LogiLcdUpdate(); } exec function LogitechLcdMonoResetBitmap() { local int ret; ret = LogiLcdMonoResetBackgroundUDK(); say("LogitechLcdMonoResetBKG return is: " $ret); } exec function LogitechLcdColorResetBitmap() { local int ret; ret = LogiLcdColorResetBackgroundUDK(); say("LogitechLcdColorResetBKG return is: " $ret); } exec function LogitechLcdColorSetTitle(string text, int red , int green , int blue ) { local bool ret; ret = LogiLcdColorSetTitle(text, red, green, blue); say("LogitechLcdColorSetTitle return is: " $ret); } exec function LogitechLcdColorSetText(int lineNumber, string text, int red, int green, int blue) { local bool ret; ret = LogiLcdColorSetText(lineNumber, text, red, green, blue); say("LogitechLcdColorSetText return is: " $ret); }
게임에서 로지텍 SDK 함수 호출하기
다음과 같이 게임을 실행합니다:- Binaries\Win32\UDK.exe dm-deck?game=MyMod.TestDLLGameInfo