Skip to content

Commit

Permalink
Fixed BUG #1515883: issue with fog not working on NIX. Symbol useFog …
Browse files Browse the repository at this point in the history
…was defined by both engine and renderers, after injection they ended up sharing addresses so things went a bit screwy. Renamed all other "shared" symbols in similar manner.
  • Loading branch information
danij committed Aug 5, 2006
1 parent e4ee7fc commit 26a7b70
Show file tree
Hide file tree
Showing 40 changed files with 811 additions and 810 deletions.
10 changes: 5 additions & 5 deletions doomsday/CMakeLists.txt
Expand Up @@ -9,11 +9,11 @@ SET (BUILDSCRIPTSDATE "$LastChangedDate$")
######################## Additional Win32 Path Setup ##########################
IF (WIN32)
## Cmake NEEDS UNIX style paths ie / not \
SET(ENV{SDLDIR} "C:/SDK/SDL")
SET(ENV{OPENALDIR} "C:/SDK/OPENAL")
SET(ENV{ZLIBDIR} "C:/SDK/ZLIB")
SET(ENV{LIBPNGDIR} "C:/SDK/LIBPNG")
SET(ENV{DIRECTXDIR} "C:/SDK/DX9SDK")
SET(ENV{SDLDIR} "H:/sdk/SDL-1.2.8")
SET(ENV{OPENALDIR} "H:/sdk/OpenAL 1.1 SDK")
SET(ENV{ZLIBDIR} "H:/sdk/zlib")
SET(ENV{LIBPNGDIR} "H:/sdk/libpng")
SET(ENV{DIRECTXDIR} "H:/sdk/dx8")
ENDIF (WIN32)
################################################################################
######################## Configure Build Options ##############################
Expand Down
4 changes: 2 additions & 2 deletions doomsday/engine/portable/include/gl_main.h
Expand Up @@ -61,11 +61,11 @@ const char* GL_ChooseVariableFont(glfontstyle_t style);
// deallocated by the caller.
unsigned char *GL_GrabScreen(void);

extern int screenWidth, screenHeight, screenBits;
extern int glScreenWidth, glScreenHeight, glScreenbits;
extern int numTexUnits;
extern boolean envModAdd;
extern int defResX, defResY;
extern float nearClip, farClip;
extern float nearClip, glFarClip;
extern int viewph, viewpw, viewpx, viewpy;
extern int r_framecounter;
extern char hiTexPath[], hiTexPath2[];
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/include/p_object.h
Expand Up @@ -39,7 +39,7 @@ DD_BASE_MOBJ_ELEMENTS()} mobj_t;

#define DEFAULT_FRICTION 0xe800

extern int tmfloorz, tmceilingz;
extern int tmpFloorZ, tmpCeilingZ;
extern mobj_t *blockingMobj;
extern boolean dontHitMobjs;

Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/include/rend_list.h
Expand Up @@ -25,7 +25,7 @@
#include "r_data.h"

// Multiplicative blending for dynamic lights?
#define IS_MUL (!dlBlend && !useFog)
#define IS_MUL (!dlBlend && !usingFog)

// PrepareFlat directions.
#define RLPF_NORMAL 0
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/include/rend_main.h
Expand Up @@ -38,7 +38,7 @@ extern float vx, vy, vz, vang, vpitch, fieldOfView, yfov;
extern byte smoothTexAnim;
extern float viewsidex, viewsidey;
extern int missileBlend, litSprites;
extern boolean useFog;
extern boolean usingFog;
extern byte fogColor[4];
extern int r_ambient;

Expand Down
242 changes: 121 additions & 121 deletions doomsday/engine/portable/include/ui_main.h
Expand Up @@ -24,157 +24,157 @@

#include "con_decl.h"

enum // Colors.
enum // Colors.
{
UIC_TEXT,
UIC_TITLE,
UIC_SHADOW,
UIC_BG_LIGHT,
UIC_BG_MEDIUM,
UIC_BG_DARK,
UIC_BRD_HI,
UIC_BRD_MED,
UIC_BRD_LOW,
UIC_HELP,
NUM_UI_COLORS
UIC_TEXT,
UIC_TITLE,
UIC_SHADOW,
UIC_BG_LIGHT,
UIC_BG_MEDIUM,
UIC_BG_DARK,
UIC_BRD_HI,
UIC_BRD_MED,
UIC_BRD_LOW,
UIC_HELP,
NUM_UI_COLORS
};

#define UI_COL(x) (ui_colors + (x))
#define IS_ACTKEY(x) (x == ' ' || x == DDKEY_ENTER)
#define UI_COL(x) (ui_colors + (x))
#define IS_ACTKEY(x) (x == ' ' || x == DDKEY_ENTER)

typedef enum {
UI_NONE,
UI_TEXT,
UI_BOX,
UI_FOCUSBOX, // Can receive focus.
UI_BUTTON,
UI_BUTTON2, // Staydown/2-state button.
UI_EDIT,
UI_LIST,
UI_SLIDER,
UI_META // Special: affects all objects up to the next meta.
UI_NONE,
UI_TEXT,
UI_BOX,
UI_FOCUSBOX, // Can receive focus.
UI_BUTTON,
UI_BUTTON2, // Staydown/2-state button.
UI_EDIT,
UI_LIST,
UI_SLIDER,
UI_META // Special: affects all objects up to the next meta.
} ui_obtype_e;

// Standard dimensions.
#define UI_BORDER (screenWidth/120) // All borders are this wide.
#define UI_SHADOW_OFFSET (MIN_OF(3, screenWidth/320))
#define UI_TITLE_HGT (ui_fonthgt + UI_BORDER)
#define UI_BORDER (glScreenWidth/120) // All borders are this wide.
#define UI_SHADOW_OFFSET (MIN_OF(3, glScreenWidth/320))
#define UI_TITLE_HGT (ui_fonthgt + UI_BORDER)
#define UI_BUTTON_BORDER (UI_BORDER)
#define UI_BAR_WDH (UI_BORDER * 3)
#define UI_BAR_BORDER (UI_BORDER / 2)
#define UI_BAR_WDH (UI_BORDER * 3)
#define UI_BAR_BORDER (UI_BORDER / 2)
#define UI_BAR_BUTTON_BORDER (3 * UI_BAR_BORDER / 2)
#define UI_MAX_COLUMNS 10 // Maximum columns for list box.
#define UI_MAX_COLUMNS 10 // Maximum columns for list box.

// Object flags.
#define UIF_HIDDEN 0x1
#define UIF_DISABLED 0x2 // Can't be interacted with.
#define UIF_PAUSED 0x4 // Ticker not called.
#define UIF_CLICKED 0x8
#define UIF_ACTIVE 0x10 // Object active.
#define UIF_FOCUS 0x20 // Has focus.
#define UIF_NO_FOCUS 0x40 // Can't receive focus.
#define UIF_DEFAULT 0x80 // Has focus by default.
#define UIF_LEFT_ALIGN 0x100
#define UIF_HIDDEN 0x1
#define UIF_DISABLED 0x2 // Can't be interacted with.
#define UIF_PAUSED 0x4 // Ticker not called.
#define UIF_CLICKED 0x8
#define UIF_ACTIVE 0x10 // Object active.
#define UIF_FOCUS 0x20 // Has focus.
#define UIF_NO_FOCUS 0x40 // Can't receive focus.
#define UIF_DEFAULT 0x80 // Has focus by default.
#define UIF_LEFT_ALIGN 0x100
#define UIF_FADE_AWAY 0x200 // Fade UI away while the control is active.
#define UIF_NEVER_FADE 0x400
#define UIF_ID0 0x10000000
#define UIF_ID1 0x20000000
#define UIF_ID2 0x40000000
#define UIF_ID3 0x80000000
#define UIF_ID0 0x10000000
#define UIF_ID1 0x20000000
#define UIF_ID2 0x40000000
#define UIF_ID3 0x80000000

// Special group: no group.
#define UIG_NONE -1
#define UIG_NONE -1

// Flag group modes (for UI_FlagGroup).
enum {
UIFG_CLEAR,
UIFG_SET,
UIFG_XOR
UIFG_CLEAR,
UIFG_SET,
UIFG_XOR
};

// Button arrows.
enum {
UIBA_NONE,
UIBA_UP,
UIBA_DOWN,
UIBA_LEFT,
UIBA_RIGHT
UIBA_NONE,
UIBA_UP,
UIBA_DOWN,
UIBA_LEFT,
UIBA_RIGHT
};

// Types.
typedef struct {
float red, green, blue;
float red, green, blue;
} ui_color_t;

typedef struct ui_object_s {
ui_obtype_e type; // Type of the object.
int group;
int flags;
int relx, rely, relw, relh; // Relative placement.
char text[256]; // Used in various ways.
void (*drawer) (struct ui_object_s *);
int (*responder) (struct ui_object_s *, event_t *);
void (*ticker) (struct ui_object_s *);
void (*action) (struct ui_object_s *);
void *data; // Pointer to extra data.
int timer;
int x, y, w, h; // Position and dimensions, auto-inited.
ui_obtype_e type; // Type of the object.
int group;
int flags;
int relx, rely, relw, relh; // Relative placement.
char text[256]; // Used in various ways.
void (*drawer) (struct ui_object_s *);
int (*responder) (struct ui_object_s *, event_t *);
void (*ticker) (struct ui_object_s *);
void (*action) (struct ui_object_s *);
void *data; // Pointer to extra data.
int timer;
int x, y, w, h; // Position and dimensions, auto-inited.
} ui_object_t;

// UI Pages consist of one or more controls.
typedef struct ui_page_s {
ui_object_t *objects; // List of objects, UI_NONE terminates.
char title[128]; // Title for the screen.
boolean background; // Draw the background?
ui_object_t *objects; // List of objects, UI_NONE terminates.
char title[128]; // Title for the screen.
boolean background; // Draw the background?
boolean header; // Draw the header bar?
int focus; // Index of the focus object.
int capture; // Index of the capture object.
void (*drawer) (struct ui_page_s *);
int (*responder) (struct ui_page_s *, event_t *);
void (*ticker) (struct ui_page_s *);
struct ui_page_s *previous; // Pointer to the previous page, if any.
int timer;
int count; // Object count, no need to initialize.
int focus; // Index of the focus object.
int capture; // Index of the capture object.
void (*drawer) (struct ui_page_s *);
int (*responder) (struct ui_page_s *, event_t *);
void (*ticker) (struct ui_page_s *);
struct ui_page_s *previous; // Pointer to the previous page, if any.
int timer;
int count; // Object count, no need to initialize.
} ui_page_t;

typedef struct {
char *ptr; // Text to modify.
int maxlen; // Maximum allowed length.
void *data;
int cp; // Cursor position.
char *ptr; // Text to modify.
int maxlen; // Maximum allowed length.
void *data;
int cp; // Cursor position.
} uidata_edit_t;

typedef struct {
char text[256];
int data;
int data2;
char text[256];
int data;
int data2;
} uidata_listitem_t;

typedef struct {
void *items;
int count; // Number of items.
void *data;
int selection; // Selected item (-1 if none).
int first; // First visible item.
int itemhgt; // Height of each item (0 = fonthgt).
int numvis; // Number of visible items (updated at SetPage).
byte button[3]; // Button states (0=normal, 1=down).
int column[UI_MAX_COLUMNS]; // Column offsets (real coords).
void *items;
int count; // Number of items.
void *data;
int selection; // Selected item (-1 if none).
int first; // First visible item.
int itemhgt; // Height of each item (0 = fonthgt).
int numvis; // Number of visible items (updated at SetPage).
byte button[3]; // Button states (0=normal, 1=down).
int column[UI_MAX_COLUMNS]; // Column offsets (real coords).
} uidata_list_t;

typedef struct {
float min, max;
float value;
float step; // Button step.
boolean floatmode; // Otherwise only integers are allowed.
void *data;
char *zerotext;
byte button[3]; // Button states (0=normal, 1=down).
float min, max;
float value;
float step; // Button step.
boolean floatmode; // Otherwise only integers are allowed.
void *data;
char *zerotext;
byte button[3]; // Button states (0=normal, 1=down).
} uidata_slider_t;

// Data.
extern int ui_fonthgt;
extern ui_page_t *ui_page; // Active page.
extern ui_page_t *ui_page; // Active page.
extern boolean ui_active;
extern ui_color_t ui_colors[];

Expand Down Expand Up @@ -233,43 +233,43 @@ void UI_DrawMouse(int x, int y);
void UI_DrawTitle(ui_page_t * page);
void UI_DrawTitleEx(char *text, int height, float alpha);
void UI_MixColors(ui_color_t * a, ui_color_t * b, ui_color_t * dest,
float amount);
float amount);
void UI_ColorA(ui_color_t * color, float alpha);
void UI_Color(ui_color_t * color);
void UI_Line(int x1, int y1, int x2, int y2, ui_color_t * start,
ui_color_t * end, float start_alpha, float end_alpha);
ui_color_t * end, float start_alpha, float end_alpha);
void UI_Shade(int x, int y, int w, int h, int border,
ui_color_t * main, ui_color_t * secondary,
float alpha, float bottom_alpha);
ui_color_t * main, ui_color_t * secondary,
float alpha, float bottom_alpha);
void UI_Gradient(int x, int y, int w, int h, ui_color_t * top,
ui_color_t * bottom, float top_alpha,
float bottom_alpha);
ui_color_t * bottom, float top_alpha,
float bottom_alpha);
void UI_GradientEx(int x, int y, int w, int h, int border,
ui_color_t * top, ui_color_t * bottom,
float top_alpha, float bottom_alpha);
ui_color_t * top, ui_color_t * bottom,
float top_alpha, float bottom_alpha);
void UI_HorizGradient(int x, int y, int w, int h, ui_color_t * left,
ui_color_t * right, float left_alpha,
float right_alpha);
ui_color_t * right, float left_alpha,
float right_alpha);
void UI_DrawRect(int x, int y, int w, int h, int brd,
ui_color_t * color, float alpha);
ui_color_t * color, float alpha);
void UI_DrawRectEx(int x, int y, int w, int h, int brd,
boolean filled, ui_color_t * top,
ui_color_t * bottom, float alpha,
float bottom_alpha);
boolean filled, ui_color_t * top,
ui_color_t * bottom, float alpha,
float bottom_alpha);
void UI_DrawTriangle(int x, int y, int radius, ui_color_t * hi,
ui_color_t * med, ui_color_t * low,
float alpha);
ui_color_t * med, ui_color_t * low,
float alpha);
void UI_DrawButton(int x, int y, int w, int h, int brd, float alpha,
ui_color_t * background, boolean down,
boolean disabled, int arrow);
ui_color_t * background, boolean down,
boolean disabled, int arrow);
void UI_TextOut(char *text, int x, int y);
void UI_TextOutEx(char *text, int x, int y, int horiz_center,
int vert_center, ui_color_t * color, float alpha);
int vert_center, ui_color_t * color, float alpha);
int UI_TextOutWrap(char *text, int x, int y, int w, int h);
int UI_TextOutWrapEx(char *text, int x, int y, int w, int h,
ui_color_t * color, float alpha);
ui_color_t * color, float alpha);
void UI_DrawHelpBox(int x, int y, int w, int h, float alpha,
char *text);
char *text);

// Console commands.
D_CMD(UIColor);
Expand Down
4 changes: 2 additions & 2 deletions doomsday/engine/portable/src/cl_mobj.c
Expand Up @@ -266,8 +266,8 @@ void Cl_CheckMobj(clmobj_t *cmo, boolean justCreated)

// Find out floor and ceiling z.
P_CheckPosXYZ(mo, mo->pos[VX], mo->pos[VY], mo->pos[VZ]);
mo->floorz = tmfloorz;
mo->ceilingz = tmceilingz;
mo->floorz = tmpFloorZ;
mo->ceilingz = tmpCeilingZ;

if(onFloor)
{
Expand Down

0 comments on commit 26a7b70

Please sign in to comment.