Skip to content

Commit

Permalink
refactor: Rewrite the entire engine subscreen backend (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyV99 committed Aug 20, 2023
1 parent 833660a commit 8729251
Show file tree
Hide file tree
Showing 41 changed files with 7,177 additions and 7,630 deletions.
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
4a60fd30f78754db103f40d07983e64715b28258
9492513da453edf2ad2fb2ff4ea18d6128a248ab
4efd9e4c0200db4f253fe800ca6c86f0859f6084
6e9c3767ed30e84cc13df2674fd8a141d761b084

# Mass comment update
f3ae9af4b92021cbfcf14ced7714968532b96b78
Expand Down
1 change: 1 addition & 0 deletions modules/zelda/ZeldaSubscreen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set(ZELDA_SUBSCREEN_SOURCES
# Add or remove files here
################################
src/subscr.cpp
src/new_subscr.cpp
src/zc/zc_subscr.cpp
src/md5.cpp
src/midi.cpp
Expand Down
1 change: 1 addition & 0 deletions modules/zquest/ZQuestCore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ src/qst.cpp
src/sprite.cpp
src/solidobject.cpp
src/subscr.cpp
src/new_subscr.cpp
src/zc/zc_custom.cpp
src/init.cpp
src/zinfo.cpp
Expand Down
4 changes: 4 additions & 0 deletions src/base/mapscr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
#include "base/zsys.h"
#include "base/qrs.h"

std::vector<mapscr> TheMaps;
std::vector<word> map_autolayers;
word map_count = 0;

byte mapscr::ffEffectWidth(size_t ind) const
{
return (byte)ffcs[ind].hit_width;
Expand Down
5 changes: 5 additions & 0 deletions src/base/mapscr.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "base/zdefs.h"
#include "ffc.h"
#include <vector>

struct mapscr
{
Expand Down Expand Up @@ -294,5 +295,9 @@ enum
rMAX
};

extern std::vector<mapscr> TheMaps;
extern std::vector<word> map_autolayers;
extern word map_count;

#endif

2 changes: 1 addition & 1 deletion src/base/qrs.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ enum
qr_SCROLLWARP_NO_RESET_FRAME, qr_BROKEN_RAFT_SCROLL, qr_BROKEN_INPUT_DOWN_STATE, qr_OLD_GUY_HANDLING,
//52
qr_FREEFORM_SUBSCREEN_CURSOR, qr_SUBSCR_PRESS_TO_EQUIP, qr_FAIRY_FLAG_COMPAT, qr_MIRROR_PRISM_LAYERS,
qr_OLD_LENS_LAYEREFFECT, qr_PUSHBLOCK_SPRITE_LAYER,
qr_OLD_LENS_LAYEREFFECT, qr_PUSHBLOCK_SPRITE_LAYER, qr_OLD_SUBSCR,
//EMILY SPOT
//60
//CONNOR SPOT qr_ = 60*8,
Expand Down
8 changes: 5 additions & 3 deletions src/base/zdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,16 +243,16 @@ enum {ENC_METHOD_192B104=0, ENC_METHOD_192B105, ENC_METHOD_192B185, ENC_METHOD_2
#define V_GUYS 47
#define V_MIDIS 4
#define V_CHEATS 1
#define V_SAVEGAME 33
#define V_SAVEGAME 34
#define V_COMBOALIASES 4
#define V_HEROSPRITES 16
#define V_SUBSCREEN 7
#define V_SUBSCREEN 8
#define V_ITEMDROPSETS 2
#define V_FFSCRIPT 21
#define V_SFX 8
#define V_FAVORITES 3

#define V_COMPATRULE 52
#define V_COMPATRULE 53
#define V_ZINFO 3

//= V_SHOPS is under V_MISC
Expand Down Expand Up @@ -2625,6 +2625,8 @@ struct gamedata
std::vector< ZCArray <int32_t> > globalRAM;

byte awpn, bwpn, xwpn, ywpn; // Currently selected weapon slots
byte awpnpg, bwpnpg, xwpnpg, ywpnpg;
int16_t abtn_itm = -1, bbtn_itm = -1, xbtn_itm = -1, ybtn_itm = -1;
int16_t forced_awpn = -1, forced_bwpn = -1, forced_xwpn = -1, forced_ywpn = -1;
bool isclearing; // The gamedata is being cleared
//115456 (260)
Expand Down
3 changes: 3 additions & 0 deletions src/dialog/quest_rules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "gui/use_size.h"
#include "zq/zq_files.h"
#include "base/qrs.h"
#include "base/mapscr.h"

bool mapcount_will_affect_layers(word newmapcount);
void update_map_count(word newmapcount);
Expand Down Expand Up @@ -925,6 +926,8 @@ static GUI::ListData compatRulesList
{ "Old (Buggy) ZScript Volume Access", qr_OLD_SCRIPT_VOLUME,
"If enabled, Audio->AdjustMusicVolume() and Audio->AdjustSFXVolume() will use their old behavior,"
" which was bugged and wrote directly to the volume sliders." },
{ "Old Engine Subscreen Quirks", qr_OLD_SUBSCR,
"If enabled, the subscreen behaves in a way needed for compat."},
};

static GUI::ListData enemiesRulesList
Expand Down
Loading

0 comments on commit 8729251

Please sign in to comment.