-
Notifications
You must be signed in to change notification settings - Fork 6
bana_advert
The Bana advertisement plays inside the attract_camera panel on the title screen. It cycles through a fixed sequence of states that advertise the Bana Passport payment/reward system.
An enum that tracks which slide is currently displayed.
| Value | Description |
|---|---|
BANA_OPTIONS |
Intro slide showing Bana Passport and mobile wallet options |
TAP_TO_READER |
Animation of a card/phone being tapped to the reader |
REWARDS |
Rotating rewards icons with a bouncing Don-chan |
CARD_OR_PHONE |
Card vs. phone comparison, alternating scale animation |
GET |
Closing "get" slide with bouncing characters before looping back |
All animations are pulled from the skin (second argument true to tex.get_animation), meaning their timing is defined in the skin script rather than in code.
BanaAdvertisement();Initialises all animations and sets the initial state to BANA_OPTIONS. Only fade_in is started immediately; all others are started by the sequencer in update.
void update(double current_ms);Advances every animation each frame, then drives a 16-step sequencer (steps_cursor) that transitions through the states in order:
-
Steps 0–4 (
BANA_OPTIONS): Wait forfade_into finish, then alternateresize_1andresize_2twice each (four scale pulses on the options icons). -
Step 5: Hold for 300 ms, then transition to
TAP_TO_READERand start the bana card rotate/move animations. - Steps 6–9: Wait for the rotate to finish, play the touch animations (fade, up/down move, resize), hold 300 ms, then fade out and reset the touch animations.
-
Steps 10–12: Repeat the tap sequence a second time, hold 600 ms, then transition to
REWARDSand start Don-chan bouncing. -
Step 13 (
REWARDS): Loop Don-chan's bounce animation 6 times. While inREWARDS,rewards_angleaccumulates at0.002radians per millisecond to drive the rotating reward icons. -
Step 14 (
CARD_OR_PHONE): Alternateresize_1andresize_26 times to pulse the card and phone icons, then transition toGET. -
Step 15 (
GET): Start the closing animations. The two characters bounce continuously (up then down, restarting on completion); character 1's bounce is delayed by 116 ms relative to character 0. Whenget_fade_outfinishes, the state resets toBANA_OPTIONSand the sequencer restarts from step 0.
void draw(float x, float y);Takes an (x, y) offset so the advertisement can be positioned within the camera panel. All sprites are offset by this value.
A scissor region is set to the bounds of CAMERA::BANA_ADVERT_OUTLINE (minus a 13-scaled-pixel bottom margin) so content never bleeds outside the panel.
Inside the scissor region, only the textures for the current state are drawn:
-
BANA_OPTIONS:BANAPASSPORT,OR,CHARA_0, andOSAIFUKEITAI, all faded in together and the passport/wallet icons scaled. -
TAP_TO_READER: The card reader background, the tap card (rotated and moved), and the touch prompt (moved vertically and resized). A gleam overlay is shown only whiletouch_fade > 0and then faded out withtouch_fade_out. -
REWARDS: Don-chan bouncing vertically, four reward icons arranged in a rotating carousel (each icon interpolates between four positional keyframes stored in the texture object'sx/yarrays, driven byrewards_angle), plus top and bottom text. -
CARD_OR_PHONE: Card and phone sprites scaled byresize_1andresize_2respectively, centered. -
GET: The "GET" text scaled through a three-phase sequence (scale down → scale up → scale down again), faded in and then faded out together. The two characters bounce independently at their current offsets and fade out withget_fade_out.
Outside the scissor region, the outline sprite is drawn twice — once normally and once mirrored horizontally — to frame the panel.
Building
libs
- animation
- audio
- config
- filesystem
- global_data
- input
- logging
- ray
- scores
- screen
- script
- song_parser
- text
- texture
- video
- webcam
libs/parsers
objects
objects/game
- player
- background
- gauge
- judgment
- combo
- branch_indicator
- ending_animations
- gogo_time
- fireworks
- song_info
- transition
- result_transition
- judge_counter
- score_counter
- score_counter_animation
- balloon_counter
- drumroll_counter
- kusudama_counter
- drum_hit_effect
- lane_hit_effect
- gauge_hit_effect
- combo_announce
- note_arc
objects/global
objects/title
objects/entry
objects/settings
objects/result
objects/song_select
- player
- navigator
- box_base
- box_song
- box_folder
- neiro
- modifier
- ura_switch
- diff_sort
- search_box
- dan_transition
- genre_bg
- score_history
- song_select_script
scenes