Changeset 658


Ignore:
Timestamp:
Feb 17, 2011, 7:06:33 PM (11 years ago)
Author:
sam
Message:

Get rid of the SHADER_CRAP macro and use LOL_EXPERIMENTAL instead,
together with the --enable-experimental flag. Use LOL_DEBUG and
LOL_RELEASE instead of the previous values.

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r644 r658  
    4444AC_ARG_ENABLE(release,
    4545  [  --enable-release        build final release of the game (default no)])
     46AC_ARG_ENABLE(experimental,
     47  [  --enable-experimental   experimental build (default no)])
    4648
    4749AC_ARG_ENABLE(cppunit,
     
    5153
    5254if test "${enable_debug}" = "yes"; then
    53   AC_DEFINE(_DEBUG, 1, Define to 1 to activate debug)
     55  AC_DEFINE(LOL_DEBUG, 1, Define to 1 to activate debug)
    5456  OPT="-O0"
    5557else
     
    5860
    5961if test "${enable_release}" = "yes"; then
    60   AC_DEFINE(FINAL_RELEASE, 1, Define to 1 to activate final release)
     62  AC_DEFINE(LOL_RELEASE, 1, Define to 1 to activate final release)
    6163  REL=""
    6264else
    6365  REL="-g"
     66fi
     67
     68if test "${enable_experimental}" = "yes"; then
     69  AC_DEFINE(LOL_EXPERIMENTAL, 1, Define to 1 to activate experimental build)
    6470fi
    6571
  • trunk/src/core.h

    r653 r658  
    1616#if !defined __DH_CORE_H__
    1717#define __DH_CORE_H__
    18 
    19 // Temporary stuff
    20 //#define SHADER_CRAP 1
    2118
    2219// Base types
  • trunk/src/dict.cpp

    r420 r658  
    4242    ~DictData()
    4343    {
    44 #if !FINAL_RELEASE
     44#if !LOL_RELEASE
    4545        if (nentities)
    4646            fprintf(stderr, "ERROR: still %i entities in dict\n", nentities);
  • trunk/src/entity.cpp

    r221 r658  
    2828    destroy(0)
    2929{
    30 #if !FINAL_RELEASE
     30#if !LOL_RELEASE
    3131    state = STATE_IDLE;
    3232#endif
     
    3838Entity::~Entity()
    3939{
    40 #if !FINAL_RELEASE
     40#if !LOL_RELEASE
    4141    if (!destroy)
    4242        fprintf(stderr, "ERROR: entity destructor called directly\n");
     
    5151void Entity::TickGame(float deltams)
    5252{
    53 #if !FINAL_RELEASE
     53#if !LOL_RELEASE
    5454    if (state != STATE_PRETICK_GAME)
    5555        fprintf(stderr, "ERROR: invalid entity game tick\n");
     
    6060void Entity::TickDraw(float deltams)
    6161{
    62 #if !FINAL_RELEASE
     62#if !LOL_RELEASE
    6363    if (state != STATE_PRETICK_DRAW)
    6464        fprintf(stderr, "ERROR: invalid entity draw tick\n");
  • trunk/src/entity.h

    r328 r658  
    6363    static int const ALLGROUP_END = DRAWGROUP_END;
    6464
    65 #if !FINAL_RELEASE
     65#if !LOL_RELEASE
    6666    enum
    6767    {
  • trunk/src/sample.cpp

    r419 r658  
    4848    if (!data->chunk)
    4949    {
    50 #if !FINAL_RELEASE
     50#if !LOL_RELEASE
    5151        fprintf(stderr, "ERROR: could not load %s\n", path);
    5252#endif
  • trunk/src/scene.cpp

    r657 r658  
    3636};
    3737
    38 #if SHADER_CRAP
     38#if LOL_EXPERIMENTAL
    3939extern GLuint prog;
    4040#endif
     
    135135    qsort(data->tiles, data->ntiles, sizeof(Tile), SceneData::Compare);
    136136
    137 #if SHADER_CRAP
     137#if LOL_EXPERIMENTAL
    138138    float *vertices = new float[18];
    139139    vertices[0] = -0.5f; vertices[1] = 0.5f; vertices[2] = 0.0f;
  • trunk/src/ticker.cpp

    r639 r658  
    4040    ~TickerData()
    4141    {
    42 #if !FINAL_RELEASE
     42#if !LOL_RELEASE
    4343        if (nentities)
    4444            fprintf(stderr, "ERROR: still %i entities in ticker\n", nentities);
     
    9595void Ticker::Ref(Entity *entity)
    9696{
    97 #if !FINAL_RELEASE
     97#if !LOL_RELEASE
    9898    if (!entity)
    9999    {
     
    126126int Ticker::Unref(Entity *entity)
    127127{
    128 #if !FINAL_RELEASE
     128#if !LOL_RELEASE
    129129    if (!entity)
    130130    {
     
    193193            if (e->ref)
    194194            {
    195 #if !FINAL_RELEASE
     195#if !LOL_RELEASE
    196196                fprintf(stderr, "ERROR: poking %s\n", e->GetName());
    197197#endif
     
    200200            }
    201201
    202 #if !FINAL_RELEASE
     202#if !LOL_RELEASE
    203203        if (n)
    204204            fprintf(stderr, "ERROR: %i entities stuck after %i frames, "
     
    261261            if (!e->destroy)
    262262            {
    263 #if !FINAL_RELEASE
     263#if !LOL_RELEASE
    264264                if (e->state != Entity::STATE_IDLE)
    265265                    fprintf(stderr, "ERROR: entity not idle for game tick\n");
     
    267267#endif
    268268                e->TickGame(data->deltams);
    269 #if !FINAL_RELEASE
     269#if !LOL_RELEASE
    270270                if (e->state != Entity::STATE_POSTTICK_GAME)
    271271                    fprintf(stderr, "ERROR: entity missed super game tick\n");
     
    302302            if (!e->destroy)
    303303            {
    304 #if !FINAL_RELEASE
     304#if !LOL_RELEASE
    305305                if (e->state != Entity::STATE_IDLE)
    306306                    fprintf(stderr, "ERROR: entity not idle for draw tick\n");
     
    308308#endif
    309309                e->TickDraw(data->deltams);
    310 #if !FINAL_RELEASE
     310#if !LOL_RELEASE
    311311                if (e->state != Entity::STATE_POSTTICK_DRAW)
    312312                    fprintf(stderr, "ERROR: entity missed super draw tick\n");
  • trunk/src/tiler.cpp

    r645 r658  
    2727public:
    2828    TilerData()
    29 #if !FINAL_RELEASE
     29#if !LOL_RELEASE
    3030      : lasterror(-1)
    3131#endif
     
    3434private:
    3535    Dict tilesets;
    36 #if !FINAL_RELEASE
     36#if !LOL_RELEASE
    3737    int lasterror;
    3838#endif
     
    5454        TileSet *tileset = new TileSet(path, size, count, dilate);
    5555        data->tilesets.SetEntity(id, tileset);
    56 #if !FINAL_RELEASE
     56#if !LOL_RELEASE
    5757        if (id == data->lasterror)
    5858            data->lasterror = -1;
     
    7171{
    7272    TileSet *tileset = (TileSet *)data->tilesets.GetEntity(id - 1);
    73 #if !FINAL_RELEASE
     73#if !LOL_RELEASE
    7474    if (!tileset)
    7575    {
     
    8484{
    8585    TileSet *tileset = (TileSet *)data->tilesets.GetEntity(id - 1);
    86 #if !FINAL_RELEASE
     86#if !LOL_RELEASE
    8787    if (!tileset)
    8888    {
     
    9999
    100100    TileSet *tileset = (TileSet *)data->tilesets.GetEntity(id);
    101 #if !FINAL_RELEASE
     101#if !LOL_RELEASE
    102102    if (!tileset)
    103103    {
     
    117117
    118118    TileSet *tileset = (TileSet *)data->tilesets.GetEntity(id);
    119 #if !FINAL_RELEASE
     119#if !LOL_RELEASE
    120120    if (!tileset)
    121121    {
  • trunk/src/tileset.cpp

    r645 r658  
    7171    if (!data->img)
    7272    {
    73 #if !FINAL_RELEASE
     73#if !LOL_RELEASE
    7474        fprintf(stderr, "ERROR: could not load %s\n", path);
    7575#endif
  • trunk/src/video.cpp

    r657 r658  
    2929#include "core.h"
    3030
    31 #if SHADER_CRAP
     31#if LOL_EXPERIMENTAL
    3232    GLuint prog, sh1, sh2;
    3333    GLint uni_m1, uni_m2, uni_m3;
     
    3636#endif
    3737
    38 #if SHADER_CRAP
     38#if LOL_EXPERIMENTAL
    3939static char const *vertexshader =
    4040    "#version 130\n"
     
    8686    glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
    8787
    88 #if SHADER_CRAP
     88#if LOL_EXPERIMENTAL
    8989    sh1 = glCreateShader(GL_VERTEX_SHADER);
    9090    glShaderSource(sh1, 1, &vertexshader, NULL);
     
    123123void Video::SetFov(float theta)
    124124{
    125 #if SHADER_CRAP
     125#if LOL_EXPERIMENTAL
    126126    float width = GetWidth();
    127127    float height = GetHeight();
     
    186186void Video::Clear()
    187187{
    188 #if SHADER_CRAP
     188#if LOL_EXPERIMENTAL
    189189    glViewport(0, 0, GetWidth(), GetHeight());
    190190    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
     
    214214#endif
    215215
    216 #if SHADER_CRAP
     216#if LOL_EXPERIMENTAL
    217217    static float time;
    218218    time += 0.01f;
     
    225225void Video::Destroy()
    226226{
    227 #if SHADER_CRAP
     227#if LOL_EXPERIMENTAL
    228228    glDetachShader(prog, sh1);
    229229    glDetachShader(prog, sh2);
  • trunk/win32/deushax.vcxproj

    r648 r658  
    122122      <WarningLevel>Level3</WarningLevel>
    123123      <Optimization>Disabled</Optimization>
    124       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     124      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;LOL_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    125125      <AdditionalIncludeDirectories>$(SolutionDir)\..\src;$(SdlIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    126126    </ClCompile>
  • trunk/win32/editor.vcxproj

    r648 r658  
    122122      <WarningLevel>Level3</WarningLevel>
    123123      <Optimization>Disabled</Optimization>
    124       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     124      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;LOL_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    125125      <AdditionalIncludeDirectories>$(SolutionDir)\..\src;$(SolutionDir)\..\deushax;$(SdlIncludes);$(GtkIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    126126    </ClCompile>
  • trunk/win32/monsterz.vcxproj

    r648 r658  
    131131      <WarningLevel>Level3</WarningLevel>
    132132      <Optimization>Disabled</Optimization>
    133       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     133      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;LOL_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    134134      <AdditionalIncludeDirectories>$(SolutionDir)\..\src;$(SdlIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    135135    </ClCompile>
Note: See TracChangeset for help on using the changeset viewer.