Document roulette.inc

This commit is contained in:
GriffinR 2019-10-07 02:00:16 -04:00
parent 81ee8f07ef
commit 0df304d629
13 changed files with 137 additions and 133 deletions

View File

@ -29,6 +29,7 @@
#include "constants/species.h"
#include "constants/trainer_hill.h"
#include "constants/trainers.h"
#include "constants/tv.h"
#include "constants/vars.h"
#include "constants/weather.h"
.include "asm/macros.inc"

View File

@ -9,7 +9,7 @@ LilycoveCity_ContestLobby_OnTransition: @ 821A21C
end
LilycoveCity_ContestLobby_EventScript_21A227:: @ 821A227
getpricereduction 4
getpricereduction POKENEWS_BLENDMASTER
compare VAR_RESULT, 1
goto_if_eq LilycoveCity_ContestLobby_EventScript_21A23C
clearflag FLAG_HIDE_LILYCOVE_CONTEST_HALL_POKEBLOCK_EXPERT

View File

@ -3,7 +3,7 @@ LilycoveCity_DepartmentStoreRooftop_MapScripts:: @ 8220207
.byte 0
LilycoveCity_DepartmentStoreRooftop_OnTransition: @ 822020D
getpricereduction 3
getpricereduction POKENEWS_LILYCOVE
compare VAR_RESULT, 1
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_220227
compare VAR_RESULT, 0
@ -51,7 +51,7 @@ LilycoveCity_DepartmentStoreRooftop_PokemartDecor_220248: @ 8220248
LilycoveCity_DepartmentStoreRooftop_EventScript_220268:: @ 8220268
lock
faceplayer
getpricereduction 3
getpricereduction POKENEWS_LILYCOVE
compare VAR_RESULT, 1
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_220282
msgbox LilycoveCity_DepartmentStoreRooftop_Text_220463, MSGBOX_DEFAULT

View File

@ -291,7 +291,7 @@
"y": 6,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "MauvilleCity_GameCorner_EventScript_2A5AB1"
"script": "Roulette_EventScript_Table1"
},
{
"type": "sign",
@ -299,7 +299,7 @@
"y": 6,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "MauvilleCity_GameCorner_EventScript_2A5AB1"
"script": "Roulette_EventScript_Table1"
},
{
"type": "sign",
@ -307,7 +307,7 @@
"y": 7,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "MauvilleCity_GameCorner_EventScript_2A5AB1"
"script": "Roulette_EventScript_Table1"
},
{
"type": "sign",
@ -315,7 +315,7 @@
"y": 7,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "MauvilleCity_GameCorner_EventScript_2A5AB1"
"script": "Roulette_EventScript_Table1"
},
{
"type": "sign",
@ -323,7 +323,7 @@
"y": 8,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "MauvilleCity_GameCorner_EventScript_2A5AB1"
"script": "Roulette_EventScript_Table1"
},
{
"type": "sign",
@ -331,7 +331,7 @@
"y": 8,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "MauvilleCity_GameCorner_EventScript_2A5AB1"
"script": "Roulette_EventScript_Table1"
},
{
"type": "sign",
@ -339,7 +339,7 @@
"y": 6,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "MauvilleCity_GameCorner_EventScript_2A5ADF"
"script": "Roulette_EventScript_Table2"
},
{
"type": "sign",
@ -347,7 +347,7 @@
"y": 6,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "MauvilleCity_GameCorner_EventScript_2A5ADF"
"script": "Roulette_EventScript_Table2"
},
{
"type": "sign",
@ -355,7 +355,7 @@
"y": 7,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "MauvilleCity_GameCorner_EventScript_2A5ADF"
"script": "Roulette_EventScript_Table2"
},
{
"type": "sign",
@ -363,7 +363,7 @@
"y": 7,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "MauvilleCity_GameCorner_EventScript_2A5ADF"
"script": "Roulette_EventScript_Table2"
},
{
"type": "sign",
@ -371,7 +371,7 @@
"y": 8,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "MauvilleCity_GameCorner_EventScript_2A5ADF"
"script": "Roulette_EventScript_Table2"
},
{
"type": "sign",
@ -379,7 +379,7 @@
"y": 8,
"elevation": 0,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "MauvilleCity_GameCorner_EventScript_2A5ADF"
"script": "Roulette_EventScript_Table2"
}
]
}

View File

@ -534,7 +534,7 @@ MauvilleCity_GameCorner_EventScript_2102D6:: @ 82102D6
lockall
checkitem ITEM_COIN_CASE, 1
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 0
specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
@ -545,7 +545,7 @@ MauvilleCity_GameCorner_EventScript_2102F6:: @ 82102F6
lockall
checkitem ITEM_COIN_CASE, 1
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 1
specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
@ -556,7 +556,7 @@ MauvilleCity_GameCorner_EventScript_210316:: @ 8210316
lockall
checkitem ITEM_COIN_CASE, 1
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 2
specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
@ -567,7 +567,7 @@ MauvilleCity_GameCorner_EventScript_210336:: @ 8210336
lockall
checkitem ITEM_COIN_CASE, 1
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 3
specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
@ -578,7 +578,7 @@ MauvilleCity_GameCorner_EventScript_210356:: @ 8210356
lockall
checkitem ITEM_COIN_CASE, 1
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 4
specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
@ -589,7 +589,7 @@ MauvilleCity_GameCorner_EventScript_210376:: @ 8210376
lockall
checkitem ITEM_COIN_CASE, 1
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 5
specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
@ -600,7 +600,7 @@ MauvilleCity_GameCorner_EventScript_210396:: @ 8210396
lockall
checkitem ITEM_COIN_CASE, 1
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 6
specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
@ -611,7 +611,7 @@ MauvilleCity_GameCorner_EventScript_2103B6:: @ 82103B6
lockall
checkitem ITEM_COIN_CASE, 1
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 7
specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
@ -622,7 +622,7 @@ MauvilleCity_GameCorner_EventScript_2103D6:: @ 82103D6
lockall
checkitem ITEM_COIN_CASE, 1
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 8
specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
@ -633,7 +633,7 @@ MauvilleCity_GameCorner_EventScript_2103F6:: @ 82103F6
lockall
checkitem ITEM_COIN_CASE, 1
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 9
specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
@ -644,7 +644,7 @@ MauvilleCity_GameCorner_EventScript_210416:: @ 8210416
lockall
checkitem ITEM_COIN_CASE, 1
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 10
specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
@ -655,15 +655,15 @@ MauvilleCity_GameCorner_EventScript_210436:: @ 8210436
lockall
checkitem ITEM_COIN_CASE, 1
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 11
specialvar VAR_RESULT, GetSlotMachineId
playslotmachine VAR_RESULT
releaseall
end
MauvilleCity_GameCorner_EventScript_210456:: @ 8210456
msgbox MauvilleCity_GameCorner_Text_210C2E, MSGBOX_DEFAULT
MauvilleCity_GameCorner_EventScript_NoCoinCase:: @ 8210456
msgbox MauvilleCity_GameCorner_Text_CantPlayWithNoCoinCase, MSGBOX_DEFAULT
releaseall
end
@ -811,7 +811,7 @@ MauvilleCity_GameCorner_Text_210B04: @ 8210B04
.string "That would total 660 COINS, but it's\n"
.string "very difficult to get.$"
MauvilleCity_GameCorner_Text_210C2E: @ 8210C2E
MauvilleCity_GameCorner_Text_CantPlayWithNoCoinCase: @ 8210C2E
.string "You can't play if you don't have\n"
.string "a COIN CASE.$"

View File

@ -1,70 +1,71 @@
MauvilleCity_GameCorner_EventScript_2A5AB1:: @ 82A5AB1
Roulette_EventScript_Table1:: @ 82A5AB1
checkitem ITEM_COIN_CASE, 1
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 0
getpricereduction 2
getpricereduction POKENEWS_GAME_CORNER
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_2A5B0D
goto_if_eq Roulette_EventScript_Play
addvar VAR_0x8004, 128
goto MauvilleCity_GameCorner_EventScript_2A5B0D
goto Roulette_EventScript_Play
end
MauvilleCity_GameCorner_EventScript_2A5ADF:: @ 82A5ADF
Roulette_EventScript_Table2:: @ 82A5ADF
checkitem ITEM_COIN_CASE, 1
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_210456
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 1
getpricereduction 2
getpricereduction POKENEWS_GAME_CORNER
compare VAR_RESULT, 0
goto_if_eq MauvilleCity_GameCorner_EventScript_2A5B0D
goto_if_eq Roulette_EventScript_Play
addvar VAR_0x8004, 128
goto MauvilleCity_GameCorner_EventScript_2A5B0D
goto Roulette_EventScript_Play
end
MauvilleCity_GameCorner_EventScript_2A5B0D:: @ 82A5B0D
Roulette_EventScript_Play:: @ 82A5B0D
special PlayRoulette
waitstate
end
gUnknown_082A5B12:: @ 82A5B12
Roulette_Text_PlayMinimumWagerIsX:: @ 82A5B12
.string "The minimum wager at this table\n"
.string "is {STR_VAR_1}. Do you want to play?$"
gUnknown_082A5B4E:: @ 82A5B4E
Roulette_Text_NotEnoughCoins:: @ 82A5B4E
.string "You don't have enough COINS.$"
gUnknown_082A5B6B:: @ 82A5B6B
Roulette_Text_SpecialRateTable:: @ 82A5B6B
.string "Special rate table right now!$"
gUnknown_082A5B89:: @ 82A5B89
Roulette_Text_ControlsInstruction:: @ 82A5B89
.string "Place your wager with the + Control\n"
.string "Pad, then press the A Button.$"
gUnknown_082A5BCB:: @ 82A5BCB
Roulette_Text_ItsAHit:: @ 82A5BCB
.string "It's a hit!$"
gUnknown_082A5BD7:: @ 82A5BD7
Roulette_Text_Jackpot:: @ 82A5BD7
.string "Jackpot!$"
gUnknown_082A5BE0:: @ 82A5BE0
Roulette_Text_NothingDoing:: @ 82A5BE0
.string "Nothing doing!$"
gUnknown_082A5BEF:: @ 82A5BEF
Roulette_Text_YouveWonXCoins:: @ 82A5BEF
.string "You've won {STR_VAR_1} COINS!$"
gUnknown_082A5C04:: @ 82A5C04
Roulette_Text_NoCoinsLeft:: @ 82A5C04
.string "No COINS left…$"
gUnknown_082A5C13:: @ 82A5C13
Roulette_Text_KeepPlaying:: @ 82A5C13
.string "Keep playing?$"
gUnknown_082A5C21:: @ 82A5C21
Roulette_Text_BoardWillBeCleared:: @ 82A5C21
.string "The ROULETTE board will be cleared.$"
gUnknown_082A5C45:: @ 82A5C45
@ Unused
Roulette_Text_YouDontHaveACoinCase:: @ 82A5C45
.string "You don't have a COIN CASE.$"
gUnknown_082A5C61:: @ 82A5C61
Roulette_Text_CoinCaseIsFull:: @ 82A5C61
.string "Your COIN CASE is full!\n"
.string "Coins can be exchanged for prizes.$"

46
include/constants/tv.h Normal file
View File

@ -0,0 +1,46 @@
#ifndef GUARD_CONSTANTS_TV_H
#define GUARD_CONSTANTS_TV_H
#define POKENEWS_NONE 0
#define POKENEWS_SLATEPORT 1
#define POKENEWS_GAME_CORNER 2
#define POKENEWS_LILYCOVE 3
#define POKENEWS_BLENDMASTER 4
#define TVSHOW_OFF_AIR 0
#define TVSHOW_FAN_CLUB_LETTER 1
#define TVSHOW_RECENT_HAPPENINGS 2
#define TVSHOW_PKMN_FAN_CLUB_OPINIONS 3
#define TVSHOW_UNKN_SHOWTYPE_04 4
#define TVSHOW_NAME_RATER_SHOW 5
#define TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE 6
#define TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE 7
#define TVSHOW_CONTEST_LIVE_UPDATES 8
#define TVSHOW_3_CHEERS_FOR_POKEBLOCKS 9
#define TVSHOW_BATTLE_UPDATE 10
#define TVSHOW_FAN_CLUB_SPECIAL 11
#define TVSHOW_CONTEST_LIVE_UPDATES_2 12
// //
#define TVSHOW_POKEMON_TODAY_CAUGHT 21
#define TVSHOW_SMART_SHOPPER 22
#define TVSHOW_POKEMON_TODAY_FAILED 23
#define TVSHOW_FISHING_ADVICE 24
#define TVSHOW_WORLD_OF_MASTERS 25
#define TVSHOW_TODAYS_RIVAL_TRAINER 26
#define TVSHOW_TREND_WATCHER 27
#define TVSHOW_TREASURE_INVESTIGATORS 28
#define TVSHOW_FIND_THAT_GAMER 29
#define TVSHOW_BREAKING_NEWS 30
#define TVSHOW_SECRET_BASE_VISIT 31
#define TVSHOW_LOTTO_WINNER 32
#define TVSHOW_BATTLE_SEMINAR 33
#define TVSHOW_TRAINER_FAN_CLUB 34
#define TVSHOW_CUTIES 35
#define TVSHOW_FRONTIER 36
#define TVSHOW_NUMBER_ONE 37
#define TVSHOW_SECRET_BASE_SECRETS 38
#define TVSHOW_SAFARI_FAN_CLUB 39
// //
#define TVSHOW_MASS_OUTBREAK 41
#endif //GUARD_CONSTANTS_TV_H

View File

@ -1,45 +1,6 @@
#ifndef GUARD_GLOBAL_TV_H
#define GUARD_GLOBAL_TV_H
enum
{
TVSHOW_OFF_AIR,
TVSHOW_FAN_CLUB_LETTER,
TVSHOW_RECENT_HAPPENINGS,
TVSHOW_PKMN_FAN_CLUB_OPINIONS,
TVSHOW_UNKN_SHOWTYPE_04,
TVSHOW_NAME_RATER_SHOW,
TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE,
TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE,
TVSHOW_CONTEST_LIVE_UPDATES,
TVSHOW_3_CHEERS_FOR_POKEBLOCKS,
TVSHOW_BATTLE_UPDATE,
TVSHOW_FAN_CLUB_SPECIAL,
TVSHOW_CONTEST_LIVE_UPDATES_2,
TVSHOW_POKEMON_TODAY_CAUGHT = 21,
TVSHOW_SMART_SHOPPER,
TVSHOW_POKEMON_TODAY_FAILED,
TVSHOW_FISHING_ADVICE,
TVSHOW_WORLD_OF_MASTERS,
TVSHOW_TODAYS_RIVAL_TRAINER,
TVSHOW_TREND_WATCHER,
TVSHOW_TREASURE_INVESTIGATORS,
TVSHOW_FIND_THAT_GAMER,
TVSHOW_BREAKING_NEWS,
TVSHOW_SECRET_BASE_VISIT,
TVSHOW_LOTTO_WINNER,
TVSHOW_BATTLE_SEMINAR,
TVSHOW_TRAINER_FAN_CLUB,
TVSHOW_CUTIES,
TVSHOW_FRONTIER,
TVSHOW_NUMBER_ONE,
TVSHOW_SECRET_BASE_SECRETS,
TVSHOW_SAFARI_FAN_CLUB,
TVSHOW_MASS_OUTBREAK = 41,
};
typedef union // size = 0x24
{
// Common
@ -495,14 +456,6 @@ typedef union // size = 0x24
} massOutbreak;
} TVShow;
enum {
POKENEWS_NONE,
POKENEWS_SLATEPORT,
POKENEWS_GAME_CORNER,
POKENEWS_LILYCOVE,
POKENEWS_BLENDMASTER
};
typedef struct // 2b50
{
u8 kind;

View File

@ -55,6 +55,7 @@
#include "constants/heal_locations.h"
#include "constants/map_types.h"
#include "constants/maps.h"
#include "constants/tv.h"
#include "constants/script_menu.h"
#include "constants/songs.h"
#include "constants/species.h"

View File

@ -188,18 +188,18 @@ static void sub_8144A24(struct Sprite *);
static void sub_8144E60(struct Sprite *);
static void sub_8145294(struct Sprite *);
extern const u8 gUnknown_082A5B89[];
extern const u8 gUnknown_082A5C13[];
extern const u8 gUnknown_082A5BD7[];
extern const u8 gUnknown_082A5BCB[];
extern const u8 gUnknown_082A5BE0[];
extern const u8 gUnknown_082A5BEF[];
extern const u8 gUnknown_082A5C21[];
extern const u8 gUnknown_082A5C61[];
extern const u8 gUnknown_082A5C04[];
extern const u8 gUnknown_082A5B12[];
extern const u8 gUnknown_082A5B6B[];
extern const u8 gUnknown_082A5B4E[];
extern const u8 Roulette_Text_ControlsInstruction[];
extern const u8 Roulette_Text_KeepPlaying[];
extern const u8 Roulette_Text_Jackpot[];
extern const u8 Roulette_Text_ItsAHit[];
extern const u8 Roulette_Text_NothingDoing[];
extern const u8 Roulette_Text_YouveWonXCoins[];
extern const u8 Roulette_Text_BoardWillBeCleared[];
extern const u8 Roulette_Text_CoinCaseIsFull[];
extern const u8 Roulette_Text_NoCoinsLeft[];
extern const u8 Roulette_Text_PlayMinimumWagerIsX[];
extern const u8 Roulette_Text_SpecialRateTable[];
extern const u8 Roulette_Text_NotEnoughCoins[];
static const u16 gUnknown_085B5BFC[] = INCBIN_U16("graphics/roulette/85B5BFC.gbapal");
static const u32 gUnknown_085B5DFC[] = INCBIN_U32("graphics/roulette/85B5DFC.bin.lz");
@ -974,7 +974,7 @@ static void sub_81405CC(void)
sub_81436D0(0);
sub_81424FC(0);
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5B89, 0, 1, TEXT_SPEED_FF, NULL);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, Roulette_Text_ControlsInstruction, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
gSpriteCoordOffsetX = -60;
gSpriteCoordOffsetY = 0;
@ -1045,7 +1045,7 @@ static void sub_8140914(u8 taskId)
{
DisplayYesNoMenuDefaultYes();
DrawStdWindowFrame(gUnknown_0203AB8C, 0);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5C13, 0, 1, TEXT_SPEED_FF, 0);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, Roulette_Text_KeepPlaying, 0, 1, TEXT_SPEED_FF, 0);
CopyWindowToVram(gUnknown_0203AB8C, 3);
DoYesNoFuncWithChoice(taskId, &gUnknown_085B6410);
}
@ -1552,14 +1552,14 @@ static void sub_814189C(u8 taskId)
{
PlayFanfare(MUS_ME_B_BIG);
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5BD7, 0, 1, TEXT_SPEED_FF, NULL);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, Roulette_Text_Jackpot, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
}
else
{
PlayFanfare(MUS_ME_B_SMALL);
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5BCB, 0, 1, TEXT_SPEED_FF, NULL);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, Roulette_Text_ItsAHit, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
}
break;
@ -1567,7 +1567,7 @@ static void sub_814189C(u8 taskId)
default:
m4aSongNumStart(SE_HAZURE);
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5BE0, 0, 1, TEXT_SPEED_FF, NULL);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, Roulette_Text_NothingDoing, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
break;
}
@ -1609,7 +1609,7 @@ static void sub_8141984(u8 taskId)
static void sub_8141A18(u8 taskId)
{
ConvertIntToDecimalStringN(gStringVar1, (gUnknown_0203AB88->var19 * gTasks[taskId].data[2]), STR_CONV_MODE_LEFT_ALIGN, 2);
StringExpandPlaceholders(gStringVar4, gUnknown_082A5BEF);
StringExpandPlaceholders(gStringVar4, Roulette_Text_YouveWonXCoins);
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
@ -1644,14 +1644,14 @@ static void sub_8141B58(u8 taskId)
if (gTasks[taskId].data[6] == 6)
{
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5C21, 0, 1, TEXT_SPEED_FF, NULL);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, Roulette_Text_BoardWillBeCleared, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
sub_8141F7C(taskId, dp01t_12_3_battle_menu, 0xFFFF, 3);
}
else if (gTasks[taskId].data[13] == 9999)
{
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5C61, 0, 1, TEXT_SPEED_FF, NULL);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
sub_8141F7C(taskId, sub_8140914, 0xFFFF, 0x3);
}
@ -1663,7 +1663,7 @@ static void sub_8141B58(u8 taskId)
else
{
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5C04, 0, 1, TEXT_SPEED_FF, NULL);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, Roulette_Text_NoCoinsLeft, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
sub_8141F7C(taskId, sub_8140994, 0x3C, 0x3);
}
@ -1688,7 +1688,7 @@ static void dp01t_12_3_battle_menu(u8 taskId)
if (gTasks[taskId].data[13] == 9999)
{
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5C61, 0, 1, TEXT_SPEED_FF, NULL);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, Roulette_Text_CoinCaseIsFull, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
sub_8141F7C(taskId, sub_8140914, 0xFFFF, 3);
}
@ -3121,7 +3121,7 @@ static void sub_81429F0(u8 taskId)
{
u32 temp = gUnknown_085B6344[(gSpecialVar_0x8004 & 1) + (gSpecialVar_0x8004 >> 7 << 1)];
ConvertIntToDecimalStringN(gStringVar1, temp, STR_CONV_MODE_LEADING_ZEROS, 1);
StringExpandPlaceholders(gStringVar4, gUnknown_082A5B12);
StringExpandPlaceholders(gStringVar4, Roulette_Text_PlayMinimumWagerIsX);
DrawStdWindowFrame(0, FALSE);
AddTextPrinterParameterized(0, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(0, 3);
@ -3140,13 +3140,13 @@ static void Task_Roulette_0(u8 taskId)
if ((gSpecialVar_0x8004 & 0x80) && (gSpecialVar_0x8004 & 1))
{
DrawStdWindowFrame(0, FALSE);
AddTextPrinterParameterized(0, 1, gUnknown_082A5B6B, 0, 1, TEXT_SPEED_FF, NULL);
AddTextPrinterParameterized(0, 1, Roulette_Text_SpecialRateTable, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(0, 3);
gTasks[taskId].func = sub_81429F0;
}
else
{
StringExpandPlaceholders(gStringVar4, gUnknown_082A5B12);
StringExpandPlaceholders(gStringVar4, Roulette_Text_PlayMinimumWagerIsX);
DrawStdWindowFrame(0, FALSE);
AddTextPrinterParameterized(0, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(0, 3);
@ -3155,7 +3155,7 @@ static void Task_Roulette_0(u8 taskId)
}
else
{
StringExpandPlaceholders(gStringVar4, gUnknown_082A5B4E);
StringExpandPlaceholders(gStringVar4, Roulette_Text_NotEnoughCoins);
DrawStdWindowFrame(0, FALSE);
AddTextPrinterParameterized(0, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(0, 3);

View File

@ -1930,9 +1930,9 @@ bool8 ScrCmd_setberrytree(struct ScriptContext *ctx)
bool8 ScrCmd_getpricereduction(struct ScriptContext *ctx)
{
u16 value = VarGet(ScriptReadHalfword(ctx));
u16 newsKind = VarGet(ScriptReadHalfword(ctx));
gSpecialVar_Result = GetPriceReduction(value);
gSpecialVar_Result = GetPriceReduction(newsKind);
return FALSE;
}

View File

@ -38,6 +38,7 @@
#include "constants/metatile_behaviors.h"
#include "constants/rgb.h"
#include "constants/songs.h"
#include "constants/tv.h"
EWRAM_DATA struct MartInfo gMartInfo = {0};
EWRAM_DATA struct ShopData *gShopDataPtr = NULL;
@ -560,7 +561,7 @@ static void BuyMenuPrintPriceInList(u8 windowId, s32 item, u8 y)
{
ConvertIntToDecimalStringN(
gStringVar1,
ItemId_GetPrice(item) >> GetPriceReduction(1),
ItemId_GetPrice(item) >> GetPriceReduction(POKENEWS_SLATEPORT),
STR_CONV_MODE_LEFT_ALIGN,
5);
}
@ -932,7 +933,7 @@ static void Task_BuyMenu(u8 taskId)
if (gMartInfo.martType == MART_TYPE_NORMAL)
{
gShopDataPtr->totalCost = (ItemId_GetPrice(itemId) >> GetPriceReduction(1));
gShopDataPtr->totalCost = (ItemId_GetPrice(itemId) >> GetPriceReduction(POKENEWS_SLATEPORT));
}
else
{
@ -1011,7 +1012,7 @@ static void Task_BuyHowManyDialogueHandleInput(u8 taskId)
if (AdjustQuantityAccordingToDPadInput(&tItemCount, gShopDataPtr->maxQuantity) == TRUE)
{
gShopDataPtr->totalCost = (ItemId_GetPrice(tItemId) >> GetPriceReduction(1)) * tItemCount;
gShopDataPtr->totalCost = (ItemId_GetPrice(tItemId) >> GetPriceReduction(POKENEWS_SLATEPORT)) * tItemCount;
BuyMenuPrintItemQuantityAndPrice(taskId);
}
else

View File

@ -42,6 +42,7 @@
#include "constants/layouts.h"
#include "constants/metatile_behaviors.h"
#include "constants/script_menu.h"
#include "constants/tv.h"
// Static type declarations
@ -1595,7 +1596,7 @@ void SaveRecordedItemPurchasesForTVShow(void)
show->smartshopperShow.itemIds[i] = gMartPurchaseHistory[i].itemId;
show->smartshopperShow.itemAmounts[i] = gMartPurchaseHistory[i].quantity;
}
show->smartshopperShow.priceReduced = GetPriceReduction(1);
show->smartshopperShow.priceReduced = GetPriceReduction(POKENEWS_SLATEPORT);
StringCopy(show->smartshopperShow.playerName, gSaveBlock2Ptr->playerName);
tv_store_id_3x(show);
show->smartshopperShow.language = gGameLanguage;