Pokemon Center | 口袋中心 以口袋妖怪为主题并带有其他动漫游戏的讨论

 找回密码
 加入口袋中心
搜索
查看: 4825|回复: 5

80x80大头像

[复制链接]

3369

回帖

535

现金

485

勋章券

超级版主

Rank: 26Rank: 26Rank: 26Rank: 26Rank: 26Rank: 26

积分
22138
QQ

时光印记Lv.3挥金如土勋章水中王者勋章Lv3Omega红宝石发售确认纪念章Alpha蓝宝石发售确认纪念章金银好CP-Ho-oh/LUGIA【里】金银好CP-Ho-oh/LUGIA【真·正常向】异化型LUGIA【M超梦版】

发表于 2016-4-18 13:31:06 | 显示全部楼层 |阅读模式
鉴于我是条懒虫,这次也懒得翻译了。。直接拿发在老外那里的东西好了。需要注意的是图片和色板都请用unlz压缩。仅限火红
Intro:
In Ruby, many hackers uses the BG0 to make mugshots. However, the same way that simply writing tileset, tilemap and palette to the RAM won't work for FR & EM as it will be cleared by the MSGBOX.

However, there's still a way to do it, which requires the knowledge of "rboxes". I've figured out some simple usage of the related functions, so I will show you my work:


The most xxxxing thing should be that only 1 BG palette for FR can be used, which is the palette for the money box (the box with thinner border). Therefore, it will only be able to launch 1 mugshot at a time and you can't use it with the money box!

How to use:
The routines are provided at the bottom.
1. Change 0x8900000 in mugshot_make.asm to free space, which is ended in 0,4,8,c. It will be the location of our custom table.
2. Compile the 2 routines and insert them to some free space (Not the table location in step 1)
3. Get/draw some 80x80 mugshots, here's 2 examples:

They should be indexed to 16 colors.
4. Open your UNLZ-GBA and insert your images and palettes.
Note: the image and the palette should all be LZ77 compressed, which means that you should insert them by using "export image" and "export palette" in UNLZ-GBA. Aparrently they should all be inserted at some free space.
5. Build the table at the offset in step 1, whose format should be [image0 pointer][image0 pal pointer][image1 pointer][image1 pal pointer][image2 pointer][image2 pal pointer]...................
It can load up to 65536 images in algorithm, which means that it's enough.
6. Test time! use
setvar 0x8004 [image index in the table]
setvar 0x8005 [0 or 1] // 0 = left, 1 = right
callasm 0x8[mugshot_make.asm+1]
to launch the mugshot and
callasm 0x8[mugshot_del.asm+1] to delete it.

An example:
I insert the 2 images at 0xFA0000, 0xFA09CC and the 2 palettes at 0xFA09A4, 0xFA1484. Then the table should be:
  1. 00 00 FA 08 A4 09 FA 08 CC 09 FA 08 84 14 FA 08
复制代码
The script:
  1. //---------------
  2. #org 0xF00000
  3. lock
  4. setvar 0x8004 0x0 //image0
  5. setvar 0x8005 0x1 //right side
  6. callasm 0x8800001 //mugshot_make.asm+1
  7. msgbox 0x8F00030 0x6
  8. callasm 0x8800089 //mugshot_del.asm+1
  9. release
  10. end

  11. #org 0xF00030
  12. = ABCD.
复制代码
The routines:
mugshot_make.asm
  1. /*
  2. Note: both image and palette should be LZ77 compressed!
  3. Table format: [image pointer][pal pointer]..........
  4. */
  5. .equiv table_location, 0x8900000
  6. .thumb
  7. push {r4-r5, lr}
  8. sub sp, sp, #0x18
  9. ldr r0, =0x20370C0
  10. ldrh r0, [r0, #2]
  11. mov r1, #0
  12. mov r2, #0x14
  13. mul r2, r0
  14. mov r3, #4
  15. mov r0, #10
  16. str r0, [sp]
  17. str r0, [sp, #4]
  18. mov r0, #0xD
  19. str r0, [sp, #8]
  20. mov r0, #0x40
  21. str r0, [sp, #0xC]
  22. add r0, sp, #0x10
  23. ldr r4, =0x810FE51
  24. bl bx_r4
  25. add r0, sp, #0x10
  26. ldr r4, =0x8003CE5
  27. bl bx_r4
  28. ldr r4, =0x2039990
  29. strb r0, [r4]
  30. ldr r4, =0x8003FA1
  31. bl bx_r4
  32. ldr r0, =0x20370C0
  33. ldrh r0, [r0]
  34. ldr r1, =table_location
  35. lsl r0, r0, #3
  36. add r0, r0, r1
  37. ldr r5, [r0, #4]
  38. ldr r0, [r0]
  39. ldr r1, =0x6008800
  40. swi 0x12
  41. mov r0, r5
  42. mov r1, #0xd0
  43. mov r2, #0x20
  44. ldr r4, =0x80703A9
  45. bl bx_r4
  46. mov r0, #0
  47. ldr r4, =0x80020BD
  48. bl bx_r4
  49. add sp, sp, #0x18
  50. pop {r4-r5, pc}

  51. bx_r4: bx r4
复制代码
mugshot_del.asm
  1. .thumb
  2. push {r4, lr}
  3. ldr r4, =0x2039990
  4. ldrb r4, [r4]
  5. mov r1, #0
  6. mov r0, r4
  7. ldr r3, =0x810F4D9
  8. bl bx_r3
  9. mov r0, r4
  10. mov r1, #2
  11. ldr r3, =0x8003F21
  12. bl bx_r3
  13. mov r0, r4
  14. ldr r3, =0x8003E3D
  15. bl bx_r3
  16. pop {r4, pc}

  17. bx_r3: bx r3
复制代码
回复

使用道具 举报

2万

回帖

13万

现金

351

勋章券

管理员

起源の钻角犀兽

Rank: 27Rank: 27Rank: 27

积分
51876

Missingno论坛十周年纪念物挥金如土勋章Lv3水中王者勋章Lv3时光印记Lv.3Omega红宝石发售确认纪念章Alpha蓝宝石发售确认纪念章

发表于 2016-4-18 17:57:01 | 显示全部楼层
80×80果然看起来够大…2333
啊咧咧,又挖坑不填哎╮(╯▽╰)╭

告别真新镇后不知经过多久,擦伤,砍伤,朋友的数目,让我有点自豪,那时候因为流行而跑去买的,这双轻便的运动鞋,现在成了,找遍全世界也找不到的,最棒的破鞋子……
口袋中心·绿宝石·改(更新1.6.4版)
【口袋中心出品】魂银·壹式改点壹(全493)    【科普向】魂银中少有人注意到的洛奇亚传说故事
宝可梦卡牌 / 限定精灵图示    好吧,这是官方微博-_-    好吧,这是我的微博-_-
我的B站号    美术作品之我的宝可梦人设画    个人制作的FC魂斗罗2代hack版
回复 支持 反对

使用道具 举报

3369

回帖

535

现金

485

勋章券

超级版主

Rank: 26Rank: 26Rank: 26Rank: 26Rank: 26Rank: 26

积分
22138
QQ

时光印记Lv.3挥金如土勋章水中王者勋章Lv3Omega红宝石发售确认纪念章Alpha蓝宝石发售确认纪念章金银好CP-Ho-oh/LUGIA【里】金银好CP-Ho-oh/LUGIA【真·正常向】异化型LUGIA【M超梦版】

 楼主| 发表于 2016-4-18 18:15:42 | 显示全部楼层
海のLUGIA 发表于 2016-4-18 17:57
80×80果然看起来够大…2333

其实这也就是个例子233
我纠结了好久这个应该弄成什么尺寸的,或许扁平的或是竖直条状的会更好
回复 支持 反对

使用道具 举报

48

回帖

234

现金

0

勋章券

离开家乡的彷徨

Rank: 4Rank: 4

积分
132
发表于 2016-4-20 17:31:12 | 显示全部楼层
很高端的样子 表示完全看不懂
回复 支持 反对

使用道具 举报

35

回帖

107

现金

0

勋章券

新伙伴的欢笑

Rank: 3

积分
76

论坛十周年纪念物时光印记Lv.1

发表于 2016-5-2 17:55:50 | 显示全部楼层
好大的说,个人觉得64*64够了的说,不过能做成扁平的话也许能表现更多动作?
回复 支持 反对

使用道具 举报

27

回帖

213

现金

0

勋章券

新伙伴的欢笑

Rank: 3

积分
89
发表于 2017-5-8 20:04:40 | 显示全部楼层
能不能弄成更大的
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 加入口袋中心

本版积分规则

手机版|Archiver|Pokemon Center

GMT+8, 2024-11-23 17:55 , Processed in 0.125059 second(s), 60 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表