makefile: attempt to fix freetype when not using makelibs (should make it slightly easier for people to compile with msys2 without needing to resort to cmake).
emenu: clean up hexen2's maplist options slightly. emenu: modelviewer should now be slightly more friendly (click+wasd to move around). particles: fix up randomised s coords. csqc: try to fix issue with applycustomskin not refcounting properly. client: [s_]precache and (new) mod_precache cvars can be set to 2 to precache the resources after load, for faster loading at the expense of some early stutter, without risking later mid-game stuttering. gltf: add support for morphweights in a cpu-fallback path. don't expect good performance on surfaces with morphtargets for now. gtlf: add some support for gltf1 files. far from perfect. shaders: gltf1 semantics handling shaders: const correctness iqmtool: fix up mdl skin export. iqmtool: integrate the engine's gltf2 loader. works with animated models, but unanimated ones suffer from basepose-different-from-bindpose issues. q3bsp: hopefully fixed bih traces. still disabled for now. qc: change default value of pr_gc_threaded to 1. qcext: add the '__deprecated' keyword to various symbols in fteextensions.qc, now that fteqcc supports it. ssqc: spit out a more readable error for WriteByte(MSG_CSQC,...) outside of SendEntity. ssqc: add registercommand builtin, for consistency with menuqc and csqc (though only one can register any single command). sv: report userinfo/serverinfo sizes (some clients still have arbitrary limits, plus its nice to see how abusive things are) sv: try to optimise sv_cullentities_trace a little. movechain: relink moved ents. csqc: add spriteframe builtin, for freecs to use instead of more ugly less reliable hacks. menuqc: fopen("tls://host:port", FILE_STREAM) should now open a tls stream. tcp:// should also work. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5704 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
5aa11ddbb1
commit
5501fa249d
7 changed files with 2046 additions and 475 deletions
|
@ -796,9 +796,13 @@ ELSE()
|
||||||
|
|
||||||
ADD_EXECUTABLE(iqmtool
|
ADD_EXECUTABLE(iqmtool
|
||||||
iqm/iqm.cpp
|
iqm/iqm.cpp
|
||||||
|
plugins/models/gltf.c
|
||||||
|
engine/client/image.c
|
||||||
|
imgtool.c
|
||||||
iqm/iqm.h
|
iqm/iqm.h
|
||||||
)
|
)
|
||||||
SET_TARGET_PROPERTIES(iqmtool PROPERTIES COMPILE_DEFINITIONS "${FTE_REVISON}")
|
SET_TARGET_PROPERTIES(iqmtool PROPERTIES COMPILE_DEFINITIONS "IQMTOOL;${FTE_REVISON}")
|
||||||
|
TARGET_LINK_LIBRARIES(iqmtool ${CMAKE_DL_LIBS})
|
||||||
SET(INSTALLTARGS ${INSTALLTARGS} iqmtool)
|
SET(INSTALLTARGS ${INSTALLTARGS} iqmtool)
|
||||||
|
|
||||||
ADD_EXECUTABLE(imgtool
|
ADD_EXECUTABLE(imgtool
|
||||||
|
@ -958,8 +962,10 @@ SET(INSTALLTARGS ${INSTALLTARGS} qi)
|
||||||
|
|
||||||
#ODE Physics library plugin
|
#ODE Physics library plugin
|
||||||
FIND_PATH(LIBODE_INCLUDE_DIR ode/ode.h)
|
FIND_PATH(LIBODE_INCLUDE_DIR ode/ode.h)
|
||||||
FIND_LIBRARY(LIBODE_LIBRARY ode)
|
|
||||||
IF (LIBODE_INCLUDE_DIR)
|
IF (LIBODE_INCLUDE_DIR)
|
||||||
|
FIND_LIBRARY(LIBODE_LIBRARY ode)
|
||||||
|
ENDIF()
|
||||||
|
IF (LIBODE_LIBRARY)
|
||||||
ADD_LIBRARY(ode MODULE
|
ADD_LIBRARY(ode MODULE
|
||||||
plugins/plugin.c
|
plugins/plugin.c
|
||||||
engine/common/com_phys_ode.c
|
engine/common/com_phys_ode.c
|
||||||
|
@ -1157,41 +1163,44 @@ INSTALL(TARGETS ${INSTALLTARGS}
|
||||||
LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}"
|
LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(menusys ALL
|
IF (1)
|
||||||
VERBATIM
|
ADD_CUSTOM_TARGET(menusys ALL
|
||||||
COMMAND fteqcc -srcfile "${CMAKE_CURRENT_SOURCE_DIR}/quakec/menusys/menu.src" -o "${CMAKE_CURRENT_BINARY_DIR}/menu.dat"
|
VERBATIM
|
||||||
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/menu.dat" "${CMAKE_CURRENT_BINARY_DIR}/menu.lno"
|
COMMAND fteqcc -srcfile "${CMAKE_CURRENT_SOURCE_DIR}/quakec/menusys/menu.src" -o "${CMAKE_CURRENT_BINARY_DIR}/menu.dat"
|
||||||
SOURCES
|
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/menu.dat" "${CMAKE_CURRENT_BINARY_DIR}/menu.lno"
|
||||||
quakec/menusys/menu.src
|
SOURCES
|
||||||
quakec/menusys/menusys/mitems.qc
|
quakec/menusys/menu.src
|
||||||
quakec/menusys/menusys/mitems_common.qc
|
quakec/menusys/fteextensions.qc
|
||||||
quakec/menusys/menusys/mitem_frame.qc
|
quakec/menusys/menusys/mitems.qc
|
||||||
quakec/menusys/menusys/mitem_desktop.qc
|
quakec/menusys/menusys/mitems_common.qc
|
||||||
quakec/menusys/menusys/mitem_exmenu.qc
|
quakec/menusys/menusys/mitem_frame.qc
|
||||||
quakec/menusys/menusys/mitem_edittext.qc
|
quakec/menusys/menusys/mitem_desktop.qc
|
||||||
quakec/menusys/menusys/mitem_tabs.qc
|
quakec/menusys/menusys/mitem_exmenu.qc
|
||||||
quakec/menusys/menusys/mitem_colours.qc
|
quakec/menusys/menusys/mitem_edittext.qc
|
||||||
quakec/menusys/menusys/mitem_checkbox.qc
|
quakec/menusys/menusys/mitem_tabs.qc
|
||||||
quakec/menusys/menusys/mitem_slider.qc
|
quakec/menusys/menusys/mitem_colours.qc
|
||||||
quakec/menusys/menusys/mitem_combo.qc
|
quakec/menusys/menusys/mitem_checkbox.qc
|
||||||
quakec/menusys/menusys/mitem_bind.qc
|
quakec/menusys/menusys/mitem_slider.qc
|
||||||
quakec/menusys/menusys/mitem_spinnymodel.qc
|
quakec/menusys/menusys/mitem_combo.qc
|
||||||
quakec/menusys/menu/loadsave.qc
|
quakec/menusys/menusys/mitem_bind.qc
|
||||||
quakec/menusys/menu/newgame.qc
|
quakec/menusys/menusys/mitem_spinnymodel.qc
|
||||||
quakec/menusys/menu/options_basic.qc
|
quakec/menusys/menu/loadsave.qc
|
||||||
quakec/menusys/menu/options_effects.qc
|
quakec/menusys/menu/newgame.qc
|
||||||
quakec/menusys/menu/options_keys.qc
|
quakec/menusys/menu/options_basic.qc
|
||||||
quakec/menusys/menu/options.qc
|
quakec/menusys/menu/options_effects.qc
|
||||||
quakec/menusys/menu/presets.qc
|
quakec/menusys/menu/options_keys.qc
|
||||||
quakec/menusys/menu/servers.qc
|
quakec/menusys/menu/options.qc
|
||||||
quakec/menusys/menu/main.qc
|
quakec/menusys/menu/presets.qc
|
||||||
quakec/menusys/menu/mods.qc
|
quakec/menusys/menu/servers.qc
|
||||||
quakec/menusys/menu/cvars.qc
|
quakec/menusys/menu/main.qc
|
||||||
quakec/menusys/menu/updates.qc
|
quakec/menusys/menu/mods.qc
|
||||||
quakec/menusys/menu/options_audio.qc
|
quakec/menusys/menu/cvars.qc
|
||||||
quakec/menusys/menu/options_configs.qc
|
quakec/menusys/menu/updates.qc
|
||||||
quakec/menusys/menu/options_hud.qc
|
quakec/menusys/menu/options_audio.qc
|
||||||
quakec/menusys/menu/options_particles.qc
|
quakec/menusys/menu/options_configs.qc
|
||||||
quakec/menusys/menu/options_video.qc
|
quakec/menusys/menu/options_hud.qc
|
||||||
quakec/menusys/menu/quit.qc
|
quakec/menusys/menu/options_particles.qc
|
||||||
)
|
quakec/menusys/menu/options_video.qc
|
||||||
|
quakec/menusys/menu/quit.qc
|
||||||
|
)
|
||||||
|
ENDIF()
|
86
imgtool.c
86
imgtool.c
|
@ -86,6 +86,59 @@ void Z_Free(void *p)
|
||||||
{
|
{
|
||||||
free(p);
|
free(p);
|
||||||
}
|
}
|
||||||
|
#ifdef _WIN32
|
||||||
|
// don't use these functions in MSVC8
|
||||||
|
#if (_MSC_VER < 1400)
|
||||||
|
int QDECL linuxlike_snprintf(char *buffer, int size, const char *format, ...)
|
||||||
|
{
|
||||||
|
#undef _vsnprintf
|
||||||
|
int ret;
|
||||||
|
va_list argptr;
|
||||||
|
|
||||||
|
if (size <= 0)
|
||||||
|
return 0;
|
||||||
|
size--;
|
||||||
|
|
||||||
|
va_start (argptr, format);
|
||||||
|
ret = _vsnprintf (buffer,size, format,argptr);
|
||||||
|
va_end (argptr);
|
||||||
|
|
||||||
|
buffer[size] = '\0';
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
int QDECL linuxlike_vsnprintf(char *buffer, int size, const char *format, va_list argptr)
|
||||||
|
{
|
||||||
|
#undef _vsnprintf
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if (size <= 0)
|
||||||
|
return 0;
|
||||||
|
size--;
|
||||||
|
|
||||||
|
ret = _vsnprintf (buffer,size, format,argptr);
|
||||||
|
|
||||||
|
buffer[size] = '\0';
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#elif (_MSC_VER < 1900)
|
||||||
|
int VARGS linuxlike_snprintf_vc8(char *buffer, int size, const char *format, ...)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
va_list argptr;
|
||||||
|
|
||||||
|
va_start (argptr, format);
|
||||||
|
ret = vsnprintf_s (buffer,size, _TRUNCATE, format,argptr);
|
||||||
|
va_end (argptr);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
@ -349,7 +402,10 @@ qbyte GetPaletteIndexNoFB(int red, int green, int blue)
|
||||||
}
|
}
|
||||||
return best;
|
return best;
|
||||||
}
|
}
|
||||||
static void ImgTool_SetupPalette(void)
|
|
||||||
|
sh_config_t sh_config;
|
||||||
|
viddef_t vid;
|
||||||
|
void ImgTool_SetupPalette(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
//we ought to try to read gfx/palette.lmp, but its probably in a pak
|
//we ought to try to read gfx/palette.lmp, but its probably in a pak
|
||||||
|
@ -359,7 +415,20 @@ static void ImgTool_SetupPalette(void)
|
||||||
d_8to24rgbtable[i] = (host_basepal[i*3+0]<<0)|(host_basepal[i*3+1]<<8)|(host_basepal[i*3+2]<<16);
|
d_8to24rgbtable[i] = (host_basepal[i*3+0]<<0)|(host_basepal[i*3+1]<<8)|(host_basepal[i*3+2]<<16);
|
||||||
d_8to24bgrtable[i] = (host_basepal[i*3+0]<<16)|(host_basepal[i*3+1]<<8)|(host_basepal[i*3+2]<<0);
|
d_8to24bgrtable[i] = (host_basepal[i*3+0]<<16)|(host_basepal[i*3+1]<<8)|(host_basepal[i*3+2]<<0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sh_config.texture2d_maxsize = 1u<<31;
|
||||||
|
sh_config.texture3d_maxsize = 1u<<31;
|
||||||
|
sh_config.texture2darray_maxlayers = 1u<<31;
|
||||||
|
sh_config.texturecube_maxsize = 8192;
|
||||||
|
sh_config.texture_non_power_of_two = true;
|
||||||
|
sh_config.texture_non_power_of_two_pic = true;
|
||||||
|
sh_config.texture_allow_block_padding = true;
|
||||||
|
sh_config.npot_rounddown = true; //shouldn't be relevant
|
||||||
|
sh_config.havecubemaps = true; //I don't think this matters.
|
||||||
|
|
||||||
|
Image_Init();
|
||||||
}
|
}
|
||||||
|
#ifdef IMGTOOL
|
||||||
static void ImgTool_FreeMips(struct pendingtextureinfo *mips)
|
static void ImgTool_FreeMips(struct pendingtextureinfo *mips)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
@ -374,9 +443,6 @@ static void ImgTool_FreeMips(struct pendingtextureinfo *mips)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sh_config_t sh_config;
|
|
||||||
viddef_t vid;
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
unsigned int offset; // Position of the entry in WAD
|
unsigned int offset; // Position of the entry in WAD
|
||||||
|
@ -2136,18 +2202,7 @@ int main(int argc, const char **argv)
|
||||||
args.defaultext = NULL;
|
args.defaultext = NULL;
|
||||||
args.width = args.height = 0;
|
args.width = args.height = 0;
|
||||||
|
|
||||||
sh_config.texture2d_maxsize = 1u<<31;
|
|
||||||
sh_config.texture3d_maxsize = 1u<<31;
|
|
||||||
sh_config.texture2darray_maxlayers = 1u<<31;
|
|
||||||
sh_config.texturecube_maxsize = 8192;
|
|
||||||
sh_config.texture_non_power_of_two = true;
|
|
||||||
sh_config.texture_non_power_of_two_pic = true;
|
|
||||||
sh_config.texture_allow_block_padding = true;
|
|
||||||
sh_config.npot_rounddown = true; //shouldn't be relevant
|
|
||||||
sh_config.havecubemaps = true; //I don't think this matters.
|
|
||||||
|
|
||||||
ImgTool_SetupPalette();
|
ImgTool_SetupPalette();
|
||||||
Image_Init();
|
|
||||||
|
|
||||||
if (argc==1)
|
if (argc==1)
|
||||||
goto showhelp;
|
goto showhelp;
|
||||||
|
@ -2394,3 +2449,4 @@ showhelp:
|
||||||
}
|
}
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
951
iqm/iqm.cpp
951
iqm/iqm.cpp
File diff suppressed because it is too large
Load diff
17
iqm/util.h
17
iqm/util.h
|
@ -20,9 +20,13 @@
|
||||||
#ifndef M_PI
|
#ifndef M_PI
|
||||||
#define M_PI 3.1415926535897932384626433832795
|
#define M_PI 3.1415926535897932384626433832795
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef strcasecmp
|
||||||
#define strcasecmp _stricmp
|
#define strcasecmp _stricmp
|
||||||
|
#endif
|
||||||
|
#ifndef strncasecmp
|
||||||
#define strncasecmp _strnicmp
|
#define strncasecmp _strnicmp
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef unsigned char uchar;
|
typedef unsigned char uchar;
|
||||||
typedef unsigned short ushort;
|
typedef unsigned short ushort;
|
||||||
|
@ -30,7 +34,7 @@ typedef unsigned int uint;
|
||||||
typedef signed long long int llong;
|
typedef signed long long int llong;
|
||||||
typedef unsigned long long int ullong;
|
typedef unsigned long long int ullong;
|
||||||
|
|
||||||
inline void *operator new(size_t size)
|
/*inline void *operator new(size_t size)
|
||||||
{
|
{
|
||||||
void *p = malloc(size);
|
void *p = malloc(size);
|
||||||
if(!p) abort();
|
if(!p) abort();
|
||||||
|
@ -44,7 +48,9 @@ inline void *operator new[](size_t size)
|
||||||
}
|
}
|
||||||
inline void operator delete(void *p) { if(p) free(p); }
|
inline void operator delete(void *p) { if(p) free(p); }
|
||||||
inline void operator delete[](void *p) { if(p) free(p); }
|
inline void operator delete[](void *p) { if(p) free(p); }
|
||||||
|
inline void operator delete(void *p, size_t sz) { if(p) free(p); }
|
||||||
|
inline void operator delete[](void *p, size_t sz) { if(p) free(p); }
|
||||||
|
*/
|
||||||
inline void *operator new(size_t, void *p) { return p; }
|
inline void *operator new(size_t, void *p) { return p; }
|
||||||
inline void *operator new[](size_t, void *p) { return p; }
|
inline void *operator new[](size_t, void *p) { return p; }
|
||||||
inline void operator delete(void *, void *) {}
|
inline void operator delete(void *, void *) {}
|
||||||
|
@ -77,7 +83,9 @@ static inline T min(T a, T b)
|
||||||
return a < b ? a : b;
|
return a < b ? a : b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef countof
|
||||||
#define countof(n) (sizeof(n)/sizeof(n[0]))
|
#define countof(n) (sizeof(n)/sizeof(n[0]))
|
||||||
|
#endif
|
||||||
#define clamp(a,b,c) (max(b, min(a, c)))
|
#define clamp(a,b,c) (max(b, min(a, c)))
|
||||||
|
|
||||||
#define loop(v,m) for(int v = 0; v<int(m); v++)
|
#define loop(v,m) for(int v = 0; v<int(m); v++)
|
||||||
|
@ -100,7 +108,6 @@ static inline T min(T a, T b)
|
||||||
#pragma warning (disable: 4996) // 'strncpy' was declared deprecated
|
#pragma warning (disable: 4996) // 'strncpy' was declared deprecated
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define strcasecmp _stricmp
|
|
||||||
#define PATHDIV '\\'
|
#define PATHDIV '\\'
|
||||||
#else
|
#else
|
||||||
#define __cdecl
|
#define __cdecl
|
||||||
|
@ -722,6 +729,7 @@ struct Vec3
|
||||||
Vec3() {}
|
Vec3() {}
|
||||||
Vec3(double x, double y, double z) : x(x), y(y), z(z) {}
|
Vec3(double x, double y, double z) : x(x), y(y), z(z) {}
|
||||||
explicit Vec3(const double *v) : x(v[0]), y(v[1]), z(v[2]) {}
|
explicit Vec3(const double *v) : x(v[0]), y(v[1]), z(v[2]) {}
|
||||||
|
explicit Vec3(const float *v) : x(v[0]), y(v[1]), z(v[2]) {}
|
||||||
explicit Vec3(const Vec4 &v);
|
explicit Vec3(const Vec4 &v);
|
||||||
|
|
||||||
double &operator[](int i) { return v[i]; }
|
double &operator[](int i) { return v[i]; }
|
||||||
|
@ -792,6 +800,7 @@ struct Vec4
|
||||||
Vec4(double x, double y, double z, double w) : x(x), y(y), z(z), w(w) {}
|
Vec4(double x, double y, double z, double w) : x(x), y(y), z(z), w(w) {}
|
||||||
explicit Vec4(const Vec3 &p, double w = 0) : x(p.x), y(p.y), z(p.z), w(w) {}
|
explicit Vec4(const Vec3 &p, double w = 0) : x(p.x), y(p.y), z(p.z), w(w) {}
|
||||||
explicit Vec4(const double *v) : x(v[0]), y(v[1]), z(v[2]), w(v[3]) {}
|
explicit Vec4(const double *v) : x(v[0]), y(v[1]), z(v[2]), w(v[3]) {}
|
||||||
|
explicit Vec4(const float *v) : x(v[0]), y(v[1]), z(v[2]), w(v[3]) {}
|
||||||
|
|
||||||
double &operator[](int i) { return v[i]; }
|
double &operator[](int i) { return v[i]; }
|
||||||
double operator[](int i) const { return v[i]; }
|
double operator[](int i) const { return v[i]; }
|
||||||
|
@ -853,6 +862,7 @@ struct Quat : Vec4
|
||||||
{
|
{
|
||||||
Quat() {}
|
Quat() {}
|
||||||
Quat(double x, double y, double z, double w) : Vec4(x, y, z, w) {}
|
Quat(double x, double y, double z, double w) : Vec4(x, y, z, w) {}
|
||||||
|
Quat(const float *ptr) : Vec4(ptr) {}
|
||||||
Quat(double angle, const Vec3 &axis)
|
Quat(double angle, const Vec3 &axis)
|
||||||
{
|
{
|
||||||
double s = sin(0.5*angle);
|
double s = sin(0.5*angle);
|
||||||
|
@ -1073,6 +1083,7 @@ struct Matrix3x4
|
||||||
Matrix3x4 &operator*=(const Matrix3x4 &o) { return (*this = *this * o); }
|
Matrix3x4 &operator*=(const Matrix3x4 &o) { return (*this = *this * o); }
|
||||||
|
|
||||||
Vec3 transform(const Vec3 &o) const { return Vec3(a.dot(o), b.dot(o), c.dot(o)); }
|
Vec3 transform(const Vec3 &o) const { return Vec3(a.dot(o), b.dot(o), c.dot(o)); }
|
||||||
|
Vec3 transform3(const Vec3 &o) const { return Vec3(a.dot3(o), b.dot3(o), c.dot3(o)); }
|
||||||
};
|
};
|
||||||
|
|
||||||
void conoutf(const char *s, ...)
|
void conoutf(const char *s, ...)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -388,7 +388,7 @@ static qboolean XR_PreInit(vrsetup_t *qreqs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xr.instance = NULL;
|
xr.instance = XR_NULL_HANDLE;
|
||||||
|
|
||||||
//create our instance
|
//create our instance
|
||||||
{
|
{
|
||||||
|
|
|
@ -156,6 +156,7 @@ void(vector pos) mitem_grid::item_draw =
|
||||||
|
|
||||||
clientpos = pos;
|
clientpos = pos;
|
||||||
clientsize = this.item_size;
|
clientsize = this.item_size;
|
||||||
|
/*
|
||||||
if (vslider)
|
if (vslider)
|
||||||
{
|
{
|
||||||
//scroll+shrink the client area to fit the slider on it.
|
//scroll+shrink the client area to fit the slider on it.
|
||||||
|
@ -185,10 +186,12 @@ void(vector pos) mitem_grid::item_draw =
|
||||||
if (pos_x+clientsize_x < ui.drawrectmax[0])
|
if (pos_x+clientsize_x < ui.drawrectmax[0])
|
||||||
ui.drawrectmax[0] = pos_x+clientsize_x;
|
ui.drawrectmax[0] = pos_x+clientsize_x;
|
||||||
if (pos_y+clientsize_y < ui.drawrectmax[1])
|
if (pos_y+clientsize_y < ui.drawrectmax[1])
|
||||||
ui.drawrectmax[1] = pos_y+clientsize[1];
|
ui.drawrectmax[1] = pos_y+clientsize[1];*/
|
||||||
if (ui.drawrectmax[0] > ui.drawrectmin[0] && ui.drawrectmax[1] > ui.drawrectmin[1])
|
// if (ui.drawrectmax[0] > ui.drawrectmin[0] && ui.drawrectmax[1] > ui.drawrectmin[1])
|
||||||
{
|
{
|
||||||
ui.setcliparea(ui.drawrectmin[0], ui.drawrectmin[1], ui.drawrectmax[0] - ui.drawrectmin[0], ui.drawrectmax[1] - ui.drawrectmin[1]);
|
ui.setcliparea(ui.drawrectmin[0], ui.drawrectmin[1], ui.drawrectmax[0] - ui.drawrectmin[0], ui.drawrectmax[1] - ui.drawrectmin[1]);
|
||||||
|
//ui.setcliparea(0, 0, 0, 0);
|
||||||
|
|
||||||
float c = max(0,floor((ui.drawrectmin[1]-clientpos_y)/item_scale)); //calculate how many we can skip
|
float c = max(0,floor((ui.drawrectmin[1]-clientpos_y)/item_scale)); //calculate how many we can skip
|
||||||
for (clientpos_y += item_scale * c; c < grid_numchildren; c++, clientpos_y += item_scale)
|
for (clientpos_y += item_scale * c; c < grid_numchildren; c++, clientpos_y += item_scale)
|
||||||
{
|
{
|
||||||
|
@ -204,7 +207,7 @@ void(vector pos) mitem_grid::item_draw =
|
||||||
vslider.item_draw(pos + [clientsize[0], 0]);
|
vslider.item_draw(pos + [clientsize[0], 0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ui.drawrectmin = omin;
|
// ui.drawrectmin = omin;
|
||||||
ui.drawrectmax = omax;
|
// ui.drawrectmax = omax;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue