mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Merged default into minor
--HG-- branch : minor
This commit is contained in:
@@ -126,7 +126,7 @@ public:
|
||||
|
||||
if (index >= SIZE)
|
||||
{
|
||||
printf("\nConstant %s out of bounds with %i!\n", key, index);
|
||||
printf("Constant %s out of bounds with %u!\n", key, index);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -538,7 +538,7 @@ int luax_insist(lua_State *L, int idx, const char *k)
|
||||
{
|
||||
// Convert to absolute index if necessary.
|
||||
if (idx < 0 && idx > LUA_REGISTRYINDEX)
|
||||
idx = lua_gettop(L) + ++idx;
|
||||
idx += lua_gettop(L) + 1;
|
||||
|
||||
lua_getfield(L, idx, k);
|
||||
|
||||
|
||||
@@ -147,6 +147,9 @@ int w_Mesh_getVertices(lua_State *L)
|
||||
size_t count = t->getVertexCount();
|
||||
lua_createtable(L, count, 0);
|
||||
|
||||
if (count == 0 || vertices == nullptr)
|
||||
return 1;
|
||||
|
||||
for (size_t i = 0; i < count; i++)
|
||||
{
|
||||
// Create vertex table.
|
||||
|
||||
@@ -81,6 +81,11 @@ void RandomGenerator::setSeed(RandomGenerator::Seed newseed)
|
||||
|
||||
seed = newseed;
|
||||
rng_state = seed;
|
||||
|
||||
// Xorshift's first couple results after seeding will be similar to results
|
||||
// from very similar seeds, so we immediately discard them here.
|
||||
for (int i = 0; i < 2; i++)
|
||||
rand();
|
||||
}
|
||||
|
||||
RandomGenerator::Seed RandomGenerator::getSeed() const
|
||||
|
||||
@@ -468,7 +468,6 @@ function love.run()
|
||||
|
||||
if love.math then
|
||||
love.math.setRandomSeed(os.time())
|
||||
for i=1,3 do love.math.random() end
|
||||
end
|
||||
|
||||
if love.event then
|
||||
|
||||
@@ -836,9 +836,6 @@ const unsigned char boot_lua[] =
|
||||
0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
|
||||
0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x74, 0x52, 0x61, 0x6e,
|
||||
0x64, 0x6f, 0x6d, 0x53, 0x65, 0x65, 0x64, 0x28, 0x6f, 0x73, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x28, 0x29, 0x29, 0x0a,
|
||||
0x09, 0x09, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x3d, 0x31, 0x2c, 0x33, 0x20, 0x64, 0x6f, 0x20, 0x6c, 0x6f, 0x76,
|
||||
0x65, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x28, 0x29, 0x20, 0x65, 0x6e,
|
||||
0x64, 0x0a,
|
||||
0x09, 0x65, 0x6e, 0x64, 0x0a,
|
||||
0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x65,
|
||||
0x6e, 0x0a,
|
||||
|
||||
Reference in New Issue
Block a user