Skip to content

Commit e24a08c

Browse files
committed
Add kPanXDefault and kPanYDefault
1 parent 1f0b1c8 commit e24a08c

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

Diff for: generator/csv/constants.csv

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#Structure,name,type,value
2+
State,kDeath,int,1
3+
SavePartyLocation,kPanXDefault,int,2304
4+
SavePartyLocation,kPanYDefault,int,1792

Diff for: generator/csv/fields.csv

+4-4
Original file line numberDiff line numberDiff line change
@@ -837,10 +837,10 @@ SavePartyLocation,unboarding,f,Boolean,0x68,False,0,0,
837837
SavePartyLocation,preboard_move_speed,f,Int32,0x69,4,0,0,Move speed before the party boarded the vehicle
838838
SavePartyLocation,menu_calling,f,Boolean,0x6C,False,0,0,Flag which briefly is true if the player presses ESC. At the right place in handling each frame's activities for the player; the code checks whether this flag is set and calls the menu; however there are several conditions which would cancel this flag and instead process another higher-priority action; such as when an encounter takes place during the same frame.
839839
SavePartyLocation,pan_state,f,Enum<SavePartyLoction_PanState>,0x6f,1,0,0,0: screen is fixed; 1: screen moves with player.
840-
SavePartyLocation,pan_current_x,f,Int32,0x70,2304,0,0,Number of 1/16 pixels to the left of player
841-
SavePartyLocation,pan_current_y,f,Int32,0x71,1792,0,0,Number of 1/16 pixels above the player
842-
SavePartyLocation,pan_finish_x,f,Int32,0x72,2304,0,0,Number of 1/16 pixels to the left of player when current scroll finishes
843-
SavePartyLocation,pan_finish_y,f,Int32,0x73,1792,0,0,Number of 1/16 pixels above the player when current scroll finishes.
840+
SavePartyLocation,pan_current_x,f,Int32,0x70,kPanXDefault,0,0,Number of 1/16 pixels to the left of player
841+
SavePartyLocation,pan_current_y,f,Int32,0x71,kPanYDefault,0,0,Number of 1/16 pixels above the player
842+
SavePartyLocation,pan_finish_x,f,Int32,0x72,kPanXDefault,0,0,Number of 1/16 pixels to the left of player when current scroll finishes
843+
SavePartyLocation,pan_finish_y,f,Int32,0x73,kPanYDefault,0,0,Number of 1/16 pixels above the player when current scroll finishes.
844844
SavePartyLocation,pan_speed,f,Int32,0x79,16,0,0,speed in the scrolls of the screen - shown in sixteenth pixels.
845845
SavePartyLocation,encounter_steps,f,Int32,0x7C,0,0,0,int: sum of terrain.encounter_rate for each step
846846
SavePartyLocation,encounter_calling,f,Boolean,0x7D,False,0,0,Similar to 0x6C - is used to signal a different piece of code that an encounter is to be triggered; which may be cancelled by other conditions such as the player starting to interact with an event during the same frame.

Diff for: src/generated/rpg_savepartylocation.h

+7-4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
namespace RPG {
2424
class SavePartyLocation : public SaveMapEventBase {
2525
public:
26+
static constexpr int kPanXDefault = 2304;
27+
static constexpr int kPanYDefault = 1792;
28+
2629
enum VehicleType {
2730
VehicleType_none = 0,
2831
VehicleType_skiff = 1,
@@ -51,10 +54,10 @@ namespace RPG {
5154
int32_t preboard_move_speed = 4;
5255
bool menu_calling = false;
5356
int32_t pan_state = 1;
54-
int32_t pan_current_x = 2304;
55-
int32_t pan_current_y = 1792;
56-
int32_t pan_finish_x = 2304;
57-
int32_t pan_finish_y = 1792;
57+
int32_t pan_current_x = kPanXDefault;
58+
int32_t pan_current_y = kPanYDefault;
59+
int32_t pan_finish_x = kPanXDefault;
60+
int32_t pan_finish_y = kPanYDefault;
5861
int32_t pan_speed = 16;
5962
int32_t encounter_steps = 0;
6063
bool encounter_calling = false;

Diff for: src/generated/rpg_state.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
namespace RPG {
2424
class State {
2525
public:
26-
constexpr int kDeath = 1;
26+
static constexpr int kDeath = 1;
2727

2828
enum Persistence {
2929
Persistence_ends = 0,

0 commit comments

Comments
 (0)