Skip to content

Commit c5a73e0

Browse files
committed
Revert "render: Allow clear_screen render commands to be for a single frame."
This reverts commit ec24777.
1 parent 53191e5 commit c5a73e0

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

data/games/maddog/game.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ local function check_actions(inputs)
578578
gunsound = "empty"
579579
else
580580
-- flash the screen white for one frame when firing to give some weight to it. I learned this trick from The Fablemans, lol.
581-
DirkSimple.clear_screen(255, 255, 255, true)
581+
DirkSimple.clear_screen(255, 255, 255)
582582
gunsound = "shot"
583583
if not infinite_bullets then
584584
scene_manager.loaded_bullets = scene_manager.loaded_bullets - 1

dirksimple.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ typedef struct RenderCommand
5959
struct
6060
{
6161
uint8_t r, g, b;
62-
int one_frame_flash;
6362
} clear;
6463
struct
6564
{
@@ -1003,7 +1002,6 @@ static int luahook_DirkSimple_clear_screen(lua_State *L)
10031002
cmd->data.clear.r = (uint8_t) lua_tonumber(L, 1);
10041003
cmd->data.clear.g = (uint8_t) lua_tonumber(L, 2);
10051004
cmd->data.clear.b = (uint8_t) lua_tonumber(L, 3);
1006-
cmd->data.clear.one_frame_flash = lua_toboolean(L, 4) ? 1 : 0;
10071005
return 0;
10081006
}
10091007

@@ -1709,15 +1707,10 @@ static void send_rendering_primitives(void)
17091707
{
17101708
DirkSimple_beginframe();
17111709
for (int i = 0; i < GNumRenderCommands; i++) {
1712-
RenderCommand *cmd = &GRenderCommands[i];
1710+
const RenderCommand *cmd = &GRenderCommands[i];
17131711
switch (cmd->prim) {
17141712
case RENDPRIM_CLEAR:
1715-
if (cmd->data.clear.one_frame_flash >= 0) {
1716-
DirkSimple_clearscreen(cmd->data.clear.r, cmd->data.clear.g, cmd->data.clear.b);
1717-
if (cmd->data.clear.one_frame_flash == 1) {
1718-
cmd->data.clear.one_frame_flash = -1;
1719-
}
1720-
}
1713+
DirkSimple_clearscreen(cmd->data.clear.r, cmd->data.clear.g, cmd->data.clear.b);
17211714
break;
17221715
case RENDPRIM_RECT:
17231716
DirkSimple_drawrect(cmd->data.rect.x, cmd->data.rect.y, cmd->data.rect.w, cmd->data.rect.h,

0 commit comments

Comments
 (0)