Add icon and license notice for map generator

This commit is contained in:
Nguyễn Gia Phong 2019-04-15 22:02:03 +07:00
parent 64f01b3fe0
commit 7cc4ffb114
5 changed files with 54 additions and 4 deletions

BIN
axuy/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -25,6 +25,7 @@ from random import choice
import glfw import glfw
import moderngl import moderngl
import numpy as np import numpy as np
from PIL import Image
from pyrr import Matrix44 from pyrr import Matrix44
from .pico import Picobot from .pico import Picobot
@ -136,6 +137,7 @@ class View:
self.lock = lock self.lock = lock
# Window's rendering and event-handling configuration # Window's rendering and event-handling configuration
glfw.set_window_icon(self.window, 1, Image.open(abspath('icon.png')))
glfw.make_context_current(self.window) glfw.make_context_current(self.window)
glfw.swap_interval(1) glfw.swap_interval(1)
glfw.set_input_mode(self.window, glfw.CURSOR, glfw.CURSOR_DISABLED) glfw.set_input_mode(self.window, glfw.CURSOR, glfw.CURSOR_DISABLED)
@ -217,7 +219,7 @@ class View:
@property @property
def visibility(self) -> np.float32: def visibility(self) -> np.float32:
"""Camera visibility.""" """Camera visibility."""
return np.float32(sqrt(1800 / self.fov)) return np.float32(3240 / (self.fov + 240))
@property @property
def fps(self): def fps(self):

View File

@ -25,8 +25,8 @@ setup(
'Operating System :: OS Independent', 'Operating System :: OS Independent',
'Programming Language :: Python :: 3 :: Only', 'Programming Language :: Python :: 3 :: Only',
'Topic :: Games/Entertainment :: First Person Shooters'], 'Topic :: Games/Entertainment :: First Person Shooters'],
keywords='fps opengl glfw', keywords='fps p2p opengl glfw',
packages=['axuy'], packages=['axuy'],
install_requires=['numpy', 'pyrr', 'moderngl', 'glfw'], install_requires=['numpy', 'pyrr', 'moderngl', 'glfw', 'Pillow'],
package_data={'axuy': ['map.npy', 'shaders']}, package_data={'axuy': ['map.npy', 'shaders/*']},
entry_points={'console_scripts': ['axuy = axuy.peer:main']}) entry_points={'console_scripts': ['axuy = axuy.peer:main']})

30
tools/icon.svg Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.1" standalone="no"?>
<!--
This work is licensed under the Creative Commons Attribution-ShareAlike 4.0
International License. To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/4.0/ or send a letter
to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
-->
<svg xmlns="http://www.w3.org/2000/svg"
width="576" height="576"
viewBox="-288 -288 576 576">
<title>Axuy icon in Scalable Vector Graphics</title>
<path fill="#eeeeec"
d="M -288 0
C 0 0, 0 288, 242.1782 242.1782
C 288 196.3563, 288 126.2, 288 0
C 288 -126.2, 288 -196.3563, 242.1782 -242.1782
C 196.3563 -288, 126.2 -288, 0 -288
C -126.2 -288, -196.3563 -288, -242.1782 -242.1782
Q 242.1782 -242.1782, -288 0
Z"/>
<path fill="#2e3436"
d="M -288 0
C -288 126.2, -288 196.3563, -242.1782 242.1782
C -196.3563 288, -126.2 288, 0 288
C 126.2 288, 196.3563 288, 242.1782 242.1782
C 0 288, 0 0, -288 0
C -288 -126.2, -288 -196.3563, -242.1782 -242.1782
Q 242.1782 -242.1782, -288 0
Z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1,4 +1,22 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# mapgen - map generator
# Copyright (C) 2019 Nguyễn Gia Phong
#
# This file is part of Axuy
#
# Axuy is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Axuy is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Axuy. If not, see <https://www.gnu.org/licenses/>.
from itertools import chain from itertools import chain
from sys import argv from sys import argv