1#pragma helper_mask_gpr 0x30
2#pragma helper_mask_fpr 0x1000
3#pragma name_counter 361
14#include "mainselect.hpp"
20extern "C" int SkipSpace__FR9input_str__3(
input_str &input) {
27 while (position < input.
size) {
28 if (CheckChar__Fc__3(text[position])) {
37 if (position >= input.
size) {
44extern "C" int CheckChar__Fc__3(
char value) {
66extern "C" void PreProcess__FR9input_str__2(
input_str &input) {
67 u8 *text = (u8 *) input.
data;
70 while (position < input.
size) {
71 if (text[position] ==
'/' && text[position + 1] ==
'/') {
72 while (position < input.
size) {
73 if (text[position] ==
'\n' || text[position] ==
'\r') {
82 if (text[position] ==
'/' && text[position + 1] ==
'*') {
83 while (position < input.
size) {
84 if (text[position] ==
'*' && text[position + 1] ==
'/') {
86 text[position + 1] =
' ';
110short mes_data[24000] __attribute__((aligned(64)));
116int SystemMesPosition = MES_POS_BOTTOM;
122int SystemMesInputKey;
126void InitSystemMes() {
127 short *data = mes_data;
130 char name[64] =
"meswin/system_a";
132 if (LanguageCode > LANG_JAPANESE) {
133 sprintf(name,
"meswin/system_a_%d", LanguageCode);
136 strcat(name,
".mes");
138 if (!LoadFile2(name, data, &size, 0)) {
139 LoadFile(
"meswin/system_ae.bin", data, &size);
142 SystemMessage.
Preset(MES_PRESET_SYSTEM);
147 SystemMessage.
style = MES_EDGE_NONE;
151 SystemMessage.
rows = 1;
153 SystemMessage.
style = MES_EDGE_BLACK;
160void ClearSystemMes() {
164 SystemMesInputKey = 0;
168int SystemMesCheck() {
169 return SystemMesCount > 0;
175void SystemMesStep() {
176 if (SystemMesWait > 0) {
181 if (SystemMesCount == 1) {
185 if (SystemMesNo > 0) {
186 SystemMessage.
Step();
189 if (SystemMesInputKey == 0 || SystemMesCount != 2 || GamePad.
Down(PAD_CROSS)) {
190 if (SystemMesCount > 0) {
199void SystemMesDraw() {
203 if (SystemMesWait > 0) {
207 if (SystemMesNo <= 0) {
211 TexManager.ReloadTexture(Vif1Packet, SystemMessage.
tex_block);
214 x -= columns * 14 / 2;
217 SystemMessage.
text_y = 345;
218 SystemMessage.
auto_pos = SystemMesPosition;
224void ItemGetMes(
int item_no,
int value,
int frames,
int input_key) {
229 int mes_args[4] = {-1, -1, -1, -1};
230 int numbers[4] = {0, 0, 0, 0};
232 number_ptr = numbers;
242 mes_args[0] = item_no + 100;
245 if (item_no >= ITEM_ATTACH_START) {
249 if (item_no >= ITEM_REGULAR_WATER) {
253 if (item_no >= ITEM_WEAPON_START) {
255 info = GetCommonItemInfo(item_no);
258 printf(
"item_no: %d is NULL\n", item_no);
260 mes_args[0] = info->
msg + 100;
264 SetSystemMes(message_no, frames, MES_POS_BOTTOM, input_key, mes_args, number_ptr);
267void AtraGetMes(
int map_no,
int element,
int frames) {
268 int mes_args[4] = {-1, -1, -1, -1};
270 mes_args[0] = GetAtraMsgNo(map_no, element);
271 SetSystemMes(40, frames, MES_POS_BOTTOM, 1, mes_args, 0);
274void TecGetMes(
int technique,
int frames) {
275 int mes_args[4] = {-1, -1, -1, -1};
277 mes_args[0] = technique + 500;
278 SetSystemMes(50, frames, MES_POS_BOTTOM, 1, mes_args, 0);
281void MaxUpMes(
int value,
int frames) {
282 int numbers[4] = {0, -1, -1, -1};
285 SetSystemMes(51, frames, MES_POS_BOTTOM, 1, 0, numbers);
290void DeadMes(
int member,
int frames) {
291 if (member < 0 || member > 5) {
295 int mes_args[4] = {0, -1, -1, -1};
297 mes_args[0] = member + 50;
298 SetSystemMes(60, frames, MES_POS_BOTTOM, 1, mes_args, 0);
301void AllDeadMes(
int frames) {
302 SetSystemMes(61, frames, MES_POS_BOTTOM, 1, 0, 0);
305void NotGetAtraMes(
int member,
int frames) {
306 if (member < 0 || member > 5) {
310 int mes_args[4] = {0, -1, -1, -1};
312 mes_args[0] = member + 50;
313 SetSystemMes(70, frames, MES_POS_BOTTOM, 0, mes_args, 0);
316void DontGetItemMes(
int kind) {
325 SetSystemMes(message_no, 40, MES_POS_BOTTOM, 1, 0, 0);
330void SetSystemMes(
int message_no,
int frames,
int position,
int input_key,
int *args,
int *numbers) {
333 SystemMesInputKey = input_key;
336 for (i = 0; i < 4; i++) {
337 SystemMessage.
mes_no[i] = -1;
340 SystemMessage.
mes_no[i] = *args;
348 for (i = 0; i < 4; i++) {
349 SystemMessage.
values[i] = -1;
352 SystemMessage.
values[i] = *numbers;
360 SystemMesNo = message_no;
361 SystemMesCount = frames;
362 SystemMesPosition = position;
void SetBuff(short *buff)
int MakeMesWin(int mes_no)
void SetBuff_system(short *buff)