Skip to content

Commit a9af4c6

Browse files
authored
Document Poketch Kitchen Timer (Overlay 46) (#810)
1 parent af5bbb5 commit a9af4c6

File tree

12 files changed

+1254
-1214
lines changed

12 files changed

+1254
-1214
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#ifndef POKEPLATINUM_POKETCH_KITCHEN_TIMER_GRAPHICS_H
2+
#define POKEPLATINUM_POKETCH_KITCHEN_TIMER_GRAPHICS_H
3+
4+
#include "applications/poketch/poketch_animation.h"
5+
#include "applications/poketch/poketch_task.h"
6+
7+
#include "bg_window.h"
8+
9+
#define KITCHEN_TIMER_TASK_SLOTS 8
10+
11+
#define NUM_STATE_BUTTONS 3
12+
13+
#define NUM_SPRITES 17
14+
#define SPRITE_HAND_LEFT 0
15+
#define SPRITE_HAND_RIGHT 1
16+
#define SPRITE_START_BUTTON 2
17+
#define SPRITE_STOP_BUTTON 3
18+
#define SPRITE_RESET_BUTTON 4
19+
#define SPRITE_MINUTES_TENS_UP 5
20+
#define SPRITE_MINUTES_ONES_UP 6
21+
#define SPRITE_SECONDS_TENS_UP 7
22+
#define SPRITE_SECONDS_ONES_UP 8
23+
#define SPRITE_MINUTES_TENS_DOWN 9
24+
#define SPRITE_MINUTES_ONES_DOWN 10
25+
#define SPRITE_SECONDS_TENS_DOWN 11
26+
#define SPRITE_SECONDS_ONES_DOWN 12
27+
#define SPRITE_MINUTES_TENS_DIGIT 13
28+
#define SPRITE_MINUTES_ONES_DIGIT 14
29+
#define SPRITE_SECONDS_TENS_DIGIT 15
30+
#define SPRITE_SECONDS_ONES_DIGIT 16
31+
32+
typedef struct KitchenTimerDisplay {
33+
s8 minutesTensDigit;
34+
s8 minutesOnesDigit;
35+
s8 secondsTensDigit;
36+
s8 secondsOnesDigit;
37+
u8 buttonPressed[NUM_STATE_BUTTONS];
38+
BOOL editingActive;
39+
u32 handPositions;
40+
u32 beatingHandPosition;
41+
} KitchenTimerDisplay;
42+
43+
typedef struct KitchenTimerGraphics {
44+
const KitchenTimerDisplay *timerData;
45+
BgConfig *bgConfig;
46+
u32 activeTasks[POKETCH_TASK_SLOT_BASE + KITCHEN_TIMER_TASK_SLOTS];
47+
PoketchAnimation_AnimationManager *animMan;
48+
PoketchAnimation_AnimatedSpriteData *sprites[NUM_SPRITES];
49+
PoketchAnimation_SpriteData timerSpritesData;
50+
PoketchAnimation_SpriteData digitSpritesData;
51+
BOOL stopBeatingHands;
52+
u32 beatingHandTimer;
53+
u32 beatingHandPositions;
54+
} KitchenTimerGraphics;
55+
56+
enum KitchenTimerGraphicsTask {
57+
KITCHEN_TIMER_GRAPHICS_INIT = 0,
58+
KITCHEN_TIMER_GRAPHICS_FREE,
59+
KITCHEN_TIMER_GRAPHICS_RESET_TIMER,
60+
KITCHEN_TIMER_GRAPHICS_START_TIMER,
61+
KITCHEN_TIMER_GRAPHICS_UPDATE_BUTTONS,
62+
KITCHEN_TIMER_GRAPHICS_UPDATE_DIGITS,
63+
KITCHEN_TIMER_GRAPHICS_BEAT_HANDS,
64+
KITCHEN_TIMER_GRAPHICS_STOP_HANDS,
65+
};
66+
67+
BOOL PoketchKitchenTimerGraphics_New(KitchenTimerGraphics **dest, const KitchenTimerDisplay *timerData, BgConfig *bgConfig);
68+
void PoketchKitchenTimerGraphics_Free(KitchenTimerGraphics *graphics);
69+
void PoketchKitchenTimerGraphics_StartTask(KitchenTimerGraphics *graphics, enum KitchenTimerGraphicsTask taskID);
70+
BOOL PoketchKitchenTimerGraphics_TaskIsNotActive(KitchenTimerGraphics *graphics, enum KitchenTimerGraphicsTask taskID);
71+
BOOL PoketchKitchenTimerGraphics_NoActiveTasks(KitchenTimerGraphics *graphics);
72+
u32 PoketchKitchenTimerGraphics_GetBeatingHandsPosition(KitchenTimerGraphics *graphics);
73+
74+
#endif // POKEPLATINUM_POKETCH_KITCHEN_TIMER_GRAPHICS_H

include/overlay046/ov46_02256BCC.h

Lines changed: 0 additions & 16 deletions
This file was deleted.

include/overlay046/struct_ov46_02256BCC_1.h

Lines changed: 0 additions & 15 deletions
This file was deleted.

include/overlay046/struct_ov46_02256BCC_decl.h

Lines changed: 0 additions & 6 deletions
This file was deleted.

platinum.us/main.lsf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,11 +1019,11 @@ Overlay poketch_alarm_clock
10191019
Object main.nef.p/src_applications_poketch_alarm_clock_graphics.c.o
10201020
}
10211021

1022-
Overlay overlay46
1022+
Overlay poketch_kitchen_timer
10231023
{
10241024
After overlay25
1025-
Object main.nef.p/src_overlay046_ov46_022561C0.c.o
1026-
Object main.nef.p/src_overlay046_ov46_02256BCC.c.o
1025+
Object main.nef.p/src_applications_poketch_kitchen_timer_main.c.o
1026+
Object main.nef.p/src_applications_poketch_kitchen_timer_graphics.c.o
10271027
}
10281028

10291029
Overlay poketch_marking_map

platinum.us/sbins_shared.sha1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ ba5baba0ff38e940d333dbea89e4c510b6998922 *poketch_coin_toss.sbin
4545
261b64d5fd09a304a5d7e78a18b44a6ecfe7ec93 *poketch_move_tester.sbin
4646
5dd962600f238f162c0999dcb8a134c9df134293 *poketch_matchup_checker.sbin
4747
e722ce81a98e1d78011e179f008a4cac37e20610 *poketch_alarm_clock.sbin
48-
87cd3ac2574737177d399a8cf8a8374c9599e38b *overlay46.sbin
48+
87cd3ac2574737177d399a8cf8a8374c9599e38b *poketch_kitchen_timer.sbin
4949
b38da9fe733a6a1213ff217f4e2788e3ae2011a4 *poketch_marking_map.sbin
5050
70266035d948ee5a826b06a3a1b908a50af050c9 *overlay48.sbin
5151
489ae29169ae71eb72909fdebdd0aa8bf8ca63f4 *poketch_color_changer.sbin

0 commit comments

Comments
 (0)