Skip to content

Commit

Permalink
Changed image resolution to 640x640, fixed wrong version display and …
Browse files Browse the repository at this point in the history
…added a small window option
  • Loading branch information
ZeCryptic committed Sep 22, 2018
1 parent 8f1a410 commit 5d3a2a0
Show file tree
Hide file tree
Showing 29 changed files with 23 additions and 13 deletions.
Binary file removed cat/KeyTapHand.png
Binary file not shown.
Binary file modified cat/KeyTapHand2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/mouse/Hand A.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/mouse/Hand B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/mouse/Hand C.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/mouse/Hand D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/mouse/Hand E.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/mouse/Hand F.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/mouse/Hand G.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/mouse/Hand H.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/mouse/Hand I.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/mouse/Hand IA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/mouse/Hand IB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/mouse/Hand IC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/mouse/Hand ID.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/tablet/Hand A.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/tablet/Hand B.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/tablet/Hand C.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/tablet/Hand D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/tablet/Hand E.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/tablet/Hand F.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/tablet/Hand G.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/tablet/Hand H.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/tablet/Hand I.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/tablet/Hand IA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cat/tablet/Hand IB.png
Binary file modified cat/tablet/Hand IC.png
Binary file modified cat/tablet/Hand ID.png
36 changes: 23 additions & 13 deletions osu!cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from math import sqrt
from time import sleep

version = 'v1.1.1'

def close_window():
root.withdraw()
Expand All @@ -15,7 +16,7 @@ def close_window():

root = Tk()
root.resizable(width=False, height=False)
root.title('osu!cat v1.0.0')
root.title('osu!cat ' + version)
root.protocol('WM_DELETE_WINDOW', close_window)

screen_x = root.winfo_screenwidth()
Expand Down Expand Up @@ -73,13 +74,13 @@ def find_frame(cx, cy, f):

return best_d[1]

print('Bongo Cat Live Cam v1.0.0')
print('Bongo Cat Live Cam ' + version)
print('----------------------------------------------------------------------------------------------------------------------')
print('Disclaimer: There is a high probability you will experience som bugs or that the program will now work at all.\n'
'This program will also most likely not work on resolutions where the height is bigger than the width, it will most\n'
'likely use much of your cpu and there is no support for custom ingame resolutions. You have been warned.')
print('Disclaimer: There is a high probability you will experience some bugs or that the program will now work at all.\n'
'This program will also most likely not work on resolutions where the height is bigger than the width and there\n'
'is no support for custom ingame resolutions or sensitivities. You have been warned.')
print('----------------------------------------------------------------------------------------------------------------------')
print('Before you can use this program you need to configure key 1, key 2 and tablet/mouse')
print('Before you can use this program you need to configure key 1, key 2, tablet/mouse and window size')
while True:
k1 = input('Key 1: ')
k2 = input('Key 2: ')
Expand All @@ -100,21 +101,31 @@ def find_frame(cx, cy, f):
else:
print('Invalid input')

print('(Type 0 for small and 1 for standard)')
while True:
i_type = input('Window size: ')
if i_type == '0':
size = (320, 320)
break
elif i_type == '1':
size = (640, 640)
break
else:
print('Invalid input')

print('All done! To reconfigure, just close and relaunch the application')

#preload all images
hit_images = {
1: PIL.Image.open("cat/KeyTapHand.png"),
2: PIL.Image.open("cat/KeyTapHand2.png")
1: PIL.Image.open("cat/KeyTapHand1.png").resize(size),
2: PIL.Image.open("cat/KeyTapHand2.png").resize(size)
}
cursor_images = { }
for key in frame_points.keys():
cursor_images[key] = PIL.Image.open("cat/{0}/Hand {1}.png".format(cursor_device, key))

#l_xyf = StringVar() # Label string for x and y cursor position + current base frame
cursor_images[key] = PIL.Image.open("cat/{0}/Hand {1}.png".format(cursor_device, key)).resize(size)

default_img = PIL.ImageTk.PhotoImage(cursor_images['A'])
image_label = Label(root, image=default_img) # ,textvariable=l_xyf, compound=CENTER)
image_label = Label(root, image=default_img)
image_label.image = default_img
image_label.pack()

Expand Down Expand Up @@ -159,5 +170,4 @@ def find_frame(cx, cy, f):
image_label.configure(image=n_base_img)
image_label.image = n_base_img

#l_xyf.set('x: ' + str(x) + ' ' + 'y: ' + str(y) + ' ' + 'frame: ' + f) # Updates x, y and frame values
root.update()

0 comments on commit 5d3a2a0

Please sign in to comment.