Changeset 2277 for trunk/src


Ignore:
Timestamp:
Jan 25, 2013, 4:48:37 PM (7 years ago)
Author:
sam
Message:

build: hide LolFx external declarations behind macros.

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core.h

    r2276 r2277  
    6161}
    6262#endif
     63
     64/* External declaration for LolFx files. */
     65#define LOLFX_RESOURCE_DECLARE(name) \
     66    extern "C" char const *LOLFX_RESOURCE_NAME(name)
     67#define LOLFX_RESOURCE_NAME(name) lolfx_resource_##name
    6368
    6469/* If using NaCl or Android, override main() with our version */
  • trunk/src/easymesh/easymesh.cpp

    r2232 r2277  
    3636#include "easymesh/easymesh-compiler.h"
    3737
    38 extern char const *lolfx_shiny;
     38LOLFX_RESOURCE_DECLARE(shiny);
    3939
    4040namespace lol
     
    6767    if(provided_shader == NULL)
    6868    {
    69         m_gpu.shader = Shader::Create(lolfx_shiny);
     69        m_gpu.shader = Shader::Create(LOLFX_RESOURCE_NAME(shiny));
    7070    }
    7171    else
  • trunk/src/gradient.cpp

    r2216 r2277  
    1818using namespace std;
    1919
    20 extern char const *lolfx_gradient;
     20LOLFX_RESOURCE_DECLARE(gradient);
    2121
    2222namespace lol
     
    7777    if (!data->shader)
    7878    {
    79         data->shader = Shader::Create(lolfx_gradient);
     79        data->shader = Shader::Create(LOLFX_RESOURCE_NAME(gradient));
    8080
    8181        data->m_vbo = new VertexBuffer(sizeof(vertex));
  • trunk/src/scene.cpp

    r2216 r2277  
    2323#include "lolgl.h"
    2424
    25 extern char const *lolfx_tile;
     25LOLFX_RESOURCE_DECLARE(tile);
    2626
    2727namespace lol
     
    157157
    158158    if (!data->m_shader)
    159         data->m_shader = Shader::Create(lolfx_tile);
     159        data->m_shader = Shader::Create(LOLFX_RESOURCE_NAME(tile));
    160160
    161161#if 0
Note: See TracChangeset for help on using the changeset viewer.