(empty log message)
@@ -11,7 +11,8 @@ | ||
11 | 11 | |
12 | 12 | static u32 nextx; |
13 | 13 | static u32 nexty; |
14 | -static int max_length; | |
14 | +static int max_x_length; | |
15 | +static int max_y_length; | |
15 | 16 | |
16 | 17 | static void *fnt_malloc(u32 size); |
17 | 18 | static s32 fnt_mfree(void *ptr); |
@@ -321,8 +322,8 @@ | ||
321 | 322 | u32 width; \ |
322 | 323 | \ |
323 | 324 | width = fnt_get_width_ucs2(font, ucs2, 1); \ |
324 | - if(nextx + width * mx > max_length) \ | |
325 | - return -1; \ | |
325 | + if(nextx + width * mx > max_x_length) \ | |
326 | + return -1; \ | |
326 | 327 | \ |
327 | 328 | index = fnt_get_bits(font, ucs2); \ |
328 | 329 | vptr_tmp = (depth *)vram + nextx + nexty * bufferwidth; \ |
@@ -509,7 +510,7 @@ | ||
509 | 510 | mx: 横方向倍率 |
510 | 511 | my: 縦方向倍率 |
511 | 512 | ---------------------------------------------------------------------------*/ |
512 | -u32 fnt_print_xy(const fnt_t* font, u16 x, u16 y, void *str, u32 color, u32 back, u8 fill, s16 rate, u16 mx, u16 my, int length) | |
513 | +u32 fnt_print_xy(const fnt_t* font, u16 x, u16 y, void *str, u32 color, u32 back, u8 fill, s16 rate, u16 mx, u16 my, int x_length, int y_length) | |
513 | 514 | { |
514 | 515 | void *vram; |
515 | 516 | int bufferwidth; |
@@ -524,7 +525,7 @@ | ||
524 | 525 | if(vram == NULL) |
525 | 526 | vram = (void*) (0x40000000 | (u32) sceGeEdramGetAddr()); |
526 | 527 | |
527 | - return fnt_print_vram(font, vram, bufferwidth, pixelformat, x, y, str, color, back, fill, rate, mx, my, length); | |
528 | + return fnt_print_vram(font, vram, bufferwidth, pixelformat, x, y, str, color, back, fill, rate, mx, my, x_length, y_length); | |
528 | 529 | } |
529 | 530 | |
530 | 531 | /*--------------------------------------------------------------------------- |
@@ -544,7 +545,7 @@ | ||
544 | 545 | my: 縦方向倍率 |
545 | 546 | return: エラー時は-1 |
546 | 547 | ---------------------------------------------------------------------------*/ |
547 | -u32 fnt_print_vram(const fnt_t* font, void *vram, u16 bufferwidth, u16 pixelformat, u16 x, u16 y, const void *str, u32 color, u32 back, u8 fill, s16 rate, u16 mx, u16 my, int length) | |
548 | +u32 fnt_print_vram(const fnt_t* font, void *vram, u16 bufferwidth, u16 pixelformat, u16 x, u16 y, const void *str, u32 color, u32 back, u8 fill, s16 rate, u16 mx, u16 my, int x_length, int y_length) | |
548 | 549 | { |
549 | 550 | u16 i; |
550 | 551 | u16 len; |
@@ -553,11 +554,16 @@ | ||
553 | 554 | |
554 | 555 | if (bufferwidth == 0) return -1; |
555 | 556 | |
556 | - if(length == 0) | |
557 | - max_length = 480; | |
557 | + if(x_length == 0) | |
558 | + max_x_length = 480; | |
558 | 559 | else |
559 | - max_length = x + length; | |
560 | + max_x_length = x + x_length; | |
560 | 561 | |
562 | + if(y_length == 0) | |
563 | + max_y_length = 272; | |
564 | + else | |
565 | + max_y_length = y + y_length; | |
566 | + | |
561 | 567 | nextx = x; |
562 | 568 | nexty = y; |
563 | 569 |
@@ -600,6 +606,8 @@ | ||
600 | 606 | { |
601 | 607 | nextx = x; |
602 | 608 | nexty += font->height; |
609 | + if(nexty > max_y_length) | |
610 | + return 0; | |
603 | 611 | ret = 0; |
604 | 612 | } |
605 | 613 | else |
@@ -124,7 +124,7 @@ | ||
124 | 124 | my: 縦方向倍率 |
125 | 125 | ---------------------------------------------------------------------------*/ |
126 | 126 | u32 fnt_print_xy(const fnt_t* font, u16 x, u16 y, void *str, u32 color, |
127 | - u32 back, u8 fill, s16 rate, u16 mx, u16 my, int length); | |
127 | + u32 back, u8 fill, s16 rate, u16 mx, u16 my, int x_length, int y_length); | |
128 | 128 | |
129 | 129 | /*--------------------------------------------------------------------------- |
130 | 130 | 文字列表示(表示VRAMへの描画) |
@@ -140,7 +140,7 @@ | ||
140 | 140 | my: 縦方向倍率 |
141 | 141 | ---------------------------------------------------------------------------*/ |
142 | 142 | u32 fnt_print_vram(const fnt_t* font, void *vram, u16 bufferwidth, u16 pixelformat, |
143 | - u16 x, u16 y, const void *str, u32 color, u32 back, u8 fill, s16 rate, u16 mx, u16 my, int length); | |
143 | + u16 x, u16 y, const void *str, u32 color, u32 back, u8 fill, s16 rate, u16 mx, u16 my, int x_length, int y_length); | |
144 | 144 | |
145 | 145 | /*--------------------------------------------------------------------------- |
146 | 146 | UFT-8Nの一文字をUTF-16に変換する |
@@ -74,8 +74,9 @@ | ||
74 | 74 | #define REPEAT_SPEED (20) |
75 | 75 | |
76 | 76 | #define MID_STR(x, str, num) ((x) - (fnt_get_width(&font, str, num) / 2)) |
77 | -#define print_xy(x, y, str, mx, my, length) fnt_print_xy(&font, ((x) * 16), ((y) * 16), (str), TEXT, BG, MODE, RATE, (mx), (my), (length) * 16) | |
78 | -#define print_xy_mid(x, y, str, mx, my, length) fnt_print_xy(&font, MID_STR(((x) * 16), (str), (mx)), ((y) * 16), (str), TEXT, BG, MODE, RATE, (mx), (my), (length) * 16) | |
77 | +#define print_xy(x, y, str, mx, my, x_len) fnt_print_xy(&font, ((x) * 16), ((y) * 16), (str), TEXT, BG, MODE, RATE, (mx), (my), (x_len) * 16, 0) | |
78 | +#define print_xy_mid(x, y, str, mx, my, length) fnt_print_xy(&font, MID_STR(((x) * 16), (str), (mx)), ((y) * 16), (str), TEXT, BG, MODE, RATE, (mx), (my), (length) * 16, 0) | |
79 | +#define print_xy_text(x, y, str, mx, my, x_len, y_len) fnt_print_xy(&font, ((x) * 16), ((y) * 16), (str), TEXT, BG, MODE, RATE, (mx), (my), (x_len) * 16, (y_len) * 16) | |
79 | 80 | |
80 | 81 | typedef enum { |
81 | 82 | MENU_RET_START, |
@@ -233,7 +233,7 @@ | ||
233 | 233 | { |
234 | 234 | // 複合化 |
235 | 235 | msg_win("EBOOT.BINを復号しています", 1, MSG_WAIT, 1); |
236 | - o_size = pspDecryptPRX((u8 *)&read_ptr, (u8 *)write_ptr, i_size); | |
236 | + o_size = pspDecryptPRX((u8 *)read_ptr, (u8 *)write_ptr, i_size); | |
237 | 237 | ERR_RET(o_size, DONE); |
238 | 238 | |
239 | 239 | if(strncmp(&write_ptr[1], "ELF", 3) != 0) |
@@ -1285,9 +1285,14 @@ | ||
1285 | 1285 | sctrlSEMountUmdFromFile(path, 1, 1); |
1286 | 1286 | break; |
1287 | 1287 | } |
1288 | + | |
1289 | + sctrlSESetUmdFile(path); | |
1290 | + | |
1291 | + sceKernelDelayThread(5000000); | |
1288 | 1292 | sceUmdActivate(1, "disc0:"); |
1289 | -// sceUmdWaitDriveStat(UMD_WAITFORINIT); | |
1290 | - | |
1293 | + sceKernelDelayThread(5000000); | |
1294 | + sceUmdWaitDriveStat(PSP_UMD_READY); | |
1295 | +// ModuleMgrForKernel_1B91F6EC("disc0:/PSP_GAME/SYSDIR/EBOOT.BIN", 0, &option); | |
1291 | 1296 | sctrlKernelLoadExecVSHDisc("disc0:/PSP_GAME/SYSDIR/EBOOT.BIN", NULL); |
1292 | 1297 | return DONE; |
1293 | 1298 | } |