- fixing some HUD stuff.

This commit is contained in:
Christoph Oelckers 2020-07-06 15:48:51 +02:00
parent 928620ab91
commit e272245537
23 changed files with 138 additions and 202 deletions

View file

@ -77,3 +77,5 @@ void fall_common(int g_i, int g_p, int JIBS6, int DRONE, int BLOODPOOL, int SHOT
void checkavailweapon(struct player_struct* p); void checkavailweapon(struct player_struct* p);
void deletesprite(int num); void deletesprite(int num);
int ssp(int i, unsigned int cliptype); //The set sprite function
void insertspriteq(int i);

View file

@ -222,7 +222,7 @@ void clearcamera(player_struct* ps)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
int ssp(short i, unsigned int cliptype) //The set sprite function int ssp(int i, unsigned int cliptype) //The set sprite function
{ {
spritetype* s; spritetype* s;
int movetype; int movetype;

View file

@ -3469,6 +3469,7 @@ void moveexplosions_d(void) // STATNUM 5
case LAVAPOOL: case LAVAPOOL:
case ONFIRE: case ONFIRE:
case ONFIRESMOKE:
case BURNEDCORPSE: case BURNEDCORPSE:
case LAVAPOOLBUBBLE: case LAVAPOOLBUBBLE:
case WHISPYSMOKE: case WHISPYSMOKE:

View file

@ -67,6 +67,13 @@ enum GameFunction_t
}; };
enum
{
TICRATE = 120,
REALGAMETICSPERSEC = 30, // The number of game state updates per second:
TICSPERFRAME = (TICRATE/REALGAMETICSPERSEC) // (This used to be TICRATE/GAMETICSPERSEC, which was 120/26 = 4.615~ truncated to 4 by integer division.)
};
// tile names which are identical for all games. // tile names which are identical for all games.
enum enum
{ {
@ -81,6 +88,9 @@ enum
RESPAWN = 9, RESPAWN = 9,
GPSPEED = 10, GPSPEED = 10,
FOF = 13, FOF = 13,
TILE_VIEWSCR = (MAXTILES-5)
}; };
// the available palettes. These are indices into the global table of translations. // the available palettes. These are indices into the global table of translations.

View file

@ -34,72 +34,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "polymost.h" #include "polymost.h"
#include "gamecvars.h" #include "gamecvars.h"
#include "menu/menu.h" #include "menu/menu.h"
BEGIN_DUKE_NS
#define VOLUMEALL (g_Shareware == 0)
#define PLUTOPAK (true)//g_scriptVersion >= 14)
#define VOLUMEONE (g_Shareware == 1)
// increase by 3, because atomic GRP adds 1, and Shareware adds 2
// Non-Lua build
# define BYTEVERSION_EDUKE32 336
//#define BYTEVERSION_13 27
//#define BYTEVERSION_14 116
//#define BYTEVERSION_15 117
#define BYTEVERSION (BYTEVERSION_EDUKE32+(PLUTOPAK?1:(VOLUMEONE<<1)))
#define NUMPAGES 1
#define RECSYNCBUFSIZ 2520 //2520 is the (LCM of 1-8)*3
#define MOVEFIFOSIZ 256
#define MAXLEVELS 64
#define MAXGAMETYPES 16
enum {
MUS_FIRST_SPECIAL = MAXVOLUMES*MAXLEVELS,
MUS_INTRO = MUS_FIRST_SPECIAL,
MUS_BRIEFING = MUS_FIRST_SPECIAL + 1,
MUS_LOADING = MUS_FIRST_SPECIAL + 2,
};
////////// TIMING CONSTANTS //////////
// The number of 'totalclock' increments per second:
#define TICRATE 120
// The number of game state updates per second:
#define REALGAMETICSPERSEC 30
// The number of 'totalclock' increments per game state update:
// NOTE: calling a game state update a 'frame' is really weird.
// (This used to be TICRATE/GAMETICSPERSEC, which was 120/26 = 4.615~ truncated
// to 4 by integer division.)
#define TICSPERFRAME (TICRATE/REALGAMETICSPERSEC)
// Used as a constant to satisfy all of the calculations written with ticrate =
// 26 in mind:
#define GAMETICSPERSEC 26
#define PACKBUF_SIZE 32768
#define TILE_VIEWSCR (MAXTILES-5)
EDUKE32_STATIC_ASSERT(7 <= MAXTILES-MAXUSERTILES);
// sprites with these statnums should be considered for fixing
#define ROTFIXSPR_STATNUMP(k) ((k)==STAT_DEFAULT || (k)==STAT_STANDABLE || (k)==STAT_FX || \
(k)==STAT_FALLER || (k)==STAT_LIGHT)
#define ROTFIXSPR_MAGIC 0x18190000
// JBF 20040604: sync is a function on some platforms
#define sync dsync
// Uncomment the following to remove calls to a.nasm functions with the GL renderers
// so that debugging with valgrind --smc-check=none is possible:
//#define DEBUG_VALGRIND_NO_SMC
END_DUKE_NS
#include "zz_actors.h" #include "zz_actors.h"
#include "gamecontrol.h" #include "gamecontrol.h"
#include "game.h" #include "game.h"

View file

@ -251,7 +251,7 @@ void initactorflags_d()
TILE_CAMCORNER = CAMCORNER; TILE_CAMCORNER = CAMCORNER;
TILE_CAMLIGHT = CAMLIGHT; TILE_CAMLIGHT = CAMLIGHT;
TILE_STATIC = STATIC; TILE_STATIC = STATIC;
TILE_BOTTOMSTATUSBAR = BOTTOMSTATUSBAR; TILE_BOTTOMSTATUSBAR = isWorldTour()? WIDESCREENSTATUSBAR : BOTTOMSTATUSBAR;
TILE_SPINNINGNUKEICON = SPINNINGNUKEICON; TILE_SPINNINGNUKEICON = SPINNINGNUKEICON;
TILE_THREEDEE = THREEDEE; TILE_THREEDEE = THREEDEE;
TILE_INGAMEDUKETHREEDEE = INGAMEDUKETHREEDEE; TILE_INGAMEDUKETHREEDEE = INGAMEDUKETHREEDEE;

View file

@ -34,6 +34,25 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
BEGIN_DUKE_NS BEGIN_DUKE_NS
#define VOLUMEALL (g_Shareware == 0)
#define PLUTOPAK (true)//g_scriptVersion >= 14)
#define VOLUMEONE (g_Shareware == 1)
#define MOVEFIFOSIZ 256
#define MAXLEVELS 64
#define MAXGAMETYPES 16
enum {
MUS_FIRST_SPECIAL = MAXVOLUMES * MAXLEVELS,
MUS_INTRO = MUS_FIRST_SPECIAL,
MUS_BRIEFING = MUS_FIRST_SPECIAL + 1,
MUS_LOADING = MUS_FIRST_SPECIAL + 2,
};
#define MAXMINECARTS 16 #define MAXMINECARTS 16
#define MAXJAILDOORS 32 #define MAXJAILDOORS 32
#define MAXLIGHTNINSECTORS 64 #define MAXLIGHTNINSECTORS 64
@ -47,9 +66,6 @@ BEGIN_DUKE_NS
#endif #endif
#define MAXINTERPOLATIONS MAXSPRITES #define MAXINTERPOLATIONS MAXSPRITES
// KEEPINSYNC lunatic/con_lang.lua
// duke3d global soup :(
G_EXTERN int32_t duke3d_globalflags; G_EXTERN int32_t duke3d_globalflags;
@ -77,11 +93,9 @@ G_EXTERN char pus,pub;
G_EXTERN char ready2send; G_EXTERN char ready2send;
#define MAXPLAYERNAME 32 #define MAXPLAYERNAME 32
G_EXTERN char tempbuf[MAXSECTORS<<1],buf[1024]; G_EXTERN char tempbuf[MAXSECTORS<<1],buf[1024];
G_EXTERN uint8_t packbuf[PACKBUF_SIZE];
G_EXTERN input_t localInput; G_EXTERN input_t localInput;
G_EXTERN input_t recsync[RECSYNCBUFSIZ];
G_EXTERN int32_t avgfvel, avgsvel, avgbits; G_EXTERN int32_t avgfvel, avgsvel, avgbits;
G_EXTERN fix16_t avgavel, avghorz; G_EXTERN fix16_t avgavel, avghorz;
@ -378,6 +392,24 @@ inline fixed_t PlayerInputAngVel(int pl)
return g_player[pl].input->q16avel; return g_player[pl].input->q16avel;
} }
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
inline void hud_drawsprite(int sx, int sy, int z, int16_t a, int16_t picnum, int8_t dashade, uint8_t dapalnum, int dastat)
{
twod_rotatesprite(&twodpsp, sx, sy, z, a, picnum, dashade, dapalnum, dastat, 0, 0, windowxy1.x, windowxy1.y, windowxy2.x, windowxy2.y);
}
inline void hud_draw(int x, int y, int tilenum, int shade, int orientation)
{
int p = sector[ps[screenpeek].cursectnum].floorpal;
hud_drawsprite(x << 16, y << 16, 65536L, (orientation & 4) ? 1024 : 0, tilenum, shade, p, 2 | orientation);
}
enum enum
{ {
kHitTypeMask = 0xC000, kHitTypeMask = 0xC000,

View file

@ -38,8 +38,6 @@ source as it is released.
BEGIN_DUKE_NS BEGIN_DUKE_NS
#define CRECT windowxy1.x, windowxy1.y, windowxy2.x, windowxy2.y
// wrapped in case it needs to be refactored // wrapped in case it needs to be refactored
int getavel(int snum) int getavel(int snum)
{ {
@ -55,19 +53,7 @@ int getavel(int snum)
inline static void hud_drawpal(int x, int y, int tilenum, int shade, int orientation, int p) inline static void hud_drawpal(int x, int y, int tilenum, int shade, int orientation, int p)
{ {
hud_rotatesprite(x << 16, y << 16, 65536, (orientation & 4) ? 1024 : 0, tilenum, shade, p, 2 | orientation, windowxy1.x, windowxy1.y, windowxy2.x, windowxy2.y); hud_drawsprite(x << 16, y << 16, 65536, (orientation & 4) ? 1024 : 0, tilenum, shade, p, 2 | orientation);
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
inline static void hud_draw(int x, int y, int tilenum, int shade, int orientation)
{
int p = sector[ps[screenpeek].cursectnum].floorpal;
rotatesprite(x << 16, y << 16, 65536L, (orientation & 4) ? 1024 : 0, tilenum, shade, p, 2 | orientation, windowxy1.x, windowxy1.y, windowxy2.x, windowxy2.y);
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -187,7 +173,8 @@ int animateknuckles(int gs, int snum)
else else
pal = sector[ps[snum].cursectnum].floorpal; pal = sector[ps[snum].cursectnum].floorpal;
hud_drawpal(160 + (getavel(snum) >> 4) - (ps[snum].look_ang >> 1), looking_arc + 180 - ((ps[snum].gethoriz() - ps[snum].gethorizof()) >> 4), CRACKKNUCKLES + knuckle_frames[ps[snum].knuckle_incs >> 1], gs, 4, pal); auto pic = isWorldTour() ? CRACKKNUCKLESWIDE : CRACKKNUCKLES;
hud_drawpal(160 + (getavel(snum) >> 4) - (ps[snum].look_ang >> 1), looking_arc + 180 - ((ps[snum].gethoriz() - ps[snum].gethorizof()) >> 4), pic + knuckle_frames[ps[snum].knuckle_incs >> 1], gs, 4, pal);
return 1; return 1;
} }
@ -212,13 +199,13 @@ void displaymasks_d(int snum)
{ {
if (ud.screen_size > 4) if (ud.screen_size > 4)
{ {
rotatesprite(44 << 16, (200 - 8 - tilesiz[SCUBAMASK].y) << 16, 65536, 0, SCUBAMASK, 0, p, 2 + 16, CRECT); hud_drawsprite(44 << 16, (200 - 8 - tilesiz[SCUBAMASK].y) << 16, 65536, 0, SCUBAMASK, 0, p, 2 + 16);
rotatesprite((320 - 43) << 16, (200 - 8 - tilesiz[SCUBAMASK].y) << 16, 65536, 1024, SCUBAMASK, 0, p, 2 + 4 + 16, CRECT); hud_drawsprite((320 - 43) << 16, (200 - 8 - tilesiz[SCUBAMASK].y) << 16, 65536, 1024, SCUBAMASK, 0, p, 2 + 4 + 16);
} }
else else
{ {
rotatesprite(44 << 16, (200 - tilesiz[SCUBAMASK].y) << 16, 65536, 0, SCUBAMASK, 0, p, 2 + 16, CRECT); hud_drawsprite(44 << 16, (200 - tilesiz[SCUBAMASK].y) << 16, 65536, 0, SCUBAMASK, 0, p, 2 + 16);
rotatesprite((320 - 43) << 16, (200 - tilesiz[SCUBAMASK].y) << 16, 65536, 1024, SCUBAMASK, 0, p, 2 + 4 + 16, CRECT); hud_drawsprite((320 - 43) << 16, (200 - tilesiz[SCUBAMASK].y) << 16, 65536, 1024, SCUBAMASK, 0, p, 2 + 4 + 16);
} }
} }
} }
@ -464,7 +451,8 @@ void displayweapon_d(int snum)
auto displayrpg = [&]() auto displayrpg = [&]()
{ {
pin = (duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING) ? 0 : RS_ALIGN_R; pin = (isWorldTour() || (duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
auto rpgpic = isWorldTour() ? RPGGUNWIDE : RPGGUN;
if (sprite[p->i].pal == 1) if (sprite[p->i].pal == 1)
pal = 1; pal = 1;
@ -478,7 +466,7 @@ void displayweapon_d(int snum)
if (*kb < (isWW2GI() ? aplWeaponTotalTime[RPG_WEAPON][snum] : 8)) if (*kb < (isWW2GI() ? aplWeaponTotalTime[RPG_WEAPON][snum] : 8))
{ {
hud_drawpal(weapon_xoffset + 164, (looking_arc << 1) + 176 - gun_pos, hud_drawpal(weapon_xoffset + 164, (looking_arc << 1) + 176 - gun_pos,
RPGGUN + (p->kickback_pic >> 1), gs, o | pin, pal); rpgpic + (p->kickback_pic >> 1), gs, o | pin, pal);
} }
else if (isWW2GI()) else if (isWW2GI())
{ {
@ -503,7 +491,7 @@ void displayweapon_d(int snum)
} }
} }
hud_drawpal(weapon_xoffset + 164, (looking_arc << 1) + 176 - gun_pos, RPGGUN, gs, o | pin, pal); hud_drawpal(weapon_xoffset + 164, (looking_arc << 1) + 176 - gun_pos, rpgpic, gs, o | pin, pal);
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -852,46 +840,47 @@ void displayweapon_d(int snum)
} }
else else
{ {
pin = (isWW2GI() || (duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R; pin = (isWW2GI() || isWorldTour() || (duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
auto pic = isWorldTour() ? FIRSTGUNRELOAD - 4 : FIRSTGUN; // I do not want to edit all code below
const int WEAPON2_RELOAD_TIME = 50; const int WEAPON2_RELOAD_TIME = 50;
auto reload_time = isWW2GI() ? aplWeaponReload[PISTOL_WEAPON][snum] : WEAPON2_RELOAD_TIME; auto reload_time = isWW2GI() ? aplWeaponReload[PISTOL_WEAPON][snum] : WEAPON2_RELOAD_TIME;
if (p->kickback_pic < 10) if (p->kickback_pic < 10)
hud_drawpal(194 - (p->look_ang >> 1), looking_arc + 230 - gun_pos, FIRSTGUN + 4, gs, o|pin, pal); hud_drawpal(194 - (p->look_ang >> 1), looking_arc + 230 - gun_pos, pic + 4, gs, o|pin, pal);
else if (p->kickback_pic < 15) else if (p->kickback_pic < 15)
{ {
hud_drawpal(244 - (p->kickback_pic << 3) - (p->look_ang >> 1), looking_arc + 130 - gun_pos + (p->kickback_pic << 4), FIRSTGUN + 6, gs, o | pin, pal); hud_drawpal(244 - (p->kickback_pic << 3) - (p->look_ang >> 1), looking_arc + 130 - gun_pos + (p->kickback_pic << 4), pic + 6, gs, o | pin, pal);
hud_drawpal(224 - (p->look_ang >> 1), looking_arc + 220 - gun_pos, FIRSTGUN + 5, gs, o | pin, pal); hud_drawpal(224 - (p->look_ang >> 1), looking_arc + 220 - gun_pos, pic + 5, gs, o | pin, pal);
} }
else if (p->kickback_pic < 20) else if (p->kickback_pic < 20)
{ {
hud_drawpal(124 + (p->kickback_pic << 1) - (p->look_ang >> 1), looking_arc + 430 - gun_pos - (p->kickback_pic << 3), FIRSTGUN + 6, gs, o | pin, pal); hud_drawpal(124 + (p->kickback_pic << 1) - (p->look_ang >> 1), looking_arc + 430 - gun_pos - (p->kickback_pic << 3), pic + 6, gs, o | pin, pal);
hud_drawpal(224 - (p->look_ang >> 1), looking_arc + 220 - gun_pos, FIRSTGUN + 5, gs, o | pin, pal); hud_drawpal(224 - (p->look_ang >> 1), looking_arc + 220 - gun_pos, pic + 5, gs, o | pin, pal);
} }
else if (p->kickback_pic < (reload_time - 12)) else if (p->kickback_pic < (reload_time - 12))
{ {
hud_drawpal(184 - (p->look_ang >> 1), looking_arc + 235 - gun_pos, FIRSTGUN + 8, gs, o | pin, pal); hud_drawpal(184 - (p->look_ang >> 1), looking_arc + 235 - gun_pos, pic + 8, gs, o | pin, pal);
hud_drawpal(224 - (p->look_ang >> 1), looking_arc + 210 - gun_pos, FIRSTGUN + 5, gs, o | pin, pal); hud_drawpal(224 - (p->look_ang >> 1), looking_arc + 210 - gun_pos, pic + 5, gs, o | pin, pal);
} }
else if (p->kickback_pic < (reload_time - 6)) else if (p->kickback_pic < (reload_time - 6))
{ {
hud_drawpal(164 - (p->look_ang >> 1), looking_arc + 245 - gun_pos, FIRSTGUN + 8, gs, o | pin, pal); hud_drawpal(164 - (p->look_ang >> 1), looking_arc + 245 - gun_pos, pic + 8, gs, o | pin, pal);
hud_drawpal(224 - (p->look_ang >> 1), looking_arc + 220 - gun_pos, FIRSTGUN + 5, gs, o | pin, pal); hud_drawpal(224 - (p->look_ang >> 1), looking_arc + 220 - gun_pos, pic + 5, gs, o | pin, pal);
} }
else if (p->kickback_pic < (reload_time)) else if (p->kickback_pic < (reload_time))
hud_drawpal(194 - (p->look_ang >> 1), looking_arc + 235 - gun_pos, FIRSTGUN + 5, gs, o, pal); hud_drawpal(194 - (p->look_ang >> 1), looking_arc + 235 - gun_pos, pic + 5, gs, o, pal);
else if (p->kickback_pic < 23) else if (p->kickback_pic < 23)
{ {
hud_drawpal(184 - (p->look_ang >> 1), looking_arc + 235 - gun_pos, FIRSTGUN + 8, gs, o | pin, pal); hud_drawpal(184 - (p->look_ang >> 1), looking_arc + 235 - gun_pos, pic + 8, gs, o | pin, pal);
hud_drawpal(224 - (p->look_ang >> 1), looking_arc + 210 - gun_pos, FIRSTGUN + 5, gs, o | pin, pal); hud_drawpal(224 - (p->look_ang >> 1), looking_arc + 210 - gun_pos, pic + 5, gs, o | pin, pal);
} }
else if (p->kickback_pic < 25) else if (p->kickback_pic < 25)
{ {
hud_drawpal(164 - (p->look_ang >> 1), looking_arc + 245 - gun_pos, FIRSTGUN + 8, gs, o | pin, pal); hud_drawpal(164 - (p->look_ang >> 1), looking_arc + 245 - gun_pos, pic + 8, gs, o | pin, pal);
hud_drawpal(224 - (p->look_ang >> 1), looking_arc + 220 - gun_pos, FIRSTGUN + 5, gs, o | pin, pal); hud_drawpal(224 - (p->look_ang >> 1), looking_arc + 220 - gun_pos, pic + 5, gs, o | pin, pal);
} }
else if (p->kickback_pic < 27) else if (p->kickback_pic < 27)
hud_drawpal(194 - (p->look_ang >> 1), looking_arc + 235 - gun_pos, FIRSTGUN + 5, gs, o | pin, pal); hud_drawpal(194 - (p->look_ang >> 1), looking_arc + 235 - gun_pos, pic + 5, gs, o | pin, pal);
} }
}; };
@ -1082,7 +1071,8 @@ void displayweapon_d(int snum)
auto displayfreezer = [&] auto displayfreezer = [&]
{ {
pin = (isWW2GI() || (duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R; pin = (isWW2GI() || isWorldTour() || (duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
auto pic = isWorldTour() ? FREEZEWIDE : FREEZE;
if (sprite[p->i].pal == 1) if (sprite[p->i].pal == 1)
pal = 1; pal = 1;
@ -1099,10 +1089,10 @@ void displayweapon_d(int snum)
looking_arc += rand() & 3; looking_arc += rand() & 3;
} }
gun_pos -= 16; gun_pos -= 16;
hud_drawpal(weapon_xoffset + 210 - (p->look_ang >> 1), looking_arc + 261 - gun_pos, FREEZE + 2, -32, o|pin, pal); hud_drawpal(weapon_xoffset + 210 - (p->look_ang >> 1), looking_arc + 261 - gun_pos, pic + 2, -32, o|pin, pal);
hud_drawpal(weapon_xoffset + 210 - (p->look_ang >> 1), looking_arc + 235 - gun_pos, FREEZE + 3 + cat_frames[*kb % 6], -32, o | pin, pal); hud_drawpal(weapon_xoffset + 210 - (p->look_ang >> 1), looking_arc + 235 - gun_pos, pic + 3 + cat_frames[*kb % 6], -32, o | pin, pal);
} }
else hud_drawpal(weapon_xoffset + 210 - (p->look_ang >> 1), looking_arc + 261 - gun_pos, FREEZE, gs, o | pin, pal); else hud_drawpal(weapon_xoffset + 210 - (p->look_ang >> 1), looking_arc + 261 - gun_pos, pic, gs, o | pin, pal);
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View file

@ -33,9 +33,6 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
BEGIN_DUKE_NS BEGIN_DUKE_NS
#define CRECT windowxy1.x, windowxy1.y, windowxy2.x, windowxy2.y
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// //
@ -44,7 +41,7 @@ BEGIN_DUKE_NS
inline static void hud_drawpal(int x, int y, int tilenum, int shade, int orientation, int p, int scale = 32768) inline static void hud_drawpal(int x, int y, int tilenum, int shade, int orientation, int p, int scale = 32768)
{ {
hud_rotatesprite(x << 16, y << 16, scale, (orientation & 4) ? 1024 : 0, tilenum, shade, p, 2 | orientation, windowxy1.x, windowxy1.y, windowxy2.x, windowxy2.y); hud_drawsprite(x << 16, y << 16, scale, (orientation & 4) ? 1024 : 0, tilenum, shade, p, 2 | orientation);
} }
inline static void rdmyospal(int x, int y, int tilenum, int shade, int orientation, int p) inline static void rdmyospal(int x, int y, int tilenum, int shade, int orientation, int p)
@ -62,19 +59,6 @@ inline static void rd3myospal(int x, int y, int tilenum, int shade, int orientat
hud_drawpal(x, y, tilenum, shade, orientation, p, 47040); hud_drawpal(x, y, tilenum, shade, orientation, p, 47040);
} }
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
inline static void hud_draw(int x, int y, int tilenum, int shade, int orientation)
{
int p = sector[ps[screenpeek].cursectnum].floorpal;
rotatesprite(x << 16, y << 16, 65536L, (orientation & 4) ? 1024 : 0, tilenum, shade, p, 2 | orientation, windowxy1.x, windowxy1.y, windowxy2.x, windowxy2.y);
}
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// //
@ -94,11 +78,11 @@ void displaymasks_r(int snum)
{ {
int pin = 0; int pin = 0;
if (!(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_STRETCH; if (!(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_STRETCH;
hud_rotatesprite((320 - (tilesiz[SCUBAMASK].x >> 1) - 15) << 16, (200 - (tilesiz[SCUBAMASK].y >> 1) + (sintable[(int)totalclock & 2047] >> 10)) << 16, 49152, 0, SCUBAMASK, 0, p, 2 + 16 + pin, CRECT); hud_drawsprite((320 - (tilesiz[SCUBAMASK].x >> 1) - 15) << 16, (200 - (tilesiz[SCUBAMASK].y >> 1) + (sintable[(int)totalclock & 2047] >> 10)) << 16, 49152, 0, SCUBAMASK, 0, p, 2 + 16 + pin);
hud_rotatesprite((320 - tilesiz[SCUBAMASK + 4].x) << 16, (200 - tilesiz[SCUBAMASK + 4].y) << 16, 65536, 0, SCUBAMASK + 4, 0, p, 2 + 16 + pin, CRECT); hud_drawsprite((320 - tilesiz[SCUBAMASK + 4].x) << 16, (200 - tilesiz[SCUBAMASK + 4].y) << 16, 65536, 0, SCUBAMASK + 4, 0, p, 2 + 16 + pin);
hud_rotatesprite(tilesiz[SCUBAMASK + 4].x << 16, (200 - tilesiz[SCUBAMASK + 4].y) << 16, 65536, 1024, SCUBAMASK + 4, 0, p, 2 + 4 + 16 + pin, CRECT); hud_drawsprite(tilesiz[SCUBAMASK + 4].x << 16, (200 - tilesiz[SCUBAMASK + 4].y) << 16, 65536, 1024, SCUBAMASK + 4, 0, p, 2 + 4 + 16 + pin);
hud_rotatesprite(35 << 16, (-1) << 16, 65536, 0, SCUBAMASK + 3, 0, p, 2 + 16 + pin, CRECT); hud_drawsprite(35 << 16, (-1) << 16, 65536, 0, SCUBAMASK + 3, 0, p, 2 + 16 + pin);
hud_rotatesprite(285 << 16, 200 << 16, 65536, 1024, SCUBAMASK + 3, 0, p, 2 + 16 + pin, CRECT); hud_drawsprite(285 << 16, 200 << 16, 65536, 1024, SCUBAMASK + 3, 0, p, 2 + 16 + pin);
} }
} }
@ -110,13 +94,13 @@ void displaymasks_r(int snum)
void ShowMotorcycle(int x, int y, short tilenum, signed char shade, char orientation, char p, short a) void ShowMotorcycle(int x, int y, short tilenum, signed char shade, char orientation, char p, short a)
{ {
hud_rotatesprite(x << 16, y << 16, 34816L, a, tilenum, shade, p, 2 | orientation, CRECT); hud_drawsprite(x << 16, y << 16, 34816L, a, tilenum, shade, p, 2 | orientation);
} }
void ShowBoat(int x, int y, short tilenum, signed char shade, char orientation, char p, short a) void ShowBoat(int x, int y, short tilenum, signed char shade, char orientation, char p, short a)
{ {
hud_rotatesprite(x << 16, y << 16, 66048L, a, tilenum, shade, p, 2 | orientation, CRECT); hud_drawsprite(x << 16, y << 16, 66048L, a, tilenum, shade, p, 2 | orientation);
} }

View file

@ -11,13 +11,13 @@ of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Original Source: 1996 - Todd Replogle Original Source: 1996 - Todd Replogle
Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
@ -747,7 +747,21 @@ enum
SIGN2 = 4912, SIGN2 = 4912,
JURYGUY = 4943, JURYGUY = 4943,
// New names from World Tour // New names from World Tour
WIDESCREENSTATUSBAR = 5120,
RPGGUNWIDE = 5121,
FIRSTGUNRELOADWIDE = 5122,
FREEZEWIDE = 5123,
FREEZEFIREWIDE = 5124,
SHRINKERWIDE = 5127,
CRACKKNUCKLESWIDE = 5129,
ONFIRESMOKE = 5143,
LAVASPLASH = 5371,
BOSS2STAYPUT = 2711,
BOSS3STAYPUT = 2761,
WTGLASS1 = 5736,
WTGLASS2 = 5737,
FLAMETHROWERSPRITE = 5134, FLAMETHROWERSPRITE = 5134,
FLAMETHROWERAMMO = 5135, FLAMETHROWERAMMO = 5135,
FLAMETHROWER = 5138, FLAMETHROWER = 5138,

View file

@ -530,7 +530,6 @@ void playerisdead(int snum, int psectlotag, int fz, int cz)
#endif #endif
p->frag_ps = snum; p->frag_ps = snum;
pus = NUMPAGES;
} }
} }

View file

@ -448,17 +448,6 @@ bool view(struct player_struct* pp, int* vx, int* vy, int* vz, short* vsectnum,
extern int lastvisinc; extern int lastvisinc;
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
inline void hud_rotatesprite(int sx, int sy, int z, int16_t a, int16_t picnum, int8_t dashade, uint8_t dapalnum, int dastat, int cx1, int cy1, int cx2, int cy2)
{
twod_rotatesprite(&twodpsp, sx, sy, z, a, picnum, dashade, dapalnum, dastat, 0, 0, cx1, cy1, cx2, cy2);
}
END_DUKE_NS END_DUKE_NS
#endif #endif

View file

@ -1237,8 +1237,6 @@ void selectweapon_d(int snum, int j) // playernum, weaponnum
if (j == SHRINKER_WEAPON && PLUTOPAK) // JBF 20040116: so we don't select the grower with v1.3d if (j == SHRINKER_WEAPON && PLUTOPAK) // JBF 20040116: so we don't select the grower with v1.3d
{ {
if (screenpeek == snum) pus = NUMPAGES;
if (p->curr_weapon != GROW_WEAPON && p->curr_weapon != SHRINKER_WEAPON) if (p->curr_weapon != GROW_WEAPON && p->curr_weapon != SHRINKER_WEAPON)
{ {
if (p->ammo_amount[GROW_WEAPON] > 0) if (p->ammo_amount[GROW_WEAPON] > 0)

View file

@ -1019,8 +1019,6 @@ void selectweapon_r(int snum, int j)
} }
else if (j == CROSSBOW_WEAPON && isRRRA()) else if (j == CROSSBOW_WEAPON && isRRRA())
{ {
if (screenpeek == snum) pus = NUMPAGES;
if (p->curr_weapon == CROSSBOW_WEAPON || p->ammo_amount[CROSSBOW_WEAPON] == 0) if (p->curr_weapon == CROSSBOW_WEAPON || p->ammo_amount[CROSSBOW_WEAPON] == 0)
{ {
if (p->ammo_amount[CHICKEN_WEAPON] == 0) if (p->ammo_amount[CHICKEN_WEAPON] == 0)
@ -1036,8 +1034,6 @@ void selectweapon_r(int snum, int j)
} }
else if (j == THROWSAW_WEAPON) else if (j == THROWSAW_WEAPON)
{ {
if (screenpeek == snum) pus = NUMPAGES;
if (p->curr_weapon == THROWSAW_WEAPON || p->ammo_amount[THROWSAW_WEAPON] == 0) if (p->curr_weapon == THROWSAW_WEAPON || p->ammo_amount[THROWSAW_WEAPON] == 0)
{ {
p->subweapon = (1 << BUZZSAW_WEAPON); p->subweapon = (1 << BUZZSAW_WEAPON);
@ -1051,8 +1047,6 @@ void selectweapon_r(int snum, int j)
} }
else if (j == POWDERKEG_WEAPON) else if (j == POWDERKEG_WEAPON)
{ {
if (screenpeek == snum) pus = NUMPAGES;
if (p->curr_weapon == POWDERKEG_WEAPON || p->ammo_amount[POWDERKEG_WEAPON] == 0) if (p->curr_weapon == POWDERKEG_WEAPON || p->ammo_amount[POWDERKEG_WEAPON] == 0)
{ {
p->subweapon = (1 << BOWLING_WEAPON); p->subweapon = (1 << BOWLING_WEAPON);

View file

@ -75,11 +75,10 @@ void DDukeCommonStatusBar::displayfragbar(void)
for (i = connecthead; i >= 0; i = connectpoint2[i]) for (i = connecthead; i >= 0; i = connectpoint2[i])
if (i > j) j = i; if (i > j) j = i;
rotatesprite(0, 0, 65600L, 0, TILE_FRAGBAR, 0, 0, 2 + 8 + 16 + 64 + 128, 0, 0, xdim - 1, ydim - 1); auto tex = tileGetTexture(TILE_FRAGBAR);
if (j >= 4) rotatesprite(319, (8) << 16, 65600L, 0, TILE_FRAGBAR, 0, 0, 10 + 16 + 64 + 128, 0, 0, xdim - 1, ydim - 1); for (int y = 0; y < 32; y += 8)
if (j >= 8) rotatesprite(319, (16) << 16, 65600L, 0, TILE_FRAGBAR, 0, 0, 10 + 16 + 64 + 128, 0, 0, xdim - 1, ydim - 1); DrawTexture(twod, tex, 0, 0, DTA_FullscreenScale, 3, DTA_ViewportWidth, 320, DTA_ViewportHeight, 200, DTA_ScaleX, 1.001, DTA_ScaleY, 1.001, TAG_Done);
if (j >= 12) rotatesprite(319, (24) << 16, 65600L, 0, TILE_FRAGBAR, 0, 0, 10 + 16 + 64 + 128, 0, 0, xdim - 1, ydim - 1);
for (i = connecthead; i >= 0; i = connectpoint2[i]) for (i = connecthead; i >= 0; i = connectpoint2[i])
{ {
m initext(21 + (73 * (i & 3)), 2 + ((i & 28) << 1), &ud.user_name[i][0], sprite[ps[i].i].pal, 2 + 8 + 16 + 128); m initext(21 + (73 * (i & 3)), 2 + ((i & 28) << 1), &ud.user_name[i][0], sprite[ps[i].i].pal, 2 + 8 + 16 + 128);

View file

@ -58,7 +58,7 @@ public:
DDukeStatusBar() DDukeStatusBar()
{ {
// optionally draw at the top of the screen. // optionally draw at the top of the screen.
SetSize(tilesiz[BOTTOMSTATUSBAR].y); SetSize(tilesiz[TILE_BOTTOMSTATUSBAR].y);
scale = 1; scale = 1;
ammo_sprites = { -1, AMMO, SHOTGUNAMMO, BATTERYAMMO, RPGAMMO, HBOMBAMMO, CRYSTALAMMO, DEVISTATORAMMO, TRIPBOMBSPRITE, FREEZEAMMO + 1, HBOMBAMMO, GROWAMMO/*, FLAMETHROWERAMMO + 1*/ }; ammo_sprites = { -1, AMMO, SHOTGUNAMMO, BATTERYAMMO, RPGAMMO, HBOMBAMMO, CRYSTALAMMO, DEVISTATORAMMO, TRIPBOMBSPRITE, FREEZEAMMO + 1, HBOMBAMMO, GROWAMMO/*, FLAMETHROWERAMMO + 1*/ };
@ -345,11 +345,11 @@ public:
void Statusbar(int snum) void Statusbar(int snum)
{ {
auto p = g_player[snum].ps; auto p = g_player[snum].ps;
int h = tilesiz[BOTTOMSTATUSBAR].y; int h = tilesiz[TILE_BOTTOMSTATUSBAR].y;
int top = 200 - h; int top = 200 - h;
BeginStatusBar(320, 200, h, true); BeginStatusBar(320, 200, h, true);
DrawInventory(p, 160, 154, 0); DrawInventory(p, 160, 154, 0);
DrawGraphic(tileGetTexture(BOTTOMSTATUSBAR), 0, top, DI_ITEM_LEFT_TOP, 1, -1, -1, 1, 1); DrawGraphic(tileGetTexture(TILE_BOTTOMSTATUSBAR), 0, top, DI_ITEM_LEFT_TOP, 1, -1, -1, 1, 1);
FString format; FString format;

View file

@ -1048,6 +1048,15 @@ void checkhitsprite_d(int i, int sn)
switch (sprite[i].picnum) switch (sprite[i].picnum)
{ {
case WTGLASS1:
case WTGLASS2:
if (!isWorldTour())
break;
A_PlaySound(GLASS_BREAKING, i);
lotsofglass(i, -1, 10);
deletesprite(i);
return;
case OCEANSPRITE1: case OCEANSPRITE1:
case OCEANSPRITE2: case OCEANSPRITE2:
case OCEANSPRITE3: case OCEANSPRITE3:

View file

@ -386,7 +386,7 @@ int S_PlaySound3D(int sndnum, int spriteNum, const vec3_t* pos, int channel, ECh
{ {
auto const pl = &ps[myconnectindex]; auto const pl = &ps[myconnectindex];
if (!soundEngine->isValidSoundId(sndnum+1) || !SoundEnabled() || (unsigned)spriteNum >= MAXSPRITES || (pl->gm & MODE_MENU) || if (!soundEngine->isValidSoundId(sndnum+1) || !SoundEnabled() || (unsigned)spriteNum >= MAXSPRITES || (pl->gm & MODE_MENU) ||
(pl->timebeforeexit > 0 && pl->timebeforeexit <= GAMETICSPERSEC * 3)) return -1; (pl->timebeforeexit > 0 && pl->timebeforeexit <= REALGAMETICSPERSEC * 3)) return -1;
int userflags = S_GetUserFlags(sndnum); int userflags = S_GetUserFlags(sndnum);

View file

@ -238,7 +238,6 @@ void setsectinterpolate(int sprnum);
#endif #endif
ACTOR_INLINE_HEADER int A_CheckEnemyTile(int tileNum); ACTOR_INLINE_HEADER int A_CheckEnemyTile(int tileNum);
ACTOR_INLINE_HEADER int A_SetSprite(int spriteNum, uint32_t cliptype);
EXTERN_INLINE_HEADER int A_CheckEnemySprite(void const * s); EXTERN_INLINE_HEADER int A_CheckEnemySprite(void const * s);
@ -251,13 +250,6 @@ ACTOR_INLINE int A_CheckEnemyTile(int const tileNum)
return ((actorinfo[tileNum].flags & (SFLAG_INTERNAL_BADGUY | SFLAG_BADGUY)) != 0); return ((actorinfo[tileNum].flags & (SFLAG_INTERNAL_BADGUY | SFLAG_BADGUY)) != 0);
} }
int ssp(short i, unsigned int cliptype); //The set sprite function
void insertspriteq(int i);
ACTOR_INLINE int A_SetSprite(int const spriteNum, uint32_t cliptype)
{
return ssp(spriteNum, cliptype);
}
# endif # endif

View file

@ -160,8 +160,6 @@ void P_GetInput(int const playerNum)
lastInputTicks = currentHiTicks; lastInputTicks = currentHiTicks;
auto scaleAdjustmentToInterval = [=](double x) { return x * REALGAMETICSPERSEC / (1000.0 / elapsedInputTicks); };
if (buttonMap.ButtonDown(gamefunc_Strafe)) if (buttonMap.ButtonDown(gamefunc_Strafe))
{ {
if (!localInput.svel) if (!localInput.svel)
@ -330,7 +328,7 @@ void P_GetInput(int const playerNum)
localInput.bits |= (mouseaim << SK_AIMMODE); localInput.bits |= (mouseaim << SK_AIMMODE);
localInput.bits |= (g_gameQuit << SK_GAMEQUIT); localInput.bits |= (g_gameQuit << SK_GAMEQUIT);
localInput.bits |= inputState.GetKeyStatus(sc_Pause) << SK_PAUSE; localInput.bits |= !!inputState.GetKeyStatus(sc_Pause) << SK_PAUSE;
//localInput.bits |= ((uint32_t)inputState.GetKeyStatus(sc_Escape)) << SK_ESCAPE; fixme.This needs to be done differently //localInput.bits |= ((uint32_t)inputState.GetKeyStatus(sc_Escape)) << SK_ESCAPE; fixme.This needs to be done differently
if (isRR()) if (isRR())
@ -492,8 +490,6 @@ void P_GetInputMotorcycle(int playerNum)
lastInputTicks = currentHiTicks; lastInputTicks = currentHiTicks;
auto scaleAdjustmentToInterval = [=](double x) { return x * REALGAMETICSPERSEC / (1000.0 / elapsedInputTicks); };
pPlayer->crouch_toggle = 0; pPlayer->crouch_toggle = 0;
localInput.bits |= buttonMap.ButtonDown(gamefunc_Fire) << SK_FIRE; localInput.bits |= buttonMap.ButtonDown(gamefunc_Fire) << SK_FIRE;
@ -502,7 +498,7 @@ void P_GetInputMotorcycle(int playerNum)
localInput.bits |= buttonMap.ButtonDown(gamefunc_MedKit) << SK_MEDKIT; localInput.bits |= buttonMap.ButtonDown(gamefunc_MedKit) << SK_MEDKIT;
localInput.bits |= (buttonMap.ButtonDown(gamefunc_Inventory_Left) || localInput.bits |= (buttonMap.ButtonDown(gamefunc_Inventory_Left) ||
(buttonMap.ButtonDown(gamefunc_Dpad_Select) && (input.svel > 0 || input.q16avel < 0))) << SK_INV_LEFT; (buttonMap.ButtonDown(gamefunc_Dpad_Select) && (input.svel > 0 || input.q16avel < 0))) << SK_INV_LEFT;
localInput.bits |= inputState.GetKeyStatus(sc_Pause) << SK_PAUSE; localInput.bits |= !!inputState.GetKeyStatus(sc_Pause) << SK_PAUSE;
localInput.bits |= buttonMap.ButtonDown(gamefunc_Holo_Duke) << SK_HOLODUKE; localInput.bits |= buttonMap.ButtonDown(gamefunc_Holo_Duke) << SK_HOLODUKE;
localInput.bits |= buttonMap.ButtonDown(gamefunc_Jetpack) << SK_JETPACK; localInput.bits |= buttonMap.ButtonDown(gamefunc_Jetpack) << SK_JETPACK;
localInput.bits |= (g_gameQuit << SK_GAMEQUIT); localInput.bits |= (g_gameQuit << SK_GAMEQUIT);
@ -686,8 +682,6 @@ void P_GetInputBoat(int playerNum)
lastInputTicks = currentHiTicks; lastInputTicks = currentHiTicks;
auto scaleAdjustmentToInterval = [=](double x) { return x * REALGAMETICSPERSEC / (1000.0 / elapsedInputTicks); };
pPlayer->crouch_toggle = 0; pPlayer->crouch_toggle = 0;
localInput.bits |= buttonMap.ButtonDown(gamefunc_Fire) << SK_FIRE; localInput.bits |= buttonMap.ButtonDown(gamefunc_Fire) << SK_FIRE;
@ -696,7 +690,7 @@ void P_GetInputBoat(int playerNum)
localInput.bits |= buttonMap.ButtonDown(gamefunc_MedKit) << SK_MEDKIT; localInput.bits |= buttonMap.ButtonDown(gamefunc_MedKit) << SK_MEDKIT;
localInput.bits |= (buttonMap.ButtonDown(gamefunc_Inventory_Left) || localInput.bits |= (buttonMap.ButtonDown(gamefunc_Inventory_Left) ||
(buttonMap.ButtonDown(gamefunc_Dpad_Select) && (input.svel > 0 || input.q16avel < 0))) << SK_INV_LEFT; (buttonMap.ButtonDown(gamefunc_Dpad_Select) && (input.svel > 0 || input.q16avel < 0))) << SK_INV_LEFT;
localInput.bits |= inputState.GetKeyStatus(sc_Pause) << SK_PAUSE; localInput.bits |= !!inputState.GetKeyStatus(sc_Pause) << SK_PAUSE;
localInput.bits |= buttonMap.ButtonDown(gamefunc_Holo_Duke) << SK_HOLODUKE; localInput.bits |= buttonMap.ButtonDown(gamefunc_Holo_Duke) << SK_HOLODUKE;
localInput.bits |= buttonMap.ButtonDown(gamefunc_Jetpack) << SK_JETPACK; localInput.bits |= buttonMap.ButtonDown(gamefunc_Jetpack) << SK_JETPACK;
localInput.bits |= (g_gameQuit << SK_GAMEQUIT); localInput.bits |= (g_gameQuit << SK_GAMEQUIT);

View file

@ -104,7 +104,7 @@ void G_NewGame(int volumeNum, int levelNum, int skillNum)
G_BonusScreen(0); G_BonusScreen(0);
#endif #endif
show_shareware = GAMETICSPERSEC*34; show_shareware = REALGAMETICSPERSEC*30;
ud.level_number = levelNum; ud.level_number = levelNum;
ud.volume_number = volumeNum; ud.volume_number = volumeNum;

View file

@ -965,7 +965,7 @@ int32_t sv_saveandmakesnapshot(FileWriter &fil, int8_t spot, bool isAutoSave)
if (isAutoSave) if (isAutoSave)
h.ptrsize |= 1u << 7u; h.ptrsize |= 1u << 7u;
h.bytever = BYTEVERSION; h.bytever = 0;
h.userbytever = ud.userbytever; h.userbytever = ud.userbytever;
h.scriptcrc = 0; h.scriptcrc = 0;
@ -1053,14 +1053,8 @@ int32_t sv_loadheader(FileReader &fill, int32_t spot, savehead_t *h)
return -2; return -2;
} }
if (h->majorver != SV_MAJOR_VER || h->minorver != SV_MINOR_VER || h->bytever != BYTEVERSION || h->userbytever != ud.userbytever || ScriptCode.Size()) if (h->majorver != SV_MAJOR_VER || h->minorver != SV_MINOR_VER || h->bytever != 0 || h->userbytever != ud.userbytever || ScriptCode.Size())
{ {
#ifndef DEBUGGINGAIDS
if (havedemo)
#endif
Printf("Incompatible savegame. Expected version %d.%d.%d.%d, found %d.%d.%d.%d\n", SV_MAJOR_VER, SV_MINOR_VER, BYTEVERSION,
ud.userbytever, h->majorver, h->minorver, h->bytever, h->userbytever);
if (h->majorver == SV_MAJOR_VER && h->minorver == SV_MINOR_VER) if (h->majorver == SV_MAJOR_VER && h->minorver == SV_MINOR_VER)
{ {
return 1; return 1;

View file

@ -284,14 +284,15 @@ void G_DisplayRest(int32_t smoothratio)
if ((unsigned) a < MAXTILES) if ((unsigned) a < MAXTILES)
{ {
vec2_t crosshairpos = { (160<<16) - (g_player[myconnectindex].ps->look_ang<<15), 100<<16 }; vec2_t crosshairpos = { };
//vec2_t crosshairpos = { ud.returnvar[0], ud.returnvar[1] }; //vec2_t crosshairpos = { ud.returnvar[0], ud.returnvar[1] };
uint32_t crosshair_o = 1|2; uint32_t crosshair_o = 1|2;
uint32_t crosshair_scale = divscale16(cl_crosshairscale, 100); double crosshair_scale = cl_crosshairscale * .001;
if (isRR()) if (isRR()) crosshair_scale *= .5;
crosshair_scale >>= 1;
rotatesprite_win(crosshairpos.x, crosshairpos.y, crosshair_scale, 0, a, 0, 0, crosshair_o); DrawTexture(twod, tileGetTexture(a), 160 - (g_player[myconnectindex].ps->look_ang >> 1), 100,
DTA_FullscreenScale, 3, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, DTA_ScaleX, crosshair_scale, DTA_ScaleY, crosshair_scale,
DTA_ViewportX, windowxy1.x, DTA_ViewportY, windowxy1.y, DTA_ViewportWidth, windowxy2.x - windowxy1.x, DTA_ViewportY, windowxy2.y - windowxy1.y, TAG_DONE);
} }
} }