Адреса 26.06.2024

Забаненный
Статус
Оффлайн
Регистрация
22 Дек 2023
Сообщения
267
Реакции[?]
16
Поинты[?]
17K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Последнее редактирование:
Забаненный
Статус
Оффлайн
Регистрация
22 Дек 2023
Сообщения
267
Реакции[?]
16
Поинты[?]
17K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Брат ну если ты знаешь скажи как нужно сделать, у меня ведь проблема
Код:
Matrix44 projection = driver.Read<Matrix44>(IOGameAddress::pProjectToScreen);
Matrix44 view = driver.Read<Matrix44>(IOGameAddress::pProjectToScreen + 0x40);
 
Начинающий
Статус
Оффлайн
Регистрация
13 Май 2023
Сообщения
144
Реакции[?]
26
Поинты[?]
26K
Код:
bool project_to_screen(int* v, const Vector3& in, Vector3& out) const {
    Matrix44 identity;
    identity.SetIdentity();
    Matrix44 view = driver.Read<Matrix44>(IOGameAddress::pProjectToScreen);
    Matrix44 projection = driver.Read<Matrix44>(IOGameAddress::pProjectToScreen + 0x40);
    if (__mathVector3Project(&out, &in, v, &projection, &view, &identity)) {
        out.x = out.x * 100.0f / (float)v[2];
        out.y = out.y * 100.0f / (float)v[3];
        return true;
    }
    return false;
}

bool WorldToScreen(const Vector3& in, Vector3& out) const {
    int v[4] = { 0, 0, globals.Width, globals.Height };
    project_to_screen(v, in, out);

    if (out.z < 0.0f || out.z > 1.0f)
        return false;
    out.x = out.x * ((float)v[2] / 100.0f);
    out.y = out.y * ((float)v[3] / 100.0f);
    return true;
}
C++:
bool cGame::WorldToScreen(const Vec3& in, Vec3& out)
{
    auto p_Render = SSystemGlobalEnvironment::Singleton()->GetIRenderer();
    int32 v[4] = { 0, 0, GetWidth(), GetHeight() };
    if(!p_Render->ProjectToScreen(v, in, out))return 0;

    out.x *= GetWidth() * 0.01f;
    out.y *= GetHeight() * 0.01f;
    out.z *= 1.0f;

    return((out.z < 1.0f) && (out.x > 0) && (out.x < (float)GetWidth()) && (out.y > 0) &&
        (out.y < (float)GetHeight()));
}
C++:
    bool ProjectToScreen(int32* vp, Vec3 ptx,Vec3 &sx)
    {
        Vec3 vOut;
        Matrix44 mIdent;
        mIdent.SetIdentity();
        Matrix44 View = TGetValue<Matrix44>(_IRenderer::dwBaseProjection);
        Matrix44 Projection = TGetValue<Matrix44>(_IRenderer::dwBaseMatrix);
        Vec3 result = mathVec3Project_Rebuild(vOut, ptx, vp, Projection, View, mIdent);
        if (!result.IsEmpty())
        {
            sx.x = vOut.x * 100.0f / (f32)vp[2];
            sx.y = vOut.y * 100.0f / (f32)vp[3];
            sx.z = vOut.z;
            return true;
        }
        return false;
    }
C++:
    static  DWORD64 dwBaseProjection = 0x142405818;
    static  DWORD64    dwBaseMatrix = dwBaseProjection + 0x40;
C++:
int cGame::GetWidth()
{
    auto& io = ImGui::GetIO();
    return    io.DisplaySize.x;
}

int cGame::GetHeight()
{
    auto& io = ImGui::GetIO();
    return io.DisplaySize.y;
}
C++:
    template<class cData> cData TGetValue(int64 dwOffset)
    {
        return Read<cData>(dwOffset);
    }
 
Начинающий
Статус
Оффлайн
Регистрация
29 Фев 2024
Сообщения
20
Реакции[?]
0
Поинты[?]
0
Код:
Matrix44 projection = driver.Read<Matrix44>(IOGameAddress::pProjectToScreen);
Matrix44 view = driver.Read<Matrix44>(IOGameAddress::pProjectToScreen + 0x40);
как я их перепутал если до обновы работало?
C++:
bool cGame::WorldToScreen(const Vec3& in, Vec3& out)
{
    auto p_Render = SSystemGlobalEnvironment::Singleton()->GetIRenderer();
    int32 v[4] = { 0, 0, GetWidth(), GetHeight() };
    if(!p_Render->ProjectToScreen(v, in, out))return 0;

    out.x *= GetWidth() * 0.01f;
    out.y *= GetHeight() * 0.01f;
    out.z *= 1.0f;

    return((out.z < 1.0f) && (out.x > 0) && (out.x < (float)GetWidth()) && (out.y > 0) &&
        (out.y < (float)GetHeight()));
}
C++:
    bool ProjectToScreen(int32* vp, Vec3 ptx,Vec3 &sx)
    {
        Vec3 vOut;
        Matrix44 mIdent;
        mIdent.SetIdentity();
        Matrix44 View = TGetValue<Matrix44>(_IRenderer::dwBaseProjection);
        Matrix44 Projection = TGetValue<Matrix44>(_IRenderer::dwBaseMatrix);
        Vec3 result = mathVec3Project_Rebuild(vOut, ptx, vp, Projection, View, mIdent);
        if (!result.IsEmpty())
        {
            sx.x = vOut.x * 100.0f / (f32)vp[2];
            sx.y = vOut.y * 100.0f / (f32)vp[3];
            sx.z = vOut.z;
            return true;
        }
        return false;
    }
C++:
    static  DWORD64 dwBaseProjection = 0x142405818;
    static  DWORD64    dwBaseMatrix = dwBaseProjection + 0x40;
C++:
int cGame::GetWidth()
{
    auto& io = ImGui::GetIO();
    return    io.DisplaySize.x;
}

int cGame::GetHeight()
{
    auto& io = ImGui::GetIO();
    return io.DisplaySize.y;
}
C++:
    template<class cData> cData TGetValue(int64 dwOffset)
    {
        return Read<cData>(dwOffset);
    }
дай пожалуйста определение f32 и mathVec3Project_Rebuild
 
Начинающий
Статус
Оффлайн
Регистрация
13 Май 2023
Сообщения
144
Реакции[?]
26
Поинты[?]
26K
как я их перепутал если до обновы работало?

дай пожалуйста определение f32 и mathVec3Project_Rebuild
C++:
typedef float f32;
typedef double f64;
typedef signed char int8;
typedef signed short int16;
typedef signed int int32;
typedef signed __int64 int64;
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned __int32 uint32;
typedef unsigned int uint;
typedef unsigned long ulong32;
typedef unsigned long long ulong64;
typedef unsigned __int64 uint64;
typedef unsigned __int64 uintptr;
typedef unsigned int EntityId;
 
Начинающий
Статус
Оффлайн
Регистрация
29 Фев 2024
Сообщения
20
Реакции[?]
0
Поинты[?]
0
C++:
typedef float f32;
typedef double f64;
typedef signed char int8;
typedef signed short int16;
typedef signed int int32;
typedef signed __int64 int64;
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned __int32 uint32;
typedef unsigned int uint;
typedef unsigned long ulong32;
typedef unsigned long long ulong64;
typedef unsigned __int64 uint64;
typedef unsigned __int64 uintptr;
typedef unsigned int EntityId;
mathVec3Project_Rebuild еще дай пожалуйста, у меня Vector3 а у тебя float
 
Начинающий
Статус
Оффлайн
Регистрация
29 Фев 2024
Сообщения
20
Реакции[?]
0
Поинты[?]
0
не удивительно, эти мелкие пастерки ни на что не способные овощи
Показываю что я сделал:
Код:
bool WorldToScreen(Vector3 in, Vector4* out) const
{
    Vector3 vOut = ZERO;
    Matrix44 mIdent = IDENTITY;

    int viewport[4] =
    {
        0,
        0,
        globals.Width,
        globals.Height
    };

    Matrix44 proj = driver.Read<Matrix44>(IOGameAddress::pProjectToScreen + 0x40);
    Matrix44 view = driver.Read<Matrix44>(IOGameAddress::pProjectToScreen);

    out->w = __mathVector3Project(&vOut, &in, viewport, &proj, &view, &mIdent);
    out->x = vOut.x;
    out->y = vOut.y;
    out->z = vOut.z;

    if (out->x < 0 || out->y < 0)
        return false;

    if (out->x > viewport[2] || out->y > viewport[3])
        return false;

    if (out->z < 0.0f || out->z > 1.0f)
        return false;

    if (out->w == 0.0f)
        return false;

    return true;
}
При том что pProjectToScreen = 0x142405818, почему то тоже не работает
 
Забаненный
Статус
Оффлайн
Регистрация
22 Дек 2023
Сообщения
267
Реакции[?]
16
Поинты[?]
17K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Начинающий
Статус
Оффлайн
Регистрация
29 Фев 2024
Сообщения
20
Реакции[?]
0
Поинты[?]
0
Забаненный
Статус
Оффлайн
Регистрация
22 Дек 2023
Сообщения
267
Реакции[?]
16
Поинты[?]
17K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Сверху Снизу