Dateien nach "inc" hochladen
This commit is contained in:
+53
@@ -0,0 +1,53 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace math
|
||||||
|
{
|
||||||
|
struct render_points_t
|
||||||
|
{
|
||||||
|
float x;
|
||||||
|
float y;
|
||||||
|
float w;
|
||||||
|
float h;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct matrix3x4
|
||||||
|
{
|
||||||
|
float *operator[](int i)
|
||||||
|
{
|
||||||
|
return m_value[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
const float *operator[](int i) const
|
||||||
|
{
|
||||||
|
return m_value[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
float *Base()
|
||||||
|
{
|
||||||
|
return &m_value[0][0];
|
||||||
|
}
|
||||||
|
|
||||||
|
const float *Base() const
|
||||||
|
{
|
||||||
|
return &m_value[0][0];
|
||||||
|
}
|
||||||
|
|
||||||
|
float m_value[3][4];
|
||||||
|
};
|
||||||
|
|
||||||
|
inline float dot_prod(const float *first, const float *second)
|
||||||
|
{
|
||||||
|
return ((first[0] * second[0]) + (first[1] * second[1]) + (first[2] * second[2]));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void vector_transform(Vector3D& in, const matrix3x4& matrix, Vector3D& out)
|
||||||
|
{
|
||||||
|
const auto in_array = in.base();
|
||||||
|
|
||||||
|
out.x = dot_prod(in_array, matrix[0]) + matrix[0][3];
|
||||||
|
out.y = dot_prod(in_array, matrix[1]) + matrix[1][3];
|
||||||
|
out.z = dot_prod(in_array, matrix[2]) + matrix[2][3];
|
||||||
|
}
|
||||||
|
|
||||||
|
extern bool setup_render_points(Context* ctx, const matrix3x4& coord_frame, const Vector3D& mins, const Vector3D& maxs, render_points_t& out);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define OFF_LOCAL_PLAYER 0x26C8128
|
||||||
|
#define OFF_ENTITY_LIST 0x6B6CE88
|
||||||
|
#define OFF_SIGNON_STATE 0x1BB557C
|
||||||
|
#define OFF_GLOBAL_VARS 0x1AC0C68
|
||||||
|
#define OFF_GAMEMODE 0x2700320
|
||||||
|
#define OFF_MAP_NAME 0xE2DBEF0
|
||||||
|
|
||||||
|
#define OFF_PLAYER_LIFE_STATE 0x690
|
||||||
|
#define OFF_PLAYER_TIME_BASE 0x20E8
|
||||||
|
#define OFF_TRAVERSAL_PROGRESS 0x2BC4
|
||||||
|
#define OFF_TRAVERSAL_START_TIME 0x2BC8
|
||||||
|
|
||||||
|
#define OFF_IN_FORWARD 0x3370F48
|
||||||
|
#define OFF_IN_JUMP 0x3371118
|
||||||
|
#define OFF_IN_DUCK 0x3371208
|
||||||
|
|
||||||
|
#define OFF_ENTITY_VEC_ORIGIN 0x17C
|
||||||
|
#define OFF_ENTITY_HEALTH 0x328
|
||||||
|
#define OFF_ENTITY_HEALTH_MAX 0x470
|
||||||
|
#define OFF_ENTITY_TEAM_NUMBER 0x338
|
||||||
|
#define OFF_ENTITY_SQUAD_ID 0x344
|
||||||
|
#define OFF_ENTITY_COLLISION 0x03b8
|
||||||
|
#define OFF_ENTITY_VEC_PUNCH_ANGLE 0x2498
|
||||||
|
#define OFF_ENTITY_VEC_EYE_ANGLE 0x2580
|
||||||
|
#define OFF_ENTITY_SIGNIFIER 0x478
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace render
|
||||||
|
{
|
||||||
|
inline void draw_set_color(Context* ctx, int r, int g, int b, int a)
|
||||||
|
{
|
||||||
|
return ctx->pfn_draw_set_color(*ctx->mss_ptr, r, g, b, a);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void draw_filled_rect(Context* ctx, int x0, int y0, int x1, int y1)
|
||||||
|
{
|
||||||
|
return ctx->pfn_draw_filled_rect(*ctx->mss_ptr, x0, y0, x1, y1);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void draw_outlined_rect(Context* ctx, int x0, int y0, int x1, int y1)
|
||||||
|
{
|
||||||
|
return ctx->pfn_draw_outlined_rect(*ctx->mss_ptr, x0, y0, x1, y1);
|
||||||
|
}
|
||||||
|
|
||||||
|
extern void tick( Context* ctx );
|
||||||
|
extern bool w2s(Context* ctx, Vector3D &vIn, Vector3D* vOut);
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
void read_xmm6(float* out);
|
||||||
|
void read_xmm7(float* out);
|
||||||
|
|
||||||
|
void write_xmm6(float val);
|
||||||
|
void write_xmm7(float val);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user