Browse Source

Merge branch 'master' into dmc

dmc
Andrey Akhmichin 5 years ago
parent
commit
5d3e7bb557
  1. 10
      cl_dll/ammo.cpp
  2. 4
      cl_dll/ammo_secondary.cpp
  3. 8
      cl_dll/ammohistory.cpp
  4. 2
      cl_dll/battery.cpp
  5. 4
      cl_dll/cl_util.h
  6. 2
      cl_dll/death.cpp
  7. 26
      cl_dll/health.cpp
  8. 2
      cl_dll/hud_redraw.cpp
  9. 11
      cl_dll/saytext.cpp
  10. 2
      cl_dll/scoreboard.cpp
  11. 12
      cl_dll/view.cpp
  12. 12
      dlls/player.h
  13. 4
      dlls/util.h
  14. 13
      scripts/waifulib/xcompile.py

10
cl_dll/ammo.cpp

@ -155,7 +155,7 @@ void WeaponsResource::LoadWeaponSprites( WEAPON *pWeapon ) @@ -155,7 +155,7 @@ void WeaponsResource::LoadWeaponSprites( WEAPON *pWeapon )
pWeapon->hInactive = SPR_Load( sz );
pWeapon->rcInactive = p->rc;
gHR.iHistoryGap = max( gHR.iHistoryGap, pWeapon->rcActive.bottom - pWeapon->rcActive.top );
gHR.iHistoryGap = Q_max( gHR.iHistoryGap, pWeapon->rcActive.bottom - pWeapon->rcActive.top );
}
else
pWeapon->hInactive = 0;
@ -177,7 +177,7 @@ void WeaponsResource::LoadWeaponSprites( WEAPON *pWeapon ) @@ -177,7 +177,7 @@ void WeaponsResource::LoadWeaponSprites( WEAPON *pWeapon )
pWeapon->hAmmo = SPR_Load( sz );
pWeapon->rcAmmo = p->rc;
gHR.iHistoryGap = max( gHR.iHistoryGap, pWeapon->rcActive.bottom - pWeapon->rcActive.top );
gHR.iHistoryGap = Q_max( gHR.iHistoryGap, pWeapon->rcActive.bottom - pWeapon->rcActive.top );
}
else
pWeapon->hAmmo = 0;
@ -189,7 +189,7 @@ void WeaponsResource::LoadWeaponSprites( WEAPON *pWeapon ) @@ -189,7 +189,7 @@ void WeaponsResource::LoadWeaponSprites( WEAPON *pWeapon )
pWeapon->hAmmo2 = SPR_Load( sz );
pWeapon->rcAmmo2 = p->rc;
gHR.iHistoryGap = max( gHR.iHistoryGap, pWeapon->rcActive.bottom - pWeapon->rcActive.top );
gHR.iHistoryGap = Q_max( gHR.iHistoryGap, pWeapon->rcActive.bottom - pWeapon->rcActive.top );
}
else
pWeapon->hAmmo2 = 0;
@ -323,7 +323,7 @@ int CHudAmmo::VidInit( void ) @@ -323,7 +323,7 @@ int CHudAmmo::VidInit( void )
giBucketWidth = gHUD.GetSpriteRect( m_HUD_bucket0 ).right - gHUD.GetSpriteRect( m_HUD_bucket0 ).left;
giBucketHeight = gHUD.GetSpriteRect( m_HUD_bucket0 ).bottom - gHUD.GetSpriteRect( m_HUD_bucket0 ).top;
gHR.iHistoryGap = max( gHR.iHistoryGap, gHUD.GetSpriteRect( m_HUD_bucket0 ).bottom - gHUD.GetSpriteRect( m_HUD_bucket0 ).top );
gHR.iHistoryGap = Q_max( gHR.iHistoryGap, gHUD.GetSpriteRect( m_HUD_bucket0 ).bottom - gHUD.GetSpriteRect( m_HUD_bucket0 ).top );
// If we've already loaded weapons, let's get new sprites
gWR.LoadAllWeaponSprites();
@ -832,7 +832,7 @@ int CHudAmmo::Draw( float flTime ) @@ -832,7 +832,7 @@ int CHudAmmo::Draw( float flTime )
AmmoWidth = gHUD.GetSpriteRect( gHUD.m_HUD_number_0 ).right - gHUD.GetSpriteRect( gHUD.m_HUD_number_0 ).left;
a = (int)max( MIN_ALPHA, m_fFade );
a = (int)Q_max( MIN_ALPHA, m_fFade );
if( m_fFade > 0 )
m_fFade -= ( gHUD.m_flTimeDelta * 20 );

4
cl_dll/ammo_secondary.cpp

@ -61,7 +61,7 @@ int CHudAmmoSecondary::Draw( float flTime ) @@ -61,7 +61,7 @@ int CHudAmmoSecondary::Draw( float flTime )
// draw secondary ammo icons above normal ammo readout
int a, x, y, r, g, b, AmmoWidth;
UnpackRGB( r, g, b, RGB_YELLOWISH );
a = (int)max( MIN_ALPHA, m_fFade );
a = (int)Q_max( MIN_ALPHA, m_fFade );
if( m_fFade > 0 )
m_fFade -= ( gHUD.m_flTimeDelta * 20 ); // slowly lower alpha to fade out icons
ScaleColors( r, g, b, a );
@ -142,7 +142,7 @@ int CHudAmmoSecondary::MsgFunc_SecAmmoVal( const char *pszName, int iSize, void @@ -142,7 +142,7 @@ int CHudAmmoSecondary::MsgFunc_SecAmmoVal( const char *pszName, int iSize, void
int count = 0;
for( int i = 0; i < MAX_SEC_AMMO_VALUES; i++ )
{
count += max( 0, m_iAmmoAmounts[i] );
count += Q_max( 0, m_iAmmoAmounts[i] );
}
if( count == 0 )

8
cl_dll/ammohistory.cpp

@ -111,7 +111,7 @@ int HistoryResource::DrawAmmoHistory( float flTime ) @@ -111,7 +111,7 @@ int HistoryResource::DrawAmmoHistory( float flTime )
{
if( rgAmmoHistory[i].type )
{
rgAmmoHistory[i].DisplayTime = min( rgAmmoHistory[i].DisplayTime, gHUD.m_flTime + HISTORY_DRAW_TIME );
rgAmmoHistory[i].DisplayTime = Q_min( rgAmmoHistory[i].DisplayTime, gHUD.m_flTime + HISTORY_DRAW_TIME );
if( rgAmmoHistory[i].DisplayTime <= flTime )
{
@ -127,7 +127,7 @@ int HistoryResource::DrawAmmoHistory( float flTime ) @@ -127,7 +127,7 @@ int HistoryResource::DrawAmmoHistory( float flTime )
int r, g, b;
UnpackRGB( r, g, b, RGB_YELLOWISH );
float scale = ( rgAmmoHistory[i].DisplayTime - flTime ) * 80;
ScaleColors( r, g, b, min( scale, 255 ) );
ScaleColors( r, g, b, Q_min( scale, 255 ) );
// Draw the pic
int ypos = ScreenHeight - (AMMO_PICKUP_PICK_HEIGHT + (AMMO_PICKUP_GAP * i));
@ -158,7 +158,7 @@ int HistoryResource::DrawAmmoHistory( float flTime ) @@ -158,7 +158,7 @@ int HistoryResource::DrawAmmoHistory( float flTime )
UnpackRGB( r, g, b, RGB_REDISH ); // if the weapon doesn't have ammo, display it as red
float scale = ( rgAmmoHistory[i].DisplayTime - flTime ) * 80;
ScaleColors( r, g, b, min( scale, 255 ) );
ScaleColors( r, g, b, Q_min( scale, 255 ) );
int ypos = ScreenHeight - ( AMMO_PICKUP_PICK_HEIGHT + ( AMMO_PICKUP_GAP * i ) );
int xpos = ScreenWidth - ( weap->rcInactive.right - weap->rcInactive.left );
@ -176,7 +176,7 @@ int HistoryResource::DrawAmmoHistory( float flTime ) @@ -176,7 +176,7 @@ int HistoryResource::DrawAmmoHistory( float flTime )
UnpackRGB( r, g, b, RGB_YELLOWISH );
float scale = ( rgAmmoHistory[i].DisplayTime - flTime ) * 80;
ScaleColors( r, g, b, min( scale, 255 ) );
ScaleColors( r, g, b, Q_min( scale, 255 ) );
int ypos = ScreenHeight - ( AMMO_PICKUP_PICK_HEIGHT + ( AMMO_PICKUP_GAP * i ) );
int xpos = ScreenWidth - ( rect.right - rect.left ) - 10;

2
cl_dll/battery.cpp

@ -78,7 +78,7 @@ int CHudBattery::Draw( float flTime ) @@ -78,7 +78,7 @@ int CHudBattery::Draw( float flTime )
wrect_t rc;
rc = *m_prc2;
rc.top += m_iHeight * ( (float)( 100 - ( min( 100,m_iBat ) ) ) * 0.01 ); // battery can go from 0 to 100 so * 0.01 goes from 0 to 1
rc.top += m_iHeight * ( (float)( 100 - ( Q_min( 100, m_iBat ) ) ) * 0.01 ); // battery can go from 0 to 100 so * 0.01 goes from 0 to 1
UnpackRGB( r, g, b, RGB_YELLOWISH );

4
cl_dll/cl_util.h

@ -148,8 +148,8 @@ inline void CenterPrint( const char *string ) @@ -148,8 +148,8 @@ inline void CenterPrint( const char *string )
inline void PlaySound( const char *szSound, float vol ) { gEngfuncs.pfnPlaySoundByName( szSound, vol ); }
inline void PlaySound( int iSound, float vol ) { gEngfuncs.pfnPlaySoundByIndex( iSound, vol ); }
#define max(a, b) (((a) > (b)) ? (a) : (b))
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define Q_max(a, b) (((a) > (b)) ? (a) : (b))
#define Q_min(a, b) (((a) < (b)) ? (a) : (b))
#define fabs(x) ((x) > 0 ? (x) : 0 - (x))
void ScaleColors( int &r, int &g, int &b, int a );

2
cl_dll/death.cpp

@ -127,7 +127,7 @@ int CHudDeathNotice::Draw( float flTime ) @@ -127,7 +127,7 @@ int CHudDeathNotice::Draw( float flTime )
continue;
}
rgDeathNoticeList[i].flDisplayTime = min( rgDeathNoticeList[i].flDisplayTime, gHUD.m_flTime + DEATHNOTICE_DISPLAY_TIME );
rgDeathNoticeList[i].flDisplayTime = Q_min( rgDeathNoticeList[i].flDisplayTime, gHUD.m_flTime + DEATHNOTICE_DISPLAY_TIME );
// Only draw if the viewport will let me
// vgui dropped out

26
cl_dll/health.cpp

@ -271,25 +271,25 @@ void CHudHealth::CalcDamageDirection( vec3_t vecFrom ) @@ -271,25 +271,25 @@ void CHudHealth::CalcDamageDirection( vec3_t vecFrom )
if( side > 0 )
{
if( side > 0.3 )
m_fAttackFront = max( m_fAttackFront, side );
m_fAttackFront = Q_max( m_fAttackFront, side );
}
else
{
float f = fabs( side );
if( f > 0.3 )
m_fAttackRear = max( m_fAttackRear, f );
m_fAttackRear = Q_max( m_fAttackRear, f );
}
if( front > 0 )
{
if( front > 0.3 )
m_fAttackRight = max( m_fAttackRight, front );
m_fAttackRight = Q_max( m_fAttackRight, front );
}
else
{
float f = fabs( front );
if( f > 0.3 )
m_fAttackLeft = max( m_fAttackLeft, f );
m_fAttackLeft = Q_max( m_fAttackLeft, f );
}
}
}
@ -311,28 +311,28 @@ int CHudHealth::DrawPain( float flTime ) @@ -311,28 +311,28 @@ int CHudHealth::DrawPain( float flTime )
if( m_fAttackFront > 0.4 )
{
GetPainColor( r, g, b );
shade = a * max( m_fAttackFront, 0.5 );
shade = a * Q_max( m_fAttackFront, 0.5 );
ScaleColors( r, g, b, shade );
SPR_Set( m_hSprite, r, g, b );
x = ScreenWidth / 2 - SPR_Width( m_hSprite, 0 ) / 2;
y = ScreenHeight / 2 - SPR_Height( m_hSprite, 0 ) * 3;
SPR_DrawAdditive( 0, x, y, NULL );
m_fAttackFront = max( 0, m_fAttackFront - fFade );
m_fAttackFront = Q_max( 0, m_fAttackFront - fFade );
} else
m_fAttackFront = 0;
if( m_fAttackRight > 0.4 )
{
GetPainColor( r, g, b );
shade = a * max( m_fAttackRight, 0.5 );
shade = a * Q_max( m_fAttackRight, 0.5 );
ScaleColors( r, g, b, shade );
SPR_Set( m_hSprite, r, g, b );
x = ScreenWidth / 2 + SPR_Width( m_hSprite, 1 ) * 2;
y = ScreenHeight / 2 - SPR_Height( m_hSprite,1 ) / 2;
SPR_DrawAdditive( 1, x, y, NULL );
m_fAttackRight = max( 0, m_fAttackRight - fFade );
m_fAttackRight = Q_max( 0, m_fAttackRight - fFade );
}
else
m_fAttackRight = 0;
@ -340,14 +340,14 @@ int CHudHealth::DrawPain( float flTime ) @@ -340,14 +340,14 @@ int CHudHealth::DrawPain( float flTime )
if( m_fAttackRear > 0.4 )
{
GetPainColor( r, g, b );
shade = a * max( m_fAttackRear, 0.5 );
shade = a * Q_max( m_fAttackRear, 0.5 );
ScaleColors( r, g, b, shade );
SPR_Set( m_hSprite, r, g, b );
x = ScreenWidth / 2 - SPR_Width( m_hSprite, 2 ) / 2;
y = ScreenHeight / 2 + SPR_Height( m_hSprite, 2 ) * 2;
SPR_DrawAdditive( 2, x, y, NULL );
m_fAttackRear = max( 0, m_fAttackRear - fFade );
m_fAttackRear = Q_max( 0, m_fAttackRear - fFade );
}
else
m_fAttackRear = 0;
@ -355,7 +355,7 @@ int CHudHealth::DrawPain( float flTime ) @@ -355,7 +355,7 @@ int CHudHealth::DrawPain( float flTime )
if( m_fAttackLeft > 0.4 )
{
GetPainColor( r, g, b );
shade = a * max( m_fAttackLeft, 0.5 );
shade = a * Q_max( m_fAttackLeft, 0.5 );
ScaleColors( r, g, b, shade );
SPR_Set( m_hSprite, r, g, b );
@ -363,7 +363,7 @@ int CHudHealth::DrawPain( float flTime ) @@ -363,7 +363,7 @@ int CHudHealth::DrawPain( float flTime )
y = ScreenHeight / 2 - SPR_Height( m_hSprite,3 ) / 2;
SPR_DrawAdditive( 3, x, y, NULL );
m_fAttackLeft = max( 0, m_fAttackLeft - fFade );
m_fAttackLeft = Q_max( 0, m_fAttackLeft - fFade );
} else
m_fAttackLeft = 0;
@ -395,7 +395,7 @@ int CHudHealth::DrawDamage( float flTime ) @@ -395,7 +395,7 @@ int CHudHealth::DrawDamage( float flTime )
SPR_Set( gHUD.GetSprite( m_HUD_dmg_bio + i ), r, g, b );
SPR_DrawAdditive( 0, pdmg->x, pdmg->y, &gHUD.GetSpriteRect( m_HUD_dmg_bio + i ) );
pdmg->fExpire = min( flTime + DMG_IMAGE_LIFE, pdmg->fExpire );
pdmg->fExpire = Q_min( flTime + DMG_IMAGE_LIFE, pdmg->fExpire );
if( pdmg->fExpire <= flTime // when the time has expired
&& a < 40 ) // and the flash is at the low point of the cycle

2
cl_dll/hud_redraw.cpp

@ -46,7 +46,7 @@ void CHud::Think( void ) @@ -46,7 +46,7 @@ void CHud::Think( void )
if( m_iFOV == 0 )
{
// only let players adjust up in fov, and only if they are not overriden by something else
m_iFOV = max( default_fov->value, 90 );
m_iFOV = Q_max( default_fov->value, 90 );
}
}

11
cl_dll/saytext.cpp

@ -96,10 +96,7 @@ int CHudSayText::Draw( float flTime ) @@ -96,10 +96,7 @@ int CHudSayText::Draw( float flTime )
int y = Y_START;
// make sure the scrolltime is within reasonable bounds, to guard against the clock being reset
flScrollTime = min( flScrollTime, flTime + m_HUD_saytext_time->value );
// make sure the scrolltime is within reasonable bounds, to guard against the clock being reset
flScrollTime = min( flScrollTime, flTime + m_HUD_saytext_time->value );
flScrollTime = Q_min( flScrollTime, flTime + m_HUD_saytext_time->value );
if( flScrollTime <= flTime )
{
@ -126,8 +123,8 @@ int CHudSayText::Draw( float flTime ) @@ -126,8 +123,8 @@ int CHudSayText::Draw( float flTime )
static char buf[MAX_PLAYER_NAME_LENGTH + 32];
// draw the first x characters in the player color
strncpy( buf, g_szLineBuffer[i], min(g_iNameLengths[i], MAX_PLAYER_NAME_LENGTH + 32 ) );
buf[min( g_iNameLengths[i], MAX_PLAYER_NAME_LENGTH + 31 )] = 0;
strncpy( buf, g_szLineBuffer[i], Q_min(g_iNameLengths[i], MAX_PLAYER_NAME_LENGTH + 32 ) );
buf[Q_min( g_iNameLengths[i], MAX_PLAYER_NAME_LENGTH + 31 )] = 0;
DrawSetTextColor( g_pflNameColors[i][0], g_pflNameColors[i][1], g_pflNameColors[i][2] );
int x = DrawConsoleString( LINE_START, y, buf );
@ -196,7 +193,7 @@ void CHudSayText::SayTextPrint( const char *pszBuf, int iBufSize, int clientInde @@ -196,7 +193,7 @@ void CHudSayText::SayTextPrint( const char *pszBuf, int iBufSize, int clientInde
}
}
strncpy( g_szLineBuffer[i], pszBuf, max( iBufSize - 1, MAX_CHARS_PER_LINE - 1 ) );
strncpy( g_szLineBuffer[i], pszBuf, Q_max( iBufSize - 1, MAX_CHARS_PER_LINE - 1 ) );
// make sure the text fits in one line
EnsureTextFitsInOneLineAndWrapIfHaveTo( i );

2
cl_dll/scoreboard.cpp

@ -577,7 +577,7 @@ int CHudScoreboard::MsgFunc_TeamInfo( const char *pszName, int iSize, void *pbuf @@ -577,7 +577,7 @@ int CHudScoreboard::MsgFunc_TeamInfo( const char *pszName, int iSize, void *pbuf
if( g_TeamInfo[j].name[0] == '\0' )
break;
}
m_iNumTeams = max( j, m_iNumTeams );
m_iNumTeams = Q_max( j, m_iNumTeams );
strncpy( g_TeamInfo[j].name, g_PlayerExtraInfo[i].teamname, MAX_TEAM_NAME );
g_TeamInfo[j].players = 0;

12
cl_dll/view.cpp

@ -199,8 +199,8 @@ float V_CalcBob( struct ref_params_s *pparams ) @@ -199,8 +199,8 @@ float V_CalcBob( struct ref_params_s *pparams )
bob = sqrt( vel[0] * vel[0] + vel[1] * vel[1] ) * cl_bob->value;
bob = bob * 0.3 + bob * 0.7 * sin(cycle);
bob = min( bob, 4 );
bob = max( bob, -7 );
bob = Q_min( bob, 4 );
bob = Q_max( bob, -7 );
return bob;
}
@ -715,7 +715,7 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams ) @@ -715,7 +715,7 @@ void V_CalcNormalRefdef( struct ref_params_s *pparams )
if( dt > 0.0 )
{
frac = ( t - ViewInterp.OriginTime[foundidx & ORIGIN_MASK] ) / dt;
frac = min( 1.0, frac );
frac = Q_min( 1.0, frac );
VectorSubtract( ViewInterp.Origins[( foundidx + 1 ) & ORIGIN_MASK], ViewInterp.Origins[foundidx & ORIGIN_MASK], delta );
VectorMA( ViewInterp.Origins[foundidx & ORIGIN_MASK], frac, delta, neworg );
@ -1336,7 +1336,7 @@ void V_CalcSpectatorRefdef( struct ref_params_s *pparams ) @@ -1336,7 +1336,7 @@ void V_CalcSpectatorRefdef( struct ref_params_s *pparams )
double frac;
frac = ( t - ViewInterp.AngleTime[foundidx & ORIGIN_MASK] ) / dt;
frac = min( 1.0, frac );
frac = Q_min( 1.0, frac );
// interpolate angles
InterpolateAngles( ViewInterp.Angles[foundidx & ORIGIN_MASK], ViewInterp.Angles[( foundidx + 1 ) & ORIGIN_MASK], v_angles, frac );
@ -1383,7 +1383,7 @@ void V_CalcSpectatorRefdef( struct ref_params_s *pparams ) @@ -1383,7 +1383,7 @@ void V_CalcSpectatorRefdef( struct ref_params_s *pparams )
if( dt > 0.0 )
{
frac = ( t - ViewInterp.OriginTime[foundidx & ORIGIN_MASK] ) / dt;
frac = min( 1.0, frac );
frac = Q_min( 1.0, frac );
VectorSubtract( ViewInterp.Origins[( foundidx + 1 ) & ORIGIN_MASK], ViewInterp.Origins[foundidx & ORIGIN_MASK], delta );
VectorMA( ViewInterp.Origins[foundidx & ORIGIN_MASK], frac, delta, neworg );
@ -1534,7 +1534,7 @@ void V_DropPunchAngle( float frametime, float *ev_punchangle ) @@ -1534,7 +1534,7 @@ void V_DropPunchAngle( float frametime, float *ev_punchangle )
len = VectorNormalize( ev_punchangle );
len -= ( 10.0 + len * 0.5 ) * frametime;
len = max( len, 0.0 );
len = Q_max( len, 0.0 );
VectorScale( ev_punchangle, len, ev_punchangle );
}

12
dlls/player.h

@ -314,7 +314,12 @@ public: @@ -314,7 +314,12 @@ public:
void SetCustomDecalFrames( int nFrames );
int GetCustomDecalFrames( void );
Vector m_vecLastViewAngles;
void TabulateAmmo( void );
float m_flStartCharge;
float m_flAmmoStartCharge;
float m_flPlayAftershock;
float m_flNextAmmoBurn;// while charging, when to absorb another unit of player's ammo?
//Player ID
void InitStatusBar( void );
@ -445,7 +450,6 @@ public: @@ -445,7 +450,6 @@ public:
bool Spectate_Think();
bool Spectate_Follow( EHANDLE &pPlayer,int iMode );
bool Spectate_HLTV();
bool m_bSentBhopcap; // If false, the player just joined and needs a bhopcap message.
//-- Martin Webrant
int m_bHasFlag;
@ -476,6 +480,10 @@ public: @@ -476,6 +480,10 @@ public:
CGrapple *m_ppHook;
void Service_Grapple();
Vector m_vecLastViewAngles;
bool m_bSentBhopcap; // If false, the player just joined and needs a bhopcap message.
};
//++ BulliT

4
dlls/util.h

@ -108,7 +108,11 @@ typedef int BOOL; @@ -108,7 +108,11 @@ typedef int BOOL;
// The _declspec forces them to be exported by name so we can do a lookup with GetProcAddress()
// The function is used to intialize / allocate the object for the entity
#if defined(CLIENT_DLL)
#define LINK_ENTITY_TO_CLASS(mapClassName,DLLClassName)
#else // CLIENT_DLL
#define LINK_ENTITY_TO_CLASS(mapClassName,DLLClassName) extern "C" EXPORT void mapClassName( entvars_t *pev ); void mapClassName( entvars_t *pev ) { GetClassPtr( (DLLClassName *)pev ); }
#endif // CLIENT_DLL
//
// Conversion among the three types of "entity", including identity-conversions.

13
scripts/waifulib/xcompile.py

@ -64,7 +64,7 @@ class Android: @@ -64,7 +64,7 @@ class Android:
else:
self.ndk_rev = 10
if self.ndk_rev not in [10, 19]:
if self.ndk_rev not in [10, 19, 20]:
ctx.fatal('Unknown NDK revision: {}'.format(self.ndk_rev))
self.arch = arch
@ -197,7 +197,10 @@ class Android: @@ -197,7 +197,10 @@ class Android:
return os.path.abspath(os.path.join(self.ndk_home, path))
def cflags(self):
cflags = ['--sysroot={0}'.format(self.sysroot()), '-DANDROID', '-D__ANDROID__']
cflags = []
if self.ndk_rev < 20:
cflags = ['--sysroot={0}'.format(self.sysroot())]
cflags += ['-DANDROID', '-D__ANDROID__']
cflags += ['-I{0}'.format(self.system_stl())]
if self.is_arm():
if self.arch == 'armeabi-v7a':
@ -218,7 +221,9 @@ class Android: @@ -218,7 +221,9 @@ class Android:
# they go before object list
def linkflags(self):
linkflags = ['--sysroot={0}'.format(self.sysroot())]
linkflags = []
if self.ndk_rev < 20:
linkflags = ['--sysroot={0}'.format(self.sysroot())]
return linkflags
def ldflags(self):
@ -277,7 +282,7 @@ def configure(conf): @@ -277,7 +282,7 @@ def configure(conf):
def post_compiler_cxx_configure(conf):
if conf.options.ANDROID_OPTS:
if conf.android.ndk_rev >= 19:
if conf.android.ndk_rev == 19:
conf.env.CXXFLAGS_cxxshlib += ['-static-libstdc++']
conf.env.LDFLAGS_cxxshlib += ['-static-libstdc++']
return

Loading…
Cancel
Save