Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ Dash Faction Changelog
Version 1.9.2 (not released yet)
--------------------------------
[@is-this-c](https://github.com/is-this-c)
- Set `rf::gr::text_2d_mode` to ignore fog
- Fix `gr_d3d_bitmap`, so `gr_d3d_set_state` is called earlier
- Fix a potential crash after a client quits a game if Directd3D 11 is enabled
- Fix a potential crash, after a client quits a game, if Directd3D 11 is enabled
- Improve compatibility with Alpine Faction servers
- Fix `PgUp`, `PgDown`, `End`, and `Home` on numeric keypads

Expand Down
3 changes: 3 additions & 0 deletions game_patch/graphics/gr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,4 +330,7 @@ void gr_apply_patch()
windowed_cmd.register_cmd();
nearest_texture_filtering_cmd.register_cmd();
lod_distance_scale_cmd.register_cmd();

// Fix `rf::gr::text_2d_mode`.
AsmWriter{0x0050BB40}.push(static_cast<uint8_t>(rf::gr::FOG_NOT_ALLOWED));
}
18 changes: 6 additions & 12 deletions game_patch/rf/gr/gr.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ namespace rf::gr
};
static_assert(sizeof(Vertex) == 0x30);

enum TextureSource
{
enum TextureSource {
TEXTURE_SOURCE_NONE = 0x0,
TEXTURE_SOURCE_WRAP = 0x1,
TEXTURE_SOURCE_CLAMP = 0x2,
Expand All @@ -68,25 +67,22 @@ namespace rf::gr
TEXTURE_SOURCE_MT_CLAMP_TRILIN = 0xB,
};

enum ColorSource
{
enum ColorSource {
COLOR_SOURCE_VERTEX = 0x0,
COLOR_SOURCE_TEXTURE = 0x1,
COLOR_SOURCE_VERTEX_TIMES_TEXTURE = 0x2,
COLOR_SOURCE_VERTEX_PLUS_TEXTURE = 0x3,
COLOR_SOURCE_VERTEX_TIMES_TEXTURE_2X = 0x4,
};

enum AlphaSource
{
enum AlphaSource {
ALPHA_SOURCE_VERTEX = 0x0,
ALPHA_SOURCE_VERTEX_NONDARKENING = 0x1,
ALPHA_SOURCE_TEXTURE = 0x2,
ALPHA_SOURCE_VERTEX_TIMES_TEXTURE = 0x3,
};

enum AlphaBlend
{
enum AlphaBlend {
ALPHA_BLEND_NONE = 0x0,
ALPHA_BLEND_ADDITIVE = 0x1,
ALPHA_BLEND_ALPHA_ADDITIVE = 0x2,
Expand All @@ -97,8 +93,7 @@ namespace rf::gr
ALPHA_BLEND_SWAPPED_SRC_DEST_COLOR = 0x7,
};

enum ZbufferType
{
enum ZbufferType {
ZBUFFER_TYPE_NONE = 0x0,
ZBUFFER_TYPE_READ = 0x1,
ZBUFFER_TYPE_READ_EQUAL = 0x2,
Expand All @@ -107,8 +102,7 @@ namespace rf::gr
ZBUFFER_TYPE_FULL_ALPHA_TEST = 0x5,
};

enum FogType
{
enum FogType {
FOG_ALLOWED = 0x0,
FOG_ALLOWED_ADD2 = 0x1,
FOG_ALLOWED_MULT2 = 0x2,
Expand Down
Loading