Skip to content

Commit

Permalink
Fixed|Cygwin|GCC: Various build errors
Browse files Browse the repository at this point in the history
Use DE_WINDOWS instead of WIN32.
Also fixed declaration of gl_FragCoord in the light_sources shader.
  • Loading branch information
skyjake committed Feb 18, 2020
1 parent d31fd85 commit a1a44bf
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 14 deletions.
2 changes: 1 addition & 1 deletion doomsday/apps/api/api_audiod.h
Expand Up @@ -49,7 +49,7 @@ typedef enum {
AUDIO_IMUSIC_OR_ICD // forAllInterfaces() special value
} audiointerfacetype_t;

#ifdef WIN32
#if defined(DE_WINDOWS)
# define VALID_AUDIODRIVER_IDENTIFIER(id) ((id) >= AUDIOD_DUMMY && (id) < AUDIODRIVER_COUNT)
#else
# define VALID_AUDIODRIVER_IDENTIFIER(id) ((id) >= AUDIOD_DUMMY && (id) <= AUDIOD_FLUIDSYNTH)
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/client/include/world/map.h
Expand Up @@ -22,7 +22,7 @@
#pragma once

#ifdef __SERVER__
# error Client's map.h included from Server app
# error "Client's map.h included from Server app"
#endif

#include "client/clplanemover.h"
Expand Down
4 changes: 2 additions & 2 deletions doomsday/apps/client/src/audio/base/audiosystem.cpp
Expand Up @@ -227,7 +227,7 @@ DE_PIMPL(AudioSystem)
if (cmdLine.has("-oal") || cmdLine.has("-openal"))
return AUDIOD_OPENAL;

#ifdef WIN32
#if defined(DE_WINDOWS)
if (cmdLine.has("-dsound"))
return AUDIOD_DSOUND;

Expand Down Expand Up @@ -277,7 +277,7 @@ DE_PIMPL(AudioSystem)
driver.load(idStr);
break;
#endif
#ifdef WIN32
#if defined(DE_WINDOWS)
case AUDIOD_DSOUND:
case AUDIOD_WINMM:
driver.load(idStr);
Expand Down
4 changes: 3 additions & 1 deletion doomsday/apps/client/src/clientapp.cpp
Expand Up @@ -589,7 +589,7 @@ ClientApp::ClientApp(const StringList &args)

// Script bindings.
{
d->binder.init(scriptSystem()["App"])
d->binder.init(scriptSystem()["App"])
<< DE_FUNC_NOARG (App_ConsolePlayer, "consolePlayer")
<< DE_FUNC_NOARG (App_GamePlugin, "gamePlugin")
<< DE_FUNC_NOARG (App_Quit, "quit");
Expand All @@ -609,6 +609,7 @@ ClientApp::ClientApp(const StringList &args)
#endif*/

// Show the splash image in a separate window.
#if 0
{
SDL_Surface *splashSurface = createSDLSurfaceFromImage(Image::fromXpmData(doomsdaySplashXpm));

Expand Down Expand Up @@ -645,6 +646,7 @@ ClientApp::ClientApp(const StringList &args)
SDL_RaiseWindow(d->splashWindow);
SDL_PumpEvents(); // allow it to appear immediately
}
#endif
}

void ClientApp::initialize()
Expand Down
3 changes: 2 additions & 1 deletion doomsday/apps/client/src/render/walledge.cpp
Expand Up @@ -32,6 +32,7 @@
#include <doomsday/world/sector.h>
#include <doomsday/world/lineowner.h>
#include <doomsday/mesh/face.h>
#include <doomsday/mesh/mesh.h>

using namespace de;

Expand Down Expand Up @@ -577,7 +578,7 @@ struct WallEdge::Impl : public IHPlane
if (!hedge->hasFace() || !hedge->hasMapElement())
break;

const auto &backSpace = hedge->face().mesh::Mesh::Element::mapElementAs<ConvexSubspace>();
const auto &backSpace = hedge->face().mapElementAs<ConvexSubspace>();
const auto &subsec = backSpace.subsector().as<Subsector>();

if (subsec.hasWorldVolume())
Expand Down
16 changes: 12 additions & 4 deletions doomsday/libs/doomsday/include/doomsday/tab_tables.h
Expand Up @@ -23,7 +23,15 @@
#include <de/legacy/types.h>
#include <de/legacy/fixedpoint.h>

LIBDOOMSDAY_PUBLIC DE_EXTERN_C fixed_t finesine[5 * FINEANGLES / 4];
LIBDOOMSDAY_PUBLIC DE_EXTERN_C fixed_t *finecosine;
LIBDOOMSDAY_PUBLIC DE_EXTERN_C int finetangent[4096];
LIBDOOMSDAY_PUBLIC DE_EXTERN_C angle_t tantoangle[SLOPERANGE + 1];
#if defined(__cplusplus)
extern "C" {
#endif

extern LIBDOOMSDAY_PUBLIC fixed_t finesine[5 * FINEANGLES / 4];
extern LIBDOOMSDAY_PUBLIC fixed_t *finecosine;
extern LIBDOOMSDAY_PUBLIC int finetangent[4096];
extern LIBDOOMSDAY_PUBLIC angle_t tantoangle[SLOPERANGE + 1];

#if defined(__cplusplus)
} // extern "C"
#endif
4 changes: 2 additions & 2 deletions doomsday/libs/doomsday/include/doomsday/world/mobj.h
Expand Up @@ -47,7 +47,7 @@ typedef struct mobj_s {
/**
* Returns the size of the game-defined mobj_t struct.
*/
LIBDOOMSDAY_PUBLIC DE_EXTERN_C size_t Mobj_Sizeof(void);
DE_EXTERN_C LIBDOOMSDAY_PUBLIC size_t Mobj_Sizeof(void);

#ifdef __cplusplus

Expand Down Expand Up @@ -142,6 +142,6 @@ LIBDOOMSDAY_PUBLIC world::Map &Mobj_Map(const mobj_t &mob);
*
* @param mobj Mobj instance.
*/
LIBDOOMSDAY_PUBLIC DE_EXTERN_C world_Sector *Mobj_Sector(const mobj_t *mobj);
DE_EXTERN_C LIBDOOMSDAY_PUBLIC world_Sector *Mobj_Sector(const mobj_t *mobj);

#endif // LIBDOOMSDAY_MOBJ_H
@@ -1,10 +1,10 @@
#ifndef GLOOM_GBUFFER_IN_H
#define GLOOM_GBUFFER_IN_H

#include "gbuffer.glsl"

layout (pixel_center_integer) in vec4 gl_FragCoord;

#include "gbuffer.glsl"

uniform sampler2D uGBufferDiffuse;
uniform sampler2D uGBufferEmissive;
uniform sampler2D uGBufferSpecGloss;
Expand Down

0 comments on commit a1a44bf

Please sign in to comment.