From bff534c9d7fdb9abe8f9bc198ea96ceaaa467ac4 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Fri, 9 Dec 2016 08:55:56 -0600 Subject: [PATCH] zcroll16 merged with scroll16 and rf_use.txt for reference on adaptive tile refresh stuff --- WHAT_WAS_CHANGED | 15 +++++++-------- rf_use.txt | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 8 deletions(-) create mode 100755 rf_use.txt diff --git a/WHAT_WAS_CHANGED b/WHAT_WAS_CHANGED index adbc95f7..2036327b 100755 --- a/WHAT_WAS_CHANGED +++ b/WHAT_WAS_CHANGED @@ -1,18 +1,17 @@ Please, refer for the actual diff for the commit the file was introoduced. Basically, I was aiming to: -1. Rewrite scroll16 to use only one player, instead of 1 of 4 possible. -2. Group panning and movement functions togeather, instead of using different functions for each move. -3. Make map struct store the initial map, and the current map to be stored in map_view struct. That is calculated based on several layers of original map and NPC movement. Current map is (potentially) of 1 layer only, and directly represents what is to be drawn (applied z-ordering! Yay!). -4. Also, I have tried to clean zcroll.c a bit. -5. Also also, tried to separate movement functions from player and to generalize it to a movable npc/entity. -6. Instead of drawing map as a rectangle of tiles and a few strips to fill the black area of partially visible tiles, draw just a slightly bigger rectangle, with it's edges a bit out of the screen. That shouldn't be too resourse-consuming, I believe, but requires less explicit calls and reads. Probably. -7. As stuff did not quite initialize properly, I have disabled keyboard interrupt vector override to be able to shut down program prematurely in case something goes wrong. So, in case you just want to replace these new files with the older and working ones, please remember to re-enable that, or you won't be able to controll the game without it. +broke much code w 1. Rewrite scroll16 to use only one player, instead of 1 of 4 possible. // do not do this wwww --sparky4 +2. Group panning and movement functions togeather, instead of using different functions for each move. // sounds good --sparky4 +3. Make map struct store the initial map, and the current map to be stored in map_view struct. That is calculated based on several layers of original map and NPC movement. Current map is (potentially) of 1 layer only, and directly represents what is to be drawn (applied z-ordering! Yay!). // exlain more? w --sparky4 +4. Also, I have tried to clean zcroll.c a bit. // ok --sparky4 +5. Also also, tried to separate movement functions from player and to generalize it to a movable npc/entity. //i know i know i want to work on this but i am more focoused on getting gfx part working --sparky4 +6. Instead of drawing map as a rectangle of tiles and a few strips to fill the black area of partially visible tiles, draw just a slightly bigger rectangle, with it's edges a bit out of the screen. That shouldn't be too resourse-consuming, I believe, but requires less explicit calls and reads. Probably. // as long as it is faster do it! also make a graphical representation of it w --sparky4 +broke way too much code with this wwww7. As stuff did not quite initialize properly, I have disabled keyboard interrupt vector override to be able to shut down program prematurely in case something goes wrong. So, in case you just want to replace these new files with the older and working ones, please remember to re-enable that, or you won't be able to controll the game without it. // YOU BROKE 16_IN WITH ONE PLAYER INSTEAD OF USING AN ARRAY OF 1 WWWWWWW --sparky4 ==== changed or planned ones by sparky4 ==== planned ones: - zcroll16 and scroll16 merge with different functions 16_map and mapread too I think there may be more diff --git a/rf_use.txt b/rf_use.txt new file mode 100755 index 00000000..a103cbae --- /dev/null +++ b/rf_use.txt @@ -0,0 +1,33 @@ +kd_act1.c:#define PLACESPRITE RF_PlaceSprite (&ob->sprite,ob->x,ob->y,ob->shapenum, \ +kd_act1.c: RF_PlaceSprite (&ob->sprite,ob->x,ob->y,ob->shapenum,spritedraw,1); +kd_act1.c: RF_PlaceSprite (&ob->sprite,ob->x,ob->y,ob->shapenum,spritedraw,2); +kd_act1.c: RF_PlaceSprite (&ob->sprite,ob->x,ob->y,ob->shapenum,spritedraw,3); +kd_act2.c:#define PLACESPRITE RF_PlaceSprite (&ob->sprite,ob->x,ob->y,ob->shapenum, \ +kd_act2.c: RF_RemoveSprite (&ob->sprite); +kd_demo.c: RF_Scroll(move,0); +kd_demo.c: RF_Refresh(); +kd_demo.c: RF_Scroll(offset - originxglobal,0); +kd_demo.c: RF_Refresh(); +kd_demo.c: RF_Refresh(); +kd_keen.c:#define PLACESPRITE RF_PlaceSprite (&ob->sprite,ob->x,ob->y,ob->shapenum, \ +kd_keen.c: RF_PlaceSprite (&ob->sprite +kd_keen.c: RF_PlaceSprite (&ob->sprite +kd_keen.c: RF_ForceRefresh (); +kd_main.c: RF_Shutdown (); +kd_main.c: RF_Startup (); +kd_play.c: RF_ForceRefresh(); +kd_play.c: RF_ForceRefresh (); +kd_play.c: RF_ForceRefresh(); // don't refresh if loading a new game +kd_play.c: RF_ForceRefresh(); +kd_play.c: RF_RemoveSprite (&gone->sprite); +kd_play.c: RF_ForceRefresh(); +kd_play.c: RF_SetRefreshHook (NULL); +kd_play.c: RF_NewMap (); +kd_play.c: RF_MarkTileGraphics (); +kd_play.c: RF_SetRefreshHook (&FadeAndUnhook); +kd_play.c: RF_NewPosition (orgx,orgy); +kd_play.c: RF_Scroll (xscroll,yscroll); +kd_play.c: RF_RemoveSprite (&obj->sprite); +kd_play.c: RF_Refresh(); +kd_play.c: RF_SetRefreshHook (&FadeAndUnhook); +kd_play.c: RF_NewPosition (orgx,orgy); -- 2.39.2