-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
1,160 additions
and
52 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "raylib"] | ||
path = raylib | ||
url = https://github.com/raysan5/raylib.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
cmake_minimum_required(VERSION 3.22) | ||
project(tetris42 VERSION 1.0.0) | ||
|
||
LIST(APPEND SRC tetris42.c) | ||
IF(WIN32) | ||
LIST(APPEND SRC tetris42.rc) | ||
ENDIF() | ||
|
||
# Player count names are define via agruments | ||
add_executable(tetris42 ${SRC}) | ||
# Players use generic names PLAYERn and below are seperate | ||
# clickable executables for different number of players | ||
add_executable(tetris4-1 ${SRC}) | ||
add_executable(tetris4-2 ${SRC}) | ||
add_executable(tetris4-3 ${SRC}) | ||
add_executable(tetris4-4 ${SRC}) | ||
|
||
target_compile_definitions(tetris4-1 PUBLIC PLAYERS=1) | ||
target_compile_definitions(tetris4-2 PUBLIC PLAYERS=2) | ||
target_compile_definitions(tetris4-3 PUBLIC PLAYERS=3) | ||
target_compile_definitions(tetris4-4 PUBLIC PLAYERS=4) | ||
|
||
set (CMAKE_BUILD_TYPE "Release") | ||
add_subdirectory(raylib) | ||
|
||
find_path(RAYLIB_DIR "raylib.h" HINTS raylib/src) | ||
include_directories(${RAYLIB_DIR}) | ||
LIST(APPEND LIBS raylib) | ||
target_link_libraries(tetris42 ${LIBS}) | ||
target_link_libraries(tetris4-1 ${LIBS}) | ||
target_link_libraries(tetris4-2 ${LIBS}) | ||
target_link_libraries(tetris4-3 ${LIBS}) | ||
target_link_libraries(tetris4-4 ${LIBS}) | ||
|
||
INSTALL(TARGETS tetris42 tetris4-1 tetris4-2 tetris4-3 tetris4-4 | ||
DESTINATION bin) | ||
|
||
# CPack support - | ||
set(CPACK_GENERATOR "ZIP;TGZ") | ||
include (CPack) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Tetris42 | ||
|
||
Tetris tournament for up to 4 players. After a while the game moves on to more complicated forms. | ||
|
||
## [Releases download](https://github.com/tpanj/tetris42/releases) | ||
|
||
![Screenshot for two players](tetris42.png) | ||
|
||
## Controls: __Rotate, movements.._ | ||
|
||
1. Player | ||
* `Keys_↑←↓→` | ||
1. Players | ||
* `KEYS_WASD` for player 1 on left | ||
* `Keys_↑←↓→` for player 2 on right | ||
1. Players | ||
* `KEYS_WASD` for player 1 on left | ||
* `Keys_↑←↓→` for player 2 on right | ||
* `GPAD1_5876` for player 3 below | ||
1. Players | ||
* `KEYS_WASD` for player 1 on left | ||
* `Keys_↑←↓→` for player 2 on right | ||
* `GPAD1_5876` for player 3 on left below | ||
* `GPAD2_5876` for player 4 on right below |
Oops, something went wrong.