Skip to content

Commit

Permalink
Hello WWWWWWorld!
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo committed Jan 8, 2020
0 parents commit f7c0321
Show file tree
Hide file tree
Showing 133 changed files with 154,973 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## The Basics

Thanks for making a pull request! Before making a pull request, we have some
things for you to read through first:

- We generally do not accept patches for formatting fixes, unless the formatting
fixes are part of a functional patch (for example, when fixing a bug in a
function you can fix up the lines surrounding it if needed).
- Patches that break compatibility with the original game data or save data will
not be accepted.
- New features and user interface changes will most likely not be accepted
unless they are for improving user accessibility.
- New platforms are acceptable if they use SDL + PhysicsFS and don't mess with
the game source too much.
- (No homebrew console targets, sorry! Maybe do the work in SDL instead?)
- Pull requests that do not fill out the Legal Stuff will be closed
automatically.

If you understand these notes, you can delete the text in this section. Pull
requests that still have this text will be closed automatically.

## Legal Stuff:

By submitting this pull request, I confirm that...

- [ ] My changes may be used in a future commercial release of VVVVVV (for
example, a 2.3 update on Steam for Windows/macOS/Linux)
- [ ] I will be credited in a `CONTRIBUTORS` file for all of said releases, but
will NOT be compensated for these changes

## Changes:

Describe your patch here!
17 changes: 17 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
VVVVVV Source Code License v1.0
-------
Last updated on January 7th, 2020.

This repo contains the source code for VVVVVV, including all level content and text from the game. It does not, however, contain any of the icons, art, graphics or music for the game, which are still under a proprietary license. For personal use, you can find these assets for free in the [Make and Play Edition](http://distractionware.com/blog/category/vvvvvv-make-and-play/).

If you are interested in distributing work that falls outside the terms in the licence below, or if you are interested in distributing work that includes using any part of VVVVVV not included in this repo then please get in touch - we can discuss granting a licence for that on a case by case basis. The purpose of making the contents of this repo available is for others to learn from, to inspire new work, and to allow the creation of new tools and modifications for VVVVVV.

This software available from here is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any claim, damages or other liability arising from the use or in connection with this software. All materials in the repo are copyright of Terry Cavanagh © 2010-2020.

Permission is granted to anyone to use this software and to alter it and redistribute it freely, subject to the following restrictions:

- You may not alter or redistribute this software in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. This includes, but is not limited to, selling altered or unaltered versions of this software, or including advertisements of any kind in altered or unaltered versions of this software.
- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, you are required to include an acknowledgement in the product that this software is the copyright of Terry Cavanagh and is based on the VVVVVV source code.
- Altered source/binary versions must be plainly marked as such, and must not be misrepresented as being the original software.
- You must not distribute any materials from the game which are not included in this repo unless approved by us in writing.
- This notice may not be removed or altered from any source/binary distribution.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
This is the source code to VVVVVV, version 2.0+.

License
-------
VVVVVV's source code is made available under a custom license. See [LICENSE.md](LICENSE.md) for more details.

In general, if you're interested in creating something that falls outside the license terms, get in touch with Terry and we'll talk about it!

Authors
-------
- Created by [Terry Cavanagh](http://distractionware.com/)
- Room Names by [Bennett Foddy](http://www.foddy.net)
- Music by [Magnus Pålsson](http://souleye.madtracker.net/)
- Metal Soundtrack by [FamilyJules](http://familyjules7x.com/)
- 2.0 Update (C++ Port) by [Simon Roth](http://www.machinestudios.co.uk)
- 2.2 Update (SDL2/PhysicsFS/Steamworks port) by [Ethan Lee](http://www.flibitijibibo.com/)
- Beta Testing by Sam Kaplan and Pauli Kohberger
- Ending Picture by Pauli Kohberger

Versions
------------
There are two versions of the VVVVVV source code available - the [desktop version](https://github.com/TerryCavanagh/VVVVVV/tree/master/desktop_version) (based on the C++ port, and currently live on Steam), and the [mobile version](https://github.com/TerryCavanagh/VVVVVV/tree/master/mobile_version) (based on a fork of the original flash source code, and currently live on iOS and Android).
131 changes: 131 additions & 0 deletions desktop_version/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# CMake File for VVVVVV
# Written by Ethan "flibitijibibo" Lee

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
PROJECT(VVVVVV)

# Architecture Flags
IF(APPLE)
# Wow, Apple is a huge jerk these days huh?
SET(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk)
SET(CMAKE_OSX_DEPLOYMENT_TARGET 10.9)
LINK_DIRECTORIES(/usr/local/lib)
ENDIF()

# Compiler Flags
ADD_DEFINITIONS(-DPHYSFS_SUPPORTS_DEFAULT=0 -DPHYSFS_SUPPORTS_ZIP=1)

# Executable Suffix
IF(APPLE)
SET(CMAKE_EXECUTABLE_SUFFIX ".osx")
ELSEIF(WIN32)
# Nothing!
ELSEIF(CMAKE_SIZEOF_VOID_P MATCHES "8")
SET(CMAKE_EXECUTABLE_SUFFIX ".x86_64")
ELSE()
SET(CMAKE_EXECUTABLE_SUFFIX ".x86")
ENDIF()

# Include Directories
INCLUDE_DIRECTORIES(src tinyxml physfs lodepng)

# Source Lists
SET(VVV_SRC
src/BinaryBlob.cpp
src/BlockV.cpp
src/editor.cpp
src/Ent.cpp
src/Entity.cpp
src/FileSystemUtils.cpp
src/Finalclass.cpp
src/Game.cpp
src/Graphics.cpp
src/GraphicsResources.cpp
src/GraphicsUtil.cpp
src/Input.cpp
src/KeyPoll.cpp
src/Labclass.cpp
src/Logic.cpp
src/Map.cpp
src/Music.cpp
src/Otherlevel.cpp
src/preloader.cpp
src/Screen.cpp
src/Script.cpp
src/Scripts.cpp
src/SoundSystem.cpp
src/Spacestation2.cpp
src/TerminalScripts.cpp
src/Textbox.cpp
src/titlerender.cpp
src/Tower.cpp
src/UtilityClass.cpp
src/WarpClass.cpp
src/main.cpp
src/SteamNetwork.c
)
SET(XML_SRC
tinyxml/tinystr.cpp
tinyxml/tinyxml.cpp
tinyxml/tinyxmlerror.cpp
tinyxml/tinyxmlparser.cpp
)
SET(PFS_SRC
physfs/physfs.c
physfs/physfs_archiver_dir.c
physfs/physfs_archiver_unpacked.c
physfs/physfs_archiver_zip.c
physfs/physfs_byteorder.c
physfs/physfs_unicode.c
physfs/physfs_platform_posix.c
physfs/physfs_platform_unix.c
physfs/physfs_platform_windows.c
)
IF(APPLE)
# Are you noticing a pattern with this Apple crap yet?
SET(PFS_SRC ${PFS_SRC} physfs/physfs_platform_apple.m)
ENDIF()
SET(PNG_SRC lodepng/lodepng.c)

# Executable information
IF(WIN32)
ADD_EXECUTABLE(vvvvvv WIN32 ${VVV_SRC})
ELSE()
ADD_EXECUTABLE(vvvvvv ${VVV_SRC})
ENDIF()

# Library information
ADD_LIBRARY(tinyxml-static STATIC ${XML_SRC})
ADD_LIBRARY(physfs-static STATIC ${PFS_SRC} ${PFSP_SRC})
ADD_LIBRARY(lodepng-static STATIC ${PNG_SRC})

# Static Dependencies
TARGET_LINK_LIBRARIES(vvvvvv physfs-static tinyxml-static lodepng-static)

# SDL2 Dependency (Detection pulled from FAudio)
if (DEFINED SDL2_INCLUDE_DIRS AND DEFINED SDL2_LIBRARIES)
message(STATUS "Using pre-defined SDL2 variables SDL2_INCLUDE_DIRS and SDL2_LIBRARIES")
target_include_directories(vvvvvv PUBLIC "$<BUILD_INTERFACE:${SDL2_INCLUDE_DIRS}>")
target_link_libraries(vvvvvv ${SDL2_LIBRARIES})
else()
# Only try to autodetect if both SDL2 variables aren't explicitly set
find_package(SDL2 CONFIG)
if (TARGET SDL2::SDL2)
message(STATUS "Using TARGET SDL2::SDL2")
target_link_libraries(vvvvvv SDL2::SDL2 SDL2_mixer)
elseif (TARGET SDL2)
message(STATUS "Using TARGET SDL2")
target_link_libraries(vvvvvv SDL2 SDL2_mixer)
else()
message(STATUS "No TARGET SDL2::SDL2, or SDL2, using variables")
target_include_directories(vvvvvv PUBLIC "$<BUILD_INTERFACE:${SDL2_INCLUDE_DIRS}>")
target_link_libraries(vvvvvv ${SDL2_LIBRARIES} SDL2_mixer)
endif()
endif()

# Yes, more Apple Crap
IF(APPLE)
FIND_LIBRARY(FOUNDATION NAMES Foundation)
FIND_LIBRARY(IOKIT NAMES IOKit)
TARGET_LINK_LIBRARIES(vvvvvv objc ${IOKIT} ${FOUNDATION})
ENDIF()
52 changes: 52 additions & 0 deletions desktop_version/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
How to Build
------------
VVVVVV's official desktop versions are built with the following environments:

- Windows: Visual Studio 2010
- macOS: Xcode CLT, currently targeting 10.9 SDK
- GNU/Linux: CentOS 7

The engine depends solely on SDL2 and SDL2_mixer. All other dependencies are
statically linked into the engine. The libs for Windows are in this repository,
all other platforms should install them either from the OS package manager or
from self-compiled source.

Steamworks support is included and the DLL is loaded dynamically, you do not
need the SDK headers and there is no special Steam or non-Steam version. The
current implementation has been tested with Steamworks SDK v1.46.

To generate the projects on Windows:
```
# Put the SDL2/SDL2_mixer VC development libraries next to the VVVVVV folder!
mkdir flibitBuild
cd flibitBuild
cmake -G "Visual Studio 10 2010" .. -DSDL2_INCLUDE_DIRS="../../SDL2-2.0.10/include;../../SDL2_mixer-2.0.4/include" -DSDL2_LIBRARIES="../../SDL2-2.0.10/lib/x86/SDL2;../../SDL2-2.0.10/lib/x86/SDL2main;../../SDL2_mixer-2.0.4/lib/x86/SDL2_mixer"
```

To generate everywhere else:
```
mkdir flibitBuild
cd flibitBuild
cmake ..
```

macOS may be fussy about the SDK version. How to fix this is up to the whims of
however Apple wants to make CMAKE_OSX_SYSROOT annoying to configure and retain
each time Xcode updates.

A Word About Compiler Quirks
----------------------------

This engine is _super_ fussy about optimization levels and runtime checks. In
particular, the Windows version _absolutely positively must_ be compiled in
Debug mode, with /RTC enabled. If you build in Release mode, or have /RTC
disabled, the game behaves dramatically different in ways that were never fully
documented (bizarre softlocks, out-of-bounds issues that don't show up in tools
like Valgrind, stuff like that). There are lots of things about this old code
that could be cleaned up, polished, rewritten, and so on, but this is the one
that will probably bite you the hardest when setting up your own build,
regardless of platform.

We hope you'll enjoy messing with the source anyway!

Love, flibit
Loading

0 comments on commit f7c0321

Please sign in to comment.