mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-16 09:42:57 +00:00
Merge remote-tracking branch 'origin/master' into flats-png-macro-fix-please-just-work-already
This commit is contained in:
commit
322a0b8c41
5 changed files with 75 additions and 75 deletions
|
@ -149,7 +149,7 @@ static void HWR_DrawColumnInCache(const column_t *patchcol, UINT8 *block, GLMipm
|
|||
{
|
||||
RGBA_t rgbatexel;
|
||||
rgbatexel.rgba = *(UINT32 *)dest;
|
||||
colortemp = ASTBlendPixel(rgbatexel, colortemp, originPatch->style, originPatch->alpha);
|
||||
colortemp.rgba = ASTBlendPixel(rgbatexel, colortemp, originPatch->style, originPatch->alpha);
|
||||
}
|
||||
memcpy(dest, &colortemp, sizeof(RGBA_t)-sizeof(UINT8));
|
||||
break;
|
||||
|
@ -159,7 +159,7 @@ static void HWR_DrawColumnInCache(const column_t *patchcol, UINT8 *block, GLMipm
|
|||
{
|
||||
RGBA_t rgbatexel;
|
||||
rgbatexel.rgba = *(UINT32 *)dest;
|
||||
colortemp = ASTBlendPixel(rgbatexel, colortemp, originPatch->style, originPatch->alpha);
|
||||
colortemp.rgba = ASTBlendPixel(rgbatexel, colortemp, originPatch->style, originPatch->alpha);
|
||||
}
|
||||
memcpy(dest, &colortemp, sizeof(RGBA_t));
|
||||
break;
|
||||
|
@ -263,7 +263,7 @@ static void HWR_DrawFlippedColumnInCache(const column_t *patchcol, UINT8 *block,
|
|||
{
|
||||
RGBA_t rgbatexel;
|
||||
rgbatexel.rgba = *(UINT32 *)dest;
|
||||
colortemp = ASTBlendPixel(rgbatexel, colortemp, originPatch->style, originPatch->alpha);
|
||||
colortemp.rgba = ASTBlendPixel(rgbatexel, colortemp, originPatch->style, originPatch->alpha);
|
||||
}
|
||||
memcpy(dest, &colortemp, sizeof(RGBA_t)-sizeof(UINT8));
|
||||
break;
|
||||
|
@ -273,7 +273,7 @@ static void HWR_DrawFlippedColumnInCache(const column_t *patchcol, UINT8 *block,
|
|||
{
|
||||
RGBA_t rgbatexel;
|
||||
rgbatexel.rgba = *(UINT32 *)dest;
|
||||
colortemp = ASTBlendPixel(rgbatexel, colortemp, originPatch->style, originPatch->alpha);
|
||||
colortemp.rgba = ASTBlendPixel(rgbatexel, colortemp, originPatch->style, originPatch->alpha);
|
||||
}
|
||||
memcpy(dest, &colortemp, sizeof(RGBA_t));
|
||||
break;
|
||||
|
|
116
src/info.c
116
src/info.c
|
@ -11599,7 +11599,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
20*FRACUNIT, // radius
|
||||
128*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
DMG_SPIKE, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SOLID|MF_SCENERY|MF_PAIN, // flags
|
||||
|
@ -11626,7 +11626,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
24*FRACUNIT, // radius
|
||||
224*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
DMG_SPIKE, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SOLID|MF_SCENERY|MF_PAIN, // flags
|
||||
|
@ -11653,7 +11653,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
24*FRACUNIT, // radius
|
||||
256*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
DMG_SPIKE, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SOLID|MF_SCENERY|MF_PAIN, // flags
|
||||
|
@ -11680,7 +11680,61 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
48*FRACUNIT, // radius
|
||||
96*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
DMG_SPIKE, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SOLID|MF_SCENERY|MF_PAIN, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_CACTI10
|
||||
1230, // doomednum
|
||||
S_CACTI10, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
16*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
0, // display offset
|
||||
DMG_SPIKE, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SOLID|MF_SCENERY|MF_PAIN, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_CACTI11
|
||||
1231, // doomednum
|
||||
S_CACTI11, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
0, // display offset
|
||||
DMG_SPIKE, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SOLID|MF_SCENERY|MF_PAIN, // flags
|
||||
|
@ -12308,60 +12362,6 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_CACTI10
|
||||
1230, // doomednum
|
||||
S_CACTI10, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
16*FRACUNIT, // radius
|
||||
64*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SOLID|MF_SCENERY|MF_PAIN, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_CACTI11
|
||||
1231, // doomednum
|
||||
S_CACTI11, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
16*FRACUNIT, // radius
|
||||
32*FRACUNIT, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_SOLID|MF_SCENERY|MF_PAIN, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_FLAMEJET
|
||||
1300, // doomednum
|
||||
S_FLAMEJETSTND, // spawnstate
|
||||
|
|
|
@ -1019,7 +1019,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
return true; // underneath
|
||||
if (tmthing->flags & MF_SHOOTABLE && thing->health > 0)
|
||||
{
|
||||
UINT8 damagetype = (thing->info->mass & 0xFF);
|
||||
UINT32 damagetype = (thing->info->mass & 0xFF);
|
||||
if (!damagetype && thing->flags & MF_FIRE) // BURN!
|
||||
damagetype = DMG_FIRE;
|
||||
if (P_DamageMobj(tmthing, thing, thing, 1, damagetype) && (damagetype = (thing->info->mass>>8)))
|
||||
|
@ -1036,7 +1036,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
|||
return true; // underneath
|
||||
if (thing->flags & MF_SHOOTABLE && tmthing->health > 0)
|
||||
{
|
||||
UINT8 damagetype = (tmthing->info->mass & 0xFF);
|
||||
UINT32 damagetype = (tmthing->info->mass & 0xFF);
|
||||
if (!damagetype && tmthing->flags & MF_FIRE) // BURN!
|
||||
damagetype = DMG_FIRE;
|
||||
if (P_DamageMobj(thing, tmthing, tmthing, 1, damagetype) && (damagetype = (tmthing->info->mass>>8)))
|
||||
|
|
16
src/r_data.c
16
src/r_data.c
|
@ -242,7 +242,7 @@ static inline void R_DrawFlippedColumnInCache(column_t *patch, UINT8 *cache, tex
|
|||
}
|
||||
}
|
||||
|
||||
RGBA_t ASTBlendPixel(RGBA_t background, RGBA_t foreground, int style, UINT8 alpha)
|
||||
UINT32 ASTBlendPixel(RGBA_t background, RGBA_t foreground, int style, UINT8 alpha)
|
||||
{
|
||||
RGBA_t output;
|
||||
if (style == AST_TRANSLUCENT)
|
||||
|
@ -299,13 +299,13 @@ RGBA_t ASTBlendPixel(RGBA_t background, RGBA_t foreground, int style, UINT8 alph
|
|||
}
|
||||
// just copy the pixel
|
||||
else if (style == AST_COPY)
|
||||
return background;
|
||||
output.rgba = foreground.rgba;
|
||||
|
||||
output.s.alpha = 0xFF;
|
||||
return output.rgba;
|
||||
}
|
||||
#undef clamp
|
||||
// unimplemented blend modes return the background pixel
|
||||
output = background;
|
||||
output.s.alpha = 0xFF;
|
||||
return output;
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT8 ASTBlendPixel_8bpp(UINT8 background, UINT8 foreground, int style, UINT8 alpha)
|
||||
|
@ -322,7 +322,7 @@ UINT8 ASTBlendPixel_8bpp(UINT8 background, UINT8 foreground, int style, UINT8 al
|
|||
}
|
||||
// just copy the pixel
|
||||
else if (style == AST_COPY)
|
||||
return background;
|
||||
return foreground;
|
||||
// use ASTBlendPixel for all other blend modes
|
||||
// and find the nearest colour in the palette
|
||||
else if (style != AST_TRANSLUCENT)
|
||||
|
@ -330,7 +330,7 @@ UINT8 ASTBlendPixel_8bpp(UINT8 background, UINT8 foreground, int style, UINT8 al
|
|||
RGBA_t texel;
|
||||
RGBA_t bg = V_GetColor(background);
|
||||
RGBA_t fg = V_GetColor(foreground);
|
||||
texel = ASTBlendPixel(bg, fg, style, alpha);
|
||||
texel.rgba = ASTBlendPixel(bg, fg, style, alpha);
|
||||
return NearestColor(texel.s.red, texel.s.green, texel.s.blue);
|
||||
}
|
||||
// fallback if all above fails, somehow
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
// Possible alpha types for a patch.
|
||||
enum patchalphastyle {AST_COPY, AST_TRANSLUCENT, AST_ADD, AST_SUBTRACT, AST_REVERSESUBTRACT, AST_MODULATE, AST_OVERLAY};
|
||||
|
||||
RGBA_t ASTBlendPixel(RGBA_t background, RGBA_t foreground, int style, UINT8 alpha);
|
||||
UINT32 ASTBlendPixel(RGBA_t background, RGBA_t foreground, int style, UINT8 alpha);
|
||||
UINT8 ASTBlendPixel_8bpp(UINT8 background, UINT8 foreground, int style, UINT8 alpha);
|
||||
|
||||
UINT8 NearestColor(UINT8 r, UINT8 g, UINT8 b);
|
||||
|
|
Loading…
Reference in a new issue