Studio builds the calendar from day controls and groups. The original constructor creates two banks of day groups, with 31 day nodes and input roots for each. When the calendar opens, its mode determines whether it uses the current date or a saved date. It then positions the tiles, labels and hitboxes for that month. [1]
Month update
Population clears old tile locations, writes day numbers, moves unused hitboxes offscreen, updates year and month text, and marks today's date when appropriate. The algorithm includes Gregorian leap-year century handling. As a result, changing the displayed month is more than replacing text: input geometry and note indicators must change too. [1]
Regional placement
The studied Japanese and American builds put Sunday in the first column. European V2 puts it last and adjusts the starting row. The builds also differ in month text formatting and some object offsets. A UI recreation should model weekday order as a regional choice, not infer it from a translated heading. [1][2]
What remains to be checked
The original function bodies establish construction and cell updates, but not every storage lookup or pixel in the finished screen. A screenshot can verify arrangement, while a date-selection trace is needed to confirm hitboxes and mode restoration. [1]
Original constructor and object layout
The Calendar constructors are JP V1 0202D814, JP V2 02036EE8, US V2 020376F4 and EU V2 02037338. Each makes two 196-byte group records, and each group requests an input root with room for 31 day pointers. JP V1 day objects request 44 bytes with geometry at +28, day number at +36 and flag at +40. V2 objects request 48 bytes and shift those fields to +32/+40/+44. If allocating a day object fails, the original group can still count a null entry. The documented behaviour includes that failure case. [3]
Population sets the real positions
Construction's packed rectangles are defaults. The month-update routine later writes tile locations, day text and hitboxes, then moves unused day controls outside the visible area. Its loaded entries are JP V1 0202D290, JP V2 02036948, US V2 0203716C and EU V2 02036D90. JP V1 formats month numbers with %d, JP V2 with %0d, and US/EU with %02d. Original coordinate writes preserve tag bits in packed halfwords. The renderer and input geometry therefore share a date model but have separate writes. [3]
In JP V1 a copied MemoList group shares child pointers with its source. Disabling copied children affects the shared objects; the left and right arrow children are then enabled by name. A visual reconstruction of the Calendar cannot show that the original groups share these pointers. [3]
