mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Merge branch '12.0' into GraphicsBuffer
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
.git* export-ignore
|
||||
.hg* export-ignore
|
||||
*.c diff=cpp
|
||||
*.cpp diff=cpp
|
||||
*.h diff=cpp
|
||||
@@ -0,0 +1,51 @@
|
||||
name: continuous-integration
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
linux-os:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Update APT
|
||||
run: sudo apt-get update
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get install --assume-yes build-essential autotools-dev automake libtool pkg-config \
|
||||
libfreetype6-dev libluajit-5.1-dev libsdl2-dev libopenal-dev \
|
||||
libogg-dev libvorbis-dev libmodplug-dev libmpg123-dev libtheora-dev
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Pre-Configure
|
||||
run: $PWD/platform/unix/automagic
|
||||
- name: Configure
|
||||
run: mkdir build && cd build && ../configure
|
||||
- name: Build
|
||||
run: cd build && make -j2
|
||||
windows-os:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [Win32, x64]
|
||||
steps:
|
||||
- name: Clone Megasource
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: megasource
|
||||
repository: love2d/megasource
|
||||
ref: master
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: megasource/libs/love
|
||||
- name: Configure
|
||||
shell: cmd
|
||||
env:
|
||||
PLATFORM: ${{ matrix.platform }}
|
||||
run: cmake -Bbuild -Hmegasource -T v142 -A %PLATFORM% -DCMAKE_INSTALL_PREFIX=%CD%\install
|
||||
- name: Install
|
||||
shell: cmd
|
||||
run: cmake --build build --config Release --target install -j2
|
||||
- name: Artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: love-windows-${{ matrix.platform }}
|
||||
path: install
|
||||
Executable → Regular
@@ -1,7 +0,0 @@
|
||||
image: mfcula/love-cmake:v1
|
||||
pipelines:
|
||||
default:
|
||||
- step:
|
||||
script:
|
||||
- cmake -G"Ninja" -H. -Bout
|
||||
- ninja -C out
|
||||
@@ -28,7 +28,7 @@ install:
|
||||
- for /D %%i in (*) do @if "%%i" NEQ "love" @move %%i love\%%i
|
||||
- for %%i in (*) do @if "%%i" NEQ "appveyor.yml" @move %%i love\%%i
|
||||
# clone megasource and move into top directory.
|
||||
- hg clone https://bitbucket.org/rude/megasource megasource
|
||||
- git clone --depth 1 https://github.com/love2d/megasource.git megasource
|
||||
- cd megasource
|
||||
- for /D %%i in (*) do @move %%i ..\%%i
|
||||
- for %%i in (*) do @move %%i ..\%%i
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
LÖVE is an *awesome* framework you can use to make 2D games in Lua. It's free, open-source, and works on Windows, Mac OS X, Linux, Android, and iOS.
|
||||
|
||||
[](https://ci.appveyor.com/project/AlexSzpakowski/love)
|
||||
[](https://ci.appveyor.com/project/AlexSzpakowski/love)
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
@@ -42,29 +42,29 @@ Visit the [Android build repository][android-repository] for build instructions.
|
||||
Repository information
|
||||
----------------------
|
||||
|
||||
We use the 'default' branch for development, and therefore it should not be considered stable.
|
||||
Also used is the 'minor' branch, which is used for features in the next minor version and it is
|
||||
not our development target (which would be the next revision - version numbers are formatted major.minor.revision.)
|
||||
We use the 'master' branch for patch development of the current major release, and therefore it should not be considered stable.
|
||||
There may also be a branch for the next major version in development, which is named after that version.
|
||||
|
||||
We tag all our releases (since we started using mercurial), and have binary downloads available for them.
|
||||
We tag all our releases (since we started using mercurial and git), and have binary downloads available for them.
|
||||
|
||||
Experimental changes are developed in the separate [love-experiments][love-experiments] repository.
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
The best places to contribute are through the Bitbucket issue tracker and the official Discord server or IRC channel.
|
||||
The best places to contribute are through the issue tracker and the official Discord server or IRC channel.
|
||||
For code contributions, pull requests and patches are welcome. Be sure to read the [source code style guide][codestyle].
|
||||
|
||||
Builds
|
||||
------
|
||||
|
||||
Releases are found in the 'downloads' section on bitbucket, are linked on [the site][site],
|
||||
Releases are found in the [releases][releases] section on github, and are linked on [the site][site],
|
||||
and there's a ppa for ubuntu, [ppa:bartbes/love-stable][stableppa].
|
||||
|
||||
There are also unstable/nightly builds:
|
||||
|
||||
- Most can be found [here][builds].
|
||||
- Builds for some platforms are automatically created after each commit and are available through GitHub's CI interfaces.
|
||||
- Otherwise, some less frequently updated builds can can be found [here][builds].
|
||||
- For ubuntu linux they are in [ppa:bartbes/love-unstable][unstableppa]
|
||||
- For arch linux there's [love-hg][aur] in the AUR.
|
||||
|
||||
@@ -87,12 +87,13 @@ Dependencies
|
||||
[discord]: https://discord.gg/rhUets9
|
||||
[irc]: irc://irc.oftc.net/love
|
||||
[dependencies]: http://love2d.org/sdk
|
||||
[dependencies-ios]: https://bitbucket.org/rude/love/downloads/
|
||||
[megasource]: https://bitbucket.org/rude/megasource
|
||||
[dependencies-ios]: https://github.com/love2d/love/releases
|
||||
[megasource]: https://github.com/love2d/megasource
|
||||
[builds]: http://love2d.org/builds
|
||||
[stableppa]: https://launchpad.net/~bartbes/+archive/love-stable
|
||||
[unstableppa]: https://launchpad.net/~bartbes/+archive/love-unstable
|
||||
[aur]: http://aur.archlinux.org/packages/love-hg
|
||||
[love-experiments]: https://bitbucket.org/bartbes/love-experiments
|
||||
[love-experiments]: https://github.com/slime73/love-experiments
|
||||
[codestyle]: https://love2d.org/wiki/Code_Style
|
||||
[android-repository]: https://bitbucket.org/MartinFelis/love-android-sdl2
|
||||
[android-repository]: https://github.com/love2d/love-android
|
||||
[releases]: https://github.com/love2d/love/releases
|
||||
|
||||
@@ -113,15 +113,18 @@ void Module::registerInstance(Module *instance)
|
||||
|
||||
registry.insert(make_pair(name, instance));
|
||||
|
||||
ModuleType moduletype = instance->getModuleType();
|
||||
ModuleType mtype = instance->getModuleType();
|
||||
|
||||
if (instances[moduletype] != nullptr)
|
||||
if (mtype != M_UNKNOWN)
|
||||
{
|
||||
printf("Warning: overwriting module instance %s with new instance %s\n",
|
||||
instances[moduletype]->getName(), instance->getName());
|
||||
}
|
||||
if (instances[mtype] != nullptr)
|
||||
{
|
||||
printf("Warning: overwriting module instance %s with new instance %s\n",
|
||||
instances[mtype]->getName(), instance->getName());
|
||||
}
|
||||
|
||||
instances[moduletype] = instance;
|
||||
instances[mtype] = instance;
|
||||
}
|
||||
}
|
||||
|
||||
Module *Module::getInstance(const std::string &name)
|
||||
|
||||
+2
-1
@@ -38,6 +38,7 @@ public:
|
||||
|
||||
enum ModuleType
|
||||
{
|
||||
M_UNKNOWN = -1, // Use this for modules outside of LOVE's source code.
|
||||
M_AUDIO,
|
||||
M_DATA,
|
||||
M_EVENT,
|
||||
@@ -99,7 +100,7 @@ public:
|
||||
template <typename T>
|
||||
static T *getInstance(ModuleType type)
|
||||
{
|
||||
return (T *) instances[type];
|
||||
return type != M_UNKNOWN ? (T *) instances[type] : nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
+11
-2
@@ -24,7 +24,9 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef LOVE_WINDOWS
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <malloc.h>
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <unistd.h> // Assume POSIX support.
|
||||
#endif
|
||||
@@ -54,8 +56,15 @@ void alignedFree(void *mem)
|
||||
size_t getPageSize()
|
||||
{
|
||||
#ifdef LOVE_WINDOWS
|
||||
// TODO: Do an actual query.
|
||||
return 4096;
|
||||
static DWORD size = 0;
|
||||
if (size == 0)
|
||||
{
|
||||
SYSTEM_INFO si;
|
||||
GetSystemInfo(&si);
|
||||
size = si.dwPageSize;
|
||||
}
|
||||
|
||||
return (size_t) size;
|
||||
#else
|
||||
static const long size = sysconf(_SC_PAGESIZE);
|
||||
return size > 0 ? (size_t) size : 4096;
|
||||
|
||||
+4304
-2174
File diff suppressed because it is too large
Load Diff
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -1,6 +1,6 @@
|
||||
# luasocket src/makefile
|
||||
#
|
||||
# Definitions in this section can be overriden on the command line or in the
|
||||
# Definitions in this section can be overridden on the command line or in the
|
||||
# environment.
|
||||
#
|
||||
# These are equivalent:
|
||||
|
||||
@@ -219,7 +219,7 @@ function send_message(mesgt)
|
||||
else send_string(mesgt) end
|
||||
end
|
||||
|
||||
-- set defaul headers
|
||||
-- set default headers
|
||||
local function adjust_headers(mesgt)
|
||||
local lower = lower_headers(mesgt.headers)
|
||||
lower["date"] = lower["date"] or
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
@@ -34,7 +34,7 @@ namespace lullaby
|
||||
FLACDecoder::FLACDecoder(Data *data, int nbufferSize)
|
||||
: Decoder(data, nbufferSize)
|
||||
{
|
||||
flac = drflac_open_memory(data->getData(), data->getSize());
|
||||
flac = drflac_open_memory(data->getData(), data->getSize(), nullptr);
|
||||
if (flac == nullptr)
|
||||
throw love::Exception("Could not load FLAC file");
|
||||
}
|
||||
@@ -52,7 +52,7 @@ bool FLACDecoder::accepts(const std::string &ext)
|
||||
// Please remove once it's no longer the case.
|
||||
static const std::string supported[] =
|
||||
{
|
||||
"flac", "ogg"
|
||||
"flac", "ogg", ""
|
||||
};
|
||||
|
||||
for (int i = 0; !(supported[i].empty()); i++)
|
||||
@@ -125,4 +125,3 @@ double FLACDecoder::getDuration()
|
||||
} // lullaby
|
||||
} // sound
|
||||
} // love
|
||||
|
||||
|
||||
Reference in New Issue
Block a user