Browse Source

いろいろ

main
Miteruzo 1 year ago
parent
commit
8e68637043
1 changed files with 22 additions and 12 deletions
  1. +22
    -12
      main.hsp

+ 22
- 12
main.hsp View File

@@ -60,10 +60,12 @@


If IsWindowVisible (hWindow) { If IsWindowVisible (hWindow) {
If StrLen (buf) != 0 { If StrLen (buf) != 0 {
hWindows.windowCnt = hWindow
GetWindowRect hWindow, VarPtr (windowRects.0.windowCnt)
If hWindow != hWnd {
hWindows.windowCnt = hWindow
GetWindowRect hWindow, VarPtr (windowRects.0.windowCnt)


windowCnt++
windowCnt++
}
} }
} }


@@ -101,15 +103,23 @@
base = gInfo_dispY base = gInfo_dispY


Repeat windowCnt Repeat windowCnt
If windowRects.LEFT.cnt <= nizikaX + (NIZIKA_WIDTH - NIZIKA_LEFT) {
If nizikaX + NIZIKA_LEFT < windowRects.RIGHT.cnt {
If nizikaY + NIZIKA_BASE <= windowRects.TOP.cnt {
If windowRects.TOP.cnt < base {
base = windowRects.TOP.cnt
}
}
}
If windowRects.LEFT.cnt > nizikaX + (NIZIKA_WIDTH - NIZIKA_LEFT) {
Continue
} }

If nizikaX + NIZIKA_LEFT >= windowRects.RIGHT.cnt {
Continue
}

If nizikaY + NIZIKA_BASE > windowRects.TOP.cnt {
Continue
}

If windowRects.TOP.cnt >= base {
Continue
}

base = windowRects.TOP.cnt
Loop Loop
} }


@@ -118,7 +128,7 @@
BoxF BoxF


Pos nizikaX, nizikaY Pos nizikaX, nizikaY
GCopy SCREEN_NIZIKA, IIf (direction < 0, NIZIKA_WIDTH, 0), NIZIKA_HEIGHT * (frame \ 24), NIZIKA_WIDTH, NIZIKA_HEIGHT
GCopy SCREEN_NIZIKA, IIf (direction < 0, NIZIKA_WIDTH, 0), NIZIKA_HEIGHT * (frame * IIf (moving, 3, 1) \ 24), NIZIKA_WIDTH, NIZIKA_HEIGHT
ReDraw True ReDraw True


nizikaX += direction * 4 nizikaX += direction * 4


Loading…
Cancel
Save