Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Development] Source Mu Main 1.03.35 [Season 5.1 - Season 5.2]

Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
Anyone solved high FPS dropdown when monsters are rendered?
I searching for reason.

Experimental codes:

C++:
#define _XM_SVML_INTRINSICS_
#include <xmmintrin.h>
#include <emmintrin.h>
#define M_PI 3.14159265358979323846f

float QPIx2d360 = (M_PI * 2 / 360);


#    define ALIGN16_BEG __declspec(align(16))
#    define ALIGN16_END

static const ALIGN16_BEG int _mm_cst_sign_mask_ps[4] ALIGN16_END =
{ 0x80000000, 0x80000000, 0x80000000, 0x80000000 };
static const ALIGN16_BEG int _mm_cst_inv_sign_mask_ps[4] ALIGN16_END =
{ ~0x80000000, ~0x80000000, ~0x80000000, ~0x80000000 };
static const ALIGN16_BEG int _mm_cst_sign_mask_pd[4] ALIGN16_END =
{ 0, 0x80000000, 0, 0x80000000 };
static const ALIGN16_BEG int _mm_cst_inv_sign_mask_pd[4] ALIGN16_END =
{ ~0, ~0x80000000, ~0, ~0x80000000 };

static const ALIGN16_BEG int _mm_cst_one[4] ALIGN16_END = { 1, 1, 1, 1 };
static const ALIGN16_BEG int _mm_cst_inv1[4] ALIGN16_END = { ~1, ~1, ~1, ~1 };
static const ALIGN16_BEG int _mm_cst_two[4] ALIGN16_END = { 2, 2, 2, 2 };
static const ALIGN16_BEG int _mm_cst_four[4] ALIGN16_END = { 4, 4, 4, 4 };
static const __m128 _mm_cst_ps_fopi = _mm_set1_ps(1.27323954473516f);
static const __m128 _mm_cst_ps_one = _mm_set1_ps(1.0f);
static const __m128 _mm_cst_ps_coscof_p0 = _mm_set1_ps(2.443315711809948e-5f);
static const __m128 _mm_cst_ps_coscof_p1 = _mm_set1_ps(-1.388731625493765e-3f);
static const __m128 _mm_cst_ps_coscof_p2 = _mm_set1_ps(4.166664568298827e-2f);
static const __m128 _mm_cst_ps_0p5   = _mm_set1_ps(0.5f);
static const __m128 _mm_cst_ps_DP1 = _mm_set1_ps(0.78515625f);
static const __m128 _mm_cst_ps_DP2 = _mm_set1_ps(2.4187564849853515625e-4f);
static const __m128 _mm_cst_ps_DP3 = _mm_set1_ps(3.77489497744594108e-8f);

static const __m128 _mm_cst_ps_sincof_p0 = _mm_set1_ps(-1.9515295891e-4f);
static const __m128 _mm_cst_ps_sincof_p1 = _mm_set1_ps(8.3321608736e-3f);
static const __m128 _mm_cst_ps_sincof_p2 = _mm_set1_ps(-1.6666654611e-1f);

__m128 _mm_sin_ps(__m128 x) {
    __m128 signbit = _mm_and_ps(x, *(__m128*) _mm_cst_sign_mask_ps);
    x = _mm_and_ps(x, *(__m128*) _mm_cst_inv_sign_mask_ps);
    __m128 y = _mm_mul_ps(x, _mm_cst_ps_fopi);
    __m128i yf = _mm_cvttps_epi32(y); // floor
    // see j = (j+1) & (~1) in Cephes
    yf = _mm_add_epi32(yf, *(__m128i*) _mm_cst_one);
    yf = _mm_and_si128(yf, *(__m128i*) _mm_cst_inv1);
    y = _mm_cvtepi32_ps(yf);
    __m128i flag = _mm_and_si128(yf, *(__m128i*) _mm_cst_four);
    flag = _mm_slli_epi32(flag, 29); // flag << 29
    yf = _mm_and_si128(yf, *(__m128i*) _mm_cst_two);
    yf = _mm_cmpeq_epi32(yf, _mm_setzero_si128());
    __m128 swapsign = _mm_castsi128_ps(flag);
    __m128 polymask = _mm_castsi128_ps(yf);
    signbit = _mm_xor_ps(signbit, swapsign);
    // z = ((x - y * DP1) - y * DP2) - y * DP3
    __m128 xmm1 = _mm_mul_ps(y, _mm_cst_ps_DP1);
    __m128 xmm2 = _mm_mul_ps(y, _mm_cst_ps_DP2);
    __m128 xmm3 = _mm_mul_ps(y, _mm_cst_ps_DP3);
    x = _mm_sub_ps(x, xmm1);
    x = _mm_sub_ps(x, xmm2);
    x = _mm_sub_ps(x, xmm3);
    __m128 z = _mm_mul_ps(x, x);
    y = _mm_mul_ps(_mm_cst_ps_coscof_p0, z);
    y = _mm_add_ps(y, _mm_cst_ps_coscof_p1);
    y = _mm_mul_ps(y, z);
    y = _mm_add_ps(y, _mm_cst_ps_coscof_p2);
    y = _mm_mul_ps(y, z);
    y = _mm_mul_ps(y, z);
    __m128 tmp = _mm_mul_ps(z, _mm_cst_ps_0p5);
    y = _mm_sub_ps(y, tmp);
    y = _mm_add_ps(y, _mm_cst_ps_one);
    __m128 y2 = _mm_mul_ps(_mm_cst_ps_sincof_p0, z);
    y2 = _mm_add_ps(y2, _mm_cst_ps_sincof_p1);
    y2 = _mm_mul_ps(y2, z);
    y2 = _mm_add_ps(y2, _mm_cst_ps_sincof_p2);
    y2 = _mm_mul_ps(y2, z);
    y2 = _mm_mul_ps(y2, x);
    y2 = _mm_add_ps(y2, x);
    y2 = _mm_and_ps(polymask, y2);
    y = _mm_andnot_ps(polymask, y);
    y = _mm_add_ps(y, y2);
    y = _mm_xor_ps(y, signbit);
    return y;
}

__m128 _mm_cos_ps(__m128 x)
{
    x = _mm_and_ps(x, *(__m128*) _mm_cst_inv_sign_mask_ps);
    __m128 y = _mm_mul_ps(x, _mm_cst_ps_fopi);
    __m128i yf = _mm_cvttps_epi32(y); // floor
    // see j = (j+1) & (~1) in Cephes
    yf = _mm_add_epi32(yf, *(__m128i*) _mm_cst_one);
    yf = _mm_and_si128(yf, *(__m128i*) _mm_cst_inv1);
    y = _mm_cvtepi32_ps(yf);
    yf = _mm_sub_epi32(yf, *(__m128i*) _mm_cst_two);
    __m128i flag = _mm_andnot_si128(yf, *(__m128i*) _mm_cst_four);
    flag = _mm_slli_epi32(flag, 29); // flag << 29
    yf = _mm_and_si128(yf, *(__m128i*) _mm_cst_two);
    yf = _mm_cmpeq_epi32(yf, _mm_setzero_si128());
    __m128 signbit = _mm_castsi128_ps(flag);
    __m128 polymask = _mm_castsi128_ps(yf);
    // z = ((x - y * DP1) - y * DP2) - y * DP3
    __m128 xmm1 = _mm_mul_ps(y, _mm_cst_ps_DP1);
    __m128 xmm2 = _mm_mul_ps(y, _mm_cst_ps_DP2);
    __m128 xmm3 = _mm_mul_ps(y, _mm_cst_ps_DP3);
    x = _mm_sub_ps(x, xmm1);
    x = _mm_sub_ps(x, xmm2);
    x = _mm_sub_ps(x, xmm3);
    __m128 z = _mm_mul_ps(x, x);
    y = _mm_mul_ps(_mm_cst_ps_coscof_p0, z);
    y = _mm_add_ps(y, _mm_cst_ps_coscof_p1);
    y = _mm_mul_ps(y, z);
    y = _mm_add_ps(y, _mm_cst_ps_coscof_p2);
    y = _mm_mul_ps(y, z);
    y = _mm_mul_ps(y, z);
    __m128 tmp = _mm_mul_ps(z, _mm_cst_ps_0p5);
    y = _mm_sub_ps(y, tmp);
    y = _mm_add_ps(y, _mm_cst_ps_one);
    __m128 y2 = _mm_mul_ps(_mm_cst_ps_sincof_p0, z);
    y2 = _mm_add_ps(y2, _mm_cst_ps_sincof_p1);
    y2 = _mm_mul_ps(y2, z);
    y2 = _mm_add_ps(y2, _mm_cst_ps_sincof_p2);
    y2 = _mm_mul_ps(y2, z);
    y2 = _mm_mul_ps(y2, x);
    y2 = _mm_add_ps(y2, x);
    y2 = _mm_and_ps(polymask, y2);
    y = _mm_andnot_ps(polymask, y);
    y = _mm_add_ps(y, y2);
    y = _mm_xor_ps(y, signbit);

    return y;
}

void AngleMatrix(const float angles[3], float matrix[3][4])
{
    __m128 angleX = _mm_set1_ps(angles[0] * QPIx2d360);
    __m128 angleY = _mm_set1_ps(angles[1] * QPIx2d360);
    __m128 angleZ = _mm_set1_ps(angles[2] * QPIx2d360);

    __m128 cx, sx, cy, sy, cz, sz;
    cx = _mm_cos_ps(angleX);
    sx = _mm_sin_ps(angleX);
    cy = _mm_cos_ps(angleY);
    sy = _mm_sin_ps(angleY);
    cz = _mm_cos_ps(angleZ);
    sz = _mm_sin_ps(angleZ);

    __m128 sy_cz = _mm_mul_ps(sy, cz);
    __m128 sy_sz = _mm_mul_ps(sy, sz);

    __m128 sx_sy_cz = _mm_mul_ps(_mm_mul_ps(sx, sy), cz);
    __m128 sx_sy_sz = _mm_mul_ps(_mm_mul_ps(sx, sy), sz);

    __m128 cx_sy_cz = _mm_mul_ps(_mm_mul_ps(cx, sy), cz);
    __m128 cx_sy_sz = _mm_mul_ps(_mm_mul_ps(cx, sy), sz);

    matrix[0][0] = _mm_cvtss_f32(_mm_mul_ps(cy, cz));
    matrix[1][0] = _mm_cvtss_f32(_mm_mul_ps(cy, sz));
    matrix[2][0] = -_mm_cvtss_f32(sy);
    matrix[0][1] = _mm_cvtss_f32(_mm_sub_ps(sx_sy_cz, _mm_mul_ps(cx, sz)));
    matrix[1][1] = _mm_cvtss_f32(_mm_add_ps(sx_sy_sz, _mm_mul_ps(cx, cz)));
    matrix[2][1] = _mm_cvtss_f32(_mm_mul_ps(sx, cy));
    matrix[0][2] = _mm_cvtss_f32(_mm_add_ps(cx_sy_cz, _mm_mul_ps(sx, sz)));
    matrix[1][2] = _mm_cvtss_f32(_mm_sub_ps(cx_sy_sz, _mm_mul_ps(sx, cz)));
    matrix[2][2] = _mm_cvtss_f32(_mm_mul_ps(cx, cy));
    matrix[0][3] = 0.0f;
    matrix[1][3] = 0.0f;
    matrix[2][3] = 0.0f;
}



void AngleIMatrix (const vec3_t angles, float matrix[3][4] )
{
    __m128 angleX = _mm_set1_ps(angles[0] * QPIx2d360);
    __m128 angleY = _mm_set1_ps(angles[1] * QPIx2d360);
    __m128 angleZ = _mm_set1_ps(angles[2] * QPIx2d360);

    __m128 cx, sx, cy, sy, cz, sz;
    cx = _mm_cos_ps(angleX);
    sx = _mm_sin_ps(angleX);
    cy = _mm_cos_ps(angleY);
    sy = _mm_sin_ps(angleY);
    cz = _mm_cos_ps(angleZ);
    sz = _mm_sin_ps(angleZ);

    __m128 sy_cz = _mm_mul_ps(sy, cz);
    __m128 sy_sz = _mm_mul_ps(sy, sz);

    __m128 sx_sy_cz = _mm_mul_ps(_mm_mul_ps(sx, sy), cz);
    __m128 sx_sy_sz = _mm_mul_ps(_mm_mul_ps(sx, sy), sz);

    __m128 cx_sy_cz = _mm_mul_ps(_mm_mul_ps(cx, sy), cz);
    __m128 cx_sy_sz = _mm_mul_ps(_mm_mul_ps(cx, sy), sz);

    matrix[0][0] = _mm_cvtss_f32(_mm_mul_ps(cy, cz));
    matrix[1][0] = _mm_cvtss_f32(_mm_mul_ps(cy, sz));
    matrix[2][0] = -_mm_cvtss_f32(sy);
    matrix[0][1] = _mm_cvtss_f32(_mm_sub_ps(sx_sy_cz, _mm_mul_ps(cx, sz)));
    matrix[1][1] = _mm_cvtss_f32(_mm_add_ps(sx_sy_sz, _mm_mul_ps(cx, cz)));
    matrix[2][1] = _mm_cvtss_f32(_mm_mul_ps(sx, cy));
    matrix[0][2] = _mm_cvtss_f32(_mm_add_ps(cx_sy_cz, _mm_mul_ps(sx, sz)));
    matrix[1][2] = _mm_cvtss_f32(_mm_sub_ps(cx_sy_sz, _mm_mul_ps(sx, cz)));
    matrix[2][2] = _mm_cvtss_f32(_mm_mul_ps(cx, cy));
    matrix[0][3] = 0.0f;
    matrix[1][3] = 0.0f;
    matrix[2][3] = 0.0f;
}

benchmark is this working better or worse.
 
Last edited:
Joined
Oct 8, 2006
Messages
740
Reaction score
289
Anyone solved high FPS dropdown when monsters are rendered?
I searching for reason.

Experimental codes:

C++:
#define _XM_SVML_INTRINSICS_
#include <xmmintrin.h>
#include <emmintrin.h>
#define M_PI 3.14159265358979323846f

float QPIx2d360 = (M_PI * 2 / 360);


#    define ALIGN16_BEG __declspec(align(16))
#    define ALIGN16_END

static const ALIGN16_BEG int _mm_cst_sign_mask_ps[4] ALIGN16_END =
{ 0x80000000, 0x80000000, 0x80000000, 0x80000000 };
static const ALIGN16_BEG int _mm_cst_inv_sign_mask_ps[4] ALIGN16_END =
{ ~0x80000000, ~0x80000000, ~0x80000000, ~0x80000000 };
static const ALIGN16_BEG int _mm_cst_sign_mask_pd[4] ALIGN16_END =
{ 0, 0x80000000, 0, 0x80000000 };
static const ALIGN16_BEG int _mm_cst_inv_sign_mask_pd[4] ALIGN16_END =
{ ~0, ~0x80000000, ~0, ~0x80000000 };

static const ALIGN16_BEG int _mm_cst_one[4] ALIGN16_END = { 1, 1, 1, 1 };
static const ALIGN16_BEG int _mm_cst_inv1[4] ALIGN16_END = { ~1, ~1, ~1, ~1 };
static const ALIGN16_BEG int _mm_cst_two[4] ALIGN16_END = { 2, 2, 2, 2 };
static const ALIGN16_BEG int _mm_cst_four[4] ALIGN16_END = { 4, 4, 4, 4 };
static const __m128 _mm_cst_ps_fopi = _mm_set1_ps(1.27323954473516f);
static const __m128 _mm_cst_ps_one = _mm_set1_ps(1.0f);
static const __m128 _mm_cst_ps_coscof_p0 = _mm_set1_ps(2.443315711809948e-5f);
static const __m128 _mm_cst_ps_coscof_p1 = _mm_set1_ps(-1.388731625493765e-3f);
static const __m128 _mm_cst_ps_coscof_p2 = _mm_set1_ps(4.166664568298827e-2f);
static const __m128 _mm_cst_ps_0p5   = _mm_set1_ps(0.5f);
static const __m128 _mm_cst_ps_DP1 = _mm_set1_ps(0.78515625f);
static const __m128 _mm_cst_ps_DP2 = _mm_set1_ps(2.4187564849853515625e-4f);
static const __m128 _mm_cst_ps_DP3 = _mm_set1_ps(3.77489497744594108e-8f);

static const __m128 _mm_cst_ps_sincof_p0 = _mm_set1_ps(-1.9515295891e-4f);
static const __m128 _mm_cst_ps_sincof_p1 = _mm_set1_ps(8.3321608736e-3f);
static const __m128 _mm_cst_ps_sincof_p2 = _mm_set1_ps(-1.6666654611e-1f);

__m128 _mm_sin_ps(__m128 x) {
    __m128 signbit = _mm_and_ps(x, *(__m128*) _mm_cst_sign_mask_ps);
    x = _mm_and_ps(x, *(__m128*) _mm_cst_inv_sign_mask_ps);
    __m128 y = _mm_mul_ps(x, _mm_cst_ps_fopi);
    __m128i yf = _mm_cvttps_epi32(y); // floor
    // see j = (j+1) & (~1) in Cephes
    yf = _mm_add_epi32(yf, *(__m128i*) _mm_cst_one);
    yf = _mm_and_si128(yf, *(__m128i*) _mm_cst_inv1);
    y = _mm_cvtepi32_ps(yf);
    __m128i flag = _mm_and_si128(yf, *(__m128i*) _mm_cst_four);
    flag = _mm_slli_epi32(flag, 29); // flag << 29
    yf = _mm_and_si128(yf, *(__m128i*) _mm_cst_two);
    yf = _mm_cmpeq_epi32(yf, _mm_setzero_si128());
    __m128 swapsign = _mm_castsi128_ps(flag);
    __m128 polymask = _mm_castsi128_ps(yf);
    signbit = _mm_xor_ps(signbit, swapsign);
    // z = ((x - y * DP1) - y * DP2) - y * DP3
    __m128 xmm1 = _mm_mul_ps(y, _mm_cst_ps_DP1);
    __m128 xmm2 = _mm_mul_ps(y, _mm_cst_ps_DP2);
    __m128 xmm3 = _mm_mul_ps(y, _mm_cst_ps_DP3);
    x = _mm_sub_ps(x, xmm1);
    x = _mm_sub_ps(x, xmm2);
    x = _mm_sub_ps(x, xmm3);
    __m128 z = _mm_mul_ps(x, x);
    y = _mm_mul_ps(_mm_cst_ps_coscof_p0, z);
    y = _mm_add_ps(y, _mm_cst_ps_coscof_p1);
    y = _mm_mul_ps(y, z);
    y = _mm_add_ps(y, _mm_cst_ps_coscof_p2);
    y = _mm_mul_ps(y, z);
    y = _mm_mul_ps(y, z);
    __m128 tmp = _mm_mul_ps(z, _mm_cst_ps_0p5);
    y = _mm_sub_ps(y, tmp);
    y = _mm_add_ps(y, _mm_cst_ps_one);
    __m128 y2 = _mm_mul_ps(_mm_cst_ps_sincof_p0, z);
    y2 = _mm_add_ps(y2, _mm_cst_ps_sincof_p1);
    y2 = _mm_mul_ps(y2, z);
    y2 = _mm_add_ps(y2, _mm_cst_ps_sincof_p2);
    y2 = _mm_mul_ps(y2, z);
    y2 = _mm_mul_ps(y2, x);
    y2 = _mm_add_ps(y2, x);
    y2 = _mm_and_ps(polymask, y2);
    y = _mm_andnot_ps(polymask, y);
    y = _mm_add_ps(y, y2);
    y = _mm_xor_ps(y, signbit);
    return y;
}

__m128 _mm_cos_ps(__m128 x)
{
    x = _mm_and_ps(x, *(__m128*) _mm_cst_inv_sign_mask_ps);
    __m128 y = _mm_mul_ps(x, _mm_cst_ps_fopi);
    __m128i yf = _mm_cvttps_epi32(y); // floor
    // see j = (j+1) & (~1) in Cephes
    yf = _mm_add_epi32(yf, *(__m128i*) _mm_cst_one);
    yf = _mm_and_si128(yf, *(__m128i*) _mm_cst_inv1);
    y = _mm_cvtepi32_ps(yf);
    yf = _mm_sub_epi32(yf, *(__m128i*) _mm_cst_two);
    __m128i flag = _mm_andnot_si128(yf, *(__m128i*) _mm_cst_four);
    flag = _mm_slli_epi32(flag, 29); // flag << 29
    yf = _mm_and_si128(yf, *(__m128i*) _mm_cst_two);
    yf = _mm_cmpeq_epi32(yf, _mm_setzero_si128());
    __m128 signbit = _mm_castsi128_ps(flag);
    __m128 polymask = _mm_castsi128_ps(yf);
    // z = ((x - y * DP1) - y * DP2) - y * DP3
    __m128 xmm1 = _mm_mul_ps(y, _mm_cst_ps_DP1);
    __m128 xmm2 = _mm_mul_ps(y, _mm_cst_ps_DP2);
    __m128 xmm3 = _mm_mul_ps(y, _mm_cst_ps_DP3);
    x = _mm_sub_ps(x, xmm1);
    x = _mm_sub_ps(x, xmm2);
    x = _mm_sub_ps(x, xmm3);
    __m128 z = _mm_mul_ps(x, x);
    y = _mm_mul_ps(_mm_cst_ps_coscof_p0, z);
    y = _mm_add_ps(y, _mm_cst_ps_coscof_p1);
    y = _mm_mul_ps(y, z);
    y = _mm_add_ps(y, _mm_cst_ps_coscof_p2);
    y = _mm_mul_ps(y, z);
    y = _mm_mul_ps(y, z);
    __m128 tmp = _mm_mul_ps(z, _mm_cst_ps_0p5);
    y = _mm_sub_ps(y, tmp);
    y = _mm_add_ps(y, _mm_cst_ps_one);
    __m128 y2 = _mm_mul_ps(_mm_cst_ps_sincof_p0, z);
    y2 = _mm_add_ps(y2, _mm_cst_ps_sincof_p1);
    y2 = _mm_mul_ps(y2, z);
    y2 = _mm_add_ps(y2, _mm_cst_ps_sincof_p2);
    y2 = _mm_mul_ps(y2, z);
    y2 = _mm_mul_ps(y2, x);
    y2 = _mm_add_ps(y2, x);
    y2 = _mm_and_ps(polymask, y2);
    y = _mm_andnot_ps(polymask, y);
    y = _mm_add_ps(y, y2);
    y = _mm_xor_ps(y, signbit);

    return y;
}

void AngleMatrix(const float angles[3], float matrix[3][4])
{
    __m128 angleX = _mm_set1_ps(angles[0] * QPIx2d360);
    __m128 angleY = _mm_set1_ps(angles[1] * QPIx2d360);
    __m128 angleZ = _mm_set1_ps(angles[2] * QPIx2d360);

    __m128 cx, sx, cy, sy, cz, sz;
    cx = _mm_cos_ps(angleX);
    sx = _mm_sin_ps(angleX);
    cy = _mm_cos_ps(angleY);
    sy = _mm_sin_ps(angleY);
    cz = _mm_cos_ps(angleZ);
    sz = _mm_sin_ps(angleZ);

    __m128 sy_cz = _mm_mul_ps(sy, cz);
    __m128 sy_sz = _mm_mul_ps(sy, sz);

    __m128 sx_sy_cz = _mm_mul_ps(_mm_mul_ps(sx, sy), cz);
    __m128 sx_sy_sz = _mm_mul_ps(_mm_mul_ps(sx, sy), sz);

    __m128 cx_sy_cz = _mm_mul_ps(_mm_mul_ps(cx, sy), cz);
    __m128 cx_sy_sz = _mm_mul_ps(_mm_mul_ps(cx, sy), sz);

    matrix[0][0] = _mm_cvtss_f32(_mm_mul_ps(cy, cz));
    matrix[1][0] = _mm_cvtss_f32(_mm_mul_ps(cy, sz));
    matrix[2][0] = -_mm_cvtss_f32(sy);
    matrix[0][1] = _mm_cvtss_f32(_mm_sub_ps(sx_sy_cz, _mm_mul_ps(cx, sz)));
    matrix[1][1] = _mm_cvtss_f32(_mm_add_ps(sx_sy_sz, _mm_mul_ps(cx, cz)));
    matrix[2][1] = _mm_cvtss_f32(_mm_mul_ps(sx, cy));
    matrix[0][2] = _mm_cvtss_f32(_mm_add_ps(cx_sy_cz, _mm_mul_ps(sx, sz)));
    matrix[1][2] = _mm_cvtss_f32(_mm_sub_ps(cx_sy_sz, _mm_mul_ps(sx, cz)));
    matrix[2][2] = _mm_cvtss_f32(_mm_mul_ps(cx, cy));
    matrix[0][3] = 0.0f;
    matrix[1][3] = 0.0f;
    matrix[2][3] = 0.0f;
}



void AngleIMatrix (const vec3_t angles, float matrix[3][4] )
{
    __m128 angleX = _mm_set1_ps(angles[0] * QPIx2d360);
    __m128 angleY = _mm_set1_ps(angles[1] * QPIx2d360);
    __m128 angleZ = _mm_set1_ps(angles[2] * QPIx2d360);

    __m128 cx, sx, cy, sy, cz, sz;
    cx = _mm_cos_ps(angleX);
    sx = _mm_sin_ps(angleX);
    cy = _mm_cos_ps(angleY);
    sy = _mm_sin_ps(angleY);
    cz = _mm_cos_ps(angleZ);
    sz = _mm_sin_ps(angleZ);

    __m128 sy_cz = _mm_mul_ps(sy, cz);
    __m128 sy_sz = _mm_mul_ps(sy, sz);

    __m128 sx_sy_cz = _mm_mul_ps(_mm_mul_ps(sx, sy), cz);
    __m128 sx_sy_sz = _mm_mul_ps(_mm_mul_ps(sx, sy), sz);

    __m128 cx_sy_cz = _mm_mul_ps(_mm_mul_ps(cx, sy), cz);
    __m128 cx_sy_sz = _mm_mul_ps(_mm_mul_ps(cx, sy), sz);

    matrix[0][0] = _mm_cvtss_f32(_mm_mul_ps(cy, cz));
    matrix[1][0] = _mm_cvtss_f32(_mm_mul_ps(cy, sz));
    matrix[2][0] = -_mm_cvtss_f32(sy);
    matrix[0][1] = _mm_cvtss_f32(_mm_sub_ps(sx_sy_cz, _mm_mul_ps(cx, sz)));
    matrix[1][1] = _mm_cvtss_f32(_mm_add_ps(sx_sy_sz, _mm_mul_ps(cx, cz)));
    matrix[2][1] = _mm_cvtss_f32(_mm_mul_ps(sx, cy));
    matrix[0][2] = _mm_cvtss_f32(_mm_add_ps(cx_sy_cz, _mm_mul_ps(sx, sz)));
    matrix[1][2] = _mm_cvtss_f32(_mm_sub_ps(cx_sy_sz, _mm_mul_ps(sx, cz)));
    matrix[2][2] = _mm_cvtss_f32(_mm_mul_ps(cx, cy));
    matrix[0][3] = 0.0f;
    matrix[1][3] = 0.0f;
    matrix[2][3] = 0.0f;
}

benchmark is this working better or worse.
#include <xmmintrin.h>
#include <emmintrin.h>

These are headers used by Intel SDKs. __m128 is just a data type used by Intel to store native vectors.
Apparently, they've used Intel development kits in some calculations and also these headers are specifically designed for Intel processors (this code won't work for ARM for example).

Most probably, the reason for the FPS drop when rendering multiple game objects in the same view is cause of the old rendering graphic architecture and engine. Probably 90% of the graphic engine inside is made by WZ. Rewriting the entire graphic system is the real fix. Patching the current graphic engine is painful and probably not worth the time. Making the current engine compatible with a DX12 SDK I would say it's a nightmare. As far as I've seen in the existing .map for S6E3 (not 100% sure, but it seemed like that in the ASM), they've made the same GUIs in Mu Helper class when they could have reuse the existing ones and tweak them a bit.

If you've seen the fixes for FPS in other client DLLs, no one was able to fix the FPS. The "fix" applied is just increasing the speed of rendering by the game's internal clock, decreasing the deltaTime for faster rendering and accelerated game speed. So yeah, "fixing FPS" but the game was feeling like you're playing with a speed hack.
 
Last edited:
Newbie Spellweaver
Joined
Jul 13, 2019
Messages
87
Reaction score
37
It's really difficult, it uses opengl 1.1 as well as old rendering styles, if someone has the ability to upgrade the rendering style so that the image can be drawn faster then the FPS will not be reduced
 
Joined
Oct 29, 2007
Messages
1,290
Reaction score
1,310
#include <xmmintrin.h>
#include <emmintrin.h>

These are headers used by Intel SDKs. __m128 is just a data type used by Intel to store native vectors.
Apparently, they've used Intel development kits in some calculations and also these headers are specifically designed for Intel processors (this code won't work for ARM for example).

Most probably, the reason for the FPS drop when rendering multiple game objects in the same view is cause of the old rendering graphic architecture and engine. Probably 90% of the graphic engine inside is made by WZ. Rewriting the entire graphic system is the real fix. Patching the current graphic engine is painful and probably not worth the time. Making the current engine compatible with a DX12 SDK I would say it's a nightmare. As far as I've seen in the existing .map for S6E3 (not 100% sure, but it seemed like that in the ASM), they've made the same GUIs in Mu Helper class when they could have reuse the existing ones and tweak them a bit.

If you've seen the fixes for FPS in other client DLLs, no one was able to fix the FPS. The "fix" applied is just increasing the speed of rendering by the game's internal clock, decreasing the deltaTime for faster rendering and accelerated game speed. So yeah, "fixing FPS" but the game was feeling like
you're playing with a speed hack.
Everything can be reused, when you know what you are doing. (Even speed hack src xD).

Anyone solved high FPS dropdown when monsters are rendered?
I searching for reason.

Experimental codes:

C++:
#define _XM_SVML_INTRINSICS_
#include <xmmintrin.h>
#include <emmintrin.h>
#define M_PI 3.14159265358979323846f

float QPIx2d360 = (M_PI * 2 / 360);


#    define ALIGN16_BEG __declspec(align(16))
#    define ALIGN16_END

static const ALIGN16_BEG int _mm_cst_sign_mask_ps[4] ALIGN16_END =
{ 0x80000000, 0x80000000, 0x80000000, 0x80000000 };
static const ALIGN16_BEG int _mm_cst_inv_sign_mask_ps[4] ALIGN16_END =
{ ~0x80000000, ~0x80000000, ~0x80000000, ~0x80000000 };
static const ALIGN16_BEG int _mm_cst_sign_mask_pd[4] ALIGN16_END =
{ 0, 0x80000000, 0, 0x80000000 };
static const ALIGN16_BEG int _mm_cst_inv_sign_mask_pd[4] ALIGN16_END =
{ ~0, ~0x80000000, ~0, ~0x80000000 };

static const ALIGN16_BEG int _mm_cst_one[4] ALIGN16_END = { 1, 1, 1, 1 };
static const ALIGN16_BEG int _mm_cst_inv1[4] ALIGN16_END = { ~1, ~1, ~1, ~1 };
static const ALIGN16_BEG int _mm_cst_two[4] ALIGN16_END = { 2, 2, 2, 2 };
static const ALIGN16_BEG int _mm_cst_four[4] ALIGN16_END = { 4, 4, 4, 4 };
static const __m128 _mm_cst_ps_fopi = _mm_set1_ps(1.27323954473516f);
static const __m128 _mm_cst_ps_one = _mm_set1_ps(1.0f);
static const __m128 _mm_cst_ps_coscof_p0 = _mm_set1_ps(2.443315711809948e-5f);
static const __m128 _mm_cst_ps_coscof_p1 = _mm_set1_ps(-1.388731625493765e-3f);
static const __m128 _mm_cst_ps_coscof_p2 = _mm_set1_ps(4.166664568298827e-2f);
static const __m128 _mm_cst_ps_0p5   = _mm_set1_ps(0.5f);
static const __m128 _mm_cst_ps_DP1 = _mm_set1_ps(0.78515625f);
static const __m128 _mm_cst_ps_DP2 = _mm_set1_ps(2.4187564849853515625e-4f);
static const __m128 _mm_cst_ps_DP3 = _mm_set1_ps(3.77489497744594108e-8f);

static const __m128 _mm_cst_ps_sincof_p0 = _mm_set1_ps(-1.9515295891e-4f);
static const __m128 _mm_cst_ps_sincof_p1 = _mm_set1_ps(8.3321608736e-3f);
static const __m128 _mm_cst_ps_sincof_p2 = _mm_set1_ps(-1.6666654611e-1f);

__m128 _mm_sin_ps(__m128 x) {
    __m128 signbit = _mm_and_ps(x, *(__m128*) _mm_cst_sign_mask_ps);
    x = _mm_and_ps(x, *(__m128*) _mm_cst_inv_sign_mask_ps);
    __m128 y = _mm_mul_ps(x, _mm_cst_ps_fopi);
    __m128i yf = _mm_cvttps_epi32(y); // floor
    // see j = (j+1) & (~1) in Cephes
    yf = _mm_add_epi32(yf, *(__m128i*) _mm_cst_one);
    yf = _mm_and_si128(yf, *(__m128i*) _mm_cst_inv1);
    y = _mm_cvtepi32_ps(yf);
    __m128i flag = _mm_and_si128(yf, *(__m128i*) _mm_cst_four);
    flag = _mm_slli_epi32(flag, 29); // flag << 29
    yf = _mm_and_si128(yf, *(__m128i*) _mm_cst_two);
    yf = _mm_cmpeq_epi32(yf, _mm_setzero_si128());
    __m128 swapsign = _mm_castsi128_ps(flag);
    __m128 polymask = _mm_castsi128_ps(yf);
    signbit = _mm_xor_ps(signbit, swapsign);
    // z = ((x - y * DP1) - y * DP2) - y * DP3
    __m128 xmm1 = _mm_mul_ps(y, _mm_cst_ps_DP1);
    __m128 xmm2 = _mm_mul_ps(y, _mm_cst_ps_DP2);
    __m128 xmm3 = _mm_mul_ps(y, _mm_cst_ps_DP3);
    x = _mm_sub_ps(x, xmm1);
    x = _mm_sub_ps(x, xmm2);
    x = _mm_sub_ps(x, xmm3);
    __m128 z = _mm_mul_ps(x, x);
    y = _mm_mul_ps(_mm_cst_ps_coscof_p0, z);
    y = _mm_add_ps(y, _mm_cst_ps_coscof_p1);
    y = _mm_mul_ps(y, z);
    y = _mm_add_ps(y, _mm_cst_ps_coscof_p2);
    y = _mm_mul_ps(y, z);
    y = _mm_mul_ps(y, z);
    __m128 tmp = _mm_mul_ps(z, _mm_cst_ps_0p5);
    y = _mm_sub_ps(y, tmp);
    y = _mm_add_ps(y, _mm_cst_ps_one);
    __m128 y2 = _mm_mul_ps(_mm_cst_ps_sincof_p0, z);
    y2 = _mm_add_ps(y2, _mm_cst_ps_sincof_p1);
    y2 = _mm_mul_ps(y2, z);
    y2 = _mm_add_ps(y2, _mm_cst_ps_sincof_p2);
    y2 = _mm_mul_ps(y2, z);
    y2 = _mm_mul_ps(y2, x);
    y2 = _mm_add_ps(y2, x);
    y2 = _mm_and_ps(polymask, y2);
    y = _mm_andnot_ps(polymask, y);
    y = _mm_add_ps(y, y2);
    y = _mm_xor_ps(y, signbit);
    return y;
}

__m128 _mm_cos_ps(__m128 x)
{
    x = _mm_and_ps(x, *(__m128*) _mm_cst_inv_sign_mask_ps);
    __m128 y = _mm_mul_ps(x, _mm_cst_ps_fopi);
    __m128i yf = _mm_cvttps_epi32(y); // floor
    // see j = (j+1) & (~1) in Cephes
    yf = _mm_add_epi32(yf, *(__m128i*) _mm_cst_one);
    yf = _mm_and_si128(yf, *(__m128i*) _mm_cst_inv1);
    y = _mm_cvtepi32_ps(yf);
    yf = _mm_sub_epi32(yf, *(__m128i*) _mm_cst_two);
    __m128i flag = _mm_andnot_si128(yf, *(__m128i*) _mm_cst_four);
    flag = _mm_slli_epi32(flag, 29); // flag << 29
    yf = _mm_and_si128(yf, *(__m128i*) _mm_cst_two);
    yf = _mm_cmpeq_epi32(yf, _mm_setzero_si128());
    __m128 signbit = _mm_castsi128_ps(flag);
    __m128 polymask = _mm_castsi128_ps(yf);
    // z = ((x - y * DP1) - y * DP2) - y * DP3
    __m128 xmm1 = _mm_mul_ps(y, _mm_cst_ps_DP1);
    __m128 xmm2 = _mm_mul_ps(y, _mm_cst_ps_DP2);
    __m128 xmm3 = _mm_mul_ps(y, _mm_cst_ps_DP3);
    x = _mm_sub_ps(x, xmm1);
    x = _mm_sub_ps(x, xmm2);
    x = _mm_sub_ps(x, xmm3);
    __m128 z = _mm_mul_ps(x, x);
    y = _mm_mul_ps(_mm_cst_ps_coscof_p0, z);
    y = _mm_add_ps(y, _mm_cst_ps_coscof_p1);
    y = _mm_mul_ps(y, z);
    y = _mm_add_ps(y, _mm_cst_ps_coscof_p2);
    y = _mm_mul_ps(y, z);
    y = _mm_mul_ps(y, z);
    __m128 tmp = _mm_mul_ps(z, _mm_cst_ps_0p5);
    y = _mm_sub_ps(y, tmp);
    y = _mm_add_ps(y, _mm_cst_ps_one);
    __m128 y2 = _mm_mul_ps(_mm_cst_ps_sincof_p0, z);
    y2 = _mm_add_ps(y2, _mm_cst_ps_sincof_p1);
    y2 = _mm_mul_ps(y2, z);
    y2 = _mm_add_ps(y2, _mm_cst_ps_sincof_p2);
    y2 = _mm_mul_ps(y2, z);
    y2 = _mm_mul_ps(y2, x);
    y2 = _mm_add_ps(y2, x);
    y2 = _mm_and_ps(polymask, y2);
    y = _mm_andnot_ps(polymask, y);
    y = _mm_add_ps(y, y2);
    y = _mm_xor_ps(y, signbit);

    return y;
}

void AngleMatrix(const float angles[3], float matrix[3][4])
{
    __m128 angleX = _mm_set1_ps(angles[0] * QPIx2d360);
    __m128 angleY = _mm_set1_ps(angles[1] * QPIx2d360);
    __m128 angleZ = _mm_set1_ps(angles[2] * QPIx2d360);

    __m128 cx, sx, cy, sy, cz, sz;
    cx = _mm_cos_ps(angleX);
    sx = _mm_sin_ps(angleX);
    cy = _mm_cos_ps(angleY);
    sy = _mm_sin_ps(angleY);
    cz = _mm_cos_ps(angleZ);
    sz = _mm_sin_ps(angleZ);

    __m128 sy_cz = _mm_mul_ps(sy, cz);
    __m128 sy_sz = _mm_mul_ps(sy, sz);

    __m128 sx_sy_cz = _mm_mul_ps(_mm_mul_ps(sx, sy), cz);
    __m128 sx_sy_sz = _mm_mul_ps(_mm_mul_ps(sx, sy), sz);

    __m128 cx_sy_cz = _mm_mul_ps(_mm_mul_ps(cx, sy), cz);
    __m128 cx_sy_sz = _mm_mul_ps(_mm_mul_ps(cx, sy), sz);

    matrix[0][0] = _mm_cvtss_f32(_mm_mul_ps(cy, cz));
    matrix[1][0] = _mm_cvtss_f32(_mm_mul_ps(cy, sz));
    matrix[2][0] = -_mm_cvtss_f32(sy);
    matrix[0][1] = _mm_cvtss_f32(_mm_sub_ps(sx_sy_cz, _mm_mul_ps(cx, sz)));
    matrix[1][1] = _mm_cvtss_f32(_mm_add_ps(sx_sy_sz, _mm_mul_ps(cx, cz)));
    matrix[2][1] = _mm_cvtss_f32(_mm_mul_ps(sx, cy));
    matrix[0][2] = _mm_cvtss_f32(_mm_add_ps(cx_sy_cz, _mm_mul_ps(sx, sz)));
    matrix[1][2] = _mm_cvtss_f32(_mm_sub_ps(cx_sy_sz, _mm_mul_ps(sx, cz)));
    matrix[2][2] = _mm_cvtss_f32(_mm_mul_ps(cx, cy));
    matrix[0][3] = 0.0f;
    matrix[1][3] = 0.0f;
    matrix[2][3] = 0.0f;
}



void AngleIMatrix (const vec3_t angles, float matrix[3][4] )
{
    __m128 angleX = _mm_set1_ps(angles[0] * QPIx2d360);
    __m128 angleY = _mm_set1_ps(angles[1] * QPIx2d360);
    __m128 angleZ = _mm_set1_ps(angles[2] * QPIx2d360);

    __m128 cx, sx, cy, sy, cz, sz;
    cx = _mm_cos_ps(angleX);
    sx = _mm_sin_ps(angleX);
    cy = _mm_cos_ps(angleY);
    sy = _mm_sin_ps(angleY);
    cz = _mm_cos_ps(angleZ);
    sz = _mm_sin_ps(angleZ);

    __m128 sy_cz = _mm_mul_ps(sy, cz);
    __m128 sy_sz = _mm_mul_ps(sy, sz);

    __m128 sx_sy_cz = _mm_mul_ps(_mm_mul_ps(sx, sy), cz);
    __m128 sx_sy_sz = _mm_mul_ps(_mm_mul_ps(sx, sy), sz);

    __m128 cx_sy_cz = _mm_mul_ps(_mm_mul_ps(cx, sy), cz);
    __m128 cx_sy_sz = _mm_mul_ps(_mm_mul_ps(cx, sy), sz);

    matrix[0][0] = _mm_cvtss_f32(_mm_mul_ps(cy, cz));
    matrix[1][0] = _mm_cvtss_f32(_mm_mul_ps(cy, sz));
    matrix[2][0] = -_mm_cvtss_f32(sy);
    matrix[0][1] = _mm_cvtss_f32(_mm_sub_ps(sx_sy_cz, _mm_mul_ps(cx, sz)));
    matrix[1][1] = _mm_cvtss_f32(_mm_add_ps(sx_sy_sz, _mm_mul_ps(cx, cz)));
    matrix[2][1] = _mm_cvtss_f32(_mm_mul_ps(sx, cy));
    matrix[0][2] = _mm_cvtss_f32(_mm_add_ps(cx_sy_cz, _mm_mul_ps(sx, sz)));
    matrix[1][2] = _mm_cvtss_f32(_mm_sub_ps(cx_sy_sz, _mm_mul_ps(sx, cz)));
    matrix[2][2] = _mm_cvtss_f32(_mm_mul_ps(cx, cy));
    matrix[0][3] = 0.0f;
    matrix[1][3] = 0.0f;
    matrix[2][3] = 0.0f;
}

benchmark is this working better or worse.
If you don't know what it does...why are you providing it? It looks like they were mathematical library extensions (I suspect) to replace or give greater support to WebZen's ZzzMathLib.h (at least that's what it seems from looking at the code in a very preliminary way). Please forgive me if I'm wrong.

It's really difficult, it uses opengl 1.1 as well as old rendering styles, if someone has the ability to upgrade the rendering style so that the image can be drawn faster then the FPS will not be reduced
Just because something is difficult doesn't mean it's impossible.
 
Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
It's really difficult, it uses opengl 1.1 as well as old rendering styles, if someone has the ability to upgrade the rendering style so that the image can be drawn faster then the FPS will not be reduced

Have You seen maybe this project?
 
Newbie Spellweaver
Joined
Jul 13, 2019
Messages
87
Reaction score
37
Have You seen maybe this project?
Yes, I've seen it, it seems to run at 60 fps but achieving 60 fps is not difficult, the fps only decreases when the number of players or monsters is too large. Try it with 20 kundun bosses

I tried measuring the time to draw frames, when there are too many monsters or players, drawing frames takes more time and causes the fps to drop low, even if the cpu or gpu are not being used too much.

 
Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
Yes, I've seen it, it seems to run at 60 fps but achieving 60 fps is not difficult, the fps only decreases when the number of players or monsters is too large. Try it with 20 kundun bosses


MU Online, released in 2003, is an MMORPG from the hack and slash genre, whose architecture and code were designed at a time when multithreading wasn't as commonly utilized as it is today. This means that the game was created during a period when personal computers didn't have the same multicore potential, and developers didn't have as much pressure to optimize games for multithreading.

During that era, games often relied on single-threaded architecture, meaning that all the game logic operated within a single thread. For MU Online, many tasks such as monster AI processing, player interactions, and network communication had to be executed sequentially, limiting the potential for utilizing multicore processors.

Furthermore, hardware resources back then were significantly more limited compared to today's standards. Games had to run on computers with lower computational power, making designing games with multithreading less of a priority.
As a result, while multithreading is now a standard practice in game development, older titles like MU Online often didn't leverage this technology due to the hardware and technological constraints prevailing at the time of their creation.

Multithreading, multithreaded rendering can also solve some performance problems, but we should implement it here.



You can also speedup build in development time using Multi-processor Compilation.
(image copied from some site)
Reduce_Build_Time - [Development] Source Mu Main 1.03.35 [Season 5.1 - Season 5.2] - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Last edited:
Joined
Oct 29, 2007
Messages
1,290
Reaction score
1,310
MU Online, released in 2003, is an MMORPG from the hack and slash genre, whose architecture and code were designed at a time when multithreading wasn't as commonly utilized as it is today. This means that the game was created during a period when personal computers didn't have the same multicore potential, and developers didn't have as much pressure to optimize games for multithreading.

During that era, games often relied on single-threaded architecture, meaning that all the game logic operated within a single thread. For MU Online, many tasks such as monster AI processing, player interactions, and network communication had to be executed sequentially, limiting the potential for utilizing multicore processors.

Furthermore, hardware resources back then were significantly more limited compared to today's standards. Games had to run on computers with lower computational power, making designing games with multithreading less of a priority.
As a result, while multithreading is now a standard practice in game development, older titles like MU Online often didn't leverage this technology due to the hardware and technological constraints prevailing at the time of their creation.

Multithreading, multithreaded rendering can also solve some performance problems, but we should implement it here.



You can also speedup build in development time using Multi-processor Compilation.
(image copied from some site)
View attachment 258017

yes, ofcourse... this is a posibility... another is learn opengl and write your own shaders.
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
Jul 28, 2021
Messages
30
Reaction score
4
yes, ofcourse... this is a posibility... another is learn opengl and write your own shaders.
i think that shaders for current project will be a big problems. maybe, maybe, you can find energy from yourself and rewrite all code from linear to sharers, but i doubt.
this is my opinion only :)
 
Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
I trying to do everything here... But also waiting for new shares on ragezone / tuservermu.
I adding phoenix shot skill now to Rage Fighter.

.
 

Attachments

You must be registered for see attachments list
Last edited:
Joined
Aug 29, 2011
Messages
512
Reaction score
33
I'm studying programming and I would like to know if someone could tell me where I can find in this source the code that deals with the effect of items when they are excellent and also the effect when they level up
 
Newbie Spellweaver
Joined
Jul 13, 2019
Messages
87
Reaction score
37
I'm studying programming and I would like to know if someone could tell me where I can find in this source the code that deals with the effect of items when they are excellent and also the effect when they level up
In the client there is only display function, you can see item information in ZzzInventory.cpp and ZzzInfomation.cpp
 
Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
Customs:

- Display item informations on ground.

File: NewUINameWindow.cpp

Change:

Code:
        else if(SelectedItem != -1)
        {
            RenderItemName(SelectedItem,&Items[SelectedItem].Object,Items[SelectedItem].Item.Level,Items[SelectedItem].Item.Option1,Items[SelectedItem].Item.ExtOption,false);
        }

To :

Code:
        else if(SelectedItem != -1)
        {
            ItemConvert(&Items[SelectedItem].Item, Items[SelectedItem].Item.Level, Items[SelectedItem].Item.Option1, Items[SelectedItem].Item.ExtOption);
            RenderItemInfo(MouseX, MouseY, &Items[SelectedItem].Item, false);
        }

Final effect:
 

Attachments

You must be registered for see attachments list
Initiate Mage
Joined
Dec 11, 2023
Messages
3
Reaction score
1
Can anybody tell me where is declared the function Vector() which is used by many parts of the game? I tried to search into all files, but no success. The function seems to have the following prototype:
Code:
void Vector(float x, float y, float z, vec3_t color)

Compilation error:
Code:
./Shader/ModelManager.h:28:3: error: 'Vector' was not declared in this scope
   Vector(0.f,0.f,0.f, m_vColor3f);
   ^~~~~~
 
Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
Can anybody tell me where is declared the function Vector() which is used by many parts of the game? I tried to search into all files, but no success. The function seems to have the following prototype:
Code:
void Vector(float x, float y, float z, vec3_t color)

Compilation error:
Code:
./Shader/ModelManager.h:28:3: error: 'Vector' was not declared in this scope
   Vector(0.f,0.f,0.f, m_vColor3f);
   ^~~~~~
ZzzMathLib.h as #define
 
Back
Top