Skip to content

Commit

Permalink
Merge branch 'master' into hlfixed
Browse files Browse the repository at this point in the history
  • Loading branch information
nekonomicon committed Oct 31, 2023
2 parents 084c954 + 7ca2750 commit 2c59674
Show file tree
Hide file tree
Showing 16 changed files with 66 additions and 88 deletions.
14 changes: 8 additions & 6 deletions cl_dll/MOTD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ int CHudMOTD::Draw( float fTime )
//bool bScroll;
// find the top of where the MOTD should be drawn, so the whole thing is centered in the screen
int ypos = ( ScreenHeight - LINE_HEIGHT * m_iLines ) / 2; // shift it up slightly
char *ch = m_szMOTD;
unsigned char *ch = (unsigned char*)m_szMOTD;
int xpos = ( ScreenWidth - gHUD.m_scrinfo.charWidths['M'] * m_iMaxLength ) / 2;
if( xpos < 30 )
xpos = 30;
Expand All @@ -95,19 +95,21 @@ int CHudMOTD::Draw( float fTime )
gHUD.DrawDarkRectangle( xpos - 5, ypos_r - 5, xmax - xpos + 10, height + 10 );
while( *ch )
{
char *next_line;
int line_length = 0; // count the length of the current line
unsigned char *next_line;
for( next_line = ch; *next_line != '\n' && *next_line != 0; next_line++ )
line_length += gHUD.m_scrinfo.charWidths[*next_line];
char *top = next_line;
;
// int line_length = 0; // count the length of the current line
// for( next_line = ch; *next_line != '\n' && *next_line != 0; next_line++ )
// line_length += gHUD.m_scrinfo.charWidths[*next_line];
unsigned char *top = next_line;
if( *top == '\n' )
*top = 0;
else
top = NULL;

// find where to start drawing the line
if( ( ypos > ROW_RANGE_MIN ) && ( ypos + LINE_HEIGHT <= ypos_r + height ) )
DrawUtfString( xpos, ypos, xmax, ch, 255, 180, 0 );
DrawUtfString( xpos, ypos, xmax, (const char*)ch, 255, 180, 0 );

ypos += LINE_HEIGHT;

Expand Down
2 changes: 1 addition & 1 deletion cl_dll/cdll_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "vgui_TeamFortressViewport.h"
#endif

#if GOLDSOURCE_SUPPORT && (_WIN32 || __linux__ || __APPLE__) && (__i386 || _M_IX86)
#if GOLDSOURCE_SUPPORT && (XASH_WIN32 || XASH_LINUX || XASH_APPLE) && XASH_X86
#define USE_FAKE_VGUI !USE_VGUI
#if USE_FAKE_VGUI
#include "VGUI_Panel.h"
Expand Down
6 changes: 2 additions & 4 deletions cl_dll/cl_dll.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#pragma once
#if !defined(CL_DLL_H)
#define CL_DLL_H
#include "build.h"
typedef unsigned char byte;
typedef unsigned short word;
typedef float vec_t;
Expand All @@ -39,7 +40,7 @@ typedef float vec_t;
#include "../engine/cdll_int.h"
#include "../dlls/cdll_dll.h"

#if !_WIN32
#if !XASH_WIN32
#define _cdecl
#endif
#include "exportdef.h"
Expand All @@ -49,9 +50,6 @@ typedef float vec_t;
#else
#include <math.h>
#endif
#if __LP64__ || __LLP64__ || _WIN64 || (__x86_64__ && !__ILP32__) || _M_X64 || __ia64 || _M_IA64 || __aarch64__ || __powerpc64__
#define XASH_64BIT 1
#endif

extern cl_enginefunc_t gEngfuncs;
#include "../engine/mobility_int.h"
Expand Down
2 changes: 1 addition & 1 deletion cl_dll/in_camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "camera.h"
#include "in_defs.h"

#if _WIN32
#if XASH_WIN32
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define WIN32_EXTRA_LEAN
#define HSPRITE WINDOWS_HSPRITE
Expand Down
Loading

0 comments on commit 2c59674

Please sign in to comment.