Skip to content

Commit

Permalink
fix macos build( maybe? #296 )
Browse files Browse the repository at this point in the history
  • Loading branch information
nillerusr committed Oct 6, 2023
1 parent e7addfc commit 2636f1a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions public/sentence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,6 @@ unsigned int CPhonemeTag::ComputeDataCheckSum()
//-----------------------------------------------------------------------------
// Purpose: Simple language to string and string to language lookup dictionary
//-----------------------------------------------------------------------------
#if defined(__i386__) || defined(__x86_64__)
#pragma pack(1)
#endif

struct CCLanguage
{
int type;
Expand All @@ -371,9 +367,6 @@ static CCLanguage g_CCLanguageLookup[] =
{ CC_THAI, "thai", 0 , 150, 250 },
{ CC_PORTUGUESE,"portuguese", 0 , 0, 150 },
};
#if defined(__i386__) || defined(__x86_64__)
#pragma pack()
#endif

void CSentence::ColorForLanguage( int language, unsigned char& r, unsigned char& g, unsigned char& b )
{
Expand Down Expand Up @@ -1767,4 +1760,4 @@ void CSentence::CreateEventWordDistribution( char const *pszText, float flSenten
}


#endif // !_STATIC_LINKED || _SHARED_LIB
#endif // !_STATIC_LINKED || _SHARED_LIB

3 comments on commit 2636f1a

@MaddTheSane
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the rationale behind packing g_CCLanguageLookup, if it is known?

@MaddTheSane
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And yes, it now links.

@nillerusr
Copy link
Owner Author

@nillerusr nillerusr commented on 2636f1a Oct 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaddTheSane

What was the rationale behind packing

There is many strange places in valve's code like that. Typical source engine bruh moment

Please sign in to comment.