mirror of
https://github.com/love2d/love.git
synced 2026-08-20 20:49:54 +02:00
Merged bartbes/love-experiments/MRTs into default
This commit is contained in:
@@ -158,6 +158,7 @@ StringMap<Graphics::Support, Graphics::SUPPORT_MAX_ENUM>::Entry Graphics::suppor
|
|||||||
{
|
{
|
||||||
{ "canvas", Graphics::SUPPORT_CANVAS },
|
{ "canvas", Graphics::SUPPORT_CANVAS },
|
||||||
{ "hdrcanvas", Graphics::SUPPORT_HDR_CANVAS },
|
{ "hdrcanvas", Graphics::SUPPORT_HDR_CANVAS },
|
||||||
|
{ "multicanvas", Graphics::SUPPORT_MULTI_CANVAS },
|
||||||
{ "shader", Graphics::SUPPORT_SHADER },
|
{ "shader", Graphics::SUPPORT_SHADER },
|
||||||
{ "npot", Graphics::SUPPORT_NPOT },
|
{ "npot", Graphics::SUPPORT_NPOT },
|
||||||
{ "subtractive", Graphics::SUPPORT_SUBTRACTIVE },
|
{ "subtractive", Graphics::SUPPORT_SUBTRACTIVE },
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ public:
|
|||||||
{
|
{
|
||||||
SUPPORT_CANVAS = 1,
|
SUPPORT_CANVAS = 1,
|
||||||
SUPPORT_HDR_CANVAS,
|
SUPPORT_HDR_CANVAS,
|
||||||
|
SUPPORT_MULTI_CANVAS,
|
||||||
SUPPORT_SHADER,
|
SUPPORT_SHADER,
|
||||||
SUPPORT_NPOT,
|
SUPPORT_NPOT,
|
||||||
SUPPORT_SUBTRACTIVE,
|
SUPPORT_SUBTRACTIVE,
|
||||||
|
|||||||
@@ -59,6 +59,15 @@ struct FramebufferStrategy
|
|||||||
*/
|
*/
|
||||||
virtual void deleteFBO(GLuint, GLuint, GLuint) {}
|
virtual void deleteFBO(GLuint, GLuint, GLuint) {}
|
||||||
virtual void bindFBO(GLuint) {}
|
virtual void bindFBO(GLuint) {}
|
||||||
|
|
||||||
|
/// attach additional canvases to the active framebuffer for rendering
|
||||||
|
/**
|
||||||
|
* @param[in] canvases List of canvases to attach
|
||||||
|
**/
|
||||||
|
virtual void setAttachments(const std::vector<Canvas *> &canvases) {}
|
||||||
|
|
||||||
|
/// stop using all additional attached canvases
|
||||||
|
virtual void setAttachments() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FramebufferStrategyGL3 : public FramebufferStrategy
|
struct FramebufferStrategyGL3 : public FramebufferStrategy
|
||||||
@@ -127,6 +136,40 @@ struct FramebufferStrategyGL3 : public FramebufferStrategy
|
|||||||
{
|
{
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, framebuffer);
|
glBindFramebuffer(GL_FRAMEBUFFER, framebuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void setAttachments()
|
||||||
|
{
|
||||||
|
// set a single render target
|
||||||
|
glDrawBuffer(GL_COLOR_ATTACHMENT0);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void setAttachments(const std::vector<Canvas *> &canvases)
|
||||||
|
{
|
||||||
|
if (canvases.size() == 0)
|
||||||
|
{
|
||||||
|
setAttachments();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<GLenum> drawbuffers;
|
||||||
|
drawbuffers.push_back(GL_COLOR_ATTACHMENT0);
|
||||||
|
|
||||||
|
// attach the canvas framebuffer textures to the currently bound framebuffer
|
||||||
|
for (int i = 0; i < canvases.size(); i++)
|
||||||
|
{
|
||||||
|
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1 + i,
|
||||||
|
GL_TEXTURE_2D, canvases[i]->getTextureName(), 0);
|
||||||
|
drawbuffers.push_back(GL_COLOR_ATTACHMENT1 + i);
|
||||||
|
}
|
||||||
|
|
||||||
|
// set up multiple render targets
|
||||||
|
if (GLEE_VERSION_2_0)
|
||||||
|
glDrawBuffers(drawbuffers.size(), &drawbuffers[0]);
|
||||||
|
else if (GLEE_ARB_draw_buffers)
|
||||||
|
glDrawBuffersARB(drawbuffers.size(), &drawbuffers[0]);
|
||||||
|
else if (GLEE_ATI_draw_buffers)
|
||||||
|
glDrawBuffersATI(drawbuffers.size(), &drawbuffers[0]);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FramebufferStrategyPackedEXT : public FramebufferStrategy
|
struct FramebufferStrategyPackedEXT : public FramebufferStrategy
|
||||||
@@ -196,6 +239,40 @@ struct FramebufferStrategyPackedEXT : public FramebufferStrategy
|
|||||||
{
|
{
|
||||||
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer);
|
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void setAttachments()
|
||||||
|
{
|
||||||
|
// set a single render target
|
||||||
|
glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void setAttachments(const std::vector<Canvas *> &canvases)
|
||||||
|
{
|
||||||
|
if (canvases.size() == 0)
|
||||||
|
{
|
||||||
|
setAttachments();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<GLenum> drawbuffers;
|
||||||
|
drawbuffers.push_back(GL_COLOR_ATTACHMENT0_EXT);
|
||||||
|
|
||||||
|
// attach the canvas framebuffer textures to the currently bound framebuffer
|
||||||
|
for (int i = 0; i < canvases.size(); i++)
|
||||||
|
{
|
||||||
|
glFramebufferTexture2DEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1_EXT + i,
|
||||||
|
GL_TEXTURE_2D, canvases[i]->getTextureName(), 0);
|
||||||
|
drawbuffers.push_back(GL_COLOR_ATTACHMENT1_EXT + i);
|
||||||
|
}
|
||||||
|
|
||||||
|
// set up multiple render targets
|
||||||
|
if (GLEE_VERSION_2_0)
|
||||||
|
glDrawBuffers(drawbuffers.size(), &drawbuffers[0]);
|
||||||
|
else if (GLEE_ARB_draw_buffers)
|
||||||
|
glDrawBuffersARB(drawbuffers.size(), &drawbuffers[0]);
|
||||||
|
else if (GLEE_ATI_draw_buffers)
|
||||||
|
glDrawBuffersATI(drawbuffers.size(), &drawbuffers[0]);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FramebufferStrategyEXT : public FramebufferStrategyPackedEXT
|
struct FramebufferStrategyEXT : public FramebufferStrategyPackedEXT
|
||||||
@@ -288,6 +365,9 @@ static void getStrategy()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int maxFBOColorAttachments = 0;
|
||||||
|
static int maxDrawBuffers = 0;
|
||||||
|
|
||||||
Canvas::Canvas(int width, int height, TextureType texture_type)
|
Canvas::Canvas(int width, int height, TextureType texture_type)
|
||||||
: width(width)
|
: width(width)
|
||||||
, height(height)
|
, height(height)
|
||||||
@@ -338,18 +418,33 @@ bool Canvas::isSupported()
|
|||||||
return (strategy != &strategyNone);
|
return (strategy != &strategyNone);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Canvas::isHdrSupported()
|
bool Canvas::isHDRSupported()
|
||||||
{
|
{
|
||||||
return GLEE_VERSION_3_0 || GLEE_ARB_texture_float;
|
return GLEE_VERSION_3_0 || GLEE_ARB_texture_float;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Canvas::isMultiCanvasSupported()
|
||||||
|
{
|
||||||
|
if (!(isSupported() && (GLEE_VERSION_2_0 || GLEE_ARB_draw_buffers || GLEE_ATI_draw_buffers)))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (maxFBOColorAttachments == 0 || maxDrawBuffers == 0)
|
||||||
|
{
|
||||||
|
glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, &maxFBOColorAttachments);
|
||||||
|
glGetIntegerv(GL_MAX_DRAW_BUFFERS, &maxDrawBuffers);
|
||||||
|
}
|
||||||
|
|
||||||
|
// system must support at least 4 simultanious active canvases
|
||||||
|
return maxFBOColorAttachments >= 4 && maxDrawBuffers >= 4;
|
||||||
|
}
|
||||||
|
|
||||||
void Canvas::bindDefaultCanvas()
|
void Canvas::bindDefaultCanvas()
|
||||||
{
|
{
|
||||||
if (current != NULL)
|
if (current != NULL)
|
||||||
current->stopGrab();
|
current->stopGrab();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Canvas::startGrab()
|
void Canvas::setupGrab()
|
||||||
{
|
{
|
||||||
// already grabbing
|
// already grabbing
|
||||||
if (current == this)
|
if (current == this)
|
||||||
@@ -379,6 +474,63 @@ void Canvas::startGrab()
|
|||||||
current = this;
|
current = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Canvas::startGrab(const std::vector<Canvas *> &canvases)
|
||||||
|
{
|
||||||
|
if (canvases.size() > 0)
|
||||||
|
{
|
||||||
|
if (!isMultiCanvasSupported())
|
||||||
|
throw love::Exception("Multi-canvas rendering is not supported on this system.");
|
||||||
|
|
||||||
|
if (canvases.size()+1 > maxDrawBuffers || canvases.size()+1 > maxFBOColorAttachments)
|
||||||
|
throw love::Exception("This system can't simultaniously render to %d canvases.", canvases.size()+1);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (size_t i = 0; i < canvases.size(); i++)
|
||||||
|
{
|
||||||
|
if (canvases[i]->getWidth() != width || canvases[i]->getHeight() != height)
|
||||||
|
throw love::Exception("All canvas arguments must have the same dimensions.");
|
||||||
|
|
||||||
|
if (canvases[i]->getTextureType() != texture_type)
|
||||||
|
throw love::Exception("All canvas arguments must have the same texture type.");
|
||||||
|
}
|
||||||
|
|
||||||
|
setupGrab();
|
||||||
|
|
||||||
|
// don't attach anything if there's nothing to attach/detach
|
||||||
|
if (canvases.size() == 0 && attachedCanvases.size() == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// attach the canvas textures to the active FBO and set up multiple render targets
|
||||||
|
strategy->setAttachments(canvases);
|
||||||
|
|
||||||
|
// retain newly attached canvases
|
||||||
|
for (size_t i = 0; i < canvases.size(); i++)
|
||||||
|
canvases[i]->retain();
|
||||||
|
|
||||||
|
// release previously attached canvases
|
||||||
|
for (size_t i = 0; i < attachedCanvases.size(); i++)
|
||||||
|
attachedCanvases[i]->release();
|
||||||
|
|
||||||
|
attachedCanvases = canvases;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Canvas::startGrab()
|
||||||
|
{
|
||||||
|
setupGrab();
|
||||||
|
|
||||||
|
if (attachedCanvases.size() == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// make sure the FBO is only using a single canvas
|
||||||
|
strategy->setAttachments();
|
||||||
|
|
||||||
|
// release any previously attached canvases
|
||||||
|
for (size_t i = 0; i < attachedCanvases.size(); i++)
|
||||||
|
attachedCanvases[i]->release();
|
||||||
|
|
||||||
|
attachedCanvases.clear();
|
||||||
|
}
|
||||||
|
|
||||||
void Canvas::stopGrab()
|
void Canvas::stopGrab()
|
||||||
{
|
{
|
||||||
// i am not grabbing. leave me alone
|
// i am not grabbing. leave me alone
|
||||||
@@ -393,20 +545,34 @@ void Canvas::stopGrab()
|
|||||||
current = NULL;
|
current = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Canvas::clear(const Color &c)
|
void Canvas::clear(const Color &c)
|
||||||
{
|
{
|
||||||
GLuint previous = 0;
|
GLuint previous = 0;
|
||||||
if (current != NULL)
|
|
||||||
previous = current->fbo;
|
|
||||||
|
|
||||||
strategy->bindFBO(fbo);
|
if (current != this)
|
||||||
glPushAttrib(GL_COLOR_BUFFER_BIT);
|
{
|
||||||
|
if (current != NULL)
|
||||||
|
previous = current->fbo;
|
||||||
|
|
||||||
|
strategy->bindFBO(fbo);
|
||||||
|
glPushAttrib(GL_COLOR_BUFFER_BIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make sure only this canvas is cleared when multi-canvas rendering is set
|
||||||
|
if (attachedCanvases.size() > 0)
|
||||||
|
strategy->setAttachments();
|
||||||
|
|
||||||
glClearColor((float)c.r/255.0f, (float)c.g/255.0f, (float)c.b/255.0f, (float)c.a/255.0f);
|
glClearColor((float)c.r/255.0f, (float)c.g/255.0f, (float)c.b/255.0f, (float)c.a/255.0f);
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||||
glPopAttrib();
|
|
||||||
|
|
||||||
strategy->bindFBO(previous);
|
if (attachedCanvases.size() > 0)
|
||||||
|
strategy->setAttachments(attachedCanvases);
|
||||||
|
|
||||||
|
if (current != this)
|
||||||
|
{
|
||||||
|
glPopAttrib();
|
||||||
|
strategy->bindFBO(previous);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Canvas::draw(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky) const
|
void Canvas::draw(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky) const
|
||||||
@@ -472,6 +638,11 @@ void Canvas::getPixel(unsigned char* pixel_rgba, int x, int y)
|
|||||||
strategy->bindFBO( 0 );
|
strategy->bindFBO( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::vector<Canvas *> &Canvas::getAttachedCanvases() const
|
||||||
|
{
|
||||||
|
return attachedCanvases;
|
||||||
|
}
|
||||||
|
|
||||||
void Canvas::setFilter(const Image::Filter &f)
|
void Canvas::setFilter(const Image::Filter &f)
|
||||||
{
|
{
|
||||||
bindTexture(img);
|
bindTexture(img);
|
||||||
@@ -515,6 +686,12 @@ void Canvas::unloadVolatile()
|
|||||||
settings.filter = getFilter();
|
settings.filter = getFilter();
|
||||||
settings.wrap = getWrap();
|
settings.wrap = getWrap();
|
||||||
strategy->deleteFBO(fbo, depth_stencil, img);
|
strategy->deleteFBO(fbo, depth_stencil, img);
|
||||||
|
|
||||||
|
// release attached canvases
|
||||||
|
for (size_t i = 0; i < attachedCanvases.size(); i++)
|
||||||
|
attachedCanvases[i]->release();
|
||||||
|
|
||||||
|
attachedCanvases.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
int Canvas::getWidth()
|
int Canvas::getWidth()
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#ifndef LOVE_GRAPHICS_OPENGL_CANVAS_H
|
#ifndef LOVE_GRAPHICS_OPENGL_CANVAS_H
|
||||||
#define LOVE_GRAPHICS_OPENGL_CANVAS_H
|
#define LOVE_GRAPHICS_OPENGL_CANVAS_H
|
||||||
|
|
||||||
|
// LOVE
|
||||||
#include "graphics/DrawQable.h"
|
#include "graphics/DrawQable.h"
|
||||||
#include "graphics/Volatile.h"
|
#include "graphics/Volatile.h"
|
||||||
#include "graphics/Image.h"
|
#include "graphics/Image.h"
|
||||||
@@ -31,6 +32,9 @@
|
|||||||
#include "common/Matrix.h"
|
#include "common/Matrix.h"
|
||||||
#include "OpenGL.h"
|
#include "OpenGL.h"
|
||||||
|
|
||||||
|
// STL
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace love
|
namespace love
|
||||||
{
|
{
|
||||||
namespace graphics
|
namespace graphics
|
||||||
@@ -50,6 +54,11 @@ public:
|
|||||||
Canvas(int width, int height, TextureType texture_type = TYPE_NORMAL);
|
Canvas(int width, int height, TextureType texture_type = TYPE_NORMAL);
|
||||||
virtual ~Canvas();
|
virtual ~Canvas();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param canvases A list of other canvases to temporarily attach to this one,
|
||||||
|
* to allow drawing to multiple canvases at once.
|
||||||
|
**/
|
||||||
|
void startGrab(const std::vector<Canvas *> &canvases);
|
||||||
void startGrab();
|
void startGrab();
|
||||||
void stopGrab();
|
void stopGrab();
|
||||||
|
|
||||||
@@ -66,6 +75,8 @@ public:
|
|||||||
|
|
||||||
void getPixel(unsigned char* pixel_rgba, int x, int y);
|
void getPixel(unsigned char* pixel_rgba, int x, int y);
|
||||||
|
|
||||||
|
const std::vector<Canvas *> &getAttachedCanvases() const;
|
||||||
|
|
||||||
void setFilter(const Image::Filter &f);
|
void setFilter(const Image::Filter &f);
|
||||||
Image::Filter getFilter() const;
|
Image::Filter getFilter() const;
|
||||||
|
|
||||||
@@ -89,20 +100,22 @@ public:
|
|||||||
void unloadVolatile();
|
void unloadVolatile();
|
||||||
|
|
||||||
static bool isSupported();
|
static bool isSupported();
|
||||||
static bool isHdrSupported();
|
static bool isHDRSupported();
|
||||||
|
static bool isMultiCanvasSupported();
|
||||||
static bool getConstant(const char *in, TextureType &out);
|
static bool getConstant(const char *in, TextureType &out);
|
||||||
static bool getConstant(TextureType in, const char *&out);
|
static bool getConstant(TextureType in, const char *&out);
|
||||||
|
|
||||||
static Canvas *current;
|
static Canvas *current;
|
||||||
static void bindDefaultCanvas();
|
static void bindDefaultCanvas();
|
||||||
|
|
||||||
private:
|
|
||||||
friend class Shader;
|
|
||||||
GLuint getTextureName() const
|
GLuint getTextureName() const
|
||||||
{
|
{
|
||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
friend class Shader;
|
||||||
|
|
||||||
GLsizei width;
|
GLsizei width;
|
||||||
GLsizei height;
|
GLsizei height;
|
||||||
GLuint fbo;
|
GLuint fbo;
|
||||||
@@ -121,6 +134,9 @@ private:
|
|||||||
Image::Wrap wrap;
|
Image::Wrap wrap;
|
||||||
} settings;
|
} settings;
|
||||||
|
|
||||||
|
std::vector<Canvas *> attachedCanvases;
|
||||||
|
|
||||||
|
void setupGrab();
|
||||||
void drawv(const Matrix &t, const vertex *v) const;
|
void drawv(const Matrix &t, const vertex *v) const;
|
||||||
|
|
||||||
static StringMap<TextureType, TYPE_MAX_ENUM>::Entry textureTypeEntries[];
|
static StringMap<TextureType, TYPE_MAX_ENUM>::Entry textureTypeEntries[];
|
||||||
|
|||||||
@@ -397,7 +397,7 @@ ParticleSystem *Graphics::newParticleSystem(Image *image, int size)
|
|||||||
|
|
||||||
Canvas *Graphics::newCanvas(int width, int height, Canvas::TextureType texture_type)
|
Canvas *Graphics::newCanvas(int width, int height, Canvas::TextureType texture_type)
|
||||||
{
|
{
|
||||||
if (texture_type == Canvas::TYPE_HDR && !Canvas::isHdrSupported())
|
if (texture_type == Canvas::TYPE_HDR && !Canvas::isHDRSupported())
|
||||||
throw Exception("HDR Canvases are not supported by your OpenGL implementation");
|
throw Exception("HDR Canvases are not supported by your OpenGL implementation");
|
||||||
|
|
||||||
while (GL_NO_ERROR != glGetError())
|
while (GL_NO_ERROR != glGetError())
|
||||||
|
|||||||
@@ -47,7 +47,14 @@ int w_Canvas_renderTo(lua_State *L)
|
|||||||
if (!lua_isfunction(L, 2))
|
if (!lua_isfunction(L, 2))
|
||||||
return luaL_error(L, "Need a function to render to canvas.");
|
return luaL_error(L, "Need a function to render to canvas.");
|
||||||
|
|
||||||
canvas->startGrab();
|
try
|
||||||
|
{
|
||||||
|
canvas->startGrab();
|
||||||
|
}
|
||||||
|
catch (love::Exception &e)
|
||||||
|
{
|
||||||
|
return luaL_error(L, "%s", e.what());
|
||||||
|
}
|
||||||
lua_settop(L, 2); // make sure the function is on top of the stack
|
lua_settop(L, 2); // make sure the function is on top of the stack
|
||||||
lua_call(L, 0, 0);
|
lua_call(L, 0, 0);
|
||||||
canvas->stopGrab();
|
canvas->stopGrab();
|
||||||
|
|||||||
@@ -943,8 +943,68 @@ int w_setCanvas(lua_State *L)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Canvas *canvas = luax_checkcanvas(L, 1);
|
Canvas *canvas = luax_checkcanvas(L, 1);
|
||||||
// this unbinds the previous fbo
|
|
||||||
canvas->startGrab();
|
try
|
||||||
|
{
|
||||||
|
// this unbinds the previous fbo
|
||||||
|
canvas->startGrab();
|
||||||
|
}
|
||||||
|
catch (love::Exception &e)
|
||||||
|
{
|
||||||
|
return luaL_error(L, "%s", e.what());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int w_setCanvases(lua_State *L)
|
||||||
|
{
|
||||||
|
// discard stencil testing
|
||||||
|
instance->discardStencil();
|
||||||
|
|
||||||
|
// called with none -> reset to default buffer
|
||||||
|
// nil is an error, to help people with typoes
|
||||||
|
if (lua_isnone(L,1))
|
||||||
|
{
|
||||||
|
Canvas::bindDefaultCanvas();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool is_table = lua_istable(L, 1);
|
||||||
|
std::vector<Canvas *> attachments;
|
||||||
|
|
||||||
|
Canvas *canvas = 0;
|
||||||
|
|
||||||
|
if (is_table)
|
||||||
|
{
|
||||||
|
lua_pushinteger(L, 1);
|
||||||
|
lua_gettable(L, 1);
|
||||||
|
canvas = luax_checkcanvas(L, -1);
|
||||||
|
lua_pop(L, 1);
|
||||||
|
|
||||||
|
for (int i = 2; i <= lua_objlen(L, 1); i++)
|
||||||
|
{
|
||||||
|
lua_pushinteger(L, i);
|
||||||
|
lua_gettable(L, 1);
|
||||||
|
attachments.push_back(luax_checkcanvas(L, -1));
|
||||||
|
lua_pop(L, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
canvas = luax_checkcanvas(L, 1);
|
||||||
|
for (int i = 2; i <= lua_gettop(L); i++)
|
||||||
|
attachments.push_back(luax_checkcanvas(L, i));
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
canvas->startGrab(attachments);
|
||||||
|
}
|
||||||
|
catch (love::Exception &e)
|
||||||
|
{
|
||||||
|
return luaL_error(L, "%s", e.what());
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -952,14 +1012,25 @@ int w_setCanvas(lua_State *L)
|
|||||||
int w_getCanvas(lua_State *L)
|
int w_getCanvas(lua_State *L)
|
||||||
{
|
{
|
||||||
Canvas *canvas = Canvas::current;
|
Canvas *canvas = Canvas::current;
|
||||||
|
int n = 1;
|
||||||
|
|
||||||
if (canvas)
|
if (canvas)
|
||||||
{
|
{
|
||||||
canvas->retain();
|
canvas->retain();
|
||||||
luax_newtype(L, "Canvas", GRAPHICS_CANVAS_T, (void *) canvas);
|
luax_newtype(L, "Canvas", GRAPHICS_CANVAS_T, (void *) canvas);
|
||||||
|
|
||||||
|
const std::vector<Canvas *> &attachments = canvas->getAttachedCanvases();
|
||||||
|
for (size_t i = 0; i < attachments.size(); i++)
|
||||||
|
{
|
||||||
|
attachments[i]->retain();
|
||||||
|
luax_newtype(L, "Canvas", GRAPHICS_CANVAS_T, (void *) attachments[i]);
|
||||||
|
n++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
return 1;
|
|
||||||
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
int w_setShader(lua_State *L)
|
int w_setShader(lua_State *L)
|
||||||
@@ -1009,7 +1080,11 @@ int w_isSupported(lua_State *L)
|
|||||||
supported = false;
|
supported = false;
|
||||||
break;
|
break;
|
||||||
case Graphics::SUPPORT_HDR_CANVAS:
|
case Graphics::SUPPORT_HDR_CANVAS:
|
||||||
if (!Canvas::isHdrSupported())
|
if (!Canvas::isHDRSupported())
|
||||||
|
supported = false;
|
||||||
|
break;
|
||||||
|
case Graphics::SUPPORT_MULTI_CANVAS:
|
||||||
|
if (!Canvas::isMultiCanvasSupported())
|
||||||
supported = false;
|
supported = false;
|
||||||
break;
|
break;
|
||||||
case Graphics::SUPPORT_SHADER:
|
case Graphics::SUPPORT_SHADER:
|
||||||
@@ -1427,7 +1502,9 @@ static const luaL_Reg functions[] =
|
|||||||
{ "getMaxPointSize", w_getMaxPointSize },
|
{ "getMaxPointSize", w_getMaxPointSize },
|
||||||
{ "newScreenshot", w_newScreenshot },
|
{ "newScreenshot", w_newScreenshot },
|
||||||
{ "setCanvas", w_setCanvas },
|
{ "setCanvas", w_setCanvas },
|
||||||
|
{ "setCanvases", w_setCanvases },
|
||||||
{ "getCanvas", w_getCanvas },
|
{ "getCanvas", w_getCanvas },
|
||||||
|
{ "getCanvases", w_getCanvas },
|
||||||
|
|
||||||
{ "setShader", w_setShader },
|
{ "setShader", w_setShader },
|
||||||
{ "getShader", w_getShader },
|
{ "getShader", w_getShader },
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ int w_getPointStyle(lua_State *L);
|
|||||||
int w_getMaxPointSize(lua_State *L);
|
int w_getMaxPointSize(lua_State *L);
|
||||||
int w_newScreenshot(lua_State *L);
|
int w_newScreenshot(lua_State *L);
|
||||||
int w_setCanvas(lua_State *L);
|
int w_setCanvas(lua_State *L);
|
||||||
|
int w_setCanvases(lua_State *L);
|
||||||
int w_getCanvas(lua_State *L);
|
int w_getCanvas(lua_State *L);
|
||||||
int w_setShader(lua_State *L);
|
int w_setShader(lua_State *L);
|
||||||
int w_getShader(lua_State *L);
|
int w_getShader(lua_State *L);
|
||||||
|
|||||||
+54
-20
@@ -1295,7 +1295,8 @@ do
|
|||||||
#define number float
|
#define number float
|
||||||
#define Image sampler2D
|
#define Image sampler2D
|
||||||
#define extern uniform
|
#define extern uniform
|
||||||
#define Texel texture2D]]
|
#define Texel texture2D
|
||||||
|
#define love_Canvases gl_FragData]]
|
||||||
|
|
||||||
local GLSL_UNIFORMS = [[
|
local GLSL_UNIFORMS = [[
|
||||||
#define ModelViewMatrix gl_ModelViewMatrix
|
#define ModelViewMatrix gl_ModelViewMatrix
|
||||||
@@ -1332,10 +1333,17 @@ void main() {
|
|||||||
|
|
||||||
FOOTER = [[
|
FOOTER = [[
|
||||||
void main() {
|
void main() {
|
||||||
// fix weird crashing issue in OSX when _tex0_ is unused within effect()
|
// fix crashing issue in OSX when _tex0_ is unused within effect()
|
||||||
float dummy = texture2D(_tex0_, vec2(.5)).r;
|
float dummy = texture2D(_tex0_, vec2(.5)).r;
|
||||||
gl_FragColor = effect(VaryingColor, _tex0_, VaryingTexCoord.st, gl_FragCoord.xy);
|
gl_FragColor = effect(VaryingColor, _tex0_, VaryingTexCoord.st, gl_FragCoord.xy);
|
||||||
}]],
|
}]],
|
||||||
|
|
||||||
|
FOOTER_MULTI_CANVAS = [[
|
||||||
|
void main() {
|
||||||
|
// fix crashing issue in OSX when _tex0_ is unused within effect()
|
||||||
|
float dummy = texture2D(_tex0_, vec2(.5)).r;
|
||||||
|
effects(VaryingColor, _tex0_, VaryingTexCoord.st, gl_FragCoord.xy);
|
||||||
|
}]],
|
||||||
}
|
}
|
||||||
|
|
||||||
local function createVertexCode(vertexcode)
|
local function createVertexCode(vertexcode)
|
||||||
@@ -1349,36 +1357,62 @@ void main() {
|
|||||||
return table_concat(vertexcodes, "\n")
|
return table_concat(vertexcodes, "\n")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function createPixelCode(pixelcode)
|
local function createPixelCode(pixelcode, is_multicanvas)
|
||||||
local pixelcodes = {
|
local pixelcodes = {
|
||||||
GLSL_VERSION,
|
GLSL_VERSION,
|
||||||
GLSL_SYNTAX, GLSL_PIXEL.HEADER, GLSL_UNIFORMS,
|
GLSL_SYNTAX, GLSL_PIXEL.HEADER, GLSL_UNIFORMS,
|
||||||
"#line 0",
|
"#line 0",
|
||||||
pixelcode,
|
pixelcode,
|
||||||
GLSL_PIXEL.FOOTER
|
is_multicanvas and GLSL_PIXEL.FOOTER_MULTI_CANVAS or GLSL_PIXEL.FOOTER,
|
||||||
}
|
}
|
||||||
return table_concat(pixelcodes, "\n")
|
return table_concat(pixelcodes, "\n")
|
||||||
end
|
end
|
||||||
|
|
||||||
function love.graphics._shaderCodeToGLSL(vertexcode, pixelcode)
|
local function isVertexCode(code)
|
||||||
if vertexcode then
|
return code:match("vec4%s*position%(") ~= nil
|
||||||
local s = vertexcode:gsub("\r\n\t", " ")
|
end
|
||||||
s = s:gsub("(%w+)(%s+)%(", "%1(")
|
|
||||||
if s:match("vec4%s*effect%(") then
|
local function isPixelCode(code)
|
||||||
pixelcode = vertexcode -- first argument contains pixel shader code
|
if code:match("vec4%s*effect%(") then
|
||||||
|
return true
|
||||||
|
elseif code:match("void%s*effects%(") then -- render to multiple canvases simultaniously
|
||||||
|
return true, true
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function love.graphics._shaderCodeToGLSL(arg1, arg2)
|
||||||
|
local vertexcode, pixelcode
|
||||||
|
local is_multicanvas = false -- whether pixel code has "effects" function instead of "effect"
|
||||||
|
|
||||||
|
if arg1 then
|
||||||
|
local s = arg1:gsub("\r\n\t", " ") -- convert whitespace to spaces for parsing
|
||||||
|
s = s:gsub("(%w+)(%s+)%(", "%1(") -- convert "func ()" to "func()"
|
||||||
|
|
||||||
|
if isVertexCode(s) then
|
||||||
|
vertexcode = arg1 -- first arg contains vertex shader code
|
||||||
end
|
end
|
||||||
if not s:match("vec4%s*position%(") then
|
|
||||||
vertexcode = nil -- first argument doesn't contain vertex shader code
|
local ispixel, isMultiCanvas = isPixelCode(s)
|
||||||
|
if ispixel then
|
||||||
|
pixelcode = arg1 -- first arg contains pixel shader code
|
||||||
|
is_multicanvas = isMultiCanvas
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if pixelcode then
|
|
||||||
local s = pixelcode:gsub("\r\n\t", " ")
|
if arg2 then
|
||||||
s = s:gsub("(%w+)(%s+)%(", "%1(")
|
local s = arg2:gsub("\r\n\t", " ") -- convert whitespace to spaces for parsing
|
||||||
if s:match("vec4%s*position%(") then
|
s = s:gsub("(%w+)(%s+)%(", "%1(") -- convert "func ()" to "func()"
|
||||||
vertexcode = pixelcode -- second argument contains vertex shader code
|
|
||||||
|
if isVertexCode(s) then
|
||||||
|
vertexcode = arg2 -- second arg contains vertex shader code
|
||||||
end
|
end
|
||||||
if not s:match("vec4%s*effect%(") then
|
|
||||||
pixelcode = nil -- second argument doesn't contain pixel shader code
|
local ispixel, isMultiCanvas = isPixelCode(s)
|
||||||
|
if ispixel then
|
||||||
|
pixelcode = arg2 -- second arg contains pixel shader code
|
||||||
|
is_multicanvas = isMultiCanvas
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1386,7 +1420,7 @@ void main() {
|
|||||||
vertexcode = createVertexCode(vertexcode)
|
vertexcode = createVertexCode(vertexcode)
|
||||||
end
|
end
|
||||||
if pixelcode then
|
if pixelcode then
|
||||||
pixelcode = createPixelCode(pixelcode)
|
pixelcode = createPixelCode(pixelcode, is_multicanvas)
|
||||||
end
|
end
|
||||||
|
|
||||||
return vertexcode, pixelcode
|
return vertexcode, pixelcode
|
||||||
|
|||||||
+115
-54
@@ -6276,7 +6276,9 @@ const unsigned char graphics_lua[] =
|
|||||||
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x20, 0x75, 0x6e, 0x69,
|
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x20, 0x75, 0x6e, 0x69,
|
||||||
0x66, 0x6f, 0x72, 0x6d, 0x0a,
|
0x66, 0x6f, 0x72, 0x6d, 0x0a,
|
||||||
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x20, 0x74, 0x65, 0x78, 0x74,
|
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x20, 0x74, 0x65, 0x78, 0x74,
|
||||||
0x75, 0x72, 0x65, 0x32, 0x44, 0x5d, 0x5d, 0x0a,
|
0x75, 0x72, 0x65, 0x32, 0x44, 0x0a,
|
||||||
|
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x43, 0x61, 0x6e, 0x76, 0x61,
|
||||||
|
0x73, 0x65, 0x73, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5d, 0x5d, 0x0a,
|
||||||
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x55, 0x4e, 0x49, 0x46, 0x4f, 0x52,
|
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x55, 0x4e, 0x49, 0x46, 0x4f, 0x52,
|
||||||
0x4d, 0x53, 0x20, 0x3d, 0x20, 0x5b, 0x5b, 0x0a,
|
0x4d, 0x53, 0x20, 0x3d, 0x20, 0x5b, 0x5b, 0x0a,
|
||||||
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x4d,
|
0x23, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x4d,
|
||||||
@@ -6333,11 +6335,10 @@ const unsigned char graphics_lua[] =
|
|||||||
0x6f, 0x72, 0x20, 0x67, 0x6c, 0x5f, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5d, 0x5d, 0x2c, 0x0a,
|
0x6f, 0x72, 0x20, 0x67, 0x6c, 0x5f, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x5d, 0x5d, 0x2c, 0x0a,
|
||||||
0x09, 0x09, 0x46, 0x4f, 0x4f, 0x54, 0x45, 0x52, 0x20, 0x3d, 0x20, 0x5b, 0x5b, 0x0a,
|
0x09, 0x09, 0x46, 0x4f, 0x4f, 0x54, 0x45, 0x52, 0x20, 0x3d, 0x20, 0x5b, 0x5b, 0x0a,
|
||||||
0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a,
|
0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a,
|
||||||
0x09, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x78, 0x20, 0x77, 0x65, 0x69, 0x72, 0x64, 0x20, 0x63, 0x72, 0x61, 0x73,
|
0x09, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x78, 0x20, 0x63, 0x72, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x69,
|
||||||
0x68, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x73, 0x73, 0x75, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x4f, 0x53, 0x58, 0x20,
|
0x73, 0x73, 0x75, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x4f, 0x53, 0x58, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x5f,
|
||||||
0x77, 0x68, 0x65, 0x6e, 0x20, 0x5f, 0x74, 0x65, 0x78, 0x30, 0x5f, 0x20, 0x69, 0x73, 0x20, 0x75, 0x6e, 0x75,
|
0x74, 0x65, 0x78, 0x30, 0x5f, 0x20, 0x69, 0x73, 0x20, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x20, 0x77, 0x69,
|
||||||
0x73, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x28,
|
0x74, 0x68, 0x69, 0x6e, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x28, 0x29, 0x0a,
|
||||||
0x29, 0x0a,
|
|
||||||
0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x64, 0x75, 0x6d, 0x6d, 0x79, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78,
|
0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x64, 0x75, 0x6d, 0x6d, 0x79, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78,
|
||||||
0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x28, 0x5f, 0x74, 0x65, 0x78, 0x30, 0x5f, 0x2c, 0x20, 0x76, 0x65, 0x63,
|
0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x28, 0x5f, 0x74, 0x65, 0x78, 0x30, 0x5f, 0x2c, 0x20, 0x76, 0x65, 0x63,
|
||||||
0x32, 0x28, 0x2e, 0x35, 0x29, 0x29, 0x2e, 0x72, 0x3b, 0x0a,
|
0x32, 0x28, 0x2e, 0x35, 0x29, 0x29, 0x2e, 0x72, 0x3b, 0x0a,
|
||||||
@@ -6347,6 +6348,21 @@ const unsigned char graphics_lua[] =
|
|||||||
0x78, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x2e, 0x73, 0x74, 0x2c, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67,
|
0x78, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x2e, 0x73, 0x74, 0x2c, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67,
|
||||||
0x43, 0x6f, 0x6f, 0x72, 0x64, 0x2e, 0x78, 0x79, 0x29, 0x3b, 0x0a,
|
0x43, 0x6f, 0x6f, 0x72, 0x64, 0x2e, 0x78, 0x79, 0x29, 0x3b, 0x0a,
|
||||||
0x7d, 0x5d, 0x5d, 0x2c, 0x0a,
|
0x7d, 0x5d, 0x5d, 0x2c, 0x0a,
|
||||||
|
0x09, 0x09, 0x46, 0x4f, 0x4f, 0x54, 0x45, 0x52, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x43, 0x41, 0x4e,
|
||||||
|
0x56, 0x41, 0x53, 0x20, 0x3d, 0x20, 0x5b, 0x5b, 0x0a,
|
||||||
|
0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x0a,
|
||||||
|
0x09, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x78, 0x20, 0x63, 0x72, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x69,
|
||||||
|
0x73, 0x73, 0x75, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x4f, 0x53, 0x58, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x5f,
|
||||||
|
0x74, 0x65, 0x78, 0x30, 0x5f, 0x20, 0x69, 0x73, 0x20, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x20, 0x77, 0x69,
|
||||||
|
0x74, 0x68, 0x69, 0x6e, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x28, 0x29, 0x0a,
|
||||||
|
0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x64, 0x75, 0x6d, 0x6d, 0x79, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78,
|
||||||
|
0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x28, 0x5f, 0x74, 0x65, 0x78, 0x30, 0x5f, 0x2c, 0x20, 0x76, 0x65, 0x63,
|
||||||
|
0x32, 0x28, 0x2e, 0x35, 0x29, 0x29, 0x2e, 0x72, 0x3b, 0x0a,
|
||||||
|
0x09, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x73, 0x28, 0x56, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x43, 0x6f,
|
||||||
|
0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x5f, 0x74, 0x65, 0x78, 0x30, 0x5f, 0x2c, 0x20, 0x56, 0x61, 0x72, 0x79, 0x69,
|
||||||
|
0x6e, 0x67, 0x54, 0x65, 0x78, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x2e, 0x73, 0x74, 0x2c, 0x20, 0x67, 0x6c, 0x5f,
|
||||||
|
0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x2e, 0x78, 0x79, 0x29, 0x3b, 0x0a,
|
||||||
|
0x7d, 0x5d, 0x5d, 0x2c, 0x0a,
|
||||||
0x09, 0x7d, 0x0a,
|
0x09, 0x7d, 0x0a,
|
||||||
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x72,
|
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x72,
|
||||||
0x65, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x76, 0x65, 0x72,
|
0x65, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x76, 0x65, 0x72,
|
||||||
@@ -6368,7 +6384,8 @@ const unsigned char graphics_lua[] =
|
|||||||
0x09, 0x65, 0x6e, 0x64, 0x0a,
|
0x09, 0x65, 0x6e, 0x64, 0x0a,
|
||||||
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x72,
|
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x72,
|
||||||
0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x70, 0x69, 0x78, 0x65,
|
0x65, 0x61, 0x74, 0x65, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x70, 0x69, 0x78, 0x65,
|
||||||
0x6c, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
|
0x6c, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x6e,
|
||||||
|
0x76, 0x61, 0x73, 0x29, 0x0a,
|
||||||
0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x73,
|
0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x73,
|
||||||
0x20, 0x3d, 0x20, 0x7b, 0x0a,
|
0x20, 0x3d, 0x20, 0x7b, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x2c, 0x0a,
|
0x09, 0x09, 0x09, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x2c, 0x0a,
|
||||||
@@ -6377,65 +6394,108 @@ const unsigned char graphics_lua[] =
|
|||||||
0x4c, 0x53, 0x4c, 0x5f, 0x55, 0x4e, 0x49, 0x46, 0x4f, 0x52, 0x4d, 0x53, 0x2c, 0x0a,
|
0x4c, 0x53, 0x4c, 0x5f, 0x55, 0x4e, 0x49, 0x46, 0x4f, 0x52, 0x4d, 0x53, 0x2c, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x22, 0x23, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x30, 0x22, 0x2c, 0x0a,
|
0x09, 0x09, 0x09, 0x22, 0x23, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x30, 0x22, 0x2c, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x0a,
|
0x09, 0x09, 0x09, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x50, 0x49, 0x58, 0x45, 0x4c, 0x2e, 0x46, 0x4f, 0x4f, 0x54,
|
0x09, 0x09, 0x09, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x20,
|
||||||
0x45, 0x52, 0x0a,
|
0x61, 0x6e, 0x64, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x50, 0x49, 0x58, 0x45, 0x4c, 0x2e, 0x46, 0x4f, 0x4f,
|
||||||
|
0x54, 0x45, 0x52, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x43, 0x41, 0x4e, 0x56, 0x41, 0x53, 0x20, 0x6f,
|
||||||
|
0x72, 0x20, 0x47, 0x4c, 0x53, 0x4c, 0x5f, 0x50, 0x49, 0x58, 0x45, 0x4c, 0x2e, 0x46, 0x4f, 0x4f, 0x54, 0x45,
|
||||||
|
0x52, 0x2c, 0x0a,
|
||||||
0x09, 0x09, 0x7d, 0x0a,
|
0x09, 0x09, 0x7d, 0x0a,
|
||||||
0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e,
|
0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e,
|
||||||
0x63, 0x61, 0x74, 0x28, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2c, 0x20, 0x22, 0x5c,
|
0x63, 0x61, 0x74, 0x28, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2c, 0x20, 0x22, 0x5c,
|
||||||
0x6e, 0x22, 0x29, 0x0a,
|
0x6e, 0x22, 0x29, 0x0a,
|
||||||
0x09, 0x65, 0x6e, 0x64, 0x0a,
|
0x09, 0x65, 0x6e, 0x64, 0x0a,
|
||||||
|
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73,
|
||||||
|
0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
|
||||||
|
0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x3a, 0x6d, 0x61, 0x74, 0x63,
|
||||||
|
0x68, 0x28, 0x22, 0x76, 0x65, 0x63, 0x34, 0x25, 0x73, 0x2a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
|
0x25, 0x28, 0x22, 0x29, 0x20, 0x7e, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x0a,
|
||||||
|
0x09, 0x65, 0x6e, 0x64, 0x0a,
|
||||||
|
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73,
|
||||||
|
0x50, 0x69, 0x78, 0x65, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
|
||||||
|
0x09, 0x09, 0x69, 0x66, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x3a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x22, 0x76,
|
||||||
|
0x65, 0x63, 0x34, 0x25, 0x73, 0x2a, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x25, 0x28, 0x22, 0x29, 0x20, 0x74,
|
||||||
|
0x68, 0x65, 0x6e, 0x0a,
|
||||||
|
0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x72, 0x75, 0x65, 0x0a,
|
||||||
|
0x09, 0x09, 0x65, 0x6c, 0x73, 0x65, 0x69, 0x66, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x3a, 0x6d, 0x61, 0x74, 0x63,
|
||||||
|
0x68, 0x28, 0x22, 0x76, 0x6f, 0x69, 0x64, 0x25, 0x73, 0x2a, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x73, 0x25,
|
||||||
|
0x28, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x2d, 0x2d, 0x20, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72,
|
||||||
|
0x20, 0x74, 0x6f, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x76, 0x61,
|
||||||
|
0x73, 0x65, 0x73, 0x20, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x74, 0x61, 0x6e, 0x69, 0x6f, 0x75, 0x73, 0x6c, 0x79, 0x0a,
|
||||||
|
0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x20, 0x74, 0x72,
|
||||||
|
0x75, 0x65, 0x0a,
|
||||||
|
0x09, 0x09, 0x65, 0x6c, 0x73, 0x65, 0x0a,
|
||||||
|
0x09, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x0a,
|
||||||
|
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
||||||
|
0x09, 0x65, 0x6e, 0x64, 0x0a,
|
||||||
0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61,
|
0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61,
|
||||||
0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x54,
|
0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x54,
|
||||||
0x6f, 0x47, 0x4c, 0x53, 0x4c, 0x28, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20,
|
0x6f, 0x47, 0x4c, 0x53, 0x4c, 0x28, 0x61, 0x72, 0x67, 0x31, 0x2c, 0x20, 0x61, 0x72, 0x67, 0x32, 0x29, 0x0a,
|
||||||
0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
|
0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x64, 0x65,
|
||||||
0x09, 0x09, 0x69, 0x66, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68,
|
0x2c, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x0a,
|
||||||
0x65, 0x6e, 0x0a,
|
0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61,
|
||||||
0x09, 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65,
|
0x6e, 0x76, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x20, 0x2d, 0x2d, 0x20, 0x77, 0x68,
|
||||||
0x78, 0x63, 0x6f, 0x64, 0x65, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x5c, 0x74,
|
0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x68,
|
||||||
0x22, 0x2c, 0x20, 0x22, 0x20, 0x22, 0x29, 0x0a,
|
0x61, 0x73, 0x20, 0x22, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x73, 0x22, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
|
||||||
|
0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x22, 0x65, 0x66,
|
||||||
|
0x66, 0x65, 0x63, 0x74, 0x22, 0x0a,
|
||||||
|
0x09, 0x09, 0x0a,
|
||||||
|
0x09, 0x09, 0x69, 0x66, 0x20, 0x61, 0x72, 0x67, 0x31, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
|
||||||
|
0x09, 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x31, 0x3a,
|
||||||
|
0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x5c, 0x74, 0x22, 0x2c, 0x20, 0x22, 0x20, 0x22,
|
||||||
|
0x29, 0x20, 0x2d, 0x2d, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x20, 0x77, 0x68, 0x69, 0x74, 0x65,
|
||||||
|
0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x20, 0x66, 0x6f,
|
||||||
|
0x72, 0x20, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x28, 0x25, 0x77,
|
0x09, 0x09, 0x09, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x28, 0x25, 0x77,
|
||||||
0x2b, 0x29, 0x28, 0x25, 0x73, 0x2b, 0x29, 0x25, 0x28, 0x22, 0x2c, 0x20, 0x22, 0x25, 0x31, 0x28, 0x22, 0x29, 0x0a,
|
0x2b, 0x29, 0x28, 0x25, 0x73, 0x2b, 0x29, 0x25, 0x28, 0x22, 0x2c, 0x20, 0x22, 0x25, 0x31, 0x28, 0x22, 0x29,
|
||||||
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x73, 0x3a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x22, 0x76, 0x65, 0x63,
|
0x20, 0x2d, 0x2d, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x20, 0x22, 0x66, 0x75, 0x6e, 0x63, 0x20,
|
||||||
0x34, 0x25, 0x73, 0x2a, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x25, 0x28, 0x22, 0x29, 0x20, 0x74, 0x68, 0x65,
|
0x28, 0x29, 0x22, 0x20, 0x74, 0x6f, 0x20, 0x22, 0x66, 0x75, 0x6e, 0x63, 0x28, 0x29, 0x22, 0x0a,
|
||||||
0x6e, 0x0a,
|
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x69, 0x73, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x64, 0x65,
|
||||||
0x09, 0x09, 0x09, 0x09, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x76, 0x65,
|
0x28, 0x73, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
|
||||||
0x72, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x2d, 0x2d, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20,
|
0x09, 0x09, 0x09, 0x09, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x61,
|
||||||
0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20,
|
0x72, 0x67, 0x31, 0x20, 0x2d, 0x2d, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x61, 0x72, 0x67, 0x20, 0x63,
|
||||||
0x70, 0x69, 0x78, 0x65, 0x6c, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a,
|
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x73, 0x68, 0x61,
|
||||||
|
0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x3a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28,
|
0x09, 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x69, 0x73, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x2c, 0x20,
|
||||||
0x22, 0x76, 0x65, 0x63, 0x34, 0x25, 0x73, 0x2a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x25, 0x28,
|
0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x69, 0x73,
|
||||||
0x22, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
|
0x50, 0x69, 0x78, 0x65, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x73, 0x29, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x09, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x6e,
|
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x69, 0x73, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
|
||||||
0x69, 0x6c, 0x20, 0x2d, 0x2d, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65,
|
0x09, 0x09, 0x09, 0x09, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x61, 0x72,
|
||||||
0x6e, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
|
0x67, 0x31, 0x20, 0x2d, 0x2d, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x61, 0x72, 0x67, 0x20, 0x63, 0x6f,
|
||||||
0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x64,
|
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65,
|
||||||
0x65, 0x0a,
|
0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a,
|
||||||
|
0x09, 0x09, 0x09, 0x09, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73,
|
||||||
|
0x20, 0x3d, 0x20, 0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
||||||
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
||||||
0x09, 0x09, 0x69, 0x66, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65,
|
0x09, 0x09, 0x0a,
|
||||||
0x6e, 0x0a,
|
0x09, 0x09, 0x69, 0x66, 0x20, 0x61, 0x72, 0x67, 0x32, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x20, 0x3d, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c,
|
0x09, 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x20, 0x3d, 0x20, 0x61, 0x72, 0x67, 0x32, 0x3a,
|
||||||
0x63, 0x6f, 0x64, 0x65, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x5c, 0x74, 0x22,
|
0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x5c, 0x72, 0x5c, 0x6e, 0x5c, 0x74, 0x22, 0x2c, 0x20, 0x22, 0x20, 0x22,
|
||||||
0x2c, 0x20, 0x22, 0x20, 0x22, 0x29, 0x0a,
|
0x29, 0x20, 0x2d, 0x2d, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x20, 0x77, 0x68, 0x69, 0x74, 0x65,
|
||||||
|
0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x20, 0x66, 0x6f,
|
||||||
|
0x72, 0x20, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x28, 0x25, 0x77,
|
0x09, 0x09, 0x09, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x3a, 0x67, 0x73, 0x75, 0x62, 0x28, 0x22, 0x28, 0x25, 0x77,
|
||||||
0x2b, 0x29, 0x28, 0x25, 0x73, 0x2b, 0x29, 0x25, 0x28, 0x22, 0x2c, 0x20, 0x22, 0x25, 0x31, 0x28, 0x22, 0x29, 0x0a,
|
0x2b, 0x29, 0x28, 0x25, 0x73, 0x2b, 0x29, 0x25, 0x28, 0x22, 0x2c, 0x20, 0x22, 0x25, 0x31, 0x28, 0x22, 0x29,
|
||||||
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x73, 0x3a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x22, 0x76, 0x65, 0x63,
|
0x20, 0x2d, 0x2d, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x20, 0x22, 0x66, 0x75, 0x6e, 0x63, 0x20,
|
||||||
0x34, 0x25, 0x73, 0x2a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x25, 0x28, 0x22, 0x29, 0x20, 0x74,
|
0x28, 0x29, 0x22, 0x20, 0x74, 0x6f, 0x20, 0x22, 0x66, 0x75, 0x6e, 0x63, 0x28, 0x29, 0x22, 0x0a,
|
||||||
0x68, 0x65, 0x6e, 0x0a,
|
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x69, 0x73, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x64, 0x65,
|
||||||
0x09, 0x09, 0x09, 0x09, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x70,
|
0x28, 0x73, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
|
||||||
0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64,
|
0x09, 0x09, 0x09, 0x09, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x61,
|
||||||
0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73,
|
0x72, 0x67, 0x32, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x61, 0x72, 0x67, 0x20,
|
||||||
0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x64,
|
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x73, 0x68,
|
||||||
0x65, 0x0a,
|
0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x3a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28,
|
0x09, 0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x69, 0x73, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x2c, 0x20,
|
||||||
0x22, 0x76, 0x65, 0x63, 0x34, 0x25, 0x73, 0x2a, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x25, 0x28, 0x22, 0x29,
|
0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x69, 0x73,
|
||||||
0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
|
0x50, 0x69, 0x78, 0x65, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x73, 0x29, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x09, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x6e, 0x69,
|
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x69, 0x73, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
|
||||||
0x6c, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65,
|
0x09, 0x09, 0x09, 0x09, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x61, 0x72,
|
||||||
0x6e, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
|
0x67, 0x32, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x61, 0x72, 0x67, 0x20, 0x63,
|
||||||
0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x20, 0x73, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a,
|
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x20, 0x73, 0x68, 0x61, 0x64,
|
||||||
|
0x65, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a,
|
||||||
|
0x09, 0x09, 0x09, 0x09, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73,
|
||||||
|
0x20, 0x3d, 0x20, 0x69, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
0x09, 0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
||||||
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
||||||
0x09, 0x09, 0x69, 0x66, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68,
|
0x09, 0x09, 0x69, 0x66, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68,
|
||||||
@@ -6448,7 +6508,8 @@ const unsigned char graphics_lua[] =
|
|||||||
0x6e, 0x0a,
|
0x6e, 0x0a,
|
||||||
0x09, 0x09, 0x09, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x63, 0x72, 0x65,
|
0x09, 0x09, 0x09, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x3d, 0x20, 0x63, 0x72, 0x65,
|
||||||
0x61, 0x74, 0x65, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x70, 0x69, 0x78, 0x65, 0x6c,
|
0x61, 0x74, 0x65, 0x50, 0x69, 0x78, 0x65, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x28, 0x70, 0x69, 0x78, 0x65, 0x6c,
|
||||||
0x63, 0x6f, 0x64, 0x65, 0x29, 0x0a,
|
0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x69, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x6e, 0x76,
|
||||||
|
0x61, 0x73, 0x29, 0x0a,
|
||||||
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
||||||
0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x64,
|
0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x64,
|
||||||
0x65, 0x2c, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x0a,
|
0x65, 0x2c, 0x20, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x63, 0x6f, 0x64, 0x65, 0x0a,
|
||||||
|
|||||||
Reference in New Issue
Block a user