Skip to content

Commit 91fffaa

Browse files
committed
initial commit
0 parents  commit 91fffaa

File tree

113 files changed

+10937
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+10937
-0
lines changed

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*~
2+
allegro.log
3+
build
4+
run
5+
others
6+
SuperDerpy.ini
7+
sync*
8+
*.user

.gitmodules

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "libsuperderpy"]
2+
path = libsuperderpy
3+
url = https://github.com/dos1/libsuperderpy.git
4+
[submodule "utils"]
5+
path = utils
6+
url = https://github.com/dos1/libsuperderpy-utils.git

CMakeLists.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
cmake_minimum_required(VERSION 2.8)
2+
3+
project(kaczuchokalipsa C)
4+
5+
SET(LIBSUPERDERPY_GAMENAME "kaczuchokalipsa" CACHE INTERNAL "")
6+
SET(LIBSUPERDERPY_GAMENAME_PRETTY "Kaczuchokalipsa" CACHE INTERNAL "")
7+
8+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_SOURCE_DIR}/libsuperderpy/cmake")
9+
10+
include(libsuperderpy)
11+
include(SetPaths)
12+
13+
add_subdirectory(libsuperderpy)
14+
add_subdirectory(src)
15+
add_subdirectory(data)
16+
17+
# uninstall target
18+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libsuperderpy/cmake/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
19+
add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)

COPYING

+340
Large diffs are not rendered by default.

cmake/Findcargo.cmake

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright (c) 2014 SiegeLord
2+
#
3+
# This software is provided 'as-is', without any express or implied
4+
# warranty. In no event will the authors be held liable for any damages
5+
# arising from the use of this software.
6+
#
7+
# Permission is granted to anyone to use this software for any purpose,
8+
# including commercial applications, and to alter it and redistribute it
9+
# freely, subject to the following restrictions:
10+
#
11+
# 1. The origin of this software must not be misrepresented; you must not
12+
# claim that you wrote the original software. If you use this software
13+
# in a product, an acknowledgment in the product documentation would be
14+
# appreciated but is not required.
15+
#
16+
# 2. Altered source versions must be plainly marked as such, and must not be
17+
# misrepresented as being the original software.
18+
#
19+
# 3. This notice may not be removed or altered from any source
20+
# distribution.
21+
22+
find_program(CARGO_EXECUTABLE cargo)
23+
include(FindPackageHandleStandardArgs)
24+
find_package_handle_standard_args(cargo DEFAULT_MSG CARGO_EXECUTABLE)
25+
mark_as_advanced(CARGO_EXECUTABLE)

cmake/Findjson-c.cmake

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# JSON-C_FOUND - true if library and headers were found
2+
# JSON-C_INCLUDE_DIRS - include directories
3+
# JSON-C_LIBRARIES - library directories
4+
5+
find_package(PkgConfig)
6+
pkg_check_modules(PC_JSON-C QUIET json-c)
7+
8+
find_path(JSON-C_INCLUDE_DIR json.h
9+
HINTS ${PC_JSON-C_INCLUDEDIR} ${PC_JSON-C_INCLUDE_DIRS} PATH_SUFFIXES json-c json)
10+
11+
find_library(JSON-C_LIBRARY NAMES json-c libjson-c
12+
HINTS ${PC_JSON-C_LIBDIR} ${PC_JSON-C_LIBRARY_DIRS})
13+
14+
set(JSON-C_LIBRARIES ${JSON-C_LIBRARY})
15+
set(JSON-C_INCLUDE_DIRS ${JSON-C_INCLUDE_DIR})
16+
17+
include(FindPackageHandleStandardArgs)
18+
19+
find_package_handle_standard_args(JSON-C DEFAULT_MSG JSON-C_LIBRARY JSON-C_INCLUDE_DIR)
20+
21+
mark_as_advanced(JSON-C_INCLUDE_DIR JSON-C_LIBRARY)
22+

cmake/Findlibusb.cmake

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# - Try to find libusb-1.0
2+
# Once done this will define
3+
#
4+
# LIBUSB_1_FOUND - system has libusb
5+
# LIBUSB_1_INCLUDE_DIRS - the libusb include directory
6+
# LIBUSB_1_LIBRARIES - Link these to use libusb
7+
# LIBUSB_1_DEFINITIONS - Compiler switches required for using libusb
8+
#
9+
# Adapted from cmake-modules Google Code project
10+
#
11+
# Copyright (c) 2006 Andreas Schneider <[email protected]>
12+
#
13+
# (Changes for libusb) Copyright (c) 2008 Kyle Machulis <[email protected]>
14+
#
15+
# Redistribution and use is allowed according to the terms of the New BSD license.
16+
#
17+
# CMake-Modules Project New BSD License
18+
#
19+
# Redistribution and use in source and binary forms, with or without
20+
# modification, are permitted provided that the following conditions are met:
21+
#
22+
# * Redistributions of source code must retain the above copyright notice, this
23+
# list of conditions and the following disclaimer.
24+
#
25+
# * Redistributions in binary form must reproduce the above copyright notice,
26+
# this list of conditions and the following disclaimer in the
27+
# documentation and/or other materials provided with the distribution.
28+
#
29+
# * Neither the name of the CMake-Modules Project nor the names of its
30+
# contributors may be used to endorse or promote products derived from this
31+
# software without specific prior written permission.
32+
#
33+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
34+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
35+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
36+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
37+
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
38+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
39+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
40+
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
41+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
42+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43+
#
44+
45+
46+
if (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS)
47+
# in cache already
48+
set(LIBUSB_FOUND TRUE)
49+
else (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS)
50+
find_path(LIBUSB_1_INCLUDE_DIR
51+
NAMES
52+
libusb.h
53+
PATHS
54+
/usr/include
55+
/usr/local/include
56+
/opt/local/include
57+
/sw/include
58+
PATH_SUFFIXES
59+
libusb-1.0
60+
)
61+
62+
find_library(LIBUSB_1_LIBRARY
63+
NAMES
64+
usb-1.0 usb
65+
PATHS
66+
/usr/lib
67+
/usr/local/lib
68+
/opt/local/lib
69+
/sw/lib
70+
)
71+
72+
set(LIBUSB_1_INCLUDE_DIRS
73+
${LIBUSB_1_INCLUDE_DIR}
74+
)
75+
set(LIBUSB_1_LIBRARIES
76+
${LIBUSB_1_LIBRARY}
77+
)
78+
79+
if (LIBUSB_1_INCLUDE_DIRS AND LIBUSB_1_LIBRARIES)
80+
set(LIBUSB_1_FOUND TRUE)
81+
endif (LIBUSB_1_INCLUDE_DIRS AND LIBUSB_1_LIBRARIES)
82+
83+
if (LIBUSB_1_FOUND)
84+
if (NOT libusb_1_FIND_QUIETLY)
85+
message(STATUS "Found libusb-1.0:")
86+
message(STATUS " - Includes: ${LIBUSB_1_INCLUDE_DIRS}")
87+
message(STATUS " - Libraries: ${LIBUSB_1_LIBRARIES}")
88+
endif (NOT libusb_1_FIND_QUIETLY)
89+
else (LIBUSB_1_FOUND)
90+
if (libusb_1_FIND_REQUIRED)
91+
message(FATAL_ERROR "Could not find libusb")
92+
endif (libusb_1_FIND_REQUIRED)
93+
endif (LIBUSB_1_FOUND)
94+
95+
# show the LIBUSB_1_INCLUDE_DIRS and LIBUSB_1_LIBRARIES variables only in the advanced view
96+
mark_as_advanced(LIBUSB_1_INCLUDE_DIRS LIBUSB_1_LIBRARIES)
97+
98+
endif (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS)
99+

cmake/Findrustc.cmake

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright (c) 2014 SiegeLord
2+
#
3+
# This software is provided 'as-is', without any express or implied
4+
# warranty. In no event will the authors be held liable for any damages
5+
# arising from the use of this software.
6+
#
7+
# Permission is granted to anyone to use this software for any purpose,
8+
# including commercial applications, and to alter it and redistribute it
9+
# freely, subject to the following restrictions:
10+
#
11+
# 1. The origin of this software must not be misrepresented; you must not
12+
# claim that you wrote the original software. If you use this software
13+
# in a product, an acknowledgment in the product documentation would be
14+
# appreciated but is not required.
15+
#
16+
# 2. Altered source versions must be plainly marked as such, and must not be
17+
# misrepresented as being the original software.
18+
#
19+
# 3. This notice may not be removed or altered from any source
20+
# distribution.
21+
22+
find_program(RUSTC_EXECUTABLE rustc)
23+
include(FindPackageHandleStandardArgs)
24+
find_package_handle_standard_args(rustc DEFAULT_MSG RUSTC_EXECUTABLE)
25+
mark_as_advanced(RUSTC_EXECUTABLE)
26+
27+
execute_process(COMMAND ${RUSTC_EXECUTABLE} -Vv
28+
OUTPUT_VARIABLE RUSTC_TARGET_TRIPLE
29+
OUTPUT_STRIP_TRAILING_WHITESPACE)
30+
string(REGEX MATCH "host:[ \t](.*)\n" RUSTC_TARGET_TRIPLE "${RUSTC_TARGET_TRIPLE}")
31+
string(REGEX REPLACE "host:[ \t](.*)\n" "\\1" RUSTC_TARGET_TRIPLE "${RUSTC_TARGET_TRIPLE}")
32+
set(RUSTC_TARGET_TRIPLE "${RUSTC_TARGET_TRIPLE}" CACHE STRING "Target triple you can pass to rustc (not passed by default)")
33+
mark_as_advanced(RUSTC_TARGET_TRIPLE)

cmake/Findrustdoc.cmake

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright (c) 2014 SiegeLord
2+
#
3+
# This software is provided 'as-is', without any express or implied
4+
# warranty. In no event will the authors be held liable for any damages
5+
# arising from the use of this software.
6+
#
7+
# Permission is granted to anyone to use this software for any purpose,
8+
# including commercial applications, and to alter it and redistribute it
9+
# freely, subject to the following restrictions:
10+
#
11+
# 1. The origin of this software must not be misrepresented; you must not
12+
# claim that you wrote the original software. If you use this software
13+
# in a product, an acknowledgment in the product documentation would be
14+
# appreciated but is not required.
15+
#
16+
# 2. Altered source versions must be plainly marked as such, and must not be
17+
# misrepresented as being the original software.
18+
#
19+
# 3. This notice may not be removed or altered from any source
20+
# distribution.
21+
22+
find_program(RUSTDOC_EXECUTABLE rustdoc)
23+
include(FindPackageHandleStandardArgs)
24+
find_package_handle_standard_args(rustdoc DEFAULT_MSG RUSTDOC_EXECUTABLE)
25+
mark_as_advanced(RUSTDOC_EXECUTABLE)

0 commit comments

Comments
 (0)