2011년 06월 09일
나도 모르는 사이에...
# by | 2011/06/09 10:15 | ■ 'Angel Park' | 트랙백 | 덧글(1)
# by | 2011/06/09 10:15 | ■ 'Angel Park' | 트랙백 | 덧글(1)


# by | 2010/01/30 23:11 | ■ remembrance | 트랙백 | 덧글(1)
# by | 2010/01/24 10:42 | ■ 'Angel Park' | 트랙백 | 덧글(0)
# by | 2010/01/10 20:10 | ■ Emulater | 트랙백 | 덧글(0)
PPJoy.PIE <- PIE 예제파일 다운로드
// 4축 1POV 9버튼 방식의 게임패드 에뮬레이팅 입니다.
// 눈처크의 스틱이 아날로그 X축 Y축이고 위모트의 X,Y좌표가 X기울기 Y기울기입니다.
// 위모트의 B버튼은 진동기능이 있습니다.
// 특별히 한정된 용도로 쓰일거라고는 생각안하고 편집해봤습니다. 데빌메이크라이 같은 조작방식에 좋을것 같습니다.
// 반드시 타겟의 PPJoy패드가 4축 1POV 9버튼 이상으로 설정되어 있어야 합니다.
var.Wiimote1.ScaleX = 1.1
var.Wiimote1.ScaleY = 1.1
var.Wiimote1.Deadzone = 5
var.Wiimote1.xcal = 3
var.Wiimote1.ycal = -30
var.Wiimote1.zcal = 3
if Wiimote1.Up
ppjoy1.Digital16 = True
else
ppjoy1.Digital16 = False
endif
if Wiimote1.Down
ppjoy1.Digital17 = True
else
ppjoy1.Digital17 = False
endif
if Wiimote1.Left
ppjoy1.Digital18 = True
else
ppjoy1.Digital18 = False
endif
if Wiimote1.Right
ppjoy1.Digital19 = True
else
ppjoy1.Digital19 = False
endif
var.Wiimote1.ForceX = Wiimote1.RawForceX + var.Wiimote1.xcal
var.Wiimote1.ForceY = Wiimote1.RawForceY + var.Wiimote1.ycal
var.Wiimote1.ForceZ = Wiimote1.RawForceZ + var.Wiimote1.zcal
if var.Wiimote1.ForceY > var.Wiimote1.ycal + var.Rotation then
var.Wiimote1.Orientation = var.Wiimote.Up
elseif var.Wiimote1.ForceY < var.Wiimote1.ycal - var.Rotation then
var.Wiimote1.Orientation = var.Wiimote.Down
else
if var.Wiimote1.ForceX > 0 then
var.Wiimote1.Orientation = var.Wiimote.Left
else
var.Wiimote1.Orientation = var.Wiimote.Right
endif
endif
if var.Wiimote1.Orientation == var.Wiimote.Up then
var.Wiimote1.X = (1024 - ((Wiimote1.Dot1x + Wiimote1.Dot2x) / 2)) / 1024 * Screen.DesktopWidth
var.Wiimote1.Y = ((Wiimote1.Dot1y + Wiimote1.Dot2y) / 2) / 768 * Screen.DesktopHeight
elseif var.Wiimote1.Orientation == var.Wiimote.Down then
var.Wiimote1.X = (Wiimote1.Dot1x + Wiimote1.Dot2x) / 2 / 1024 * Screen.DesktopWidth
var.Wiimote1.Y = (768 - ((Wiimote1.Dot1y + Wiimote1.Dot2y) / 2)) / 768 * Screen.DesktopHeight
elseif var.Wiimote1.Orientation == var.Wiimote.Left then
var.Wiimote1.X = (Wiimote1.Dot1y) / 768 * Screen.DesktopWidth
var.Wiimote1.Y = (Wiimote1.Dot1x + Wiimote1.Dot2x) / 2 / 1024 * Screen.DesktopHeight
else
var.Wiimote1.X = (768 - Wiimote1.Dot1y) / 768 * Screen.DesktopWidth
var.Wiimote1.Y = (1024 - ((Wiimote1.Dot1x + Wiimote1.Dot2x) / 2)) / 1024 * Screen.DesktopHeight
endif
PPJoy1.Analog0 = Wiimote1.Nunchuk.JoyX
PPJoy1.Analog1 = Wiimote1.Nunchuk.JoyY
if abs(mouse.CursorPosX - var.Wiimote1.X) > var.Wiimote1.Deadzone then
ppjoy1.Analog2 = (var.Wiimote1.X - (Screen.DesktopWidth /2)) * var.Wiimote1.ScaleX / (Screen.DesktopWidth / 2)
endif
if abs(mouse.CursorPosY - var.Wiimote1.Y) > var.Wiimote1.Deadzone then
ppjoy1.Analog3 = (var.Wiimote1.Y - (Screen.DesktopHeight /2)) * var.Wiimote1.ScaleY / (Screen.DesktopHeight / 2)
endif
if not Wiimote1.B then
var.Wiimote1.Pressed = false
ppjoy1.Digital1 = false
endif
if Wiimote1.B and not var.Wiimote1.Pressed then
var.Wiimote1.Pressed = true
Wiimote1.Rumble = true
ppjoy1.Digital1 = true
wait 100ms
Wiimote1.Rumble = false
ppjoy1.Digital1 = false
endif
ppjoy1.Digital2 = Wiimote1.A
ppjoy1.Digital3 = Wiimote1.Minus
ppjoy1.Digital4 = Wiimote1.Home
ppjoy1.Digital5 = Wiimote1.Plus
ppjoy1.Digital6 = Wiimote1.1
ppjoy1.Digital7 = Wiimote1.2
ppjoy1.Digital8 = Wiimote1.Nunchuk.c
ppjoy1.Digital9 = Wiimote1.Nunchuk.z
if Wiimote1.Minus & Wiimote1.Plus then
Wiimote1.Report15 = 4 | int(Wiimote1.Rumble)
Wiimote1.Leds = 2 ^ ceil(Wiimote1.Battery / 48) - 1
else
Wiimote1.Leds = 2 ^ (var.Wiimote1 - 1)
endif
# by | 2010/01/07 17:49 | ■ Emulater | 트랙백 | 덧글(4)
◀ 이전 페이지 다음 페이지 ▶