Devilution: scrollrt.cpp

Created on 18 Sep 2018  路  8Comments  路  Source: diasurgical/devilution

  • [x] 452985 (ClearCursor)
  • [x] 452994 (DrawMissile)
  • [x] 452B2A (DrawClippedMissile)
  • [x] 452CC0 (DrawDeadPlayer)
  • [x] 452DA0 (DrawPlayer)
  • [x] 452F8B (DrawClippedPlayer)
  • [x] 453160 (DrawView)
  • [x] 453272 (DrawGame)
  • [x] 453477 (scrollrt_draw_lower)
  • [x] 4538E2 (scrollrt_draw_clipped_dungeon) #953
  • [x] 453ED9 (DrawClippedMonster)
  • [x] 453FCC (DrawClippedObject)
  • [x] 4540E5 (scrollrt_draw_clipped_e_flag)
  • [x] 454229 (scrollrt_draw_lower_2)
  • [x] 4545D2 (scrollrt_draw_clipped_dungeon_2)
  • [x] 454C09 (scrollrt_draw_clipped_e_flag_2)
  • [x] 454D9D (scrollrt_draw_upper)
  • [x] 455217 (scrollrt_draw_dungeon) #773
  • [x] 455844 (DrawMonster)
  • [x] 455937 (DrawObject)
  • [x] 455A7D (scrollrt_draw_e_flag)
  • [x] 455BD4 (DrawZoom)
  • [x] 455E32 (ClearScreenBuffer)
  • [x] 455E65 (scrollrt_draw_game_screen)
  • [x] 455EC7 (scrollrt_draw_cursor_back_buffer)
  • [x] 455F56 (scrollrt_draw_cursor_item)
  • [x] 456124 (DrawMain)
  • [x] 4563B3 (DoBlitScreen)
  • [x] 4564F9 (DrawAndBlit)
Binary exact

Most helpful comment

馃幍 1 functions left in the game 1 functions of code, 馃幍
馃幍 you pick one out and clean it right up, no functions left in the game 馃幍

Fixes https://github.com/diasurgical/devilution/milestone/3

All 8 comments

Maybe debug functions such like ScrollView() could be added into milestone-issues too?

@sskras debug functions are difficult to get bin exact since they are not in the 1.09 version and was compiled with a different compiler, so we would need a completely individual pipeline for making them bin exactly. So since they are mostly just icing on the cake I think we can leave them out of the effort to achieve bin exactness (they don't appear in the release builds of Devilution either).

since they are not in the 1.09 version and was compiled with a different compiler

Thanks, didn't know that.

S.

So here's compiler tricking workaround to make scrollrt_draw_dungeon into min diff:
Replacing

DrawDeadPlayer(sx, sy, dx, dy, 0, CelCap, 0);

with

if (light_table_index) /* any irrelevant to surrounding code global or local */
    DrawDeadPlayer(sx, sy, dx, dy, 0, CelCap, 0);
else
    DrawDeadPlayer(sx, sy, dx, dy, 0, CelCap, 0);

Turns diff into
image

Maybe it would give someone idea for proper fix. Similar trick I believe also works for DrawPlayer calls just results in much more changes around the call itself.

In general this workaround might be applied if there would be desperate need to make function of the same size as original and no better soultion is found.

Aha! It makes sense because in the demo the function actually does something just like that. I think you nailed it.

Edit: and as we know from AddCBolt, when a conditional results in the same function call it gets optimized away even in the beta.

Getting it to be the same size would be a win by it self.

Wow, last issue! @AJenbo, I miss you coding song. 馃幎 馃幎

馃幍 1 functions left in the game 1 functions of code, 馃幍
馃幍 you pick one out and clean it right up, no functions left in the game 馃幍

Fixes https://github.com/diasurgical/devilution/milestone/3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ogodei picture Ogodei  路  6Comments

ghost picture ghost  路  10Comments

ghost picture ghost  路  6Comments

sskras picture sskras  路  5Comments

ghost picture ghost  路  5Comments