summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fixer.h3
-rw-r--r--src/main.c9
-rw-r--r--src/mathline.c2
-rw-r--r--src/opengl.c5
4 files changed, 11 insertions, 8 deletions
diff --git a/src/fixer.h b/src/fixer.h
index d5c1549..42e088e 100644
--- a/src/fixer.h
+++ b/src/fixer.h
@@ -41,8 +41,7 @@ extern "C" {
/* #define _mbclen strlen */
size_t _mbclen(const unsigned char *s);
-//#define RGBA_MAKE(r,g,b,a) (((r) << 24) | ((g) << 16) | ((b) << 8) | (a))
-#define RGBA_MAKE(r,g,b,a) ((((unsigned char)a) << 24) | (((unsigned char)b) << 16) | (((unsigned char)g) << 8) | ((unsigned char)r))
+#define RGBA_MAKE(r, g, b, a) ((((a) << 24) | ((r) << 16) | ((g) << 8) | (b)))
#define MAX_PATH PATH_MAX
diff --git a/src/main.c b/src/main.c
index 6749ee4..adaac43 100644
--- a/src/main.c
+++ b/src/main.c
@@ -442,10 +442,11 @@ int main(int argc, char *argv[])
AvP.CurrentEnv = AvP.StartingEnv = 0; /* are these even used? */
-// AvP.PlayerType = I_Alien;
+ AvP.PlayerType = I_Alien;
+ SetLevelToLoad(AVP_ENVIRONMENT_FERARCO); /* starting alien level */
- AvP.PlayerType = I_Marine;
- SetLevelToLoad(AVP_ENVIRONMENT_DERELICT); /* starting marine level */
+// AvP.PlayerType = I_Marine;
+// SetLevelToLoad(AVP_ENVIRONMENT_DERELICT); /* starting marine level */
// SetLevelToLoad(AVP_ENVIRONMENT_INVASION); /* because the menus aren't implemented */
@@ -455,7 +456,7 @@ int main(int argc, char *argv[])
// SetLevelToLoad(AVP_ENVIRONMENT_LEADWORKS_MP); /* multiplayer */
// SetLevelToLoad(AVP_ENVIRONMENT_E3DEMOSP); /* demo level */
-
+
// while(AvP_MainMenus()) {
d3d_light_ctrl.ctrl = LCCM_NORMAL;
diff --git a/src/mathline.c b/src/mathline.c
index 7879f95..2adfc09 100644
--- a/src/mathline.c
+++ b/src/mathline.c
@@ -394,6 +394,8 @@ __asm__("imull %%edx \n\t"
int DIV_FIXED(int a, int b)
{
int retval;
+
+ if (b == 0) return 0; /* TODO: debug this! (start with alien on ferarco) */
/*
_asm
{
diff --git a/src/opengl.c b/src/opengl.c
index 21bda70..75f3a7e 100644
--- a/src/opengl.c
+++ b/src/opengl.c
@@ -333,6 +333,7 @@ void D3D_Particle_Output(PARTICLE *particlePtr, RENDERVERTEX *renderVerticesPtr)
{
int r, g, b, a;
+ /* this should be OK. (ColourComponents was RGBA while RGBA_MAKE is BGRA (little endian) */
r = (particlePtr->Colour >> 0) & 0xFF;
g = (particlePtr->Colour >> 8) & 0xFF;
b = (particlePtr->Colour >> 16) & 0xFF;
@@ -355,9 +356,9 @@ void D3D_Particle_Output(PARTICLE *particlePtr, RENDERVERTEX *renderVerticesPtr)
} else {
int r, g, b, a;
- r = (particlePtr->Colour >> 0) & 0xFF;
+ b = (particlePtr->Colour >> 0) & 0xFF;
g = (particlePtr->Colour >> 8) & 0xFF;
- b = (particlePtr->Colour >> 16) & 0xFF;
+ r = (particlePtr->Colour >> 16) & 0xFF;
a = (particlePtr->Colour >> 24) & 0xFF;
glColor4ub(r, g, b, a);