Skip to content

Commit 2ec3f07

Browse files
committed
Merge remote-tracking branch 'upstream/master' into upstream-ci
Fix conflict: .github/workflows/ci.yml
2 parents 267b450 + 775ac4c commit 2ec3f07

40 files changed

+2152
-1750
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,40 @@ jobs:
3333
if: startsWith(matrix.os, 'macos')
3434
run: brew install ninja sdl2 sdl2_mixer
3535

36-
- name: CMake configure
36+
- name: CMake configure (default version)
3737
run: |
3838
mkdir ${SRC_DIR_PATH}/build && cd ${SRC_DIR_PATH}/build
3939
cmake -GNinja ..
40-
- name: Build
40+
- name: Build (default version)
41+
run: ninja -C ${SRC_DIR_PATH}/build
42+
43+
- name: CMake configure (official)
44+
run: |
45+
cd ${SRC_DIR_PATH}/build
46+
cmake -DOFFICIAL_BUILD=ON ..
47+
- name: Build (official)
48+
run: |
49+
ninja -C ${SRC_DIR_PATH}/build
50+
51+
- name: CMake configure (M&P)
52+
run: |
53+
cd ${SRC_DIR_PATH}/build
54+
cmake -DOFFICIAL_BUILD=OFF -DMAKEANDPLAY=ON ..
55+
- name: Build (M&P)
56+
run: ninja -C ${SRC_DIR_PATH}/build
57+
58+
- name: CMake configure (no custom levels)
59+
run: |
60+
cd ${SRC_DIR_PATH}/build
61+
cmake -DMAKEANDPLAY=OFF -DCUSTOM_LEVEL_SUPPORT=DISABLED ..
62+
- name: Build (no custom levels)
63+
run: ninja -C ${SRC_DIR_PATH}/build
64+
65+
- name: CMake configure (no editor)
66+
run: |
67+
cd ${SRC_DIR_PATH}/build
68+
cmake -DCUSTOM_LEVEL_SUPPORT=NO_EDITOR ..
69+
- name: Build (no editor)
4170
run: ninja -C ${SRC_DIR_PATH}/build
4271

4372

License exceptions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ VVVVVV's source code is made available under a [custom license](LICENSE.md), whi
1313
| cursed_vvvvvv.exe | [MustardBucket](https://twitter.com/mustard_bucket/) | Modified version of VVVVVV where instead of flipping gravity you jump normally, can jump multiple times, and wall jump. | Make it impossible to revert to ordinary flipping behaviour. | [download](https://mustardbucket.itch.io/cursed-vvvvvv?secret=O0KvS02wD473pXBF9avreZsww), [twitter gif](https://twitter.com/mustard_bucket/status/1216272971779670016) |
1414
| Haiku Port | [Julius C. Enriquez](https://github.com/win8linux) | Port for the Haiku operating system. | Display the following text in the Haiku package to make it clear that this is an exception: "VVVVVV is a commercial game! The author has given special permission to make this Haiku version available for free. If you enjoy the game, please consider purchasing a copy at [thelettervsixtim.es](http://thelettervsixtim.es)." | [haiku recipe](https://github.com/haikuports/haikuports/tree/master/games-arcade/vvvvvv), [haiku data.zip recipe](https://github.com/haikuports/haikuports/tree/master/games-arcade/vvvvvv_data) |
1515
| Dreamcast Port | [Gustavo Aranda](https://github.com/gusarba/) | Port for the Sega Dreamcast. | Permission is given to distribute a ready-to-use CD image file for the Sega Dreamcast containing the data.zip assets for non commercial use only. | [github repo](https://github.com/gusarba/VVVVVVDC)|
16+
| XBox One/UWP Port | [tunip3](https://github.com/tunip3) | Port for XBOX ONE (DURANGO) via UWP. | Permission is given to distribute a pre-compiled package (containing the data.zip assets) for people to run on development mode xboxes, for non commercial use only. | [github repo](https://github.com/tunip3/DURANGO-V6)|
1617

1718
In addition, the following exceptions apply for any projects that match these descriptions:
1819

desktop_version/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ VVVVVV.exe
99
VVVVVV
1010
*.a
1111
*.gch
12+
src/Version.h.out
1213

1314
# Game data
1415
data.zip

desktop_version/CMakeLists.txt

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,19 @@ SET_PROPERTY(CACHE CUSTOM_LEVEL_SUPPORT PROPERTY STRINGS ENABLED NO_EDITOR DISAB
1313
SET(STEAM OFF CACHE BOOL "Use the Steam API")
1414
SET(GOG OFF CACHE BOOL "Use the GOG API")
1515

16-
IF(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
16+
SET(OFFICIAL_BUILD OFF CACHE BOOL "Compile an official build of the game")
17+
18+
SET(MAKEANDPLAY OFF CACHE BOOL "Compile a version of the game without the main campaign (provided for convenience; consider modifying MakeAndPlay.h instead")
19+
20+
IF(OFFICIAL_BUILD AND NOT MAKEANDPLAY)
1721
SET(STEAM ON)
1822
SET(GOG ON)
1923
ENDIF()
2024

25+
IF(MAKEANDPLAY)
26+
ADD_DEFINITIONS(-DMAKEANDPLAY)
27+
ENDIF()
28+
2129
# Set standard to C++98/C++03
2230
SET(CMAKE_CXX_STANDARD 98)
2331
SET(CMAKE_CXX_EXTENSIONS OFF) # prevent mixing stdlib implementations (dangerous!)
@@ -97,6 +105,7 @@ SET(VVV_SRC
97105
src/Otherlevel.cpp
98106
src/preloader.cpp
99107
src/Render.cpp
108+
src/RenderFixed.cpp
100109
src/Screen.cpp
101110
src/Script.cpp
102111
src/Scripts.cpp
@@ -107,6 +116,7 @@ SET(VVV_SRC
107116
src/Tower.cpp
108117
src/UtilityClass.cpp
109118
src/WarpClass.cpp
119+
src/XMLUtils.cpp
110120
src/main.cpp
111121
src/Network.c
112122
)
@@ -150,6 +160,38 @@ ELSE()
150160
ADD_EXECUTABLE(VVVVVV ${VVV_SRC})
151161
ENDIF()
152162

163+
IF(NOT OFFICIAL_BUILD)
164+
# Add interim commit hash and its date to the build
165+
166+
# FIND_PACKAGE sets GIT_FOUND and GIT_EXECUTABLE
167+
FIND_PACKAGE(Git)
168+
169+
IF(GIT_FOUND)
170+
# These filenames have to be qualified, because when we run
171+
# the CMake script, its work dir gets set to the build folder
172+
SET(VERSION_INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h.in)
173+
SET(VERSION_OUTPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h.out)
174+
175+
ADD_CUSTOM_TARGET(
176+
GenerateVersion ALL
177+
# This BYPRODUCTS line is required for this to be ran every time
178+
BYPRODUCTS ${VERSION_OUTPUT_FILE}
179+
COMMAND ${CMAKE_COMMAND}
180+
# These args have to be passed through, otherwise the script can't see them
181+
# Also, these args have to come BEFORE `-P`! (Otherwise it fails with an unclear error)
182+
-DGIT_EXECUTABLE=${GIT_EXECUTABLE}
183+
-DINPUT_FILE=${VERSION_INPUT_FILE}
184+
-DOUTPUT_FILE=${VERSION_OUTPUT_FILE}
185+
-P ${CMAKE_CURRENT_SOURCE_DIR}/version.cmake
186+
)
187+
188+
ADD_DEPENDENCIES(VVVVVV GenerateVersion)
189+
190+
# This lets Version.h know that Version.h.out exists
191+
ADD_DEFINITIONS(-DVERSION_H_OUT_EXISTS)
192+
ENDIF()
193+
ENDIF()
194+
153195
# Build options
154196
IF(ENABLE_WARNINGS)
155197
# The weird syntax is due to CMake generator expressions.
@@ -204,7 +246,7 @@ if (DEFINED SDL2_INCLUDE_DIRS AND DEFINED SDL2_LIBRARIES AND (MINGW OR MSYS))
204246

205247
elseif (DEFINED SDL2_INCLUDE_DIRS AND DEFINED SDL2_LIBRARIES)
206248
message(STATUS "Using pre-defined SDL2 variables SDL2_INCLUDE_DIRS and SDL2_LIBRARIES")
207-
target_include_directories(VVVVVV PUBLIC "$<BUILD_INTERFACE:${SDL2_INCLUDE_DIRS}>")
249+
target_include_directories(VVVVVV SYSTEM PUBLIC "$<BUILD_INTERFACE:${SDL2_INCLUDE_DIRS}>")
208250
target_link_libraries(VVVVVV ${SDL2_LIBRARIES})
209251
else()
210252
# Only try to autodetect if both SDL2 variables aren't explicitly set
@@ -218,7 +260,7 @@ else()
218260
else()
219261
message(STATUS "No TARGET SDL2::SDL2, or SDL2, using variables")
220262
find_path(SDL2_MIXER_INCLUDE_DIRS NAMES SDL_mixer.h PATH_SUFFIXES SDL2)
221-
target_include_directories(VVVVVV PUBLIC "$<BUILD_INTERFACE:${SDL2_INCLUDE_DIRS}>" ${SDL2_MIXER_INCLUDE_DIRS})
263+
target_include_directories(VVVVVV SYSTEM PUBLIC "$<BUILD_INTERFACE:${SDL2_INCLUDE_DIRS}>" ${SDL2_MIXER_INCLUDE_DIRS})
222264
target_link_libraries(VVVVVV ${SDL2_LIBRARIES} SDL2_mixer)
223265
endif()
224266
endif()

desktop_version/src/Ent.cpp

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void entclass::setenemy( int t )
106106
break;
107107
case 1:
108108
yp += 10;
109-
oldyp += 10;
109+
lerpoldyp += 10;
110110
tile = 63;
111111
animate = 100; //LIES
112112
colour = 6;
@@ -146,9 +146,9 @@ void entclass::setenemy( int t )
146146
break;
147147
case 1:
148148
xp += 4;
149-
oldxp += 4;
149+
lerpoldxp += 4;
150150
yp -= 4;
151-
oldyp -= 4;
151+
lerpoldyp -= 4;
152152
tile = 76;
153153
animate = 100; // Clouds
154154
colour = 6;
@@ -226,9 +226,9 @@ void entclass::setenemyroom( int rx, int ry )
226226
w = 16;
227227
h = 16;
228228
xp -= 24;
229-
oldxp -= 24;
229+
lerpoldxp -= 24;
230230
yp -= 16;
231-
oldyp -= 16;
231+
lerpoldyp -= 16;
232232
}
233233
else
234234
{
@@ -241,9 +241,9 @@ void entclass::setenemyroom( int rx, int ry )
241241
cx = 4;
242242
size = 9;
243243
xp -= 4;
244-
oldxp -= 4;
244+
lerpoldxp -= 4;
245245
yp -= 32;
246-
oldyp -= 32;
246+
lerpoldyp -= 32;
247247
}
248248

249249
break;
@@ -344,7 +344,7 @@ void entclass::setenemyroom( int rx, int ry )
344344
w = 32;
345345
h = 14;
346346
yp += 1;
347-
oldyp += 1;
347+
lerpoldyp += 1;
348348
break;
349349
case rn(16, 2): // (Manequins)
350350
tile = 52;
@@ -353,7 +353,7 @@ void entclass::setenemyroom( int rx, int ry )
353353
w = 16;
354354
h = 25;
355355
yp -= 4;
356-
oldyp -= 4;
356+
lerpoldyp -= 4;
357357
break;
358358
case rn(18, 0): // (Obey)
359359
tile = 51;
@@ -644,3 +644,11 @@ void entclass::updatecolour()
644644
break;
645645
}
646646
}
647+
648+
bool entclass::ishumanoid()
649+
{
650+
return type == 0
651+
|| type == 12
652+
|| type == 14
653+
|| type == 55;
654+
}

desktop_version/src/Ent.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class entclass
2020

2121
void updatecolour();
2222

23+
bool ishumanoid();
24+
2325
public:
2426
//Fundamentals
2527
bool invis;

desktop_version/src/Entity.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,7 +2361,7 @@ bool entityclass::updateentities( int i )
23612361
{
23622362
return removeentity(i);
23632363
}
2364-
if (game.roomy == 108)
2364+
if (game.roomx == 113 && game.roomy == 108)
23652365
{
23662366
if (entities[i].yp <= 60)
23672367
{
@@ -2773,7 +2773,7 @@ bool entityclass::updateentities( int i )
27732773
}
27742774

27752775
//Special rules:
2776-
if (game.roomx == 110 && game.roomy == 105)
2776+
if (game.roomx == 110 && game.roomy == 105 && !map.custommode)
27772777
{
27782778
if (entities[i].xp < 155)
27792779
{
@@ -4674,6 +4674,11 @@ void entityclass::collisioncheck(int i, int j, bool scm /*= false*/)
46744674
}
46754675
break;
46764676
case 2: //Moving platforms
4677+
if (entities[j].behave >= 8 && entities[j].behave < 10)
4678+
{
4679+
//We don't want conveyors, moving platforms only
4680+
break;
4681+
}
46774682
if (entitycollide(i, j))
46784683
{
46794684
//Disable collision temporarily so we don't push the person out!

0 commit comments

Comments
 (0)