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

标题: 当setflag 0x200时,对战不消耗PP值(绿宝石) [打印本页]

作者: 744865306    时间: 2021-9-20 15:24
标题: 当setflag 0x200时,对战不消耗PP值(绿宝石)
本帖最后由 744865306 于 2021-9-25 15:26 编辑
  1. .gba
  2. .thumb
  3. .create "new.gba",0x8000000
  4. .close
  5. .open "绿宝石.gba","new.gba",0x8000000

  6. .org 0x08F80000
  7. .func newflag_200
  8.         lsl r0,r0,#4
  9.         and r4,r0
  10.         cmp r4,#0
  11.         bne NoPPReduce
  12.         mov r0,#128
  13.         lsl r0,r0,#2
  14.         ldr r3,=(0x0809D790|1)
  15.         bl call_bx
  16.         cmp r0,#1
  17.         beq NoPPReduce
  18.         ldr r3,=(0x08046B04|1)
  19.         bx r3
  20. NoPPReduce:
  21.         ldr r3,=(0x08046BDC|1)
  22.         bx r3
  23. .endfunc
  24. .pool

  25. .func call_bx
  26.         bx r3
  27. .endfunc
  28. .pool

  29. .org 0x08046AFC
  30.         ldr r3, =(newflag_200|1)
  31.         bx r3
  32. .pool

  33. .close
复制代码

作者: jiangzhengwenjz    时间: 2021-9-22 22:46
仔细测试过吗?测试过的话我会索引
作者: 744865306    时间: 2021-9-25 15:25
jiangzhengwenjz 发表于 2021-9-22 22:46
仔细测试过吗?测试过的话我会索引

(这几天都没看pmcenter)是的,不过我刚刚看了下,我发源码的时候忘记写.org 0x08F80000了,现在把帖子编辑一下
作者: 744865306    时间: 2021-9-25 15:27
jiangzhengwenjz 发表于 2021-9-22 22:46
仔细测试过吗?测试过的话我会索引

编辑好了,现在可以加了




欢迎光临 Pokemon Center | 口袋中心 以口袋妖怪为主题并带有其他动漫游戏的讨论 (http://162.218.49.243/) Powered by Discuz! X3