Browse Source

Some cleanup. Add false_vgui include path to makefiles

asheep
Roman Chistokhodov 7 years ago
parent
commit
33de8458d6
  1. 5
      cl_dll/Android.mk
  2. 2
      cl_dll/CMakeLists.txt
  3. 2
      cl_dll/Makefile
  4. 3
      cl_dll/cdll_int.cpp
  5. 4
      cl_dll/cl_dll.dsp
  6. 13
      utils/false_vgui/include/VGUI.h
  7. 37
      utils/false_vgui/include/VGUI_Bitmap.h
  8. 62
      utils/false_vgui/include/VGUI_Image.h

5
cl_dll/Android.mk

@ -91,7 +91,7 @@ SRCS+=./view.cpp @@ -91,7 +91,7 @@ SRCS+=./view.cpp
SRCS+=./input_xash3d.cpp
SRCS+=./scoreboard.cpp
SRCS+=./MOTD.cpp
INCLUDES = -I../common -I. -I../game_shared -I../pm_shared -I../engine -I../dlls
INCLUDES = -I../common -I. -I../game_shared -I../pm_shared -I../engine -I../dlls -I../utils/false_vgui/include
DEFINES = -Wno-write-strings -DLINUX -D_LINUX -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DCLIENT_WEAPONS -DCLIENT_DLL -w
LOCAL_C_INCLUDES := $(LOCAL_PATH)/. \
@ -99,7 +99,8 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/. \ @@ -99,7 +99,8 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/. \
$(LOCAL_PATH)/../engine \
$(LOCAL_PATH)/../game_shared \
$(LOCAL_PATH)/../dlls \
$(LOCAL_PATH)/../pm_shared
$(LOCAL_PATH)/../pm_shared \
$(LOCAL_PATH)/../utils/false_vgui/include
LOCAL_CFLAGS += $(DEFINES) $(INCLUDES)
ifeq ($(GOLDSOURCE_SUPPORT),1)

2
cl_dll/CMakeLists.txt

@ -27,7 +27,7 @@ set (CLDLL_LIBRARY client) @@ -27,7 +27,7 @@ set (CLDLL_LIBRARY client)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-write-strings -DLINUX -D_LINUX -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -DCLIENT_WEAPONS -DCLIENT_DLL -w")
if (GOLDSOURCE_SUPPORT)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DGOLDSOURCE_SUPPORT -L${CMAKE_CURRENT_SOURCE_DIR}/.. -lSDL2 -Wl,--no-undefined")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DGOLDSOURCE_SUPPORT -lSDL2")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")

2
cl_dll/Makefile

@ -67,7 +67,7 @@ SRCS+=./view.cpp @@ -67,7 +67,7 @@ SRCS+=./view.cpp
SRCS+=./input_xash3d.cpp
SRCS+=./scoreboard.cpp
SRCS+=./MOTD.cpp
INCLUDES = -I../common -I. -I../game_shared -I../pm_shared -I../engine -I../dlls
INCLUDES = -I../common -I. -I../game_shared -I../pm_shared -I../engine -I../dlls -I../utils/false_vgui/include
DEFINES = -Wno-write-strings -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -DCLIENT_WEAPONS -DCLIENT_DLL
CFLAGS = -m32
OBJS = $(SRCS:.cpp=.o) $(SRCS_C:.c=.o)

3
cl_dll/cdll_int.cpp

@ -239,6 +239,7 @@ int DLLEXPORT HUD_VidInit( void ) @@ -239,6 +239,7 @@ int DLLEXPORT HUD_VidInit( void )
#ifdef USE_VGUI_FOR_GOLDSOURCE_SUPPORT
vgui::Panel* root=(vgui::Panel*)gEngfuncs.VGui_GetPanel();
if (root) {
gEngfuncs.Con_Printf( "Root VGUI panel exists\n" );
root->setBgColor(128,128,0,0);
if (gViewPort != NULL)
@ -250,6 +251,8 @@ int DLLEXPORT HUD_VidInit( void ) @@ -250,6 +251,8 @@ int DLLEXPORT HUD_VidInit( void )
gViewPort = new TeamFortressViewport(0,0,root->getWide(),root->getTall());
gViewPort->setParent(root);
}
} else {
gEngfuncs.Con_Printf( "Root VGUI panel does not exist\n" );
}
#endif
return 1;

4
cl_dll/cl_dll.dsp

@ -43,7 +43,7 @@ RSC=rc.exe @@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\utils\vgui\include" /I "..\engine" /I "..\common" /I "..\pm_shared" /I "..\dlls" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "CLIENT_DLL" /D "CLIENT_WEAPONS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\utils\false_vgui\include" /I "..\engine" /I "..\common" /I "..\pm_shared" /I "..\dlls" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "CLIENT_DLL" /D "CLIENT_WEAPONS" /YX /FD /c
# SUBTRACT CPP /Z<none>
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@ -80,7 +80,7 @@ SOURCE="$(InputPath)" @@ -80,7 +80,7 @@ SOURCE="$(InputPath)"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /G5 /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\dlls" /I "..\common" /I "..\pm_shared" /I "..\engine" /I "..\utils\vgui\include" /I "..\game_shared" /D "_DEBUG" /D "_MBCS" /D "WIN32" /D "_WINDOWS" /D "CLIENT_DLL" /D "CLIENT_WEAPONS" /FR /YX /FD /c
# ADD CPP /nologo /G5 /MTd /W3 /Gm /GR /GX /ZI /Od /I "..\dlls" /I "..\common" /I "..\pm_shared" /I "..\engine" /I "..\utils\false_vgui\include" /I "..\game_shared" /D "_DEBUG" /D "_MBCS" /D "WIN32" /D "_WINDOWS" /D "CLIENT_DLL" /D "CLIENT_WEAPONS" /FR /YX /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"

13
utils/false_vgui/include/VGUI.h

@ -91,18 +91,5 @@ typedef unsigned short ushort; @@ -91,18 +91,5 @@ typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
namespace vgui
{
VGUIAPI void vgui_setMalloc(void *(*malloc)(size_t size) );
VGUIAPI void vgui_setFree(void (*free)(void* memblock));
VGUIAPI void vgui_strcpy(char* dst,int dstLen,const char* src);
VGUIAPI char* vgui_strdup(const char* src);
VGUIAPI int vgui_printf(const char* format,...);
VGUIAPI int vgui_dprintf(const char* format,...);
VGUIAPI int vgui_dprintf2(const char* format,...);
}
#endif

37
utils/false_vgui/include/VGUI_Bitmap.h

@ -1,37 +0,0 @@ @@ -1,37 +0,0 @@
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#ifndef VGUI_BITMAP_H
#define VGUI_BITMAP_H
#include<VGUI.h>
#include<VGUI_Image.h>
namespace vgui
{
class Panel;
class VGUIAPI Bitmap : public Image
{
private:
int _id;
bool _uploaded;
public:
Bitmap() {}
protected:
virtual void setSize(int wide,int tall) {}
virtual void setRGBA(int x,int y,uchar r,uchar g,uchar b,uchar a) {}
public:
virtual void paint(Panel* panel) {}
protected:
uchar* _rgba;
};
}
#endif

62
utils/false_vgui/include/VGUI_Image.h

@ -1,62 +0,0 @@ @@ -1,62 +0,0 @@
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#ifndef VGUI_IMAGE_H
#define VGUI_IMAGE_H
#include<VGUI.h>
#include<VGUI_Scheme.h>
#include<VGUI_Color.h>
//TODO:: needs concept of insets
namespace vgui
{
class Panel;
class VGUIAPI Image
{
friend class Panel;
private:
int _pos[2];
int _size[2];
Panel* _panel;
Color _color;
public:
Image();
public:
virtual void setPos(int x,int y) {}
virtual void getPos(int& x,int& y) {}
virtual void getSize(int& wide,int& tall) {}
virtual void setColor(Color color) {}
virtual void getColor(Color& color) {}
protected:
virtual void setSize(int wide,int tall) {}
virtual void drawSetColor(Scheme::SchemeColor sc) {}
virtual void drawSetColor(int r,int g,int b,int a) {}
virtual void drawFilledRect(int x0,int y0,int x1,int y1) {}
virtual void drawOutlinedRect(int x0,int y0,int x1,int y1) {}
virtual void drawSetTextFont(Scheme::SchemeFont sf) {}
virtual void drawSetTextFont(Font* font) {}
virtual void drawSetTextColor(Scheme::SchemeColor sc) {}
virtual void drawSetTextColor(int r,int g,int b,int a) {}
virtual void drawSetTextPos(int x,int y) {}
virtual void drawPrintText(const char* str,int strlen) {}
virtual void drawPrintText(int x,int y,const char* str,int strlen) {}
virtual void drawPrintChar(char ch) {}
virtual void drawPrintChar(int x,int y,char ch) {}
virtual void drawSetTextureRGBA(int id,const char* rgba,int wide,int tall) {}
virtual void drawSetTexture(int id) {}
virtual void drawTexturedRect(int x0,int y0,int x1,int y1) {}
virtual void paint(Panel* panel) {}
public:
virtual void doPaint(Panel* panel) {}
};
}
#endif
Loading…
Cancel
Save