Merge branch 'master' into doc-introcred
@ -1,10 +1,5 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
# Only run this script if it's the master branch build.
|
||||
if [[ "$TRAVIS_BRANCH" != "master" || "$TRAVIS_PULL_REQUEST" != "false" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
build_name=$1
|
||||
map_file=$build_name.map
|
||||
if [ ! -f $map_file ]; then
|
||||
@ -13,4 +8,4 @@ if [ ! -f $map_file ]; then
|
||||
fi
|
||||
|
||||
output=$(perl $(dirname "$0")/calcrom.pl $build_name.map | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')
|
||||
curl -d "{\"username\": \"$CALCROM_DISCORD_WEBHOOK_USERNAME\", \"avatar_url\": \"$CALCROM_DISCORD_WEBHOOK_AVATAR_URL\", \"content\":\"\`\`\`$build_name progress:\\n$output\`\`\`\"}" -H "Content-Type: application/json" -X POST $CALCROM_DISCORD_WEBHOOK_URL
|
||||
curl -d "{\"username\": \"$CALCROM_DISCORD_WEBHOOK_USERNAME\", \"avatar_url\": \"$CALCROM_DISCORD_WEBHOOK_AVATAR_URL\", \"content\":\"\`\`\`$build_name progress:\\n$output\`\`\`\"}" -H "Content-Type: application/json" -X POST "$CALCROM_DISCORD_WEBHOOK_URL"
|
40
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Install binutils
|
||||
run: sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi
|
||||
# build-essential, git, and libpng-dev are already installed
|
||||
# gcc-arm-none-eabi is only needed for the modern build
|
||||
# as an alternative to dkP
|
||||
|
||||
- name: Install agbcc
|
||||
run: |
|
||||
git clone https://github.com/pret/agbcc.git
|
||||
cd agbcc
|
||||
./build.sh
|
||||
./install.sh ../
|
||||
|
||||
- name: Compare
|
||||
run: make -j${nproc} compare
|
||||
|
||||
- name: Modern
|
||||
run: make -j${nproc} modern
|
||||
|
||||
- name: Webhook
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
env:
|
||||
CALCROM_DISCORD_WEBHOOK_USERNAME: OK
|
||||
CALCROM_DISCORD_WEBHOOK_AVATAR_URL: https://i.imgur.com/38BQHdd.png
|
||||
CALCROM_DISCORD_WEBHOOK_URL: ${{ secrets.CALCROM_DISCORD_WEBHOOK_URL }}
|
||||
run: sh .github/calcrom/webhook.sh pokeemerald
|
39
.travis.yml
@ -1,39 +0,0 @@
|
||||
language: generic
|
||||
dist: bionic
|
||||
sudo: false
|
||||
env:
|
||||
global:
|
||||
- DEVKITPRO=$HOME
|
||||
- DEVKITARM=$DEVKITPRO/devkitARM
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-multilib
|
||||
- linux-libc-dev
|
||||
cache:
|
||||
apt: true
|
||||
install:
|
||||
- pushd $HOME
|
||||
- travis_retry wget https://github.com/devkitPro/buildscripts/releases/download/devkitARM_r52/devkitARM_r52-linux.tar.xz
|
||||
- tar xJf devkitARM*.tar.xz
|
||||
- travis_retry wget https://github.com/devkitPro/devkitarm-rules/releases/download/v1.0.0/devkitarm-rules-1.0.0.tar.xz
|
||||
- tar xJf devkitarm-rules-*.tar.xz -C $DEVKITARM
|
||||
- travis_retry git clone https://github.com/pret/agbcc.git
|
||||
- cd agbcc && ./build.sh && ./install.sh $TRAVIS_BUILD_DIR
|
||||
- popd
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-7
|
||||
env: _="Build"
|
||||
script:
|
||||
- make -j2 tools CXX=g++-7
|
||||
- make -j2 compare
|
||||
- make -j2 modern
|
||||
after_success:
|
||||
- .travis/calcrom/webhook.sh pokeemerald
|
@ -941,7 +941,7 @@
|
||||
.byte 0xb5
|
||||
.endm
|
||||
|
||||
.macro happinesstodamagecalculation
|
||||
.macro friendshiptodamagecalculation
|
||||
.byte 0xb6
|
||||
.endm
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
gFonts
|
||||
gUnknown_03002F84
|
||||
gUnknown_03002F90
|
||||
gDisableTextPrinters
|
||||
gCurGlyph
|
||||
gTextFlags
|
||||
|
@ -1678,7 +1678,7 @@ BattleScript_EffectReturn::
|
||||
BattleScript_EffectFrustration::
|
||||
attackcanceler
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
happinesstodamagecalculation
|
||||
friendshiptodamagecalculation
|
||||
goto BattleScript_HitFromAtkString
|
||||
|
||||
BattleScript_EffectPresent::
|
||||
|
@ -1,308 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2, 0
|
||||
|
||||
gPointillismPoints:: @ 85A1F94
|
||||
.byte 0x00, 0x1d, 0x1c, 0x0e, 0x1e, 0x1b, 0x00, 0x01, 0x32, 0x2e, 0x1e, 0x37, 0x0a, 0x22, 0x1f, 0x05, 0x26, 0x2e, 0x12, 0x17, 0x1e, 0x1a, 0x03, 0x11, 0x05, 0x11, 0x18, 0x05, 0x27, 0x2f, 0x1a, 0x3f
|
||||
.byte 0x12, 0x22, 0x3f, 0x16, 0x2b, 0x2f, 0x2e, 0x11, 0x02, 0x2d, 0x23, 0x0d, 0x28, 0x17, 0x0c, 0x19, 0x2f, 0x0e, 0x13, 0x30, 0x18, 0x20, 0x2d, 0x28, 0x22, 0x01, 0x03, 0x19, 0x0e, 0x2a, 0x2b, 0x22
|
||||
.byte 0x15, 0x25, 0x22, 0x0a, 0x26, 0x39, 0x06, 0x23, 0x16, 0x07, 0x2f, 0x22, 0x3a, 0x1b, 0x3b, 0x36, 0x35, 0x0a, 0x2b, 0x24, 0x36, 0x09, 0x12, 0x1c, 0x2f, 0x23, 0x2e, 0x38, 0x2c, 0x05, 0x2a, 0x20
|
||||
.byte 0x07, 0x14, 0x32, 0x31, 0x08, 0x17, 0x1a, 0x24, 0x2d, 0x22, 0x0a, 0x16, 0x1b, 0x26, 0x2b, 0x29, 0x16, 0x11, 0x35, 0x08, 0x14, 0x1e, 0x08, 0x14, 0x05, 0x31, 0x14, 0x38, 0x31, 0x17, 0x34, 0x33
|
||||
.byte 0x12, 0x11, 0x09, 0x1f, 0x28, 0x3d, 0x32, 0x35, 0x03, 0x1e, 0x3c, 0x2b, 0x2e, 0x10, 0x01, 0x17, 0x03, 0x3e, 0x22, 0x17, 0x18, 0x34, 0x08, 0x29, 0x19, 0x03, 0x24, 0x28, 0x3d, 0x33, 0x2f, 0x31
|
||||
.byte 0x24, 0x19, 0x1b, 0x18, 0x26, 0x07, 0x0d, 0x25, 0x2d, 0x3f, 0x12, 0x2f, 0x15, 0x25, 0x29, 0x0f, 0x12, 0x07, 0x2c, 0x12, 0x2c, 0x0b, 0x26, 0x12, 0x1a, 0x16, 0x00, 0x0b, 0x2f, 0x16, 0x35, 0x24
|
||||
.byte 0x1f, 0x1c, 0x22, 0x29, 0x33, 0x27, 0x3b, 0x30, 0x17, 0x11, 0x06, 0x35, 0x3e, 0x31, 0x2f, 0x11, 0x3a, 0x25, 0x2a, 0x02, 0x19, 0x33, 0x18, 0x35, 0x2a, 0x20, 0x21, 0x2e, 0x32, 0x1b, 0x3b, 0x1f
|
||||
.byte 0x23, 0x39, 0x29, 0x2a, 0x2e, 0x31, 0x29, 0x2a, 0x0e, 0x2d, 0x2d, 0x00, 0x1f, 0x38, 0x28, 0x1b, 0x14, 0x3b, 0x2b, 0x2e, 0x04, 0x26, 0x36, 0x30, 0x11, 0x3b, 0x21, 0x2d, 0x2b, 0x3f, 0x1b, 0x20
|
||||
.byte 0x13, 0x31, 0x33, 0x0c, 0x30, 0x22, 0x2b, 0x2b, 0x16, 0x02, 0x1e, 0x1c, 0x12, 0x1c, 0x0f, 0x3c, 0x36, 0x38, 0x10, 0x2d, 0x18, 0x2f, 0x2d, 0x35, 0x3b, 0x11, 0x37, 0x31, 0x13, 0x13, 0x3d, 0x2f
|
||||
.byte 0x1e, 0x2c, 0x33, 0x2e, 0x37, 0x12, 0x3c, 0x1f, 0x33, 0x32, 0x2a, 0x27, 0x0d, 0x3b, 0x1c, 0x35, 0x2a, 0x27, 0x09, 0x3d, 0x27, 0x12, 0x0b, 0x18, 0x0c, 0x15, 0x1d, 0x20, 0x01, 0x1c, 0x08, 0x3b
|
||||
.byte 0x1c, 0x12, 0x37, 0x33, 0x15, 0x03, 0x2c, 0x2a, 0x3b, 0x31, 0x0f, 0x04, 0x35, 0x08, 0x17, 0x33, 0x38, 0x3d, 0x2a, 0x2f, 0x35, 0x16, 0x10, 0x35, 0x16, 0x23, 0x13, 0x2c, 0x2f, 0x06, 0x20, 0x27
|
||||
.byte 0x3a, 0x24, 0x00, 0x1c, 0x2a, 0x03, 0x39, 0x1d, 0x28, 0x07, 0x1a, 0x20, 0x0a, 0x37, 0x07, 0x35, 0x2d, 0x15, 0x2f, 0x2c, 0x10, 0x2c, 0x23, 0x3f, 0x29, 0x14, 0x2a, 0x21, 0x36, 0x34, 0x1a, 0x2c
|
||||
.byte 0x1c, 0x3d, 0x33, 0x38, 0x2b, 0x22, 0x35, 0x28, 0x1f, 0x3d, 0x0f, 0x1c, 0x1e, 0x3e, 0x1b, 0x0c, 0x3e, 0x1f, 0x2b, 0x31, 0x2c, 0x32, 0x39, 0x11, 0x05, 0x09, 0x11, 0x04, 0x38, 0x2a, 0x32, 0x00
|
||||
.byte 0x16, 0x13, 0x0b, 0x31, 0x34, 0x2a, 0x13, 0x2c, 0x22, 0x21, 0x39, 0x2f, 0x15, 0x37, 0x28, 0x1e, 0x07, 0x3b, 0x2d, 0x11, 0x03, 0x28, 0x2d, 0x30, 0x1e, 0x31, 0x11, 0x11, 0x23, 0x01, 0x1e, 0x3d
|
||||
.byte 0x31, 0x34, 0x1c, 0x02, 0x34, 0x21, 0x0e, 0x25, 0x3d, 0x07, 0x17, 0x33, 0x15, 0x10, 0x29, 0x32, 0x32, 0x18, 0x1f, 0x30, 0x2d, 0x3b, 0x30, 0x27, 0x3e, 0x16, 0x31, 0x15, 0x12, 0x30, 0x25, 0x17
|
||||
.byte 0x33, 0x06, 0x34, 0x00, 0x29, 0x18, 0x3c, 0x03, 0x12, 0x2c, 0x0c, 0x11, 0x09, 0x30, 0x30, 0x10, 0x0e, 0x11, 0x27, 0x16, 0x1b, 0x0c, 0x3b, 0x2e, 0x2b, 0x33, 0x1e, 0x13, 0x2d, 0x2d, 0x11, 0x24
|
||||
.byte 0x29, 0x34, 0x3e, 0x2b, 0x24, 0x1e, 0x21, 0x27, 0x1a, 0x2d, 0x04, 0x39, 0x16, 0x3e, 0x33, 0x26, 0x1b, 0x2e, 0x25, 0x0c, 0x06, 0x19, 0x25, 0x19, 0x18, 0x1d, 0x33, 0x33, 0x1d, 0x28, 0x2d, 0x1c
|
||||
.byte 0x10, 0x2a, 0x1f, 0x35, 0x1e, 0x34, 0x02, 0x10, 0x2b, 0x3a, 0x14, 0x0d, 0x0b, 0x15, 0x0c, 0x2c, 0x10, 0x37, 0x3a, 0x19, 0x06, 0x13, 0x17, 0x24, 0x10, 0x25, 0x24, 0x04, 0x1e, 0x00, 0x35, 0x34
|
||||
.byte 0x3a, 0x00, 0x37, 0x3c, 0x07, 0x1a, 0x2b, 0x28, 0x36, 0x34, 0x39, 0x2f, 0x28, 0x09, 0x1f, 0x38, 0x31, 0x30, 0x16, 0x25, 0x31, 0x18, 0x28, 0x31, 0x18, 0x0c, 0x22, 0x06, 0x39, 0x2d, 0x3d, 0x20
|
||||
.byte 0x24, 0x2e, 0x27, 0x21, 0x3e, 0x18, 0x18, 0x15, 0x3c, 0x24, 0x06, 0x1b, 0x26, 0x15, 0x0e, 0x22, 0x0a, 0x0d, 0x1f, 0x18, 0x16, 0x34, 0x10, 0x28, 0x21, 0x20, 0x11, 0x11, 0x36, 0x32, 0x15, 0x3b
|
||||
.byte 0x2e, 0x24, 0x1f, 0x2d, 0x12, 0x36, 0x2e, 0x20, 0x0b, 0x17, 0x33, 0x26, 0x03, 0x1f, 0x08, 0x19, 0x31, 0x2a, 0x18, 0x25, 0x35, 0x2d, 0x2d, 0x30, 0x38, 0x18, 0x1c, 0x25, 0x14, 0x1c, 0x22, 0x28
|
||||
.byte 0x08, 0x23, 0x21, 0x26, 0x1e, 0x30, 0x19, 0x0f, 0x15, 0x10, 0x2f, 0x22, 0x12, 0x02, 0x25, 0x3c, 0x01, 0x1d, 0x0e, 0x14, 0x18, 0x0d, 0x18, 0x17, 0x22, 0x0b, 0x31, 0x13, 0x34, 0x21, 0x0f, 0x2d
|
||||
.byte 0x36, 0x39, 0x1f, 0x25, 0x18, 0x10, 0x1f, 0x2d, 0x20, 0x20, 0x19, 0x0b, 0x31, 0x33, 0x13, 0x14, 0x2e, 0x11, 0x21, 0x2d, 0x0a, 0x37, 0x07, 0x15, 0x1b, 0x32, 0x04, 0x32, 0x06, 0x18, 0x1b, 0x13
|
||||
.byte 0x24, 0x12, 0x36, 0x22, 0x16, 0x1d, 0x29, 0x1c, 0x35, 0x17, 0x21, 0x36, 0x17, 0x2b, 0x35, 0x32, 0x19, 0x2a, 0x0f, 0x2e, 0x10, 0x00, 0x34, 0x02, 0x0e, 0x28, 0x31, 0x32, 0x32, 0x3b, 0x05, 0x20
|
||||
.byte 0x36, 0x26, 0x12, 0x34, 0x06, 0x34, 0x1e, 0x31, 0x32, 0x35, 0x05, 0x34, 0x1e, 0x13, 0x15, 0x15, 0x14, 0x2c, 0x29, 0x1c, 0x18, 0x24, 0x24, 0x12, 0x22, 0x29, 0x18, 0x34, 0x36, 0x30, 0x1e, 0x01
|
||||
.byte 0x23, 0x0c, 0x3c, 0x24, 0x0a, 0x3d, 0x16, 0x27, 0x1e, 0x23, 0x15, 0x02, 0x12, 0x11, 0x19, 0x2a, 0x1d, 0x31, 0x15, 0x03, 0x3b, 0x2a, 0x21, 0x19, 0x2c, 0x0a, 0x23, 0x11, 0x25, 0x11, 0x1a, 0x1a
|
||||
.byte 0x0a, 0x34, 0x3b, 0x0b, 0x33, 0x21, 0x0b, 0x37, 0x01, 0x31, 0x28, 0x35, 0x1d, 0x27, 0x2c, 0x30, 0x31, 0x2e, 0x39, 0x2d, 0x30, 0x05, 0x2c, 0x12, 0x2a, 0x2b, 0x39, 0x22, 0x20, 0x15, 0x34, 0x1c
|
||||
.byte 0x1c, 0x01, 0x15, 0x20, 0x16, 0x22, 0x13, 0x04, 0x18, 0x1e, 0x13, 0x10, 0x25, 0x33, 0x15, 0x39, 0x03, 0x31, 0x3f, 0x36, 0x18, 0x14, 0x23, 0x10, 0x2f, 0x1e, 0x1f, 0x1f, 0x17, 0x2c, 0x02, 0x16
|
||||
.byte 0x31, 0x20, 0x18, 0x30, 0x2e, 0x18, 0x37, 0x3b, 0x0e, 0x30, 0x10, 0x39, 0x24, 0x26, 0x39, 0x1e, 0x30, 0x26, 0x2e, 0x12, 0x01, 0x14, 0x37, 0x2a, 0x2e, 0x21, 0x06, 0x1d, 0x2a, 0x16, 0x32, 0x09
|
||||
.byte 0x38, 0x1c, 0x07, 0x22, 0x17, 0x3b, 0x2d, 0x15, 0x07, 0x1e, 0x2e, 0x1b, 0x2e, 0x1d, 0x04, 0x09, 0x30, 0x30, 0x2d, 0x37, 0x2d, 0x34, 0x24, 0x18, 0x24, 0x25, 0x0e, 0x2d, 0x26, 0x23, 0x0a, 0x16
|
||||
.byte 0x12, 0x2d, 0x11, 0x21, 0x28, 0x2e, 0x0f, 0x01, 0x21, 0x01, 0x31, 0x12, 0x3f, 0x1b, 0x1e, 0x21, 0x25, 0x2b, 0x26, 0x18, 0x13, 0x15, 0x2d, 0x34, 0x23, 0x21, 0x36, 0x0e, 0x2e, 0x1c, 0x14, 0x22
|
||||
.byte 0x1c, 0x2c, 0x0b, 0x28, 0x1a, 0x18, 0x21, 0x21, 0x07, 0x1a, 0x24, 0x26, 0x29, 0x2b, 0x0a, 0x34, 0x3e, 0x27, 0x33, 0x12, 0x34, 0x1b, 0x1f, 0x01, 0x2a, 0x2e, 0x06, 0x23, 0x2f, 0x1f, 0x14, 0x18
|
||||
.byte 0x06, 0x26, 0x31, 0x1f, 0x2b, 0x22, 0x26, 0x2e, 0x1e, 0x15, 0x16, 0x20, 0x22, 0x28, 0x15, 0x37, 0x12, 0x25, 0x04, 0x2c, 0x1f, 0x04, 0x2e, 0x0c, 0x13, 0x18, 0x07, 0x0b, 0x36, 0x1d, 0x1c, 0x2a
|
||||
.byte 0x30, 0x22, 0x1c, 0x2e, 0x12, 0x2f, 0x2b, 0x21, 0x1e, 0x16, 0x38, 0x30, 0x04, 0x02, 0x16, 0x05, 0x14, 0x20, 0x38, 0x3c, 0x33, 0x21, 0x1b, 0x2f, 0x14, 0x2a, 0x27, 0x38, 0x14, 0x1b, 0x2b, 0x1f
|
||||
.byte 0x2b, 0x29, 0x2b, 0x25, 0x27, 0x36, 0x21, 0x11, 0x22, 0x1b, 0x29, 0x03, 0x1b, 0x18, 0x24, 0x28, 0x21, 0x2d, 0x36, 0x3c, 0x2c, 0x24, 0x33, 0x17, 0x1f, 0x2a, 0x3a, 0x21, 0x0a, 0x23, 0x37, 0x00
|
||||
.byte 0x0b, 0x21, 0x11, 0x38, 0x19, 0x0f, 0x0e, 0x1c, 0x1f, 0x0f, 0x37, 0x3c, 0x10, 0x37, 0x38, 0x31, 0x35, 0x07, 0x15, 0x28, 0x1e, 0x2e, 0x19, 0x26, 0x10, 0x33, 0x3d, 0x35, 0x2f, 0x3a, 0x04, 0x34
|
||||
.byte 0x0d, 0x18, 0x1a, 0x01, 0x2d, 0x15, 0x3d, 0x1a, 0x17, 0x17, 0x3f, 0x32, 0x0b, 0x21, 0x11, 0x1e, 0x26, 0x2b, 0x0d, 0x19, 0x24, 0x2e, 0x04, 0x1b, 0x1b, 0x33, 0x20, 0x15, 0x21, 0x1d, 0x1f, 0x04
|
||||
.byte 0x21, 0x0f, 0x12, 0x1f, 0x2d, 0x2a, 0x32, 0x03, 0x37, 0x1f, 0x35, 0x07, 0x27, 0x24, 0x1f, 0x31, 0x2f, 0x30, 0x15, 0x06, 0x00, 0x24, 0x0b, 0x22, 0x1a, 0x0c, 0x3b, 0x29, 0x14, 0x1a, 0x17, 0x37
|
||||
.byte 0x20, 0x25, 0x3f, 0x26, 0x37, 0x3a, 0x3e, 0x10, 0x22, 0x04, 0x11, 0x28, 0x12, 0x1c, 0x03, 0x2e, 0x2e, 0x0e, 0x38, 0x28, 0x01, 0x29, 0x22, 0x1e, 0x33, 0x19, 0x06, 0x21, 0x27, 0x33, 0x19, 0x1a
|
||||
.byte 0x02, 0x05, 0x17, 0x11, 0x11, 0x2c, 0x1f, 0x26, 0x1e, 0x39, 0x1f, 0x28, 0x2e, 0x2f, 0x12, 0x22, 0x34, 0x13, 0x3b, 0x26, 0x2f, 0x34, 0x00, 0x14, 0x10, 0x31, 0x11, 0x1d, 0x2d, 0x2a, 0x08, 0x08
|
||||
.byte 0x37, 0x15, 0x18, 0x34, 0x04, 0x2b, 0x24, 0x2f, 0x1e, 0x27, 0x22, 0x2a, 0x24, 0x07, 0x14, 0x25, 0x01, 0x27, 0x19, 0x29, 0x0a, 0x29, 0x3d, 0x1c, 0x2f, 0x0d, 0x1f, 0x1c, 0x24, 0x3d, 0x32, 0x36
|
||||
.byte 0x1d, 0x24, 0x14, 0x21, 0x16, 0x1a, 0x0d, 0x29, 0x3f, 0x2b, 0x2a, 0x1a, 0x3e, 0x35, 0x11, 0x28, 0x18, 0x32, 0x05, 0x15, 0x21, 0x2e, 0x34, 0x2d, 0x14, 0x2a, 0x3c, 0x08, 0x37, 0x3f, 0x34, 0x1e
|
||||
.byte 0x27, 0x24, 0x1c, 0x16, 0x16, 0x33, 0x29, 0x3b, 0x19, 0x36, 0x2f, 0x1c, 0x03, 0x25, 0x2c, 0x0b, 0x16, 0x36, 0x1c, 0x1d, 0x1b, 0x2c, 0x27, 0x1b, 0x0b, 0x1f, 0x2b, 0x08, 0x10, 0x27, 0x3f, 0x25
|
||||
.byte 0x2f, 0x33, 0x13, 0x1f, 0x04, 0x31, 0x37, 0x0e, 0x2f, 0x12, 0x08, 0x23, 0x20, 0x3a, 0x1a, 0x1e, 0x2f, 0x0b, 0x1f, 0x1e, 0x20, 0x19, 0x23, 0x3b, 0x14, 0x25, 0x00, 0x27, 0x14, 0x04, 0x25, 0x36
|
||||
.byte 0x1a, 0x2b, 0x27, 0x21, 0x15, 0x28, 0x13, 0x2c, 0x0e, 0x3c, 0x35, 0x0c, 0x2d, 0x2b, 0x37, 0x16, 0x15, 0x29, 0x15, 0x1d, 0x17, 0x34, 0x36, 0x09, 0x0a, 0x31, 0x37, 0x22, 0x28, 0x17, 0x2b, 0x35
|
||||
.byte 0x14, 0x2b, 0x12, 0x08, 0x13, 0x1f, 0x31, 0x13, 0x28, 0x06, 0x07, 0x35, 0x23, 0x3a, 0x29, 0x0f, 0x24, 0x2e, 0x07, 0x35, 0x26, 0x0e, 0x12, 0x15, 0x23, 0x33, 0x2c, 0x0e, 0x21, 0x26, 0x1c, 0x12
|
||||
.byte 0x25, 0x23, 0x1d, 0x2f, 0x04, 0x35, 0x33, 0x16, 0x01, 0x24, 0x3d, 0x2c, 0x2e, 0x35, 0x0a, 0x25, 0x11, 0x13, 0x25, 0x1b, 0x1b, 0x15, 0x15, 0x39, 0x10, 0x0b, 0x35, 0x24, 0x3a, 0x27, 0x30, 0x2e
|
||||
.byte 0x2f, 0x15, 0x10, 0x1f, 0x35, 0x1b, 0x28, 0x35, 0x26, 0x30, 0x37, 0x34, 0x37, 0x2b, 0x0f, 0x30, 0x29, 0x2e, 0x3f, 0x2b, 0x38, 0x34, 0x2b, 0x2b, 0x2f, 0x25, 0x0d, 0x28, 0x2a, 0x33, 0x18, 0x10
|
||||
.byte 0x21, 0x12, 0x11, 0x1f, 0x22, 0x34, 0x11, 0x25, 0x23, 0x21, 0x3f, 0x11, 0x26, 0x27, 0x25, 0x28, 0x36, 0x12, 0x15, 0x26, 0x32, 0x11, 0x18, 0x24, 0x32, 0x25, 0x37, 0x27, 0x3a, 0x33, 0x35, 0x07
|
||||
.byte 0x1c, 0x1a, 0x0e, 0x2a, 0x1e, 0x2f, 0x1f, 0x00, 0x2e, 0x21, 0x1b, 0x3c, 0x14, 0x2f, 0x3a, 0x2f, 0x3e, 0x38, 0x15, 0x1a, 0x13, 0x2f, 0x29, 0x0d, 0x2f, 0x37, 0x17, 0x18, 0x30, 0x1c, 0x35, 0x15
|
||||
.byte 0x34, 0x14, 0x28, 0x11, 0x2c, 0x2c, 0x25, 0x2a, 0x20, 0x3f, 0x28, 0x0c, 0x34, 0x1b, 0x30, 0x2e, 0x25, 0x37, 0x1c, 0x24, 0x1f, 0x25, 0x26, 0x0c, 0x19, 0x34, 0x18, 0x10, 0x35, 0x0a, 0x13, 0x11
|
||||
.byte 0x25, 0x13, 0x20, 0x13, 0x19, 0x11, 0x20, 0x28, 0x1d, 0x3e, 0x30, 0x1b, 0x23, 0x24, 0x21, 0x0d, 0x23, 0x23, 0x1d, 0x28, 0x2e, 0x2d, 0x12, 0x1f, 0x0e, 0x2e, 0x2b, 0x0b, 0x31, 0x32, 0x24, 0x3c
|
||||
.byte 0x2c, 0x13, 0x3c, 0x12, 0x28, 0x16, 0x2a, 0x05, 0x0c, 0x32, 0x39, 0x0b, 0x32, 0x21, 0x04, 0x14, 0x10, 0x31, 0x32, 0x12, 0x1f, 0x23, 0x39, 0x2e, 0x2e, 0x22, 0x3d, 0x27, 0x0c, 0x1e, 0x18, 0x25
|
||||
.byte 0x00, 0x17, 0x06, 0x31, 0x14, 0x13, 0x21, 0x1a, 0x14, 0x20, 0x35, 0x0a, 0x3b, 0x25, 0x33, 0x08, 0x28, 0x3d, 0x02, 0x33, 0x23, 0x00, 0x13, 0x22, 0x21, 0x28, 0x30, 0x14, 0x2e, 0x14, 0x32, 0x36
|
||||
.byte 0x39, 0x23, 0x1e, 0x1c, 0x11, 0x30, 0x37, 0x16, 0x30, 0x15, 0x31, 0x1f, 0x34, 0x28, 0x2c, 0x35, 0x05, 0x29, 0x37, 0x33, 0x2a, 0x1c, 0x17, 0x2e, 0x10, 0x06, 0x16, 0x32, 0x1f, 0x2f, 0x00, 0x29
|
||||
.byte 0x1e, 0x04, 0x01, 0x16, 0x3b, 0x23, 0x1e, 0x1b, 0x34, 0x2a, 0x30, 0x11, 0x2b, 0x03, 0x00, 0x1f, 0x1d, 0x37, 0x1a, 0x3a, 0x18, 0x25, 0x1c, 0x16, 0x2c, 0x04, 0x3f, 0x33, 0x26, 0x23, 0x2d, 0x15
|
||||
.byte 0x2c, 0x27, 0x02, 0x35, 0x27, 0x07, 0x35, 0x33, 0x1a, 0x0c, 0x10, 0x28, 0x26, 0x2c, 0x2f, 0x36, 0x16, 0x37, 0x0b, 0x27, 0x1b, 0x3d, 0x18, 0x27, 0x1f, 0x20, 0x2b, 0x2a, 0x33, 0x0b, 0x0f, 0x20
|
||||
.byte 0x35, 0x3c, 0x2f, 0x33, 0x21, 0x15, 0x2d, 0x26, 0x34, 0x1f, 0x1a, 0x21, 0x2f, 0x2c, 0x2a, 0x1a, 0x32, 0x1a, 0x3b, 0x3f, 0x21, 0x13, 0x3f, 0x13, 0x0f, 0x24, 0x22, 0x14, 0x1b, 0x10, 0x21, 0x06
|
||||
.byte 0x28, 0x25, 0x34, 0x10, 0x2e, 0x0e, 0x14, 0x3c, 0x3e, 0x25, 0x16, 0x06, 0x30, 0x0b, 0x04, 0x1f, 0x3e, 0x02, 0x24, 0x0c, 0x17, 0x25, 0x2b, 0x3c, 0x2d, 0x15, 0x36, 0x33, 0x18, 0x23, 0x2a, 0x1d
|
||||
.byte 0x10, 0x2a, 0x35, 0x17, 0x28, 0x00, 0x37, 0x24, 0x0a, 0x3b, 0x15, 0x1d, 0x0b, 0x1f, 0x3c, 0x31, 0x25, 0x1d, 0x0f, 0x1d, 0x20, 0x13, 0x34, 0x11, 0x2b, 0x2e, 0x23, 0x0c, 0x2e, 0x24, 0x02, 0x14
|
||||
.byte 0x31, 0x16, 0x19, 0x0e, 0x23, 0x35, 0x1a, 0x10, 0x16, 0x14, 0x04, 0x19, 0x2d, 0x27, 0x37, 0x33, 0x02, 0x31, 0x02, 0x04, 0x16, 0x0d, 0x22, 0x25, 0x25, 0x00, 0x16, 0x2a, 0x3f, 0x26, 0x20, 0x0c
|
||||
.byte 0x12, 0x2f, 0x2e, 0x35, 0x1b, 0x0d, 0x22, 0x1e, 0x01, 0x34, 0x05, 0x22, 0x21, 0x34, 0x2a, 0x32, 0x0b, 0x09, 0x1d, 0x3f, 0x32, 0x2f, 0x3d, 0x18, 0x2d, 0x0b, 0x38, 0x36, 0x39, 0x17, 0x28, 0x34
|
||||
.byte 0x04, 0x24, 0x36, 0x0e, 0x2a, 0x38, 0x01, 0x14, 0x3c, 0x24, 0x22, 0x21, 0x03, 0x18, 0x32, 0x2f, 0x12, 0x29, 0x24, 0x31, 0x0a, 0x3b, 0x12, 0x1a, 0x1c, 0x20, 0x30, 0x31, 0x1b, 0x1a, 0x21, 0x10
|
||||
.byte 0x05, 0x29, 0x10, 0x26, 0x2d, 0x13, 0x16, 0x0c, 0x1d, 0x2b, 0x06, 0x1b, 0x06, 0x12, 0x14, 0x38, 0x0f, 0x35, 0x23, 0x3a, 0x2c, 0x00, 0x19, 0x33, 0x29, 0x14, 0x2d, 0x2a, 0x21, 0x29, 0x14, 0x31
|
||||
.byte 0x14, 0x1a, 0x06, 0x1e, 0x18, 0x1b, 0x28, 0x3b, 0x16, 0x29, 0x15, 0x1e, 0x12, 0x34, 0x0a, 0x14, 0x1b, 0x05, 0x27, 0x0b, 0x01, 0x26, 0x2a, 0x22, 0x35, 0x21, 0x20, 0x18, 0x20, 0x37, 0x17, 0x14
|
||||
.byte 0x1f, 0x11, 0x1d, 0x11, 0x25, 0x24, 0x2b, 0x2f, 0x07, 0x3f, 0x1f, 0x2c, 0x25, 0x25, 0x2a, 0x29, 0x18, 0x11, 0x24, 0x28, 0x31, 0x2c, 0x2a, 0x39, 0x0b, 0x26, 0x28, 0x10, 0x26, 0x22, 0x06, 0x16
|
||||
.byte 0x09, 0x2c, 0x13, 0x34, 0x19, 0x15, 0x3a, 0x12, 0x21, 0x1d, 0x38, 0x23, 0x12, 0x25, 0x24, 0x21, 0x30, 0x12, 0x37, 0x1a, 0x12, 0x24, 0x3b, 0x25, 0x32, 0x15, 0x23, 0x0d, 0x1a, 0x10, 0x16, 0x2e
|
||||
.byte 0x26, 0x1d, 0x14, 0x16, 0x3e, 0x2e, 0x1f, 0x0a, 0x16, 0x10, 0x1d, 0x30, 0x2b, 0x04, 0x3a, 0x19, 0x08, 0x2d, 0x2e, 0x28, 0x1e, 0x33, 0x0a, 0x12, 0x2e, 0x0d, 0x03, 0x2f, 0x26, 0x3a, 0x1e, 0x35
|
||||
.byte 0x3b, 0x2a, 0x03, 0x1a, 0x18, 0x3f, 0x0b, 0x27, 0x04, 0x05, 0x34, 0x36, 0x0b, 0x27, 0x3b, 0x17, 0x11, 0x0d, 0x27, 0x26, 0x2c, 0x1f, 0x20, 0x26, 0x10, 0x20, 0x25, 0x23, 0x2d, 0x37, 0x09, 0x13
|
||||
.byte 0x14, 0x17, 0x2d, 0x2e, 0x3d, 0x23, 0x1d, 0x1a, 0x1f, 0x21, 0x33, 0x2e, 0x28, 0x17, 0x13, 0x26, 0x3c, 0x36, 0x14, 0x1a, 0x33, 0x32, 0x20, 0x2b, 0x19, 0x3e, 0x20, 0x0c, 0x02, 0x2d, 0x3c, 0x3c
|
||||
.byte 0x2a, 0x30, 0x30, 0x28, 0x25, 0x3f, 0x1e, 0x03, 0x17, 0x1e, 0x35, 0x11, 0x1c, 0x1b, 0x14, 0x2a, 0x28, 0x3a, 0x23, 0x0e, 0x1f, 0x12, 0x36, 0x21, 0x20, 0x07, 0x3b, 0x10, 0x23, 0x19, 0x34, 0x0d
|
||||
.byte 0x2e, 0x18, 0x3f, 0x20, 0x25, 0x3e, 0x3b, 0x15, 0x0b, 0x2e, 0x12, 0x37, 0x0b, 0x23, 0x3d, 0x32, 0x1f, 0x16, 0x03, 0x27, 0x14, 0x0c, 0x21, 0x18, 0x03, 0x30, 0x3e, 0x21, 0x13, 0x0f, 0x00, 0x32
|
||||
.byte 0x3f, 0x23, 0x16, 0x0e, 0x31, 0x1d, 0x18, 0x1c, 0x1d, 0x30, 0x0e, 0x1e, 0x21, 0x20, 0x23, 0x3f, 0x0c, 0x1e, 0x14, 0x33, 0x22, 0x22, 0x21, 0x15, 0x36, 0x05, 0x1e, 0x1d, 0x31, 0x14, 0x20, 0x11
|
||||
.byte 0x37, 0x0d, 0x33, 0x19, 0x25, 0x05, 0x36, 0x1e, 0x31, 0x20, 0x35, 0x3a, 0x2f, 0x32, 0x2f, 0x30, 0x14, 0x23, 0x2d, 0x35, 0x1e, 0x29, 0x05, 0x05, 0x1b, 0x09, 0x1f, 0x26, 0x2f, 0x0b, 0x15, 0x15
|
||||
.byte 0x11, 0x13, 0x29, 0x1b, 0x18, 0x1c, 0x13, 0x35, 0x34, 0x31, 0x23, 0x27, 0x3f, 0x2f, 0x09, 0x30, 0x19, 0x23, 0x12, 0x34, 0x02, 0x2a, 0x21, 0x09, 0x3c, 0x1d, 0x0c, 0x02, 0x10, 0x22, 0x05, 0x17
|
||||
.byte 0x22, 0x08, 0x1b, 0x0a, 0x0f, 0x15, 0x02, 0x11, 0x13, 0x01, 0x21, 0x22, 0x16, 0x39, 0x33, 0x24, 0x38, 0x34, 0x0f, 0x1e, 0x2b, 0x2b, 0x15, 0x15, 0x20, 0x22, 0x2e, 0x3a, 0x3f, 0x31, 0x1a, 0x27
|
||||
.byte 0x2b, 0x29, 0x34, 0x14, 0x16, 0x39, 0x2f, 0x13, 0x3e, 0x16, 0x36, 0x21, 0x30, 0x00, 0x24, 0x2b, 0x24, 0x21, 0x30, 0x15, 0x31, 0x13, 0x10, 0x37, 0x24, 0x08, 0x07, 0x23, 0x21, 0x09, 0x25, 0x05
|
||||
.byte 0x3c, 0x32, 0x19, 0x03, 0x25, 0x0f, 0x29, 0x2b, 0x16, 0x07, 0x13, 0x3e, 0x3d, 0x25, 0x36, 0x0b, 0x28, 0x2e, 0x2b, 0x16, 0x0c, 0x31, 0x11, 0x30, 0x13, 0x2d, 0x26, 0x3e, 0x37, 0x29, 0x2f, 0x2e
|
||||
.byte 0x15, 0x3d, 0x17, 0x1c, 0x2e, 0x21, 0x33, 0x2f, 0x10, 0x0d, 0x05, 0x1d, 0x1c, 0x1a, 0x12, 0x0e, 0x18, 0x37, 0x1b, 0x11, 0x14, 0x06, 0x14, 0x21, 0x31, 0x0e, 0x27, 0x1a, 0x03, 0x10, 0x00, 0x34
|
||||
.byte 0x31, 0x3f, 0x0b, 0x1d, 0x0f, 0x12, 0x1f, 0x1a, 0x15, 0x10, 0x0f, 0x00, 0x24, 0x3e, 0x0a, 0x2a, 0x30, 0x2b, 0x24, 0x26, 0x31, 0x10, 0x2d, 0x2f, 0x2f, 0x3f, 0x0c, 0x13, 0x12, 0x0b, 0x16, 0x15
|
||||
.byte 0x07, 0x1f, 0x28, 0x10, 0x32, 0x0f, 0x17, 0x15, 0x0b, 0x27, 0x33, 0x34, 0x1d, 0x10, 0x1c, 0x3a, 0x12, 0x2c, 0x27, 0x37, 0x0a, 0x1a, 0x32, 0x05, 0x1f, 0x21, 0x24, 0x0d, 0x1f, 0x1c, 0x17, 0x24
|
||||
.byte 0x2f, 0x3b, 0x32, 0x3b, 0x25, 0x10, 0x03, 0x2f, 0x21, 0x0c, 0x10, 0x23, 0x0e, 0x3a, 0x2c, 0x33, 0x03, 0x2c, 0x12, 0x06, 0x1c, 0x2a, 0x37, 0x30, 0x3f, 0x01, 0x1e, 0x35, 0x16, 0x37, 0x2c, 0x32
|
||||
.byte 0x35, 0x05, 0x11, 0x22, 0x29, 0x09, 0x20, 0x2b, 0x0d, 0x1f, 0x18, 0x0d, 0x20, 0x23, 0x39, 0x16, 0x0f, 0x3a, 0x18, 0x21, 0x35, 0x2b, 0x36, 0x26, 0x2b, 0x23, 0x05, 0x2f, 0x1b, 0x08, 0x17, 0x3e
|
||||
.byte 0x09, 0x16, 0x2d, 0x3a, 0x37, 0x15, 0x35, 0x35, 0x29, 0x0a, 0x12, 0x02, 0x39, 0x1f, 0x14, 0x34, 0x33, 0x17, 0x1d, 0x18, 0x16, 0x1d, 0x1a, 0x01, 0x39, 0x22, 0x1e, 0x27, 0x36, 0x32, 0x14, 0x26
|
||||
.byte 0x0a, 0x39, 0x36, 0x1f, 0x0d, 0x1e, 0x0b, 0x0a, 0x19, 0x35, 0x1d, 0x34, 0x03, 0x12, 0x16, 0x0c, 0x13, 0x2e, 0x0c, 0x34, 0x1e, 0x10, 0x14, 0x1e, 0x23, 0x32, 0x27, 0x02, 0x10, 0x29, 0x35, 0x18
|
||||
.byte 0x33, 0x33, 0x1d, 0x1a, 0x3c, 0x15, 0x23, 0x3e, 0x3f, 0x22, 0x2a, 0x02, 0x2c, 0x28, 0x0a, 0x2f, 0x1a, 0x06, 0x35, 0x3c, 0x17, 0x2b, 0x03, 0x12, 0x17, 0x2f, 0x0a, 0x26, 0x12, 0x38, 0x11, 0x36
|
||||
.byte 0x1b, 0x23, 0x01, 0x39, 0x35, 0x19, 0x19, 0x17, 0x09, 0x28, 0x22, 0x1e, 0x27, 0x2c, 0x35, 0x33, 0x2c, 0x27, 0x25, 0x31, 0x06, 0x31, 0x2d, 0x1a, 0x39, 0x28, 0x2d, 0x04, 0x1e, 0x24, 0x3e, 0x1c
|
||||
.byte 0x3c, 0x30, 0x1b, 0x3f, 0x3e, 0x37, 0x22, 0x36, 0x11, 0x00, 0x01, 0x1c, 0x12, 0x1a, 0x10, 0x12, 0x1e, 0x2c, 0x1f, 0x12, 0x2a, 0x2f, 0x06, 0x19, 0x35, 0x1a, 0x18, 0x3b, 0x09, 0x36, 0x34, 0x1d
|
||||
.byte 0x13, 0x02, 0x07, 0x10, 0x20, 0x2f, 0x1d, 0x0b, 0x03, 0x33, 0x1c, 0x16, 0x31, 0x05, 0x13, 0x1b, 0x29, 0x06, 0x13, 0x30, 0x2d, 0x36, 0x2a, 0x2d, 0x2c, 0x19, 0x34, 0x1c, 0x0f, 0x15, 0x12, 0x36
|
||||
.byte 0x15, 0x2c, 0x3a, 0x06, 0x1c, 0x12, 0x1d, 0x26, 0x03, 0x38, 0x1d, 0x01, 0x01, 0x2d, 0x17, 0x2e, 0x10, 0x14, 0x17, 0x1c, 0x34, 0x0f, 0x28, 0x09, 0x37, 0x1b, 0x28, 0x1d, 0x26, 0x29, 0x2d, 0x36
|
||||
.byte 0x1e, 0x17, 0x28, 0x15, 0x0f, 0x1c, 0x20, 0x2d, 0x10, 0x27, 0x16, 0x2e, 0x14, 0x09, 0x12, 0x3b, 0x3d, 0x21, 0x25, 0x1a, 0x2c, 0x00, 0x22, 0x36, 0x0d, 0x30, 0x10, 0x17, 0x19, 0x1b, 0x00, 0x3b
|
||||
.byte 0x21, 0x2a, 0x28, 0x34, 0x2d, 0x0f, 0x16, 0x0a, 0x30, 0x28, 0x06, 0x00, 0x25, 0x31, 0x2e, 0x2a, 0x14, 0x33, 0x28, 0x36, 0x10, 0x2e, 0x05, 0x2e, 0x19, 0x19, 0x1a, 0x15, 0x2c, 0x14, 0x17, 0x37
|
||||
.byte 0x0f, 0x13, 0x32, 0x17, 0x1b, 0x39, 0x18, 0x32, 0x2e, 0x32, 0x1e, 0x24, 0x1d, 0x31, 0x12, 0x1d, 0x2b, 0x14, 0x0c, 0x27, 0x36, 0x2e, 0x32, 0x06, 0x0a, 0x1a, 0x28, 0x28, 0x20, 0x3a, 0x3a, 0x17
|
||||
.byte 0x08, 0x27, 0x36, 0x18, 0x1a, 0x10, 0x1e, 0x26, 0x1b, 0x1f, 0x33, 0x1f, 0x21, 0x17, 0x2f, 0x01, 0x08, 0x20, 0x35, 0x03, 0x19, 0x3b, 0x02, 0x20, 0x02, 0x2d, 0x23, 0x0e, 0x17, 0x32, 0x31, 0x29
|
||||
.byte 0x11, 0x22, 0x17, 0x22, 0x3a, 0x2c, 0x23, 0x34, 0x20, 0x18, 0x00, 0x3a, 0x22, 0x25, 0x33, 0x21, 0x33, 0x04, 0x27, 0x04, 0x18, 0x32, 0x2c, 0x0c, 0x2f, 0x28, 0x14, 0x2c, 0x3f, 0x30, 0x2b, 0x30
|
||||
.byte 0x21, 0x1d, 0x01, 0x25, 0x32, 0x05, 0x23, 0x34, 0x24, 0x10, 0x30, 0x3d, 0x14, 0x1b, 0x3f, 0x38, 0x2f, 0x22, 0x1b, 0x32, 0x25, 0x07, 0x37, 0x0a, 0x0c, 0x1d, 0x03, 0x1e, 0x1a, 0x0f, 0x3c, 0x12
|
||||
.byte 0x11, 0x18, 0x1d, 0x00, 0x35, 0x2f, 0x32, 0x18, 0x14, 0x23, 0x30, 0x1b, 0x11, 0x3d, 0x12, 0x1a, 0x16, 0x35, 0x28, 0x05, 0x24, 0x17, 0x3d, 0x37, 0x2e, 0x09, 0x2e, 0x18, 0x1d, 0x17, 0x20, 0x1f
|
||||
.byte 0x18, 0x23, 0x2c, 0x2f, 0x20, 0x3f, 0x16, 0x3f, 0x29, 0x2e, 0x23, 0x3b, 0x29, 0x18, 0x39, 0x13, 0x1e, 0x32, 0x35, 0x14, 0x1d, 0x2a, 0x35, 0x01, 0x1d, 0x3e, 0x3b, 0x1e, 0x22, 0x1e, 0x16, 0x18
|
||||
.byte 0x22, 0x12, 0x3e, 0x29, 0x33, 0x2f, 0x14, 0x19, 0x3b, 0x07, 0x15, 0x06, 0x3d, 0x29, 0x35, 0x37, 0x23, 0x34, 0x1d, 0x2d, 0x18, 0x12, 0x1b, 0x0b, 0x13, 0x24, 0x13, 0x38, 0x1c, 0x1f, 0x0b, 0x1b
|
||||
.byte 0x13, 0x21, 0x1c, 0x06, 0x39, 0x32, 0x37, 0x3d, 0x26, 0x29, 0x26, 0x15, 0x3c, 0x33, 0x27, 0x00, 0x01, 0x2e, 0x15, 0x18, 0x31, 0x0d, 0x2c, 0x13, 0x27, 0x3b, 0x20, 0x2d, 0x01, 0x26, 0x23, 0x15
|
||||
.byte 0x30, 0x24, 0x00, 0x17, 0x37, 0x3f, 0x33, 0x25, 0x24, 0x31, 0x06, 0x3b, 0x37, 0x03, 0x18, 0x1a, 0x2c, 0x34, 0x14, 0x1d, 0x36, 0x18, 0x3a, 0x04, 0x23, 0x12, 0x26, 0x15, 0x2b, 0x19, 0x1a, 0x29
|
||||
.byte 0x2c, 0x36, 0x01, 0x19, 0x1d, 0x2f, 0x06, 0x2b, 0x0c, 0x12, 0x26, 0x36, 0x32, 0x1d, 0x0d, 0x12, 0x28, 0x03, 0x28, 0x13, 0x29, 0x06, 0x17, 0x03, 0x38, 0x21, 0x30, 0x2c, 0x10, 0x22, 0x00, 0x28
|
||||
.byte 0x24, 0x3b, 0x1c, 0x20, 0x3e, 0x13, 0x02, 0x0c, 0x19, 0x29, 0x2c, 0x1a, 0x39, 0x30, 0x22, 0x2a, 0x1f, 0x22, 0x14, 0x34, 0x2c, 0x14, 0x25, 0x1b, 0x06, 0x3b, 0x15, 0x06, 0x1c, 0x13, 0x15, 0x03
|
||||
.byte 0x18, 0x1e, 0x2a, 0x1b, 0x17, 0x25, 0x2f, 0x1c, 0x29, 0x2e, 0x02, 0x32, 0x1e, 0x1d, 0x28, 0x35, 0x36, 0x03, 0x34, 0x16, 0x3d, 0x2a, 0x12, 0x0d, 0x13, 0x1d, 0x2d, 0x21, 0x32, 0x17, 0x2e, 0x1a
|
||||
.byte 0x15, 0x26, 0x22, 0x2f, 0x15, 0x3c, 0x0e, 0x20, 0x2f, 0x27, 0x13, 0x04, 0x09, 0x32, 0x1e, 0x01, 0x34, 0x06, 0x16, 0x1e, 0x2e, 0x1b, 0x1c, 0x28, 0x13, 0x2a, 0x30, 0x34, 0x12, 0x12, 0x32, 0x18
|
||||
.byte 0x1d, 0x1d, 0x35, 0x07, 0x1c, 0x16, 0x2d, 0x3d, 0x35, 0x1c, 0x1b, 0x24, 0x21, 0x2d, 0x1e, 0x10, 0x09, 0x14, 0x3d, 0x11, 0x12, 0x25, 0x02, 0x26, 0x23, 0x02, 0x19, 0x19, 0x05, 0x14, 0x0b, 0x21
|
||||
.byte 0x1a, 0x09, 0x02, 0x2c, 0x18, 0x28, 0x2d, 0x1e, 0x10, 0x12, 0x2e, 0x18, 0x2e, 0x1f, 0x02, 0x2c, 0x14, 0x17, 0x24, 0x39, 0x08, 0x32, 0x16, 0x14, 0x22, 0x16, 0x28, 0x21, 0x11, 0x10, 0x2c, 0x23
|
||||
.byte 0x36, 0x2b, 0x39, 0x21, 0x26, 0x0e, 0x06, 0x2d, 0x3c, 0x3e, 0x26, 0x2a, 0x1b, 0x1f, 0x00, 0x3c, 0x33, 0x35, 0x3f, 0x14, 0x00, 0x0b, 0x10, 0x34, 0x3c, 0x17, 0x2d, 0x07, 0x1f, 0x24, 0x39, 0x27
|
||||
.byte 0x16, 0x00, 0x1d, 0x33, 0x2b, 0x1e, 0x0f, 0x08, 0x31, 0x3a, 0x09, 0x13, 0x0c, 0x21, 0x1c, 0x2a, 0x17, 0x34, 0x29, 0x27, 0x10, 0x37, 0x1b, 0x18, 0x15, 0x08, 0x2f, 0x1f, 0x16, 0x12, 0x1f, 0x28
|
||||
.byte 0x34, 0x1c, 0x20, 0x22, 0x12, 0x01, 0x12, 0x21, 0x31, 0x10, 0x22, 0x26, 0x1e, 0x01, 0x3d, 0x11, 0x1e, 0x27, 0x25, 0x3d, 0x30, 0x24, 0x1d, 0x11, 0x22, 0x36, 0x30, 0x16, 0x1f, 0x3e, 0x2a, 0x3c
|
||||
.byte 0x27, 0x1b, 0x1f, 0x29, 0x10, 0x1e, 0x05, 0x2a, 0x0a, 0x10, 0x14, 0x1f, 0x00, 0x2e, 0x0b, 0x3b, 0x18, 0x0a, 0x39, 0x30, 0x37, 0x0b, 0x1f, 0x1d, 0x0a, 0x29, 0x3e, 0x1c, 0x33, 0x13, 0x2e, 0x28
|
||||
.byte 0x27, 0x1b, 0x1e, 0x1d, 0x02, 0x1c, 0x01, 0x25, 0x14, 0x3a, 0x10, 0x1c, 0x12, 0x05, 0x2a, 0x30, 0x20, 0x26, 0x2f, 0x2e, 0x2e, 0x03, 0x07, 0x24, 0x36, 0x04, 0x2b, 0x11, 0x25, 0x2d, 0x28, 0x0e
|
||||
.byte 0x2e, 0x0f, 0x1d, 0x15, 0x1c, 0x28, 0x30, 0x1f, 0x23, 0x26, 0x36, 0x12, 0x37, 0x3a, 0x31, 0x10, 0x2c, 0x2c, 0x2f, 0x1a, 0x0d, 0x15, 0x3f, 0x3c, 0x32, 0x35, 0x1c, 0x16, 0x33, 0x16, 0x28, 0x1d
|
||||
.byte 0x3f, 0x21, 0x2c, 0x3e, 0x2b, 0x24, 0x23, 0x2f, 0x32, 0x15, 0x2a, 0x1b, 0x10, 0x35, 0x18, 0x37, 0x10, 0x3b, 0x1e, 0x11, 0x2b, 0x16, 0x24, 0x1d, 0x16, 0x26, 0x3c, 0x2d, 0x11, 0x15, 0x28, 0x28
|
||||
.byte 0x27, 0x27, 0x27, 0x3b, 0x3a, 0x16, 0x1a, 0x0c, 0x1a, 0x15, 0x08, 0x25, 0x0b, 0x10, 0x22, 0x1a, 0x3e, 0x17, 0x28, 0x1f, 0x1e, 0x01, 0x1e, 0x1e, 0x1c, 0x2f, 0x10, 0x25, 0x0b, 0x34, 0x3e, 0x0c
|
||||
.byte 0x1a, 0x1b, 0x10, 0x2a, 0x0f, 0x14, 0x17, 0x0f, 0x3f, 0x17, 0x03, 0x15, 0x1f, 0x02, 0x36, 0x17, 0x15, 0x1d, 0x18, 0x08, 0x36, 0x10, 0x14, 0x0d, 0x2b, 0x0a, 0x05, 0x1d, 0x26, 0x12, 0x1e, 0x3e
|
||||
.byte 0x18, 0x19, 0x36, 0x18, 0x37, 0x17, 0x39, 0x2e, 0x0d, 0x04, 0x19, 0x16, 0x22, 0x15, 0x3e, 0x26, 0x1f, 0x00, 0x06, 0x17, 0x33, 0x22, 0x1d, 0x2b, 0x39, 0x2b, 0x3e, 0x31, 0x1c, 0x22, 0x3f, 0x13
|
||||
.byte 0x30, 0x1c, 0x31, 0x07, 0x2b, 0x14, 0x32, 0x35, 0x1e, 0x02, 0x07, 0x20, 0x0f, 0x3b, 0x11, 0x20, 0x07, 0x12, 0x2a, 0x30, 0x1d, 0x28, 0x38, 0x36, 0x20, 0x01, 0x17, 0x15, 0x20, 0x21, 0x3a, 0x1b
|
||||
.byte 0x1e, 0x38, 0x12, 0x24, 0x03, 0x3e, 0x1f, 0x29, 0x1d, 0x13, 0x20, 0x27, 0x19, 0x12, 0x25, 0x20, 0x32, 0x33, 0x2b, 0x3f, 0x05, 0x31, 0x35, 0x3c, 0x2d, 0x2d, 0x02, 0x2e, 0x10, 0x2a, 0x16, 0x17
|
||||
.byte 0x08, 0x31, 0x17, 0x2e, 0x2b, 0x30, 0x1e, 0x15, 0x31, 0x15, 0x26, 0x08, 0x10, 0x33, 0x15, 0x01, 0x27, 0x12, 0x07, 0x2f, 0x29, 0x27, 0x34, 0x3f, 0x08, 0x31, 0x1c, 0x20, 0x1a, 0x33, 0x0c, 0x13
|
||||
.byte 0x18, 0x31, 0x24, 0x37, 0x2d, 0x2e, 0x21, 0x18, 0x24, 0x3a, 0x27, 0x31, 0x35, 0x3e, 0x30, 0x3a, 0x14, 0x33, 0x0f, 0x1a, 0x2d, 0x30, 0x2e, 0x11, 0x1a, 0x31, 0x1d, 0x17, 0x3c, 0x18, 0x33, 0x31
|
||||
.byte 0x23, 0x1d, 0x39, 0x2d, 0x10, 0x1d, 0x2f, 0x24, 0x15, 0x1c, 0x25, 0x01, 0x2b, 0x22, 0x16, 0x2e, 0x1b, 0x25, 0x35, 0x37, 0x10, 0x26, 0x39, 0x01, 0x36, 0x17, 0x2b, 0x14, 0x09, 0x16, 0x17, 0x20
|
||||
.byte 0x28, 0x23, 0x26, 0x3a, 0x26, 0x27, 0x2a, 0x24, 0x36, 0x02, 0x2c, 0x29, 0x30, 0x35, 0x36, 0x01, 0x1f, 0x28, 0x3b, 0x1d, 0x23, 0x1e, 0x2d, 0x11, 0x1e, 0x2c, 0x2f, 0x32, 0x19, 0x3f, 0x26, 0x31
|
||||
.byte 0x38, 0x1e, 0x17, 0x05, 0x18, 0x2e, 0x00, 0x2e, 0x12, 0x34, 0x3f, 0x34, 0x16, 0x10, 0x29, 0x20, 0x3d, 0x36, 0x2f, 0x16, 0x25, 0x12, 0x17, 0x10, 0x21, 0x37, 0x35, 0x25, 0x37, 0x2d, 0x01, 0x08
|
||||
.byte 0x27, 0x03, 0x1f, 0x29, 0x0d, 0x2a, 0x16, 0x3a, 0x3f, 0x33, 0x2b, 0x19, 0x1d, 0x2a, 0x1f, 0x29, 0x28, 0x2c, 0x10, 0x28, 0x30, 0x10, 0x39, 0x14, 0x1b, 0x00, 0x18, 0x21, 0x28, 0x0c, 0x37, 0x11
|
||||
.byte 0x10, 0x11, 0x3c, 0x33, 0x32, 0x33, 0x36, 0x1a, 0x36, 0x00, 0x1c, 0x31, 0x1b, 0x1d, 0x38, 0x1d, 0x10, 0x3c, 0x39, 0x27, 0x3a, 0x3f, 0x14, 0x19, 0x12, 0x14, 0x0d, 0x1f, 0x18, 0x00, 0x25, 0x18
|
||||
.byte 0x28, 0x1c, 0x32, 0x27, 0x03, 0x1a, 0x26, 0x2d, 0x2a, 0x29, 0x28, 0x27, 0x0a, 0x2a, 0x18, 0x0a, 0x1a, 0x30, 0x20, 0x1a, 0x2e, 0x06, 0x0b, 0x1d, 0x0f, 0x0c, 0x1c, 0x35, 0x28, 0x1c, 0x3d, 0x16
|
||||
.byte 0x23, 0x21, 0x1c, 0x31, 0x14, 0x1c, 0x2e, 0x22, 0x32, 0x35, 0x09, 0x29, 0x30, 0x20, 0x1a, 0x10, 0x31, 0x3f, 0x2c, 0x0a, 0x3d, 0x37, 0x0b, 0x2e, 0x2d, 0x1f, 0x22, 0x31, 0x06, 0x07, 0x29, 0x22
|
||||
.byte 0x17, 0x2d, 0x30, 0x11, 0x18, 0x0c, 0x19, 0x15, 0x07, 0x0a, 0x34, 0x18, 0x29, 0x27, 0x33, 0x0c, 0x30, 0x03, 0x1a, 0x37, 0x06, 0x01, 0x2d, 0x0f, 0x3b, 0x2b, 0x11, 0x1f, 0x37, 0x2b, 0x21, 0x36
|
||||
.byte 0x3f, 0x23, 0x17, 0x17, 0x07, 0x2b, 0x2b, 0x0e, 0x30, 0x11, 0x39, 0x1d, 0x29, 0x03, 0x33, 0x30, 0x03, 0x2f, 0x3c, 0x20, 0x26, 0x03, 0x22, 0x14, 0x3a, 0x28, 0x35, 0x01, 0x28, 0x2b, 0x3e, 0x15
|
||||
.byte 0x18, 0x30, 0x07, 0x17, 0x3b, 0x2c, 0x30, 0x15, 0x07, 0x2c, 0x17, 0x27, 0x1d, 0x3f, 0x1e, 0x33, 0x0d, 0x17, 0x10, 0x15, 0x0e, 0x30, 0x09, 0x05, 0x30, 0x2d, 0x20, 0x15, 0x3c, 0x3d, 0x30, 0x0c
|
||||
.byte 0x17, 0x1c, 0x1a, 0x0d, 0x25, 0x2b, 0x2b, 0x2a, 0x02, 0x16, 0x2d, 0x17, 0x31, 0x17, 0x00, 0x08, 0x13, 0x37, 0x35, 0x21, 0x1e, 0x1c, 0x1f, 0x2b, 0x32, 0x1c, 0x10, 0x2a, 0x16, 0x3a, 0x33, 0x31
|
||||
.byte 0x17, 0x2b, 0x2a, 0x0c, 0x3d, 0x11, 0x28, 0x0a, 0x30, 0x23, 0x0a, 0x26, 0x0a, 0x14, 0x24, 0x0b, 0x0f, 0x30, 0x1b, 0x1e, 0x29, 0x02, 0x35, 0x28, 0x3b, 0x02, 0x14, 0x00, 0x0f, 0x35, 0x1c, 0x3c
|
||||
.byte 0x2e, 0x28, 0x38, 0x19, 0x1b, 0x11, 0x12, 0x09, 0x16, 0x10, 0x2e, 0x0d, 0x20, 0x3d, 0x04, 0x32, 0x16, 0x2c, 0x25, 0x02, 0x3d, 0x18, 0x0b, 0x13, 0x1c, 0x22, 0x2a, 0x1c, 0x20, 0x27, 0x22, 0x05
|
||||
.byte 0x26, 0x22, 0x12, 0x1d, 0x2c, 0x08, 0x05, 0x2e, 0x3f, 0x1c, 0x17, 0x24, 0x0d, 0x33, 0x36, 0x08, 0x24, 0x10, 0x22, 0x29, 0x1c, 0x0a, 0x11, 0x25, 0x0f, 0x10, 0x24, 0x38, 0x2f, 0x25, 0x32, 0x1e
|
||||
.byte 0x06, 0x2a, 0x29, 0x3e, 0x3a, 0x28, 0x34, 0x17, 0x33, 0x18, 0x33, 0x17, 0x07, 0x14, 0x1f, 0x11, 0x17, 0x20, 0x13, 0x0e, 0x14, 0x3b, 0x1c, 0x12, 0x2a, 0x13, 0x37, 0x2a, 0x35, 0x32, 0x30, 0x02
|
||||
.byte 0x25, 0x00, 0x07, 0x1f, 0x0c, 0x04, 0x2c, 0x37, 0x37, 0x30, 0x25, 0x12, 0x25, 0x12, 0x22, 0x21, 0x22, 0x35, 0x33, 0x07, 0x20, 0x2d, 0x27, 0x0e, 0x30, 0x34, 0x19, 0x1a, 0x0a, 0x3c, 0x25, 0x07
|
||||
.byte 0x1d, 0x2b, 0x31, 0x3a, 0x12, 0x1a, 0x3d, 0x37, 0x16, 0x15, 0x16, 0x39, 0x13, 0x15, 0x2d, 0x03, 0x2e, 0x06, 0x39, 0x2c, 0x16, 0x00, 0x13, 0x35, 0x2a, 0x35, 0x24, 0x01, 0x18, 0x24, 0x37, 0x28
|
||||
.byte 0x25, 0x1b, 0x34, 0x25, 0x19, 0x17, 0x27, 0x2f, 0x1b, 0x27, 0x0d, 0x10, 0x36, 0x3c, 0x30, 0x3c, 0x33, 0x23, 0x3e, 0x27, 0x1e, 0x25, 0x2d, 0x29, 0x1f, 0x12, 0x21, 0x37, 0x32, 0x1f, 0x11, 0x21
|
||||
.byte 0x35, 0x30, 0x0c, 0x19, 0x25, 0x3d, 0x26, 0x17, 0x02, 0x1d, 0x14, 0x2e, 0x11, 0x38, 0x13, 0x30, 0x0a, 0x2b, 0x20, 0x1e, 0x10, 0x15, 0x37, 0x30, 0x2e, 0x1e, 0x04, 0x2c, 0x14, 0x34, 0x19, 0x08
|
||||
.byte 0x14, 0x18, 0x0e, 0x1c, 0x30, 0x1a, 0x2e, 0x1b, 0x1f, 0x39, 0x31, 0x0c, 0x1c, 0x28, 0x3e, 0x33, 0x23, 0x0f, 0x13, 0x16, 0x25, 0x39, 0x2f, 0x14, 0x1b, 0x1a, 0x28, 0x3e, 0x21, 0x2d, 0x19, 0x11
|
||||
.byte 0x0c, 0x34, 0x32, 0x39, 0x31, 0x19, 0x1a, 0x08, 0x34, 0x09, 0x2f, 0x11, 0x30, 0x04, 0x1c, 0x02, 0x3b, 0x1b, 0x33, 0x21, 0x33, 0x38, 0x02, 0x1a, 0x31, 0x38, 0x32, 0x1f, 0x1d, 0x16, 0x17, 0x10
|
||||
.byte 0x1b, 0x32, 0x20, 0x17, 0x00, 0x33, 0x12, 0x21, 0x0f, 0x27, 0x14, 0x19, 0x27, 0x24, 0x2c, 0x37, 0x25, 0x05, 0x2f, 0x3d, 0x25, 0x11, 0x12, 0x30, 0x1a, 0x16, 0x03, 0x1a, 0x14, 0x09, 0x13, 0x02
|
||||
.byte 0x23, 0x22, 0x01, 0x3c, 0x10, 0x3f, 0x2d, 0x23, 0x31, 0x3f, 0x23, 0x17, 0x00, 0x33, 0x3f, 0x0f, 0x2f, 0x26, 0x07, 0x15, 0x21, 0x2b, 0x2a, 0x38, 0x39, 0x1e, 0x09, 0x25, 0x2b, 0x3b, 0x30, 0x25
|
||||
.byte 0x12, 0x2d, 0x13, 0x32, 0x19, 0x28, 0x24, 0x1c, 0x2d, 0x35, 0x32, 0x26, 0x0d, 0x23, 0x1e, 0x1d, 0x07, 0x21, 0x0b, 0x34, 0x17, 0x2d, 0x32, 0x32, 0x3a, 0x3c, 0x35, 0x1a, 0x10, 0x33, 0x1a, 0x07
|
||||
.byte 0x22, 0x3b, 0x1b, 0x2a, 0x33, 0x1f, 0x26, 0x0e, 0x35, 0x1a, 0x3b, 0x0a, 0x1c, 0x11, 0x07, 0x11, 0x0d, 0x3c, 0x2d, 0x1e, 0x37, 0x29, 0x11, 0x05, 0x12, 0x15, 0x2f, 0x1c, 0x24, 0x31, 0x16, 0x2b
|
||||
.byte 0x21, 0x1b, 0x23, 0x10, 0x31, 0x02, 0x14, 0x29, 0x26, 0x20, 0x16, 0x10, 0x17, 0x10, 0x0b, 0x0f, 0x33, 0x01, 0x2e, 0x14, 0x21, 0x0e, 0x37, 0x1a, 0x1d, 0x2f, 0x1e, 0x30, 0x24, 0x04, 0x14, 0x2d
|
||||
.byte 0x11, 0x00, 0x30, 0x08, 0x2a, 0x1d, 0x1d, 0x22, 0x21, 0x24, 0x2c, 0x37, 0x24, 0x11, 0x12, 0x04, 0x2e, 0x28, 0x1d, 0x18, 0x23, 0x3c, 0x16, 0x16, 0x10, 0x17, 0x31, 0x20, 0x21, 0x12, 0x33, 0x3e
|
||||
.byte 0x34, 0x06, 0x13, 0x13, 0x17, 0x38, 0x2b, 0x14, 0x0d, 0x15, 0x24, 0x3b, 0x2b, 0x34, 0x3b, 0x1e, 0x18, 0x07, 0x34, 0x37, 0x1d, 0x1f, 0x0b, 0x29, 0x20, 0x12, 0x1e, 0x1d, 0x1a, 0x24, 0x24, 0x3d
|
||||
.byte 0x28, 0x24, 0x0b, 0x12, 0x33, 0x1b, 0x3a, 0x22, 0x14, 0x13, 0x2a, 0x31, 0x38, 0x15, 0x37, 0x2b, 0x2e, 0x19, 0x1e, 0x2c, 0x3f, 0x1b, 0x2a, 0x33, 0x1f, 0x33, 0x3f, 0x15, 0x29, 0x01, 0x1e, 0x18
|
||||
.byte 0x1f, 0x22, 0x19, 0x33, 0x3c, 0x34, 0x1e, 0x12, 0x22, 0x0d, 0x37, 0x2c, 0x0f, 0x08, 0x31, 0x2e, 0x09, 0x36, 0x01, 0x05, 0x1e, 0x1c, 0x04, 0x1e, 0x0c, 0x01, 0x1c, 0x29, 0x28, 0x2f, 0x39, 0x2d
|
||||
.byte 0x14, 0x09, 0x22, 0x36, 0x04, 0x37, 0x37, 0x2d, 0x2f, 0x35, 0x24, 0x23, 0x1b, 0x08, 0x20, 0x32, 0x20, 0x1f, 0x34, 0x02, 0x31, 0x19, 0x18, 0x13, 0x36, 0x06, 0x2b, 0x1e, 0x0e, 0x1b, 0x10, 0x2f
|
||||
.byte 0x0e, 0x1c, 0x11, 0x38, 0x13, 0x01, 0x37, 0x19, 0x14, 0x11, 0x26, 0x31, 0x3d, 0x33, 0x1d, 0x1b, 0x34, 0x25, 0x31, 0x2f, 0x11, 0x0a, 0x2f, 0x39, 0x17, 0x1b, 0x05, 0x0e, 0x13, 0x29, 0x25, 0x22
|
||||
.byte 0x15, 0x0d, 0x20, 0x2b, 0x27, 0x21, 0x3e, 0x24, 0x27, 0x2a, 0x2b, 0x16, 0x24, 0x3d, 0x15, 0x15, 0x30, 0x31, 0x0f, 0x33, 0x24, 0x06, 0x16, 0x13, 0x06, 0x31, 0x10, 0x2e, 0x3f, 0x10, 0x05, 0x0d
|
||||
.byte 0x2f, 0x3c, 0x1f, 0x19, 0x12, 0x13, 0x24, 0x0f, 0x33, 0x36, 0x15, 0x3b, 0x33, 0x03, 0x0f, 0x2a, 0x3b, 0x3c, 0x2c, 0x36, 0x09, 0x29, 0x11, 0x3b, 0x27, 0x28, 0x2b, 0x31, 0x1a, 0x0e, 0x2f, 0x39
|
||||
.byte 0x2c, 0x31, 0x0e, 0x3c, 0x35, 0x2c, 0x24, 0x33, 0x3d, 0x11, 0x2b, 0x07, 0x3c, 0x37, 0x14, 0x18, 0x13, 0x1d, 0x3f, 0x2e, 0x30, 0x12, 0x25, 0x26, 0x1d, 0x11, 0x07, 0x11, 0x1e, 0x34, 0x01, 0x11
|
||||
.byte 0x0b, 0x39, 0x21, 0x29, 0x02, 0x29, 0x15, 0x10, 0x1a, 0x30, 0x1f, 0x35, 0x3c, 0x2b, 0x2a, 0x30, 0x3b, 0x36, 0x20, 0x1a, 0x23, 0x32, 0x24, 0x2b, 0x15, 0x20, 0x1c, 0x25, 0x3d, 0x36, 0x2d, 0x14
|
||||
.byte 0x31, 0x18, 0x23, 0x17, 0x18, 0x05, 0x13, 0x34, 0x30, 0x37, 0x0e, 0x39, 0x23, 0x1d, 0x1f, 0x17, 0x01, 0x15, 0x2f, 0x0b, 0x3e, 0x1b, 0x0d, 0x19, 0x2e, 0x31, 0x38, 0x1c, 0x15, 0x34, 0x15, 0x13
|
||||
.byte 0x19, 0x29, 0x19, 0x14, 0x27, 0x15, 0x18, 0x23, 0x29, 0x0c, 0x27, 0x2d, 0x0e, 0x17, 0x34, 0x18, 0x10, 0x3b, 0x1e, 0x29, 0x34, 0x2c, 0x22, 0x31, 0x08, 0x13, 0x1d, 0x18, 0x1a, 0x1c, 0x0b, 0x2a
|
||||
.byte 0x19, 0x1e, 0x1a, 0x23, 0x27, 0x17, 0x3b, 0x0e, 0x37, 0x19, 0x2b, 0x16, 0x2f, 0x08, 0x21, 0x37, 0x02, 0x20, 0x0b, 0x32, 0x30, 0x16, 0x05, 0x30, 0x13, 0x05, 0x1a, 0x07, 0x39, 0x19, 0x0c, 0x3b
|
||||
.byte 0x2a, 0x15, 0x05, 0x30, 0x30, 0x05, 0x19, 0x13, 0x00, 0x12, 0x27, 0x16, 0x2a, 0x0f, 0x28, 0x27, 0x0c, 0x23, 0x2f, 0x39, 0x28, 0x2a, 0x24, 0x25, 0x1f, 0x18, 0x29, 0x14, 0x16, 0x05, 0x1a, 0x35
|
||||
.byte 0x2f, 0x26, 0x0a, 0x3a, 0x29, 0x34, 0x2c, 0x36, 0x2e, 0x3a, 0x15, 0x1a, 0x0a, 0x2d, 0x16, 0x14, 0x2e, 0x35, 0x28, 0x2a, 0x35, 0x0f, 0x11, 0x11, 0x32, 0x19, 0x20, 0x1a, 0x28, 0x17, 0x1a, 0x28
|
||||
.byte 0x16, 0x33, 0x25, 0x13, 0x2c, 0x29, 0x09, 0x16, 0x33, 0x1d, 0x27, 0x26, 0x15, 0x0c, 0x2f, 0x22, 0x1c, 0x19, 0x29, 0x33, 0x10, 0x2d, 0x11, 0x1b, 0x16, 0x19, 0x2e, 0x0d, 0x0c, 0x28, 0x37, 0x3a
|
||||
.byte 0x34, 0x2a, 0x1d, 0x37, 0x30, 0x0a, 0x36, 0x24, 0x39, 0x1b, 0x39, 0x0a, 0x32, 0x11, 0x03, 0x2d, 0x32, 0x1d, 0x30, 0x38, 0x1e, 0x27, 0x2e, 0x17, 0x18, 0x16, 0x17, 0x2a, 0x36, 0x3b, 0x31, 0x17
|
||||
.byte 0x04, 0x19, 0x3a, 0x25, 0x2d, 0x00, 0x36, 0x27, 0x25, 0x12, 0x33, 0x06, 0x0a, 0x14, 0x11, 0x05, 0x2f, 0x03, 0x35, 0x2f, 0x0b, 0x34, 0x29, 0x00, 0x31, 0x13, 0x27, 0x0f, 0x1c, 0x1d, 0x06, 0x2d
|
||||
.byte 0x1c, 0x30, 0x27, 0x2f, 0x2a, 0x27, 0x16, 0x20, 0x31, 0x33, 0x2b, 0x2b, 0x05, 0x30, 0x36, 0x29, 0x23, 0x35, 0x10, 0x16, 0x2f, 0x2d, 0x20, 0x29, 0x37, 0x13, 0x24, 0x2d, 0x0e, 0x25, 0x08, 0x0a
|
||||
.byte 0x18, 0x0f, 0x03, 0x1b, 0x31, 0x0c, 0x37, 0x1e, 0x34, 0x31, 0x1b, 0x0e, 0x25, 0x1a, 0x07, 0x34, 0x0d, 0x3c, 0x33, 0x00, 0x3a, 0x36, 0x04, 0x27, 0x12, 0x23, 0x18, 0x24, 0x0d, 0x0b, 0x18, 0x31
|
||||
.byte 0x32, 0x37, 0x00, 0x0d, 0x21, 0x32, 0x10, 0x12, 0x26, 0x0d, 0x19, 0x29, 0x24, 0x2b, 0x3d, 0x21, 0x1f, 0x1e, 0x1b, 0x28, 0x0d, 0x12, 0x28, 0x35, 0x1e, 0x23, 0x0a, 0x2e, 0x22, 0x27, 0x27, 0x35
|
||||
.byte 0x01, 0x0e, 0x20, 0x31, 0x39, 0x29, 0x3b, 0x24, 0x36, 0x14, 0x10, 0x33, 0x18, 0x2c, 0x26, 0x04, 0x2d, 0x15, 0x1a, 0x11, 0x37, 0x0f, 0x0b, 0x14, 0x0e, 0x2c, 0x2c, 0x21, 0x17, 0x2c, 0x16, 0x21
|
||||
.byte 0x35, 0x3e, 0x10, 0x10, 0x0a, 0x05, 0x1e, 0x3b, 0x09, 0x13, 0x26, 0x18, 0x1e, 0x23, 0x0c, 0x1a, 0x33, 0x37, 0x1f, 0x09, 0x12, 0x35, 0x3d, 0x0d, 0x15, 0x36, 0x06, 0x24, 0x33, 0x30, 0x29, 0x3b
|
||||
.byte 0x0f, 0x28, 0x34, 0x2a, 0x2c, 0x02, 0x12, 0x35, 0x09, 0x22, 0x31, 0x3b, 0x31, 0x1c, 0x33, 0x22, 0x27, 0x3d, 0x34, 0x15, 0x14, 0x22, 0x28, 0x28, 0x10, 0x1e, 0x21, 0x31, 0x10, 0x2d, 0x16, 0x21
|
||||
.byte 0x1e, 0x05, 0x33, 0x0f, 0x30, 0x31, 0x0e, 0x1a, 0x35, 0x38, 0x2e, 0x28, 0x26, 0x37, 0x1e, 0x2b, 0x13, 0x33, 0x1f, 0x1e, 0x37, 0x0a, 0x28, 0x24, 0x32, 0x1c, 0x1a, 0x1f, 0x3f, 0x19, 0x39, 0x39
|
||||
.byte 0x29, 0x2c, 0x1b, 0x14, 0x15, 0x2a, 0x17, 0x32, 0x0f, 0x21, 0x30, 0x21, 0x18, 0x23, 0x2a, 0x27, 0x3d, 0x07, 0x10, 0x0b, 0x3f, 0x2f, 0x31, 0x02, 0x2e, 0x08, 0x39, 0x2f, 0x3f, 0x20, 0x18, 0x2d
|
||||
.byte 0x34, 0x11, 0x2e, 0x34, 0x10, 0x26, 0x12, 0x23, 0x25, 0x0a, 0x37, 0x34, 0x09, 0x25, 0x0a, 0x3e, 0x16, 0x1a, 0x17, 0x11, 0x38, 0x1c, 0x20, 0x11, 0x21, 0x26, 0x05, 0x0f, 0x18, 0x26, 0x2b, 0x32
|
||||
.byte 0x0a, 0x0c, 0x16, 0x03, 0x29, 0x1d, 0x29, 0x3b, 0x23, 0x16, 0x1b, 0x29, 0x07, 0x09, 0x17, 0x17, 0x2c, 0x1c, 0x35, 0x33, 0x30, 0x17, 0x12, 0x1e, 0x3d, 0x1a, 0x2b, 0x21, 0x1d, 0x10, 0x0a, 0x08
|
||||
.byte 0x17, 0x14, 0x3c, 0x36, 0x28, 0x36, 0x36, 0x3b, 0x20, 0x1b, 0x13, 0x22, 0x1d, 0x13, 0x3a, 0x15, 0x02, 0x23, 0x2c, 0x3e, 0x19, 0x14, 0x39, 0x3c, 0x1a, 0x10, 0x08, 0x1e, 0x0a, 0x13, 0x29, 0x3f
|
||||
.byte 0x38, 0x2c, 0x07, 0x23, 0x1f, 0x19, 0x2a, 0x24, 0x14, 0x3c, 0x1f, 0x0d, 0x04, 0x37, 0x1a, 0x2f, 0x28, 0x2a, 0x1d, 0x1e, 0x11, 0x37, 0x29, 0x28, 0x27, 0x12, 0x0d, 0x00, 0x26, 0x0a, 0x3c, 0x26
|
||||
.byte 0x1f, 0x1c, 0x33, 0x04, 0x3a, 0x2c, 0x24, 0x3d, 0x2b, 0x26, 0x31, 0x2f, 0x13, 0x1c, 0x21, 0x3e, 0x12, 0x23, 0x36, 0x0a, 0x1a, 0x2d, 0x1e, 0x19, 0x05, 0x1f, 0x1b, 0x1e, 0x0a, 0x1f, 0x20, 0x08
|
||||
.byte 0x24, 0x2c, 0x0c, 0x33, 0x1d, 0x1f, 0x11, 0x0e, 0x12, 0x10, 0x27, 0x12, 0x19, 0x2a, 0x13, 0x31, 0x1c, 0x04, 0x30, 0x1a, 0x38, 0x1f, 0x2c, 0x35, 0x25, 0x07, 0x0b, 0x33, 0x2d, 0x02, 0x1a, 0x2a
|
||||
.byte 0x35, 0x35, 0x16, 0x2f, 0x14, 0x11, 0x31, 0x33, 0x2c, 0x31, 0x1e, 0x3c, 0x3a, 0x27, 0x3c, 0x2b, 0x12, 0x27, 0x1d, 0x12, 0x36, 0x2c, 0x2b, 0x25, 0x3b, 0x35, 0x12, 0x3d, 0x27, 0x13, 0x23, 0x19
|
||||
.byte 0x33, 0x2c, 0x26, 0x09, 0x3c, 0x12, 0x15, 0x1a, 0x23, 0x21, 0x07, 0x1a, 0x22, 0x25, 0x20, 0x19, 0x1b, 0x2c, 0x3a, 0x19, 0x35, 0x05, 0x26, 0x1d, 0x23, 0x22, 0x25, 0x0e, 0x1e, 0x11, 0x13, 0x30
|
||||
.byte 0x12, 0x2c, 0x22, 0x25, 0x0a, 0x1d, 0x18, 0x23, 0x3e, 0x1d, 0x02, 0x28, 0x25, 0x21, 0x0e, 0x20, 0x21, 0x22, 0x37, 0x18, 0x33, 0x27, 0x23, 0x23, 0x31, 0x24, 0x1a, 0x1a, 0x3e, 0x25, 0x24, 0x24
|
||||
.byte 0x01, 0x18, 0x34, 0x10, 0x22, 0x07, 0x00, 0x37, 0x06, 0x20, 0x20, 0x3a, 0x02, 0x2b, 0x07, 0x2c, 0x2c, 0x09, 0x2f, 0x2a, 0x01, 0x32, 0x2c, 0x00, 0x35, 0x13, 0x2b, 0x3c, 0x1f, 0x36, 0x37, 0x1e
|
||||
.byte 0x20, 0x35, 0x1d, 0x0c, 0x07, 0x33, 0x16, 0x08, 0x12, 0x3f, 0x36, 0x11, 0x0b, 0x1f, 0x2d, 0x21, 0x20, 0x33, 0x17, 0x1a, 0x2e, 0x16, 0x01, 0x2f, 0x2f, 0x1c, 0x34, 0x29, 0x31, 0x2e, 0x3b, 0x38
|
||||
.byte 0x31, 0x0d, 0x16, 0x12, 0x07, 0x29, 0x24, 0x33, 0x3c, 0x34, 0x3e, 0x1e, 0x18, 0x30, 0x02, 0x34, 0x2a, 0x34, 0x1b, 0x2e, 0x23, 0x18, 0x34, 0x00, 0x1f, 0x20, 0x0e, 0x28, 0x15, 0x33, 0x37, 0x27
|
||||
.byte 0x35, 0x23, 0x37, 0x3e, 0x11, 0x32, 0x2e, 0x36, 0x3a, 0x02, 0x2b, 0x00, 0x36, 0x1d, 0x13, 0x29, 0x16, 0x08, 0x2b, 0x37, 0x08, 0x02, 0x27, 0x32, 0x2d, 0x34, 0x30, 0x36, 0x29, 0x2e, 0x10, 0x12
|
||||
.byte 0x3c, 0x2e, 0x2a, 0x04, 0x33, 0x30, 0x3f, 0x01, 0x22, 0x37, 0x14, 0x1d, 0x27, 0x00, 0x2f, 0x0c, 0x39, 0x26, 0x27, 0x04, 0x21, 0x19, 0x08, 0x1d, 0x01, 0x04, 0x1e, 0x27, 0x1b, 0x2b, 0x31, 0x17
|
||||
.byte 0x1f, 0x07, 0x01, 0x2d, 0x2e, 0x3b, 0x1f, 0x34, 0x24, 0x31, 0x32, 0x2b, 0x24, 0x0e, 0x07, 0x1e, 0x0f, 0x33, 0x10, 0x16, 0x21, 0x32, 0x39, 0x02, 0x1a, 0x33, 0x3d, 0x22, 0x0c, 0x25, 0x1a, 0x29
|
||||
.byte 0x29, 0x28, 0x3a, 0x32, 0x26, 0x0b, 0x13, 0x22, 0x1f, 0x0f, 0x1c, 0x04, 0x2c, 0x20, 0x39, 0x1a, 0x1b, 0x1a, 0x2a, 0x1f, 0x24, 0x13, 0x1a, 0x31, 0x3b, 0x33, 0x39, 0x23, 0x28, 0x31, 0x07, 0x31
|
||||
.byte 0x1f, 0x10, 0x20, 0x29, 0x17, 0x32, 0x26, 0x3b, 0x2d, 0x02, 0x3c, 0x1c, 0x0e, 0x00, 0x20, 0x14, 0x3e, 0x37, 0x01, 0x0f, 0x2d, 0x06, 0x12, 0x27, 0x30, 0x13, 0x19, 0x00, 0x33, 0x2a, 0x0c, 0x07
|
||||
.byte 0x27, 0x11, 0x3a, 0x1c, 0x15, 0x0a, 0x13, 0x1f, 0x0d, 0x2a, 0x37, 0x07, 0x2a, 0x34, 0x35, 0x34, 0x28, 0x16, 0x27, 0x06, 0x02, 0x36, 0x09, 0x23, 0x30, 0x14, 0x02, 0x28, 0x39, 0x32, 0x34, 0x24
|
||||
.byte 0x35, 0x12, 0x12, 0x22, 0x26, 0x09, 0x07, 0x33, 0x0f, 0x3e, 0x1e, 0x00, 0x3c, 0x33, 0x10, 0x37, 0x14, 0x3a, 0x03, 0x25, 0x2d, 0x1e, 0x24, 0x36, 0x36, 0x26, 0x1f, 0x3c, 0x1a, 0x37, 0x33, 0x25
|
||||
.byte 0x23, 0x13, 0x1f, 0x33, 0x0d, 0x13, 0x25, 0x30, 0x1e, 0x17, 0x03, 0x18, 0x18, 0x18, 0x14, 0x30, 0x07, 0x22, 0x3e, 0x33, 0x21, 0x14, 0x37, 0x16, 0x16, 0x00, 0x12, 0x2c, 0x12, 0x2f, 0x25, 0x3f
|
||||
.byte 0x1e, 0x24, 0x19, 0x16, 0x16, 0x0f, 0x35, 0x2d, 0x10, 0x11, 0x24, 0x2a, 0x28, 0x19, 0x25, 0x2e, 0x0c, 0x16, 0x1f, 0x38, 0x21, 0x36, 0x3d, 0x1a, 0x2f, 0x3b, 0x32, 0x12, 0x36, 0x13, 0x29, 0x0e
|
||||
.byte 0x30, 0x31, 0x19, 0x07, 0x2f, 0x25, 0x23, 0x28, 0x20, 0x08, 0x29, 0x2a, 0x00, 0x30, 0x30, 0x38, 0x23, 0x1e, 0x0f, 0x1f, 0x3b, 0x1b, 0x30, 0x3a, 0x37, 0x2f, 0x39, 0x37, 0x35, 0x39, 0x2d, 0x2f
|
||||
.byte 0x1f, 0x2e, 0x1e, 0x1a, 0x2b, 0x1e, 0x14, 0x17, 0x20, 0x2f, 0x03, 0x11, 0x1d, 0x00, 0x30, 0x17, 0x2b, 0x1d, 0x35, 0x28, 0x25, 0x3b, 0x0f, 0x11, 0x09, 0x04, 0x2e, 0x23, 0x11, 0x1e, 0x13, 0x37
|
||||
.byte 0x1e, 0x37, 0x37, 0x1e, 0x07, 0x01, 0x32, 0x14, 0x06, 0x32, 0x11, 0x0c, 0x2e, 0x36, 0x2e, 0x24, 0x15, 0x2a, 0x1c, 0x22, 0x15, 0x34, 0x2c, 0x1e, 0x35, 0x22, 0x27, 0x33, 0x19, 0x3f, 0x2d, 0x21
|
||||
.byte 0x33, 0x15, 0x26, 0x1a, 0x11, 0x16, 0x3e, 0x12, 0x2b, 0x24, 0x15, 0x3c, 0x0f, 0x2d, 0x31, 0x15, 0x36, 0x3f, 0x24, 0x1d, 0x25, 0x01, 0x37, 0x33, 0x16, 0x1a, 0x1f, 0x0e, 0x10, 0x2f, 0x0b, 0x12
|
||||
.byte 0x2a, 0x1a, 0x25, 0x17, 0x0a, 0x35, 0x09, 0x28, 0x35, 0x02, 0x13, 0x36, 0x34, 0x2f, 0x17, 0x03, 0x04, 0x31, 0x3e, 0x26, 0x11, 0x35, 0x33, 0x31, 0x22, 0x17, 0x23, 0x1d, 0x05, 0x2b, 0x2e, 0x27
|
||||
.byte 0x20, 0x03, 0x2b, 0x1d, 0x01, 0x19, 0x1e, 0x0e, 0x05, 0x18, 0x16, 0x25, 0x17, 0x02, 0x28, 0x18, 0x19, 0x0b, 0x24, 0x3e, 0x35, 0x16, 0x2e, 0x29, 0x25, 0x3e, 0x38, 0x1e, 0x3a, 0x2f, 0x12, 0x14
|
||||
.byte 0x17, 0x2d, 0x11, 0x12, 0x30, 0x15, 0x31, 0x18, 0x08, 0x0b, 0x29, 0x2d, 0x00, 0x33, 0x2c, 0x06, 0x1a, 0x14, 0x1c, 0x2e, 0x04, 0x08, 0x12, 0x1b, 0x2b, 0x2d, 0x2a, 0x37, 0x33, 0x10, 0x27, 0x2c
|
||||
.byte 0x1d, 0x0e, 0x34, 0x20, 0x02, 0x12, 0x1e, 0x1a, 0x2e, 0x07, 0x0b, 0x10, 0x36, 0x1e, 0x33, 0x2b, 0x28, 0x1b, 0x31, 0x25, 0x1f, 0x38, 0x3a, 0x2f, 0x39, 0x30, 0x2f, 0x12, 0x09, 0x14, 0x0e, 0x08
|
||||
.byte 0x19, 0x00, 0x0d, 0x2c, 0x1b, 0x0e, 0x34, 0x11, 0x25, 0x15, 0x0c, 0x2d, 0x26, 0x36, 0x2c, 0x16, 0x31, 0x31, 0x2c, 0x03, 0x1a, 0x16, 0x1c, 0x32, 0x14, 0x0a, 0x3e, 0x36, 0x33, 0x1b, 0x27, 0x1f
|
||||
.byte 0x32, 0x18, 0x33, 0x26, 0x33, 0x1a, 0x13, 0x1a, 0x0f, 0x34, 0x1c, 0x35, 0x2c, 0x2f, 0x38, 0x03, 0x18, 0x15, 0x0f, 0x27, 0x31, 0x29, 0x20, 0x28, 0x0e, 0x28, 0x31, 0x2c, 0x2e, 0x15, 0x19, 0x1b
|
||||
.byte 0x10, 0x03, 0x2f, 0x2e, 0x2a, 0x32, 0x2a, 0x27, 0x1b, 0x36, 0x04, 0x1e, 0x3b, 0x04, 0x21, 0x07, 0x2f, 0x19, 0x27, 0x1d, 0x1d, 0x3c, 0x3d, 0x2e, 0x25, 0x08, 0x32, 0x3b, 0x34, 0x2a, 0x0c, 0x10
|
||||
.byte 0x13, 0x25, 0x35, 0x1a, 0x2f, 0x19, 0x28, 0x17, 0x00, 0x2b, 0x0a, 0x1c, 0x17, 0x0a, 0x11, 0x1b, 0x35, 0x13, 0x37, 0x29, 0x1c, 0x28, 0x0c, 0x31, 0x35, 0x3c, 0x10, 0x1a, 0x1b, 0x3a, 0x2d, 0x3a
|
||||
.byte 0x1c, 0x18, 0x22, 0x10, 0x2d, 0x1c, 0x3c, 0x12, 0x17, 0x18, 0x2a, 0x0b, 0x2b, 0x2f, 0x2d, 0x04, 0x2e, 0x3c, 0x13, 0x23, 0x01, 0x1c, 0x2e, 0x14, 0x16, 0x22, 0x0c, 0x24, 0x13, 0x35, 0x37, 0x34
|
||||
.byte 0x1b, 0x30, 0x1e, 0x3a, 0x1c, 0x20, 0x06, 0x06, 0x36, 0x09, 0x15, 0x1a, 0x1b, 0x1a, 0x27, 0x0f, 0x33, 0x35, 0x37, 0x06, 0x23, 0x3a, 0x12, 0x1d, 0x00, 0x16, 0x29, 0x0e, 0x1d, 0x35, 0x3f, 0x38
|
||||
.byte 0x16, 0x2a, 0x3c, 0x34, 0x13, 0x32, 0x10, 0x17, 0x2c, 0x37, 0x29, 0x2a, 0x1e, 0x35, 0x2f, 0x2d, 0x3c, 0x2a, 0x11, 0x28, 0x13, 0x21, 0x19, 0x1e, 0x34, 0x0c, 0x06, 0x2d, 0x09, 0x04, 0x1c, 0x1d
|
||||
.byte 0x2f, 0x26, 0x39, 0x07, 0x16, 0x14, 0x04, 0x2d, 0x3a, 0x2f, 0x2e, 0x29, 0x15, 0x35, 0x24, 0x02, 0x36, 0x3f, 0x02, 0x1a, 0x0f, 0x18, 0x24, 0x16, 0x1d, 0x19, 0x14, 0x16, 0x10, 0x29, 0x1b, 0x13
|
||||
.byte 0x15, 0x0e, 0x19, 0x3a, 0x2e, 0x2b, 0x08, 0x30, 0x15, 0x35, 0x16, 0x30, 0x2e, 0x18, 0x35, 0x3b, 0x0b, 0x1c, 0x3a, 0x18, 0x13, 0x29, 0x13, 0x1e, 0x20, 0x13, 0x27, 0x04, 0x1d, 0x34, 0x00, 0x38
|
||||
.byte 0x19, 0x08, 0x39, 0x32, 0x20, 0x10, 0x26, 0x08, 0x02, 0x28, 0x3f, 0x0f, 0x16, 0x30, 0x1f, 0x19, 0x20, 0x2d, 0x10, 0x38, 0x17, 0x1c, 0x18, 0x31, 0x27, 0x33, 0x38, 0x30, 0x16, 0x33, 0x23, 0x00
|
||||
.byte 0x01, 0x36, 0x0d, 0x02, 0x23, 0x39, 0x04, 0x1f, 0x0e, 0x30, 0x24, 0x06, 0x01, 0x2c, 0x34, 0x33, 0x35, 0x16, 0x34, 0x2e, 0x32, 0x16, 0x24, 0x26, 0x39, 0x34, 0x1f, 0x3c, 0x1d, 0x28, 0x1d, 0x37
|
||||
.byte 0x17, 0x15, 0x2b, 0x27, 0x39, 0x30, 0x0b, 0x1b, 0x18, 0x35, 0x20, 0x2d, 0x0b, 0x35, 0x1c, 0x03, 0x0e, 0x21, 0x06, 0x0c, 0x20, 0x02, 0x18, 0x34, 0x1e, 0x36, 0x2d, 0x16, 0x0c, 0x19, 0x25, 0x09
|
||||
.byte 0x2c, 0x37, 0x05, 0x2e, 0x2e, 0x2b, 0x2c, 0x24, 0x1a, 0x14, 0x27, 0x04, 0x10, 0x32, 0x38, 0x33, 0x37, 0x15, 0x35, 0x11, 0x3f, 0x1d, 0x23, 0x23, 0x1f, 0x29, 0x3f, 0x1d, 0x1a, 0x3c, 0x2b, 0x1b
|
||||
.byte 0x2c, 0x2c, 0x38, 0x3b, 0x36, 0x04, 0x13, 0x33, 0x2c, 0x14, 0x12, 0x1a, 0x09, 0x1b, 0x36, 0x11, 0x24, 0x3a, 0x3f, 0x11, 0x01, 0x0e, 0x2b, 0x3b, 0x03, 0x2a, 0x08, 0x0d, 0x2b, 0x2b, 0x13, 0x27
|
||||
.byte 0x3a, 0x3c, 0x1c, 0x3a, 0x15, 0x2a, 0x24, 0x00, 0x17, 0x3e, 0x0a, 0x15, 0x0c, 0x29, 0x2d, 0x1f, 0x15, 0x30, 0x35, 0x18, 0x19, 0x3d, 0x37, 0x37, 0x12, 0x38, 0x1b, 0x3b, 0x02, 0x20, 0x08, 0x21
|
||||
.byte 0x19, 0x2e, 0x36, 0x1d, 0x15, 0x3d, 0x24, 0x22, 0x0c, 0x27, 0x36, 0x3f, 0x33, 0x33, 0x12, 0x11, 0x1a, 0x19, 0x1f, 0x2b, 0x24, 0x12, 0x11, 0x2a, 0x18, 0x25, 0x32, 0x2a, 0x2c, 0x1a, 0x12, 0x26
|
||||
.byte 0x06, 0x10, 0x11, 0x29, 0x33, 0x2c, 0x09, 0x14, 0x2b, 0x12, 0x2b, 0x1d, 0x03, 0x24, 0x00, 0x12, 0x15, 0x22, 0x3d, 0x26, 0x15, 0x37, 0x1a, 0x0f, 0x12, 0x37, 0x24, 0x01, 0x18, 0x2a, 0x17, 0x13
|
||||
.byte 0x14, 0x3b, 0x29, 0x2a, 0x19, 0x32, 0x2d, 0x17, 0x17, 0x0b, 0x2c, 0x33, 0x07, 0x2d, 0x34, 0x07, 0x38, 0x1d, 0x1f, 0x36, 0x22, 0x11, 0x0a, 0x17, 0x14, 0x11, 0x13, 0x2a, 0x17, 0x25, 0x01, 0x3a
|
||||
.byte 0x1c, 0x26, 0x27, 0x30, 0x2d, 0x3b, 0x35, 0x3a, 0x30, 0x34, 0x06, 0x3a, 0x1c, 0x2d, 0x05, 0x13, 0x21, 0x32, 0x12, 0x3e, 0x1e, 0x2c, 0x3a, 0x3f, 0x2d, 0x20, 0x2a, 0x34, 0x26, 0x03, 0x1a, 0x19
|
||||
.byte 0x27, 0x2e, 0x31, 0x04, 0x26, 0x2a, 0x3f, 0x30, 0x25, 0x23, 0x2a, 0x08, 0x08, 0x35, 0x2c, 0x30, 0x1e, 0x08, 0x05, 0x18, 0x06, 0x09, 0x2d, 0x19, 0x00, 0x27, 0x0d, 0x10, 0x19, 0x1c, 0x00, 0x13
|
||||
.byte 0x3d, 0x0b, 0x24, 0x2e, 0x1f, 0x16, 0x3d, 0x18, 0x34, 0x12, 0x1e, 0x15, 0x15, 0x39, 0x25, 0x33, 0x0f, 0x17, 0x1a, 0x1c, 0x1b, 0x37, 0x29, 0x1b, 0x3b, 0x38, 0x12, 0x1d, 0x22, 0x34, 0x26, 0x0a
|
||||
.byte 0x31, 0x16, 0x2d, 0x13, 0x0d, 0x20, 0x27, 0x24, 0x1d, 0x16, 0x2e, 0x2b, 0x18, 0x16, 0x2a, 0x1b, 0x24, 0x17, 0x36, 0x02, 0x05, 0x2b, 0x37, 0x1a, 0x17, 0x11, 0x3d, 0x2c, 0x1e, 0x2f, 0x22, 0x2c
|
||||
.byte 0x29, 0x1a, 0x2f, 0x04, 0x25, 0x36, 0x0c, 0x35, 0x30, 0x3e, 0x12, 0x11, 0x30, 0x37, 0x12, 0x21, 0x2e, 0x21, 0x30, 0x17, 0x2c, 0x3d, 0x24, 0x11, 0x23, 0x14, 0x1a, 0x32, 0x17, 0x39, 0x27, 0x18
|
||||
.byte 0x0f, 0x24, 0x19, 0x00, 0x3d, 0x37, 0x2c, 0x3c, 0x1c, 0x0b, 0x39, 0x23, 0x0e, 0x04, 0x1f, 0x1c, 0x31, 0x14, 0x00, 0x04, 0x15, 0x26, 0x2a, 0x2a, 0x20, 0x25, 0x2a, 0x0b, 0x3c, 0x33, 0x11, 0x0b
|
||||
.byte 0x2e, 0x37, 0x22, 0x2e, 0x0e, 0x22, 0x26, 0x18, 0x2d, 0x27, 0x06, 0x0c, 0x1c, 0x26, 0x18, 0x2f, 0x3a, 0x01, 0x2a, 0x2f, 0x31, 0x34, 0x1f, 0x34, 0x1a, 0x31, 0x05, 0x10, 0x2e, 0x17, 0x34, 0x18
|
||||
.byte 0x22, 0x23, 0x23, 0x21, 0x32, 0x07, 0x08, 0x22, 0x26, 0x1c, 0x22, 0x31, 0x12, 0x2f, 0x08, 0x1f, 0x10, 0x27, 0x15, 0x2a, 0x1f, 0x0b, 0x26, 0x2f, 0x14, 0x35, 0x24, 0x1f, 0x26, 0x3b, 0x23, 0x33
|
||||
.byte 0x20, 0x3e, 0x2d, 0x17, 0x0c, 0x15, 0x13, 0x39, 0x1a, 0x30, 0x14, 0x25, 0x09, 0x07, 0x17, 0x38, 0x38, 0x1f, 0x29, 0x24, 0x27, 0x17, 0x27, 0x28, 0x1b, 0x12, 0x2a, 0x2b, 0x3d, 0x2d, 0x19, 0x34
|
||||
.byte 0x1c, 0x01, 0x1d, 0x10, 0x08, 0x39, 0x11, 0x0e, 0x36, 0x1b, 0x26, 0x13, 0x10, 0x16, 0x28, 0x1e, 0x3c, 0x28, 0x17, 0x3e, 0x39, 0x34, 0x0a, 0x03, 0x2e, 0x37, 0x1a, 0x13, 0x2b, 0x33, 0x26, 0x13
|
||||
.byte 0x2c, 0x21, 0x25, 0x14, 0x10, 0x16, 0x0b, 0x35, 0x1d, 0x35, 0x33, 0x21, 0x08, 0x33, 0x28, 0x21, 0x1a, 0x12, 0x0c, 0x1b, 0x36, 0x2a, 0x19, 0x2c, 0x2b, 0x23, 0x01, 0x0f, 0x26, 0x17, 0x0c, 0x18
|
||||
.byte 0x09, 0x0f, 0x11, 0x2b, 0x24, 0x1c, 0x09, 0x09, 0x15, 0x36, 0x08, 0x13, 0x20, 0x39, 0x21, 0x00, 0x3a, 0x1f, 0x2b, 0x36, 0x31, 0x02, 0x37, 0x13, 0x04, 0x34, 0x35, 0x37, 0x3d, 0x1a, 0x17, 0x3d
|
||||
.byte 0x13, 0x2b, 0x36, 0x2f, 0x13, 0x1e, 0x13, 0x3e, 0x11, 0x33, 0x27, 0x3a, 0x2d, 0x1e, 0x31, 0x1a, 0x03, 0x03, 0x2d, 0x25, 0x37, 0x1f, 0x11, 0x01, 0x22, 0x1c, 0x12, 0x17, 0x30, 0x3a, 0x30, 0x17
|
||||
.byte 0x1d, 0x29, 0x0e, 0x13, 0x27, 0x1a, 0x2e, 0x24, 0x2d, 0x00, 0x1c, 0x17, 0x28, 0x1d, 0x09, 0x1f, 0x2e, 0x1a, 0x2d, 0x26, 0x0a, 0x13, 0x32, 0x3e, 0x00, 0x27, 0x0b, 0x3b, 0x30, 0x08, 0x3a, 0x2d
|
||||
.byte 0x22, 0x12, 0x1e, 0x34, 0x1d, 0x2b, 0x26, 0x22, 0x35, 0x17, 0x2c, 0x17, 0x29, 0x13, 0x2d, 0x2d, 0x10, 0x10, 0x20, 0x31, 0x23, 0x1e, 0x33, 0x18, 0x33, 0x06, 0x2d, 0x26, 0x14, 0x27, 0x22, 0x1d
|
||||
.byte 0x2a, 0x2d, 0x06, 0x18, 0x07, 0x09, 0x2e, 0x21, 0x15, 0x2e, 0x21, 0x38, 0x23, 0x35, 0x0b, 0x34, 0x24, 0x0b, 0x22, 0x1e, 0x01, 0x17, 0x0b, 0x24, 0x11, 0x17, 0x07, 0x20, 0x14, 0x25, 0x32, 0x1a
|
||||
.byte 0x0e, 0x2f, 0x35, 0x17, 0x1f, 0x0c, 0x08, 0x21, 0x30, 0x35, 0x1f, 0x0c, 0x0b, 0x20, 0x04, 0x10, 0x11, 0x35, 0x11, 0x1e, 0x33, 0x3d, 0x16, 0x1e, 0x2b, 0x1d, 0x1a, 0x19, 0x10, 0x04, 0x06, 0x22
|
||||
.byte 0x03, 0x3d, 0x24, 0x2a, 0x0e, 0x35, 0x03, 0x3e, 0x17, 0x0b, 0x18, 0x36, 0x3d, 0x0d, 0x26, 0x35, 0x12, 0x20, 0x1f, 0x0d, 0x16, 0x23, 0x32, 0x1a, 0x00, 0x3d, 0x26, 0x30, 0x19, 0x36, 0x12, 0x0e
|
||||
.byte 0x23, 0x01, 0x23, 0x28, 0x3b, 0x31, 0x11, 0x2d, 0x1c, 0x36, 0x2a, 0x05, 0x16, 0x14, 0x0e, 0x30, 0x3a, 0x37, 0x19, 0x1f, 0x30, 0x25, 0x10, 0x26, 0x2f, 0x22, 0x11, 0x1f, 0x2e, 0x2b, 0x1e, 0x16
|
||||
.byte 0x16, 0x21, 0x32, 0x18, 0x35, 0x23, 0x32, 0x1a, 0x3d, 0x0d, 0x19, 0x39, 0x09, 0x23, 0x30, 0x2e, 0x24, 0x1e, 0x0f, 0x24, 0x09, 0x21, 0x31, 0x05, 0x03, 0x11, 0x05, 0x22, 0x2a, 0x03, 0x07, 0x37
|
||||
.byte 0x04, 0x08, 0x13, 0x05, 0x10, 0x34, 0x37, 0x14, 0x29, 0x0a, 0x24, 0x32, 0x34, 0x1e, 0x1b, 0x12, 0x17, 0x2e, 0x01, 0x02, 0x13, 0x0a, 0x0c, 0x11, 0x02, 0x14, 0x13, 0x0d, 0x25, 0x23, 0x00, 0x07
|
||||
.byte 0x1a, 0x1c, 0x28, 0x35, 0x08, 0x0e, 0x2c, 0x1b, 0x3c, 0x15, 0x1c, 0x19, 0x1d, 0x32, 0x13, 0x1a, 0x1c, 0x00, 0x37, 0x22, 0x1b, 0x35, 0x39, 0x3e, 0x14, 0x32, 0x06, 0x31, 0x17, 0x05, 0x2b, 0x01
|
||||
.byte 0x0f, 0x20, 0x1e, 0x0f, 0x34, 0x18, 0x03, 0x1f, 0x2b, 0x00, 0x14, 0x15, 0x3a, 0x30, 0x25, 0x30, 0x21, 0x0b, 0x00, 0x37, 0x24, 0x37, 0x1d, 0x29, 0x21, 0x16, 0x24, 0x0f, 0x2c, 0x3e, 0x15, 0x36
|
||||
.byte 0x3c, 0x2d, 0x23, 0x3d, 0x3c, 0x17, 0x1a, 0x1c, 0x13, 0x0a, 0x29, 0x22, 0x25, 0x3f, 0x26, 0x3b, 0x39, 0x2f, 0x1d, 0x08, 0x16, 0x0b, 0x19, 0x14, 0x12, 0x01, 0x2c, 0x35, 0x11, 0x2a, 0x02, 0x00
|
||||
.byte 0x13, 0x39, 0x2a, 0x35, 0x07, 0x1a, 0x11, 0x24, 0x0e, 0x1e, 0x0e, 0x2c, 0x15, 0x08, 0x31, 0x1b, 0x21, 0x1d, 0x26, 0x1d, 0x1c, 0x2a, 0x1d, 0x24, 0x13, 0x01, 0x00, 0x18, 0x28, 0x2a, 0x37, 0x15
|
||||
.byte 0x0f, 0x13, 0x10, 0x32, 0x36, 0x22, 0x13, 0x31, 0x13, 0x05, 0x1e, 0x17, 0x35, 0x35, 0x3b, 0x0e, 0x24, 0x35, 0x3a, 0x1d, 0x1b, 0x36, 0x1b, 0x03, 0x1d, 0x24, 0x0f, 0x16, 0x30, 0x2d, 0x09, 0x25
|
||||
.byte 0x05, 0x21, 0x13, 0x0a, 0x27, 0x36, 0x04, 0x0d, 0x1c, 0x06, 0x3e, 0x21, 0x2a, 0x27, 0x33, 0x28, 0x0e, 0x15, 0x0b, 0x17, 0x1d, 0x1d, 0x32, 0x2d, 0x08, 0x3d, 0x29, 0x21, 0x32, 0x17, 0x33, 0x31
|
||||
.byte 0x22, 0x0e, 0x03, 0x21, 0x0d, 0x0b, 0x16, 0x3e, 0x2a, 0x2e, 0x19, 0x36, 0x2a, 0x0d, 0x00, 0x14, 0x22, 0x07, 0x36, 0x0a, 0x09, 0x15, 0x14, 0x10, 0x22, 0x07, 0x16, 0x2c, 0x36, 0x13, 0x15, 0x09
|
||||
.byte 0x2f, 0x1b, 0x20, 0x3b, 0x2e, 0x3a, 0x3a, 0x16, 0x0d, 0x15, 0x2a, 0x39, 0x13, 0x2b, 0x0b, 0x01, 0x2a, 0x13, 0x17, 0x1e, 0x08, 0x17, 0x1e, 0x0c, 0x0f, 0x34, 0x1f, 0x31, 0x12, 0x07, 0x3a, 0x1d
|
||||
.byte 0x35, 0x1e, 0x12, 0x24, 0x2c, 0x15, 0x0e, 0x21, 0x19, 0x34, 0x3b, 0x33, 0x19, 0x0f, 0x28, 0x10, 0x2f, 0x2e, 0x23, 0x27, 0x31, 0x39, 0x2e, 0x18, 0x3c, 0x3f, 0x24, 0x07, 0x23, 0x30, 0x28, 0x13
|
||||
.byte 0x35, 0x13, 0x0a, 0x10, 0x35, 0x19, 0x33, 0x23, 0x28, 0x29, 0x13, 0x2f, 0x1a, 0x3a, 0x19, 0x14, 0x37, 0x36, 0x26, 0x20, 0x3b, 0x15, 0x37, 0x39, 0x10, 0x3c, 0x21, 0x34, 0x1c, 0x38, 0x30, 0x15
|
||||
.byte 0x07, 0x26, 0x27, 0x21, 0x19, 0x18, 0x11, 0x23, 0x30, 0x28, 0x37, 0x32, 0x2d, 0x1f, 0x2c, 0x3f, 0x30, 0x1d, 0x2f, 0x26, 0x01, 0x11, 0x1c, 0x3b, 0x0f, 0x12, 0x2a, 0x17, 0x27, 0x05, 0x00, 0x1b
|
||||
.byte 0x25, 0x1c, 0x32, 0x04, 0x22, 0x2d, 0x10, 0x0f, 0x25, 0x0d, 0x39, 0x30, 0x0b, 0x2e, 0x27, 0x2d, 0x34, 0x15, 0x3e, 0x30, 0x36, 0x16, 0x26, 0x2a, 0x05, 0x3f, 0x2b, 0x20, 0x3b, 0x2e, 0x3b, 0x1c
|
||||
.byte 0x2f, 0x01, 0x18, 0x16, 0x16, 0x3d, 0x10, 0x0a, 0x1f, 0x18, 0x17, 0x0f, 0x22, 0x06, 0x13, 0x11, 0x38, 0x21, 0x17, 0x17, 0x0a, 0x37, 0x1c, 0x19, 0x30, 0x16, 0x38, 0x31, 0x30, 0x10, 0x36, 0x31
|
||||
.byte 0x2f, 0x26, 0x3c, 0x1b, 0x23, 0x33, 0x2f, 0x19, 0x16, 0x35, 0x25, 0x3a, 0x18, 0x1f, 0x37, 0x01, 0x1e, 0x0d, 0x18, 0x12, 0x1f, 0x1c, 0x1b, 0x07, 0x34, 0x2d, 0x0b, 0x3f, 0x33, 0x1e, 0x34, 0x1d
|
||||
.byte 0x2c, 0x13, 0x2c, 0x20, 0x20, 0x13, 0x20, 0x0f, 0x31, 0x08, 0x0f, 0x24, 0x18, 0x3d, 0x1c, 0x36, 0x34, 0x27, 0x33, 0x2a, 0x25, 0x2d, 0x30, 0x26, 0x3d, 0x37, 0x26, 0x25, 0x11, 0x11, 0x03, 0x05
|
||||
.byte 0x18, 0x10, 0x04, 0x29, 0x07, 0x2e, 0x36, 0x2a, 0x29, 0x15, 0x3a, 0x0e, 0x33, 0x2a, 0x06, 0x29, 0x3d, 0x01, 0x29, 0x27, 0x0e, 0x16, 0x1d, 0x28, 0x1b, 0x10, 0x33, 0x2b, 0x0c, 0x14, 0x1d, 0x15
|
||||
.byte 0x3f, 0x25, 0x37, 0x23, 0x1e, 0x04, 0x2c, 0x1c, 0x15, 0x34, 0x2a, 0x09, 0x2f, 0x15, 0x02, 0x3f, 0x14, 0x19, 0x2c, 0x33, 0x39, 0x32, 0x20, 0x2a, 0x18, 0x32, 0x17, 0x23, 0x21, 0x0b, 0x2d, 0x25
|
||||
.byte 0x24, 0x3a, 0x2d, 0x31, 0x3f, 0x34, 0x18, 0x19, 0x24, 0x1e, 0x15, 0x1a, 0x17, 0x33, 0x2b, 0x23, 0x09, 0x26, 0x1b, 0x0d, 0x15, 0x36, 0x26, 0x28, 0x3a, 0x1c, 0x14, 0x0c, 0x3e, 0x10, 0x18, 0x06
|
||||
.byte 0x35, 0x37, 0x26, 0x36, 0x21, 0x26, 0x17, 0x3d, 0x1c, 0x2c, 0x16, 0x25, 0x1d, 0x1e, 0x0b, 0x1e, 0x1d, 0x0d, 0x32, 0x08, 0x1f, 0x1b, 0x12, 0x1c, 0x12, 0x20, 0x2a, 0x28, 0x06, 0x3b, 0x35, 0x39
|
||||
.byte 0x0e, 0x1e, 0x31, 0x30, 0x28, 0x02, 0x21, 0x14, 0x06, 0x1e, 0x29, 0x16, 0x09, 0x1c, 0x27, 0x32, 0x2d, 0x39, 0x03, 0x27, 0x29, 0x09, 0x1e, 0x1b, 0x11, 0x1c, 0x28, 0x3a, 0x2c, 0x03, 0x03, 0x18
|
||||
.byte 0x23, 0x09, 0x2f, 0x30, 0x17, 0x23, 0x0f, 0x25, 0x33, 0x06, 0x24, 0x37, 0x22, 0x09, 0x33, 0x2c, 0x09, 0x2a, 0x0c, 0x12, 0x2a, 0x28, 0x20, 0x10, 0x15, 0x29, 0x33, 0x0f, 0x1a, 0x13, 0x13, 0x18
|
||||
.byte 0x36, 0x2e, 0x16, 0x13, 0x3c, 0x1a, 0x15, 0x3a, 0x11, 0x32, 0x02, 0x0a, 0x2c, 0x19, 0x39, 0x11, 0x31, 0x3e, 0x1d, 0x32, 0x14, 0x32, 0x12, 0x2e, 0x34, 0x3e, 0x36, 0x23, 0x37, 0x3e, 0x15, 0x15
|
||||
.byte 0x35, 0x34, 0x01, 0x3a, 0x2c, 0x26, 0x25, 0x22, 0x01, 0x2b, 0x37, 0x1c, 0x3d, 0x33, 0x3e, 0x10, 0x1c, 0x26, 0x33, 0x19, 0x05, 0x19, 0x17, 0x12, 0x38, 0x1c, 0x15, 0x3c, 0x32, 0x3f, 0x0f, 0x37
|
||||
.byte 0x02, 0x39, 0x32, 0x13, 0x00, 0x1d, 0x1d, 0x2c, 0x10, 0x39, 0x13, 0x31, 0x0f, 0x37, 0x19, 0x09, 0x0d, 0x2a, 0x20, 0x2f, 0x32, 0x3b, 0x34, 0x22, 0x26, 0x14, 0x10, 0x24, 0x3d, 0x22, 0x0b, 0x31
|
||||
.byte 0x23, 0x2f, 0x2d, 0x2a, 0x30, 0x04, 0x35, 0x19, 0x20, 0x2a, 0x16, 0x36, 0x37, 0x14, 0x28, 0x37, 0x11, 0x0b, 0x27, 0x1d, 0x06, 0x29, 0x35, 0x16, 0x2e, 0x24, 0x2e, 0x29, 0x36, 0x14, 0x2a, 0x21
|
||||
.byte 0x0c, 0x1f, 0x3f, 0x39, 0x19, 0x27, 0x10, 0x2a, 0x1e, 0x12, 0x34, 0x10, 0x24, 0x34, 0x1d, 0x13, 0x1d, 0x17, 0x16, 0x37, 0x27, 0x1b, 0x27, 0x07, 0x24, 0x21, 0x37, 0x21, 0x11, 0x37, 0x28, 0x24
|
||||
.byte 0x19, 0x02, 0x1c, 0x14, 0x12, 0x1d, 0x1b, 0x24, 0x2e, 0x2e, 0x3a, 0x15, 0x37, 0x34, 0x21, 0x33, 0x2d, 0x29, 0x2f, 0x1e, 0x34, 0x29, 0x3c, 0x12, 0x05, 0x15, 0x20, 0x05, 0x3e, 0x19, 0x18, 0x0b
|
||||
.byte 0x30, 0x2f, 0x02, 0x27, 0x14, 0x1c, 0x34, 0x12, 0x20, 0x30, 0x2b, 0x22, 0x1b, 0x06, 0x31, 0x28, 0x15, 0x2d, 0x12, 0x01, 0x0e, 0x13, 0x13, 0x0c, 0x28, 0x07, 0x2a, 0x14, 0x1d, 0x36, 0x14, 0x15
|
||||
.byte 0x2b, 0x26, 0x03, 0x25, 0x15, 0x3e, 0x3b, 0x20, 0x35, 0x0c, 0x25, 0x2b, 0x16, 0x35, 0x1e, 0x31, 0x2c, 0x06, 0x03, 0x29, 0x24, 0x07, 0x1f, 0x32, 0x2f, 0x19, 0x25, 0x21, 0x31, 0x22, 0x26, 0x1d
|
||||
.byte 0x00, 0x1b, 0x18, 0x2a, 0x24, 0x31, 0x20, 0x06, 0x2f, 0x1e, 0x32, 0x26, 0x32, 0x39, 0x12, 0x20, 0x01, 0x19, 0x0f, 0x15, 0x15, 0x27, 0x10, 0x2e, 0x09, 0x25, 0x19, 0x29, 0x37, 0x30, 0x13, 0x1c
|
||||
.byte 0x1d, 0x29, 0x2d, 0x26, 0x02, 0x1a, 0x16, 0x1d, 0x2b, 0x1c, 0x18, 0x04, 0x34, 0x28, 0x2a, 0x21, 0x15, 0x1b, 0x2e, 0x16, 0x01, 0x10, 0x05, 0x09, 0x14, 0x22, 0x03, 0x22, 0x02, 0x1b, 0x34, 0x29
|
||||
.byte 0x2a, 0x23, 0x26, 0x36, 0x13, 0x23, 0x3d, 0x1a, 0x1d, 0x10, 0x24, 0x25, 0x2b, 0x37, 0x19, 0x24, 0x26, 0x28, 0x13, 0x16, 0x17, 0x14, 0x19, 0x0b, 0x2f, 0x25, 0x37, 0x34, 0x37, 0x39, 0x21, 0x1b
|
||||
.byte 0x0f, 0x3d, 0x2d, 0x0d, 0x10, 0x20, 0x05, 0x0b, 0x2d, 0x01, 0x12, 0x24, 0x18, 0x3d, 0x32, 0x09, 0x21, 0x26, 0x1a, 0x0e, 0x1f, 0x30, 0x06, 0x1f, 0x0b, 0x3c, 0x29, 0x07, 0x3e, 0x27, 0x13, 0x1e
|
||||
.byte 0x1a, 0x13, 0x07, 0x23, 0x10, 0x34, 0x1e, 0x32, 0x17, 0x23, 0x35, 0x16, 0x31, 0x32, 0x2e, 0x1b, 0x28, 0x0e, 0x22, 0x14, 0x3a, 0x23, 0x22, 0x03, 0x29, 0x2a, 0x10, 0x20, 0x3e, 0x3c, 0x27, 0x16
|
||||
.byte 0x20, 0x12, 0x3f, 0x24, 0x31, 0x0d, 0x2e, 0x32, 0x2f, 0x17, 0x2d, 0x36, 0x3b, 0x17, 0x24, 0x23, 0x18, 0x37, 0x1d, 0x13, 0x17, 0x3a, 0x1a, 0x0a, 0x3d, 0x1e, 0x05, 0x12, 0x16, 0x33, 0x32, 0x25
|
||||
.byte 0x1d, 0x1f, 0x29, 0x34, 0x2c, 0x26, 0x20, 0x29, 0x35, 0x0e, 0x32, 0x17, 0x01, 0x39, 0x2d, 0x27, 0x24, 0x23, 0x28, 0x3f, 0x18, 0x39, 0x38, 0x25, 0x23, 0x11, 0x11, 0x19, 0x2c, 0x29, 0x30, 0x08
|
||||
.byte 0x28, 0x25, 0x27, 0x1d, 0x17, 0x25, 0x21, 0x09, 0x3d, 0x16, 0x1b, 0x0f, 0x2c, 0x1b, 0x12, 0x22, 0x28, 0x3e, 0x26, 0x34, 0x10, 0x1b, 0x02, 0x34, 0x15, 0x1a, 0x29, 0x19, 0x29, 0x11, 0x31, 0x12
|
||||
.byte 0x27, 0x17, 0x27, 0x27, 0x2f, 0x34, 0x27, 0x24, 0x03, 0x19, 0x36, 0x17, 0x1d, 0x33, 0x19, 0x25, 0x1a, 0x2b, 0x39, 0x13, 0x3b, 0x33, 0x1d, 0x27, 0x31, 0x34, 0x28, 0x33, 0x37, 0x09, 0x30, 0x1b
|
||||
.byte 0x03, 0x3a, 0x27, 0x19, 0x11, 0x1f, 0x0b, 0x1a, 0x34, 0x3d, 0x2a, 0x15, 0x04, 0x24, 0x36, 0x30, 0x23, 0x30, 0x0f, 0x22, 0x1b, 0x3d, 0x3d, 0x24, 0x29, 0x1d, 0x12, 0x16, 0x19, 0x2e, 0x03, 0x12
|
||||
.byte 0x17, 0x18, 0x25, 0x33, 0x2f, 0x23, 0x1a, 0x1a, 0x35, 0x27, 0x21, 0x26, 0x19, 0x1b, 0x30, 0x18, 0x2b, 0x22, 0x2d, 0x2c, 0x1a, 0x34, 0x3e, 0x12, 0x19, 0x28, 0x27, 0x15, 0x1b, 0x11, 0x12, 0x17
|
||||
.byte 0x15, 0x10, 0x34, 0x37, 0x25, 0x12, 0x3f, 0x15, 0x31, 0x0d, 0x37, 0x3e, 0x2a, 0x2d, 0x0f, 0x24, 0x24, 0x3c, 0x3f, 0x1f, 0x1d, 0x34, 0x17, 0x1a, 0x23, 0x1f, 0x37, 0x0f, 0x10, 0x32, 0x34, 0x35
|
||||
.byte 0x19, 0x05, 0x22, 0x33, 0x16, 0x34, 0x1e, 0x14, 0x1e, 0x08, 0x13, 0x29, 0x3a, 0x37, 0x30, 0x1d, 0x36, 0x15, 0x29, 0x2e, 0x1d, 0x32, 0x2e, 0x23, 0x35, 0x17, 0x1c, 0x36, 0x1d, 0x13, 0x23, 0x34
|
||||
.byte 0x34, 0x24, 0x1a, 0x37, 0x2f, 0x26, 0x2e, 0x1e, 0x17, 0x1a, 0x1f, 0x15, 0x1f, 0x2b, 0x1f, 0x19, 0x0a, 0x33, 0x1a, 0x35, 0x31, 0x24, 0x2d, 0x17, 0x2c, 0x0c, 0x21, 0x36, 0x2c, 0x35, 0x35, 0x1b
|
||||
.byte 0x03, 0x27, 0x01, 0x0d, 0x1d, 0x1c, 0x0e, 0x11, 0x11, 0x2b, 0x10, 0x25, 0x3b, 0x20, 0x1f, 0x17, 0x19, 0x20, 0x08, 0x36, 0x13, 0x38, 0x19, 0x1b, 0x2b, 0x24, 0x0b, 0x1f, 0x29, 0x27, 0x15, 0x2c
|
||||
.byte 0x37, 0x39, 0x10, 0x3a, 0x15, 0x2e, 0x2f, 0x11, 0x36, 0x24, 0x04, 0x20, 0x3b, 0x2a, 0x35, 0x27, 0x35, 0x34, 0x0d, 0x1b, 0x20, 0x10, 0x22, 0x37, 0x1f, 0x38, 0x27, 0x31, 0x0f, 0x28, 0x28, 0x25
|
||||
.byte 0x15, 0x00, 0x1d, 0x25, 0x31, 0x28, 0x28, 0x0b, 0x3a, 0x1d, 0x2d, 0x13, 0x1b, 0x03, 0x37, 0x2e, 0x1d, 0x28, 0x19, 0x08, 0x2d, 0x22, 0x27, 0x39, 0x32, 0x3f, 0x2f, 0x1d, 0x33, 0x34, 0x28, 0x18
|
||||
.byte 0x08, 0x31, 0x23, 0x1f, 0x13, 0x0d, 0x2c, 0x23, 0x3a, 0x2d, 0x1a, 0x02, 0x25, 0x13, 0x20, 0x36, 0x34, 0x12, 0x2b, 0x2d, 0x35, 0x35, 0x34, 0x23, 0x20, 0x21, 0x3a, 0x19, 0x1b, 0x1f, 0x2b, 0x19
|
||||
.byte 0x35, 0x0e, 0x19, 0x26, 0x24, 0x37, 0x18, 0x08, 0x10, 0x0c, 0x16, 0x2d, 0x1f, 0x34, 0x21, 0x05, 0x38, 0x19, 0x14, 0x21, 0x24, 0x11, 0x31, 0x14, 0x3e, 0x38, 0x29, 0x3f, 0x08, 0x25, 0x2a, 0x1f
|
||||
.byte 0x25, 0x25, 0x06, 0x28, 0x0b, 0x1e, 0x14, 0x1a, 0x38, 0x22, 0x24, 0x18, 0x29, 0x1a, 0x11, 0x20, 0x3b, 0x3a, 0x1e, 0x1c, 0x26, 0x1a, 0x05, 0x32, 0x19, 0x39, 0x2a, 0x31, 0x09, 0x07, 0x25, 0x05
|
||||
.byte 0x3e, 0x16, 0x34, 0x26, 0x14, 0x1b, 0x32, 0x26, 0x05, 0x08, 0x37, 0x0f, 0x03, 0x20, 0x2a, 0x39, 0x31, 0x08, 0x01, 0x1e, 0x1d, 0x23, 0x31, 0x28, 0x1b, 0x28, 0x1e, 0x37, 0x14, 0x13, 0x0e, 0x28
|
||||
.byte 0x2a, 0x3b, 0x37, 0x2f, 0x1c, 0x28, 0x30, 0x30, 0x1a, 0x36, 0x1f, 0x16, 0x3e, 0x0d, 0x15, 0x2e, 0x16, 0x18, 0x15, 0x37, 0x20, 0x2a, 0x33, 0x30, 0x2b, 0x0e, 0x25, 0x18, 0x20, 0x16, 0x02, 0x19
|
||||
.byte 0x25, 0x0a, 0x2e, 0x30, 0x16, 0x03, 0x11, 0x04, 0x27, 0x25, 0x1b, 0x1c, 0x21, 0x29, 0x04, 0x27, 0x3d, 0x20, 0x1e, 0x28, 0x33, 0x31, 0x1e, 0x39, 0x10, 0x31, 0x29, 0x1e, 0x06, 0x25, 0x28, 0x19
|
||||
.byte 0x3b, 0x12, 0x0b, 0x1b, 0x1c, 0x3e, 0x37, 0x20, 0x0a, 0x37, 0x33, 0x02, 0x2c, 0x25, 0x15, 0x18, 0x14, 0x3b, 0x20, 0x1c, 0x22, 0x3b, 0x1c, 0x24, 0x34, 0x35, 0x0f, 0x2f, 0x31, 0x3b, 0x17, 0x35
|
||||
.byte 0x30, 0x39, 0x37, 0x0d, 0x15, 0x11, 0x10, 0x03, 0x1e, 0x1a, 0x39, 0x33, 0x2f, 0x2e, 0x28, 0x1c, 0x28, 0x36, 0x28, 0x18, 0x1f, 0x15, 0x01, 0x30, 0x3e, 0x32, 0x28, 0x34, 0x2f, 0x23, 0x07, 0x0c
|
||||
.byte 0x36, 0x28, 0x2c, 0x34, 0x2a, 0x0c, 0x1f, 0x3f, 0x20, 0x13, 0x2b, 0x17, 0x27, 0x28, 0x29, 0x2a, 0x3c, 0x13, 0x36, 0x26, 0x2d, 0x2a, 0x0a, 0x06, 0x1e, 0x20, 0x04, 0x1a, 0x02, 0x07, 0x35, 0x0e
|
||||
.byte 0x18, 0x30, 0x00, 0x34, 0x34, 0x2f, 0x14, 0x37, 0x21, 0x30, 0x1f, 0x15, 0x37, 0x1b, 0x3a, 0x0b, 0x32, 0x22, 0x22, 0x21, 0x1b, 0x35, 0x23, 0x0d, 0x03, 0x1c, 0x23, 0x3b, 0x13, 0x0e, 0x1d, 0x1f
|
||||
.byte 0x1d, 0x3f, 0x2e, 0x39, 0x27, 0x2e, 0x0f, 0x38, 0x20, 0x31, 0x3c, 0x35, 0x0b, 0x0f, 0x2e, 0x06, 0x06, 0x28, 0x25, 0x39, 0x23, 0x0a, 0x32, 0x15, 0x0f, 0x1d, 0x25, 0x0c, 0x0d, 0x34, 0x12, 0x2e
|
||||
.byte 0x21, 0x36, 0x18, 0x1f, 0x1f, 0x34, 0x1b, 0x05, 0x3a, 0x36, 0x2b, 0x01, 0x17, 0x0e, 0x16, 0x2b, 0x0e, 0x0b, 0x26, 0x0d, 0x2d, 0x10, 0x21, 0x11, 0x27, 0x3d, 0x13, 0x32, 0x15, 0x25, 0x2a, 0x1b
|
||||
.byte 0x2d, 0x35, 0x2c, 0x2b, 0x26, 0x26, 0x1f, 0x20, 0x22, 0x2b, 0x12, 0x3f, 0x3d, 0x27, 0x30, 0x0a, 0x36, 0x35, 0x1f, 0x17, 0x21, 0x08, 0x29, 0x1d, 0x20, 0x33, 0x34, 0x11, 0x16, 0x05, 0x38, 0x2d
|
||||
|
@ -16,7 +16,9 @@ TrainerHill_OnWarp: @ 82C8372
|
||||
|
||||
TrainerHill_1F_EventScript_DummyOnWarp:: @ 82C837C
|
||||
setvar VAR_TEMP_3, 1
|
||||
@ forced stop
|
||||
.ifdef BUGFIX
|
||||
end @ Missing end. By chance, the next byte (0x02 of VAR_TEMP_2) is also the id for the end cmd
|
||||
.endif
|
||||
|
||||
TrainerHill_OnFrame: @ 82C8381
|
||||
map_script_2 VAR_TEMP_2, 0, TrainerHill_1F_EventScript_DummyWarpToEntranceCounter
|
||||
|
@ -1329,12 +1329,7 @@ void ApplyAffineAnimFrameRelativeAndUpdateMatrix(u8 matrixNum, struct AffineAnim
|
||||
s16 ConvertScaleParam(s16 scale)
|
||||
{
|
||||
s32 val = 0x10000;
|
||||
// UB: possible division by zero
|
||||
#ifdef UBFIX
|
||||
if (scale == 0)
|
||||
return 0;
|
||||
#endif //UBFIX
|
||||
return val / scale;
|
||||
return SAFE_DIV(val, scale);
|
||||
}
|
||||
|
||||
void GetAffineAnimFrame(u8 matrixNum, struct Sprite *sprite, struct AffineAnimFrameCmd *frameCmd)
|
||||
|
235
gflib/text.c
@ -21,8 +21,8 @@ static u16 gLastTextFgColor;
|
||||
static u16 gLastTextShadowColor;
|
||||
|
||||
const struct FontInfo *gFonts;
|
||||
u8 gUnknown_03002F84;
|
||||
struct Struct_03002F90 gUnknown_03002F90;
|
||||
u8 gDisableTextPrinters;
|
||||
struct TextGlyph gCurGlyph;
|
||||
TextFlags gTextFlags;
|
||||
|
||||
const u8 gFontHalfRowOffsets[] =
|
||||
@ -204,7 +204,7 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi
|
||||
CopyWindowToVram(gTempTextPrinter.printerTemplate.windowId, 2);
|
||||
gTextPrinters[printerTemplate->windowId].active = 0;
|
||||
}
|
||||
gUnknown_03002F84 = 0;
|
||||
gDisableTextPrinters = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ void RunTextPrinters(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (gUnknown_03002F84 == 0)
|
||||
if (gDisableTextPrinters == 0)
|
||||
{
|
||||
for (i = 0; i < NUM_TEXT_PRINTERS; ++i)
|
||||
{
|
||||
@ -461,9 +461,9 @@ u8 GetLastTextColor(u8 colorType)
|
||||
}
|
||||
}
|
||||
|
||||
inline static void GLYPH_COPY(u8 *windowTiles, u32 widthOffset, u32 j, u32 i, u32 *ptr, s32 width, s32 height)
|
||||
inline static void GLYPH_COPY(u8 *windowTiles, u32 widthOffset, u32 j, u32 i, u32 *glyphPixels, s32 width, s32 height)
|
||||
{
|
||||
u32 xAdd, yAdd, r5, bits, toOrr, dummyX;
|
||||
u32 xAdd, yAdd, pixelData, bits, toOrr, dummyX;
|
||||
u8 *dst;
|
||||
|
||||
xAdd = j + width;
|
||||
@ -471,69 +471,69 @@ inline static void GLYPH_COPY(u8 *windowTiles, u32 widthOffset, u32 j, u32 i, u3
|
||||
dummyX = j;
|
||||
for (; i < yAdd; i++)
|
||||
{
|
||||
r5 = *ptr++;
|
||||
pixelData = *glyphPixels++;
|
||||
for (j = dummyX; j < xAdd; j++)
|
||||
{
|
||||
if ((toOrr = r5 & 0xF))
|
||||
if ((toOrr = pixelData & 0xF))
|
||||
{
|
||||
dst = windowTiles + ((j / 8) * 32) + ((j % 8) / 2) + ((i / 8) * widthOffset) + ((i % 8) * 4);
|
||||
bits = ((j & 1) * 4);
|
||||
*dst = (toOrr << bits) | (*dst & (0xF0 >> bits));
|
||||
}
|
||||
r5 >>= 4;
|
||||
pixelData >>= 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CopyGlyphToWindow(struct TextPrinter *textPrinter)
|
||||
{
|
||||
struct Window *win;
|
||||
struct WindowTemplate *winTempl;
|
||||
u32 *unkStruct;
|
||||
struct Window *window;
|
||||
struct WindowTemplate *template;
|
||||
u32 *glyphPixels;
|
||||
u32 currX, currY, widthOffset;
|
||||
s32 r4, r0;
|
||||
s32 glyphWidth, glyphHeight;
|
||||
u8 *windowTiles;
|
||||
|
||||
win = &gWindows[textPrinter->printerTemplate.windowId];
|
||||
winTempl = &win->window;
|
||||
window = &gWindows[textPrinter->printerTemplate.windowId];
|
||||
template = &window->window;
|
||||
|
||||
if ((r4 = (winTempl->width * 8) - textPrinter->printerTemplate.currentX) > gUnknown_03002F90.width)
|
||||
r4 = gUnknown_03002F90.width;
|
||||
if ((glyphWidth = (template->width * 8) - textPrinter->printerTemplate.currentX) > gCurGlyph.width)
|
||||
glyphWidth = gCurGlyph.width;
|
||||
|
||||
if ((r0 = (winTempl->height * 8) - textPrinter->printerTemplate.currentY) > gUnknown_03002F90.height)
|
||||
r0 = gUnknown_03002F90.height;
|
||||
if ((glyphHeight = (template->height * 8) - textPrinter->printerTemplate.currentY) > gCurGlyph.height)
|
||||
glyphHeight = gCurGlyph.height;
|
||||
|
||||
currX = textPrinter->printerTemplate.currentX;
|
||||
currY = textPrinter->printerTemplate.currentY;
|
||||
unkStruct = (u32 *)&gUnknown_03002F90.unk0;
|
||||
windowTiles = win->tileData;
|
||||
widthOffset = winTempl->width * 32;
|
||||
glyphPixels = gCurGlyph.gfxBufferTop;
|
||||
windowTiles = window->tileData;
|
||||
widthOffset = template->width * 32;
|
||||
|
||||
if (r4 < 9)
|
||||
if (glyphWidth < 9)
|
||||
{
|
||||
if (r0 < 9)
|
||||
if (glyphHeight < 9)
|
||||
{
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY, unkStruct, r4, r0);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY, glyphPixels, glyphWidth, glyphHeight);
|
||||
}
|
||||
else
|
||||
{
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY, unkStruct, r4, 8);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY + 8, unkStruct + 16, r4, r0 - 8);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY, glyphPixels, glyphWidth, 8);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY + 8, glyphPixels + 16, glyphWidth, glyphHeight - 8);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (r0 < 9)
|
||||
if (glyphHeight < 9)
|
||||
{
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY, unkStruct, 8, r0);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX + 8, currY, unkStruct + 8, r4 - 8, r0);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY, glyphPixels, 8, glyphHeight);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX + 8, currY, glyphPixels + 8, glyphWidth - 8, glyphHeight);
|
||||
}
|
||||
else
|
||||
{
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY, unkStruct, 8, 8);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX + 8, currY, unkStruct + 8, r4 - 8, 8);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY + 8, unkStruct + 16, 8, r0 - 8);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX + 8, currY + 8, unkStruct + 24, r4 - 8, r0 - 8);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY, glyphPixels, 8, 8);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX + 8, currY, glyphPixels + 8, glyphWidth - 8, 8);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX, currY + 8, glyphPixels + 16, 8, glyphHeight - 8);
|
||||
GLYPH_COPY(windowTiles, widthOffset, currX + 8, currY + 8, glyphPixels + 24, glyphWidth - 8, glyphHeight - 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -542,7 +542,7 @@ void ClearTextSpan(struct TextPrinter *textPrinter, u32 width)
|
||||
{
|
||||
struct Window *window;
|
||||
struct Bitmap pixels_data;
|
||||
struct Struct_03002F90 *gUnk;
|
||||
struct TextGlyph *glyph;
|
||||
u8* glyphHeight;
|
||||
|
||||
if (gLastTextBgColor != 0)
|
||||
@ -552,8 +552,8 @@ void ClearTextSpan(struct TextPrinter *textPrinter, u32 width)
|
||||
pixels_data.width = window->window.width << 3;
|
||||
pixels_data.height = window->window.height << 3;
|
||||
|
||||
gUnk = &gUnknown_03002F90;
|
||||
glyphHeight = &gUnk->height;
|
||||
glyph = &gCurGlyph;
|
||||
glyphHeight = &glyph->height;
|
||||
|
||||
FillBitmapRect4Bit(
|
||||
&pixels_data,
|
||||
@ -1015,8 +1015,8 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
||||
break;
|
||||
case CHAR_KEYPAD_ICON:
|
||||
currChar = *textPrinter->printerTemplate.currentChar++;
|
||||
gUnknown_03002F90.width = DrawKeypadIcon(textPrinter->printerTemplate.windowId, currChar, textPrinter->printerTemplate.currentX, textPrinter->printerTemplate.currentY);
|
||||
textPrinter->printerTemplate.currentX += gUnknown_03002F90.width + textPrinter->printerTemplate.letterSpacing;
|
||||
gCurGlyph.width = DrawKeypadIcon(textPrinter->printerTemplate.windowId, currChar, textPrinter->printerTemplate.currentX, textPrinter->printerTemplate.currentY);
|
||||
textPrinter->printerTemplate.currentX += gCurGlyph.width + textPrinter->printerTemplate.letterSpacing;
|
||||
return 0;
|
||||
case EOS:
|
||||
return 1;
|
||||
@ -1050,8 +1050,8 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
||||
|
||||
if (textPrinter->minLetterSpacing)
|
||||
{
|
||||
textPrinter->printerTemplate.currentX += gUnknown_03002F90.width;
|
||||
width = textPrinter->minLetterSpacing - gUnknown_03002F90.width;
|
||||
textPrinter->printerTemplate.currentX += gCurGlyph.width;
|
||||
width = textPrinter->minLetterSpacing - gCurGlyph.width;
|
||||
if (width > 0)
|
||||
{
|
||||
ClearTextSpan(textPrinter, width);
|
||||
@ -1061,9 +1061,9 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
||||
else
|
||||
{
|
||||
if (textPrinter->japanese)
|
||||
textPrinter->printerTemplate.currentX += (gUnknown_03002F90.width + textPrinter->printerTemplate.letterSpacing);
|
||||
textPrinter->printerTemplate.currentX += (gCurGlyph.width + textPrinter->printerTemplate.letterSpacing);
|
||||
else
|
||||
textPrinter->printerTemplate.currentX += gUnknown_03002F90.width;
|
||||
textPrinter->printerTemplate.currentX += gCurGlyph.width;
|
||||
}
|
||||
return 0;
|
||||
case 1:
|
||||
@ -1398,8 +1398,7 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
||||
|
||||
if (lineWidth > width)
|
||||
return lineWidth;
|
||||
else
|
||||
return width;
|
||||
return width;
|
||||
}
|
||||
|
||||
u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str)
|
||||
@ -1499,8 +1498,8 @@ u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str)
|
||||
DecompressGlyphFont1(temp, 1);
|
||||
break;
|
||||
}
|
||||
CpuCopy32(gUnknown_03002F90.unk0, pixels, 0x20);
|
||||
CpuCopy32(gUnknown_03002F90.unk40, pixels + 0x20, 0x20);
|
||||
CpuCopy32(gCurGlyph.gfxBufferTop, pixels, 0x20);
|
||||
CpuCopy32(gCurGlyph.gfxBufferBottom, pixels + 0x20, 0x20);
|
||||
pixels += 0x40;
|
||||
break;
|
||||
}
|
||||
@ -1592,30 +1591,30 @@ void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese)
|
||||
if (isJapanese == 1)
|
||||
{
|
||||
glyphs = gFont0JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & 0xF));
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
|
||||
gUnknown_03002F90.width = 8; // gGlyphWidth
|
||||
gUnknown_03002F90.height = 12; // gGlyphHeight
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom);
|
||||
gCurGlyph.width = 8;
|
||||
gCurGlyph.height = 12;
|
||||
}
|
||||
else
|
||||
{
|
||||
glyphs = gFont0LatinGlyphs + (0x20 * glyphId);
|
||||
gUnknown_03002F90.width = gFont0LatinGlyphWidths[glyphId];
|
||||
gCurGlyph.width = gFont0LatinGlyphWidths[glyphId];
|
||||
|
||||
if (gUnknown_03002F90.width <= 8)
|
||||
if (gCurGlyph.width <= 8)
|
||||
{
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x10, gCurGlyph.gfxBufferBottom);
|
||||
}
|
||||
else
|
||||
{
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x8, gUnknown_03002F90.unk20);
|
||||
DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
|
||||
DecompressGlyphTile(glyphs + 0x18, gUnknown_03002F90.unk60);
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x8, gCurGlyph.gfxBufferTop + 8);
|
||||
DecompressGlyphTile(glyphs + 0x10, gCurGlyph.gfxBufferBottom);
|
||||
DecompressGlyphTile(glyphs + 0x18, gCurGlyph.gfxBufferBottom + 8);
|
||||
}
|
||||
|
||||
gUnknown_03002F90.height = 13;
|
||||
gCurGlyph.height = 13;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1635,30 +1634,30 @@ void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
int eff;
|
||||
glyphs = gFont1JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & (eff = 0xF))); // shh, no questions, only matching now
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
|
||||
gUnknown_03002F90.width = 8; // gGlyphWidth
|
||||
gUnknown_03002F90.height = 15; // gGlyphHeight
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom);
|
||||
gCurGlyph.width = 8;
|
||||
gCurGlyph.height = 15;
|
||||
}
|
||||
else
|
||||
{
|
||||
glyphs = gFont7LatinGlyphs + (0x20 * glyphId);
|
||||
gUnknown_03002F90.width = gFont7LatinGlyphWidths[glyphId];
|
||||
gCurGlyph.width = gFont7LatinGlyphWidths[glyphId];
|
||||
|
||||
if (gUnknown_03002F90.width <= 8)
|
||||
if (gCurGlyph.width <= 8)
|
||||
{
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x10, gCurGlyph.gfxBufferBottom);
|
||||
}
|
||||
else
|
||||
{
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x8, gUnknown_03002F90.unk20);
|
||||
DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
|
||||
DecompressGlyphTile(glyphs + 0x18, gUnknown_03002F90.unk60);
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x8, gCurGlyph.gfxBufferTop + 8);
|
||||
DecompressGlyphTile(glyphs + 0x10, gCurGlyph.gfxBufferBottom);
|
||||
DecompressGlyphTile(glyphs + 0x18, gCurGlyph.gfxBufferBottom + 8);
|
||||
}
|
||||
|
||||
gUnknown_03002F90.height = 15;
|
||||
gCurGlyph.height = 15;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1677,30 +1676,30 @@ void DecompressGlyphFont8(u16 glyphId, bool32 isJapanese)
|
||||
if (isJapanese == TRUE)
|
||||
{
|
||||
glyphs = gFont0JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & 0xF));
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
|
||||
gUnknown_03002F90.width = 8; // gGlyphWidth
|
||||
gUnknown_03002F90.height = 12; // gGlyphHeight
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom);
|
||||
gCurGlyph.width = 8;
|
||||
gCurGlyph.height = 12;
|
||||
}
|
||||
else
|
||||
{
|
||||
glyphs = gFont8LatinGlyphs + (0x20 * glyphId);
|
||||
gUnknown_03002F90.width = gFont8LatinGlyphWidths[glyphId];
|
||||
gCurGlyph.width = gFont8LatinGlyphWidths[glyphId];
|
||||
|
||||
if (gUnknown_03002F90.width <= 8)
|
||||
if (gCurGlyph.width <= 8)
|
||||
{
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x10, gCurGlyph.gfxBufferBottom);
|
||||
}
|
||||
else
|
||||
{
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x8, gUnknown_03002F90.unk20);
|
||||
DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
|
||||
DecompressGlyphTile(glyphs + 0x18, gUnknown_03002F90.unk60);
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x8, gCurGlyph.gfxBufferTop + 8);
|
||||
DecompressGlyphTile(glyphs + 0x10, gCurGlyph.gfxBufferBottom);
|
||||
DecompressGlyphTile(glyphs + 0x18, gCurGlyph.gfxBufferBottom + 8);
|
||||
}
|
||||
|
||||
gUnknown_03002F90.height = 12;
|
||||
gCurGlyph.height = 12;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1719,32 +1718,32 @@ void DecompressGlyphFont2(u16 glyphId, bool32 isJapanese)
|
||||
if (isJapanese == TRUE)
|
||||
{
|
||||
glyphs = gFont2JapaneseGlyphs + (0x100 * (glyphId >> 0x3)) + (0x10 * (glyphId & 0x7));
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x8, gUnknown_03002F90.unk20); // gUnknown_03002F90 + 0x40
|
||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x20
|
||||
DecompressGlyphTile(glyphs + 0x88, gUnknown_03002F90.unk60); // gUnknown_03002F90 + 0x60
|
||||
gUnknown_03002F90.width = gFont2JapaneseGlyphWidths[glyphId]; // gGlyphWidth
|
||||
gUnknown_03002F90.height = 14; // gGlyphHeight
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x8, gCurGlyph.gfxBufferTop + 8);
|
||||
DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom); // gCurGlyph + 0x20
|
||||
DecompressGlyphTile(glyphs + 0x88, gCurGlyph.gfxBufferBottom + 8); // gCurGlyph + 0x60
|
||||
gCurGlyph.width = gFont2JapaneseGlyphWidths[glyphId];
|
||||
gCurGlyph.height = 14;
|
||||
}
|
||||
else
|
||||
{
|
||||
glyphs = gFont2LatinGlyphs + (0x20 * glyphId);
|
||||
gUnknown_03002F90.width = gFont2LatinGlyphWidths[glyphId];
|
||||
gCurGlyph.width = gFont2LatinGlyphWidths[glyphId];
|
||||
|
||||
if (gUnknown_03002F90.width <= 8)
|
||||
if (gCurGlyph.width <= 8)
|
||||
{
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x10, gCurGlyph.gfxBufferBottom);
|
||||
}
|
||||
else
|
||||
{
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x8, gUnknown_03002F90.unk20);
|
||||
DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
|
||||
DecompressGlyphTile(glyphs + 0x18, gUnknown_03002F90.unk60);
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x8, gCurGlyph.gfxBufferTop + 8);
|
||||
DecompressGlyphTile(glyphs + 0x10, gCurGlyph.gfxBufferBottom);
|
||||
DecompressGlyphTile(glyphs + 0x18, gCurGlyph.gfxBufferBottom + 8);
|
||||
}
|
||||
|
||||
gUnknown_03002F90.height = 14;
|
||||
gCurGlyph.height = 14;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1764,30 +1763,30 @@ void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
int eff;
|
||||
glyphs = gFont1JapaneseGlyphs + (0x100 * (glyphId >> 0x4)) + (0x8 * (glyphId & (eff = 0xF))); // shh, no questions, only matching now
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
|
||||
gUnknown_03002F90.width = 8; // gGlyphWidth
|
||||
gUnknown_03002F90.height = 15; // gGlyphHeight
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom);
|
||||
gCurGlyph.width = 8;
|
||||
gCurGlyph.height = 15;
|
||||
}
|
||||
else
|
||||
{
|
||||
glyphs = gFont1LatinGlyphs + (0x20 * glyphId);
|
||||
gUnknown_03002F90.width = gFont1LatinGlyphWidths[glyphId];
|
||||
gCurGlyph.width = gFont1LatinGlyphWidths[glyphId];
|
||||
|
||||
if (gUnknown_03002F90.width <= 8)
|
||||
if (gCurGlyph.width <= 8)
|
||||
{
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x10, gCurGlyph.gfxBufferBottom);
|
||||
}
|
||||
else
|
||||
{
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x8, gUnknown_03002F90.unk20);
|
||||
DecompressGlyphTile(glyphs + 0x10, gUnknown_03002F90.unk40);
|
||||
DecompressGlyphTile(glyphs + 0x18, gUnknown_03002F90.unk60);
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x8, gCurGlyph.gfxBufferTop + 8);
|
||||
DecompressGlyphTile(glyphs + 0x10, gCurGlyph.gfxBufferBottom);
|
||||
DecompressGlyphTile(glyphs + 0x18, gCurGlyph.gfxBufferBottom + 8);
|
||||
}
|
||||
|
||||
gUnknown_03002F90.height = 15;
|
||||
gCurGlyph.height = 15;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1804,8 +1803,8 @@ void DecompressGlyphFont9(u16 glyphId)
|
||||
const u16* glyphs;
|
||||
|
||||
glyphs = gFont9JapaneseGlyphs + (0x100 * (glyphId >> 4)) + (0x8 * (glyphId & 0xF));
|
||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40);
|
||||
gUnknown_03002F90.width = 8;
|
||||
gUnknown_03002F90.height = 12;
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
DecompressGlyphTile(glyphs + 0x80, gCurGlyph.gfxBufferBottom);
|
||||
gCurGlyph.width = 8;
|
||||
gCurGlyph.height = 12;
|
||||
}
|
||||
|
12
gflib/text.h
@ -360,20 +360,18 @@ typedef struct {
|
||||
bool8 forceMidTextSpeed:1;
|
||||
} TextFlags;
|
||||
|
||||
struct Struct_03002F90
|
||||
struct TextGlyph
|
||||
{
|
||||
u32 unk0[8];
|
||||
u32 unk20[8];
|
||||
u32 unk40[8];
|
||||
u32 unk60[8];
|
||||
u32 gfxBufferTop[16];
|
||||
u32 gfxBufferBottom[16];
|
||||
u8 width;
|
||||
u8 height;
|
||||
};
|
||||
|
||||
extern TextFlags gTextFlags;
|
||||
|
||||
extern u8 gUnknown_03002F84;
|
||||
extern struct Struct_03002F90 gUnknown_03002F90;
|
||||
extern u8 gDisableTextPrinters;
|
||||
extern struct TextGlyph gCurGlyph;
|
||||
|
||||
void SetFontsPointer(const struct FontInfo *fonts);
|
||||
void DeactivateAllTextPrinters(void);
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 626 B After Width: | Height: | Size: 626 B |
Before Width: | Height: | Size: 642 B After Width: | Height: | Size: 642 B |
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 329 B |
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 395 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 310 B After Width: | Height: | Size: 310 B |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 195 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 71 B After Width: | Height: | Size: 71 B |
Before Width: | Height: | Size: 815 B After Width: | Height: | Size: 815 B |
Before Width: | Height: | Size: 778 B After Width: | Height: | Size: 778 B |
@ -344,6 +344,15 @@ struct BattleTvMovePoints
|
||||
s16 points[2][PARTY_SIZE * 4];
|
||||
};
|
||||
|
||||
struct LinkBattlerHeader
|
||||
{
|
||||
u8 versionSignatureLo;
|
||||
u8 versionSignatureHi;
|
||||
u8 vsScreenHealthFlagsLo;
|
||||
u8 vsScreenHealthFlagsHi;
|
||||
struct BattleEnigmaBerry battleEnigmaBerry;
|
||||
};
|
||||
|
||||
struct BattleStruct
|
||||
{
|
||||
u8 turnEffectsTracker;
|
||||
@ -419,11 +428,10 @@ struct BattleStruct
|
||||
u8 givenExpMons; // Bits for enemy party's pokemon that gave exp to player's party.
|
||||
u8 lastTakenMoveFrom[MAX_BATTLERS_COUNT * MAX_BATTLERS_COUNT * 2]; // a 3-D array [target][attacker][byte]
|
||||
u16 castformPalette[MAX_BATTLERS_COUNT][16];
|
||||
u8 field_180; // weird field, used in battle_main.c, once accessed as an array of u32 overwriting the field below
|
||||
u8 field_181;
|
||||
u8 vsScreenHealthFlagsLo;
|
||||
u8 vsScreenHealthFlagsHi; // Last bit is 'has frontier pass'
|
||||
struct BattleEnigmaBerry battleEnigmaBerry;
|
||||
union {
|
||||
struct LinkBattlerHeader linkBattlerHeader;
|
||||
u32 battleVideo[2];
|
||||
} multiBuffer;
|
||||
u8 wishPerishSongState;
|
||||
u8 wishPerishSongBattlerId;
|
||||
bool8 overworldWeatherDone;
|
||||
|
@ -28,11 +28,11 @@ void SetBerryTreesSeen(void);
|
||||
|
||||
extern const struct Berry gBerries[];
|
||||
|
||||
struct UnkStruct_0858AB24 {
|
||||
u8 unk0;
|
||||
u16 unk1;
|
||||
struct BerryCrushBerryData {
|
||||
u8 difficulty; // The number of A presses required to crush it
|
||||
u16 powder;
|
||||
};
|
||||
|
||||
extern const struct UnkStruct_0858AB24 gUnknown_0858AB24[];
|
||||
extern const struct BerryCrushBerryData gBerryCrush_BerryData[];
|
||||
|
||||
#endif // GUARD_BERRY_H
|
||||
|
@ -3,6 +3,6 @@
|
||||
|
||||
#include "main.h"
|
||||
|
||||
void StartBerryCrush(MainCallback callback);
|
||||
void StartBerryCrush(MainCallback exitCallback);
|
||||
|
||||
#endif // GUARD_BERRY_CRUSH_H
|
||||
|
@ -42,8 +42,8 @@
|
||||
#define BATTLE_PIKE_FUNC_SET_IN_WILD_MON_ROOM 6
|
||||
#define BATTLE_PIKE_FUNC_CLEAR_IN_WILD_MON_ROOM 7
|
||||
#define BATTLE_PIKE_FUNC_SAVE 8
|
||||
#define BATTLE_PIKE_FUNC_NULL_9 9
|
||||
#define BATTLE_PIKE_FUNC_NULL_10 10
|
||||
#define BATTLE_PIKE_FUNC_DUMMY_1 9
|
||||
#define BATTLE_PIKE_FUNC_DUMMY_2 10
|
||||
#define BATTLE_PIKE_FUNC_GET_ROOM_STATUS 11
|
||||
#define BATTLE_PIKE_FUNC_GET_ROOM_STATUS_MON 12
|
||||
#define BATTLE_PIKE_FUNC_HEAL_ONE_TWO_MONS 13
|
||||
|
@ -52,7 +52,7 @@
|
||||
#define GAME_STAT_RODE_CABLE_CAR 48
|
||||
#define GAME_STAT_ENTERED_HOT_SPRINGS 49
|
||||
#define GAME_STAT_NUM_UNION_ROOM_BATTLES 50
|
||||
#define GAME_STAT_51 51
|
||||
#define GAME_STAT_PLAYED_BERRY_CRUSH 51
|
||||
|
||||
#define NUM_USED_GAME_STATS 52
|
||||
#define NUM_GAME_STATS 64
|
||||
|
@ -28,7 +28,7 @@
|
||||
#define HOLD_EFFECT_MACHO_BRACE 24
|
||||
#define HOLD_EFFECT_EXP_SHARE 25
|
||||
#define HOLD_EFFECT_QUICK_CLAW 26
|
||||
#define HOLD_EFFECT_HAPPINESS_UP 27
|
||||
#define HOLD_EFFECT_FRIENDSHIP_UP 27
|
||||
#define HOLD_EFFECT_CURE_ATTRACT 28
|
||||
#define HOLD_EFFECT_CHOICE_BAND 29
|
||||
#define HOLD_EFFECT_FLINCH 30
|
||||
|
@ -56,7 +56,7 @@
|
||||
#define VAR_CYCLING_ROAD_RECORD_COLLISIONS 0x4027
|
||||
#define VAR_CYCLING_ROAD_RECORD_TIME_L 0x4028
|
||||
#define VAR_CYCLING_ROAD_RECORD_TIME_H 0x4029
|
||||
#define VAR_HAPPINESS_STEP_COUNTER 0x402A
|
||||
#define VAR_FRIENDSHIP_STEP_COUNTER 0x402A
|
||||
#define VAR_POISON_STEP_COUNTER 0x402B
|
||||
#define VAR_RESET_RTC_ENABLE 0x402C
|
||||
#define VAR_ENIGMA_BERRY_AVAILABLE 0x402D
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef GUARD_DODRIO_BERRY_PICKING_H
|
||||
#define GUARD_DODRIO_BERRY_PICKING_H
|
||||
|
||||
void StartDodrioBerryPicking(u16 a0, void (*callback)(void));
|
||||
void StartDodrioBerryPicking(u16 partyId, void (*exitCallback)(void));
|
||||
void IsDodrioInParty(void);
|
||||
void ShowDodrioBerryPickingRecords(void);
|
||||
|
||||
|
@ -74,6 +74,14 @@
|
||||
#define abs(x) (((x) < 0) ? -(x) : (x))
|
||||
#endif
|
||||
|
||||
// Used in cases where division by 0 can occur in the retail version.
|
||||
// Avoids invalid opcodes on some emulators, and the otherwise UB.
|
||||
#ifdef UBFIX
|
||||
#define SAFE_DIV(a, b) ((b) ? (a) / (b) : 0)
|
||||
#else
|
||||
#define SAFE_DIV(a, b) ((a) / (b))
|
||||
#endif
|
||||
|
||||
// Extracts the upper 16 bits of a 32-bit number
|
||||
#define HIHALF(n) (((n) & 0xFFFF0000) >> 16)
|
||||
|
||||
@ -209,7 +217,7 @@ struct PyramidBag
|
||||
|
||||
struct BerryCrush
|
||||
{
|
||||
u16 berryCrushResults[4];
|
||||
u16 pressingSpeeds[4]; // For the record with each possible group size, 2-5 players
|
||||
u32 berryPowderAmount;
|
||||
u32 unk;
|
||||
};
|
||||
|
@ -4998,9 +4998,9 @@ extern const u16 gUsePokeblockUpDown_Pal[];
|
||||
extern const u16 gUsePokeblockCondition_Pal[];
|
||||
|
||||
// Berry Crush
|
||||
extern const u32 gUnknown_08DE34B8[];
|
||||
extern const u16 gUnknown_08DE3398[];
|
||||
extern const u32 gUnknown_08DE3FD4[];
|
||||
extern const u32 gBerryCrush_Crusher_Gfx[];
|
||||
extern const u16 gBerryCrush_Crusher_Pal[];
|
||||
extern const u32 gBerryCrush_Crusher_Tilemap[];
|
||||
|
||||
// Pokenav
|
||||
extern const u32 gPokenavMessageBox_Gfx[];
|
||||
|
@ -56,17 +56,17 @@
|
||||
#define LINKCMD_BLENDER_SEND_KEYS 0x4444
|
||||
#define LINKCMD_BLENDER_SCORE_BEST 0x4523
|
||||
#define LINKCMD_BLENDER_SCORE_GOOD 0x5432
|
||||
#define LINKCMD_0x5555 0x5555
|
||||
#define LINKCMD_0x5566 0x5566
|
||||
#define LINKCMD_DUMMY_1 0x5555
|
||||
#define LINKCMD_DUMMY_2 0x5566
|
||||
#define LINKCMD_READY_CLOSE_LINK 0x5FFF
|
||||
#define LINKCMD_0x6666 0x6666
|
||||
#define LINKCMD_0x7777 0x7777
|
||||
#define LINKCMD_SEND_EMPTY 0x6666
|
||||
#define LINKCMD_SEND_0xEE 0x7777
|
||||
#define LINKCMD_BLENDER_PLAY_AGAIN 0x7779
|
||||
#define LINKCMD_0x7FFF 0x7FFF
|
||||
#define LINKCMD_COUNTDOWN 0x7FFF
|
||||
#define LINKCMD_CONT_BLOCK 0x8888
|
||||
#define LINKCMD_BLENDER_NO_BERRIES 0x9999
|
||||
#define LINKCMD_BLENDER_NO_PBLOCK_SPACE 0xAAAA
|
||||
#define LINKCMD_0xAAAB 0xAAAB
|
||||
#define LINKCMD_SEND_ITEM 0xAAAB
|
||||
#define LINKCMD_READY_TO_TRADE 0xAABB
|
||||
#define LINKCMD_READY_FINISH_TRADE 0xABCD
|
||||
#define LINKCMD_INIT_BLOCK 0xBBBB
|
||||
@ -76,17 +76,18 @@
|
||||
#define LINKCMD_START_TRADE 0xCCDD
|
||||
#define LINKCMD_CONFIRM_FINISH_TRADE 0xDCBA
|
||||
#define LINKCMD_SET_MONS_TO_TRADE 0xDDDD
|
||||
#define LINKCMD_0xDDEE 0xDDEE
|
||||
#define LINKCMD_PLAYER_CANCEL_TRADE 0xDDEE
|
||||
#define LINKCMD_REQUEST_CANCEL 0xEEAA
|
||||
#define LINKCMD_CANCEL_TRADE 0xEEBB
|
||||
#define LINKCMD_0xEECC 0xEECC
|
||||
#define LINKCMD_BOTH_CANCEL_TRADE 0xEEBB
|
||||
#define LINKCMD_PARTNER_CANCEL_TRADE 0xEECC
|
||||
#define LINKCMD_NONE 0xEFFF
|
||||
|
||||
#define LINKTYPE_TRADE 0x1111
|
||||
#define LINKTYPE_TRADE_CONNECTING 0x1122
|
||||
#define LINKTYPE_TRADE_SETUP 0x1133
|
||||
#define LINKTYPE_TRADE_DISCONNECTED 0x1144
|
||||
#define LINKTYPE_BATTLE 0x2211
|
||||
#define LINKTYPE_0x2222 0x2222 // unused battle?
|
||||
#define LINKTYPE_UNUSED_BATTLE 0x2222 // Unused, inferred from gap
|
||||
#define LINKTYPE_SINGLE_BATTLE 0x2233
|
||||
#define LINKTYPE_DOUBLE_BATTLE 0x2244
|
||||
#define LINKTYPE_MULTI_BATTLE 0x2255
|
||||
@ -98,7 +99,7 @@
|
||||
#define LINKTYPE_BERRY_BLENDER_SETUP 0x4411
|
||||
#define LINKTYPE_BERRY_BLENDER 0x4422
|
||||
#define LINKTYPE_MYSTERY_EVENT 0x5501
|
||||
#define LINKTYPE_0x5502 0x5502 // unused?
|
||||
#define LINKTYPE_UNUSED_EREADER 0x5502 // Unused, inferred from gap
|
||||
#define LINKTYPE_EREADER 0x5503
|
||||
#define LINKTYPE_CONTEST_GMODE 0x6601
|
||||
#define LINKTYPE_CONTEST_EMODE 0x6602
|
||||
@ -290,17 +291,17 @@ bool8 HandleLinkConnection(void);
|
||||
void SetLinkDebugValues(u32 seed, u32 flags);
|
||||
void SetBerryBlenderLinkCallback(void);
|
||||
void SetSuppressLinkErrorMessage(bool8 flag);
|
||||
void sub_800B524(struct LinkPlayer *linkPlayer);
|
||||
void ConvertLinkPlayerName(struct LinkPlayer *linkPlayer);
|
||||
u8 GetSioMultiSI(void);
|
||||
void ClearSavedLinkPlayers(void);
|
||||
void BufferLinkErrorInfo(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, u8 unk_06);
|
||||
void sub_800B348(void);
|
||||
void BufferLinkErrorInfo(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, bool8 disconnected);
|
||||
void LocalLinkPlayerToBlock(void);
|
||||
void LinkPlayerFromBlock(u32 who);
|
||||
bool32 Link_AnyPartnersPlayingFRLG_JP(void);
|
||||
void ResetLinkPlayerCount(void);
|
||||
void SaveLinkPlayers(u8 a0);
|
||||
void SetWirelessCommType0(void);
|
||||
bool32 sub_800B504(void);
|
||||
bool32 IsLinkRecvQueueLengthAtLeast3(void);
|
||||
|
||||
extern u16 gLinkPartnersHeldKeys[6];
|
||||
extern u32 gLinkDebugSeed;
|
||||
|
@ -262,7 +262,7 @@ bool8 LinkRfu_GetNameIfSerial7F7D(struct GFtgtGname *buff1, u8 *buff2, u8 idx);
|
||||
s32 sub_800E87C(u8 idx);
|
||||
void CreateTask_RfuIdle(void);
|
||||
void DestroyTask_RfuIdle(void);
|
||||
void sub_8011AC8(void);
|
||||
void ClearRecvCommands(void);
|
||||
void LinkRfu_FatalError(void);
|
||||
bool32 sub_8011A9C(void);
|
||||
void sub_80104B0(void);
|
||||
|
@ -37,7 +37,7 @@ struct Main
|
||||
|
||||
/*0x439*/ u8 oamLoadDisabled:1;
|
||||
/*0x439*/ u8 inBattle:1;
|
||||
/*0x439*/ u8 field_439_x4:1;
|
||||
/*0x439*/ u8 anyLinkBattlerHasFrontierPass:1;
|
||||
};
|
||||
|
||||
extern const u8 gGameVersion;
|
||||
|
@ -152,10 +152,10 @@ u16 sub_8087288(void);
|
||||
u16 sub_808729C(void);
|
||||
u16 QueueExitLinkRoomKey(void);
|
||||
u16 sub_80872C4(void);
|
||||
bool32 sub_8087598(void);
|
||||
bool32 sub_80875C8(void);
|
||||
bool32 sub_8087634(void);
|
||||
bool32 sub_808766C(void);
|
||||
bool32 Overworld_LinkRecvQueueLengthMoreThan2(void);
|
||||
bool32 Overworld_RecvKeysFromLinkIsRunning(void);
|
||||
bool32 Overworld_SendKeysToLinkIsRunning(void);
|
||||
bool32 IsSendingKeysOverCable(void);
|
||||
void ClearLinkPlayerObjectEvents(void);
|
||||
|
||||
#endif // GUARD_OVERWORLD_H
|
||||
|
@ -22,9 +22,9 @@ u8 GetRecordedBattleFrontierFacility(void);
|
||||
u8 GetRecordedBattleFronterBrainSymbol(void);
|
||||
void RecordedBattle_SaveParties(void);
|
||||
u8 GetActiveBattlerLinkPlayerGender(void);
|
||||
void sub_8185F84(void);
|
||||
void sub_8185F90(u16 arg0);
|
||||
u8 sub_8185FAC(void);
|
||||
void RecordedBattle_ClearFrontierPassFlag(void);
|
||||
void RecordedBattle_SetFrontierPassFlagFromHword(u16 arg0);
|
||||
u8 RecordedBattle_GetFrontierPassFlag(void);
|
||||
u8 GetBattleSceneInRecordedBattle(void);
|
||||
u8 GetTextSpeedInRecordedBattle(void);
|
||||
void RecordedBattle_CopyBattlerMoves(void);
|
||||
|
@ -1,6 +1,27 @@
|
||||
#ifndef GUARD_SOUND_H
|
||||
#define GUARD_SOUND_H
|
||||
|
||||
enum {
|
||||
FANFARE_LEVEL_UP,
|
||||
FANFARE_OBTAIN_ITEM,
|
||||
FANFARE_EVOLVED,
|
||||
FANFARE_OBTAIN_TMHM,
|
||||
FANFARE_HEAL,
|
||||
FANFARE_OBTAIN_BADGE,
|
||||
FANFARE_MOVE_DELETED,
|
||||
FANFARE_OBTAIN_BERRY,
|
||||
FANFARE_AWAKEN_LEGEND,
|
||||
FANFARE_SLOTS_JACKPOT,
|
||||
FANFARE_SLOTS_WIN,
|
||||
FANFARE_TOO_BAD,
|
||||
FANFARE_RG_POKE_FLUTE,
|
||||
FANFARE_RG_OBTAIN_KEY_ITEM,
|
||||
FANFARE_RG_DEX_RATING,
|
||||
FANFARE_OBTAIN_B_POINTS,
|
||||
FANFARE_OBTAIN_SYMBOL,
|
||||
FANFARE_REGISTER_MATCH_CALL,
|
||||
};
|
||||
|
||||
void InitMapMusic(void);
|
||||
void MapMusicMain(void);
|
||||
void ResetMapMusic(void);
|
||||
|
@ -2904,7 +2904,7 @@ extern const u8 gText_CrushingResults[];
|
||||
extern const u8 gText_BerryCrush2[];
|
||||
extern const u8 gText_PressingSpeedRankings[];
|
||||
extern const u8 gText_Var1Players[];
|
||||
extern const u8 gText_ReadyToBerryCrush[];
|
||||
extern const u8 gText_ReadyPickBerry[];
|
||||
extern const u8 gText_WaitForAllChooseBerry[];
|
||||
extern const u8 gText_EndedWithXUnitsPowder[];
|
||||
extern const u8 gText_RecordingGameResults[];
|
||||
|
@ -66,7 +66,6 @@ void InitTrainerHillBattleStruct(void);
|
||||
void FreeTrainerHillBattleStruct(void);
|
||||
void CopyTrainerHillTrainerText(u8 which, u16 trainerId);
|
||||
bool8 InTrainerHillChallenge(void);
|
||||
void nullsub_129(void);
|
||||
void PrintOnTrainerHillRecordsWindow(void);
|
||||
void LoadTrainerHillObjectEventTemplates(void);
|
||||
bool32 LoadTrainerHillFloorObjectEventScripts(void);
|
||||
|
@ -580,7 +580,6 @@ SECTIONS {
|
||||
src/heal_location.o(.rodata);
|
||||
src/region_map.o(.rodata);
|
||||
src/image_processing_effects.o(.rodata);
|
||||
data/image_processing_effects.o(.rodata);
|
||||
src/decoration.o(.rodata);
|
||||
src/slot_machine.o(.rodata);
|
||||
src/contest_painting.o(.rodata);
|
||||
|
@ -50,6 +50,15 @@ SECTIONS {
|
||||
asm/*.o(.text);
|
||||
} =0
|
||||
|
||||
.text.unlikely :
|
||||
ALIGN(4)
|
||||
{
|
||||
src/crt0.o(.text.unlikely);
|
||||
src/*.o(.text.unlikely);
|
||||
gflib/*.o(.text.unlikely);
|
||||
asm/*.o(.text.unlikely);
|
||||
} =0
|
||||
|
||||
script_data :
|
||||
ALIGN(4)
|
||||
{
|
||||
|
@ -2089,12 +2089,7 @@ static void Cmd_get_used_held_item(void)
|
||||
else
|
||||
battlerId = gBattlerTarget;
|
||||
|
||||
// This is likely a leftover from Ruby's code and its ugly ewram access.
|
||||
#ifdef NONMATCHING
|
||||
AI_THINKING_STRUCT->funcResult = gBattleStruct->usedHeldItems[battlerId];
|
||||
#else
|
||||
AI_THINKING_STRUCT->funcResult = *(u8*)((u8*)(gBattleStruct) + offsetof(struct BattleStruct, usedHeldItems) + (battlerId * 2));
|
||||
#endif // NONMATCHING
|
||||
AI_THINKING_STRUCT->funcResult = *(u8 *)&gBattleStruct->usedHeldItems[battlerId];
|
||||
|
||||
gAIScriptPtr += 2;
|
||||
}
|
||||
|
@ -51,51 +51,43 @@ const struct SpriteTemplate gUnusedSpriteTemplate_08595E14 =
|
||||
.callback = AnimUnused_080B08A0,
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_HandOrFoot[] =
|
||||
static const union AnimCmd sAnim_Fist[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 1),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_SlidingKick_0[] =
|
||||
static const union AnimCmd sAnim_FootWide[] =
|
||||
{
|
||||
ANIMCMD_FRAME(16, 1),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_SlidingKick_1[] =
|
||||
static const union AnimCmd sAnim_FootTall[] =
|
||||
{
|
||||
ANIMCMD_FRAME(32, 1),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_CrossChopHand_0[] =
|
||||
static const union AnimCmd sAnim_HandLeft[] =
|
||||
{
|
||||
ANIMCMD_FRAME(48, 1),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_CrossChopHand_1[] =
|
||||
static const union AnimCmd sAnim_HandRight[] =
|
||||
{
|
||||
ANIMCMD_FRAME(48, 1, .hFlip = TRUE),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_HandOrFoot[] =
|
||||
static const union AnimCmd *const sAnims_HandsAndFeet[] =
|
||||
{
|
||||
sAnim_HandOrFoot,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_SlidingKick[] =
|
||||
{
|
||||
sAnim_SlidingKick_0,
|
||||
sAnim_SlidingKick_1,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_CrossChopHand[] =
|
||||
{
|
||||
sAnim_CrossChopHand_0,
|
||||
sAnim_CrossChopHand_1,
|
||||
sAnim_Fist,
|
||||
sAnim_FootWide,
|
||||
sAnim_FootTall,
|
||||
sAnim_HandLeft,
|
||||
sAnim_HandRight,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gKarateChopSpriteTemplate =
|
||||
@ -103,7 +95,7 @@ const struct SpriteTemplate gKarateChopSpriteTemplate =
|
||||
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = sAnims_HandOrFoot,
|
||||
.anims = sAnims_HandsAndFeet,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimSlideHandOrFootToTarget,
|
||||
@ -114,7 +106,7 @@ const struct SpriteTemplate gJumpKickSpriteTemplate =
|
||||
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = sAnims_HandOrFoot,
|
||||
.anims = sAnims_HandsAndFeet,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimJumpKick,
|
||||
@ -125,7 +117,7 @@ const struct SpriteTemplate gFistFootSpriteTemplate =
|
||||
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = sAnims_HandOrFoot,
|
||||
.anims = sAnims_HandsAndFeet,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimBasicFistOrFoot,
|
||||
@ -136,7 +128,7 @@ const struct SpriteTemplate gFistFootRandomPosSpriteTemplate =
|
||||
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = sAnims_HandOrFoot,
|
||||
.anims = sAnims_HandsAndFeet,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimFistOrFootRandomPos,
|
||||
@ -147,7 +139,7 @@ const struct SpriteTemplate gCrossChopHandSpriteTemplate =
|
||||
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = sAnims_CrossChopHand,
|
||||
.anims = &sAnims_HandsAndFeet[3],
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimCrossChopHand,
|
||||
@ -158,7 +150,7 @@ const struct SpriteTemplate gSlidingKickSpriteTemplate =
|
||||
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = sAnims_SlidingKick,
|
||||
.anims = &sAnims_HandsAndFeet[1],
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimSlidingKick,
|
||||
@ -182,7 +174,7 @@ const struct SpriteTemplate gSpinningHandOrFootSpriteTemplate =
|
||||
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.oam = &gOamData_AffineDouble_ObjNormal_32x32,
|
||||
.anims = sAnims_HandOrFoot,
|
||||
.anims = sAnims_HandsAndFeet,
|
||||
.images = NULL,
|
||||
.affineAnims = sAffineAnims_SpinningHandOrFoot,
|
||||
.callback = AnimSpinningKickOrPunch,
|
||||
@ -205,7 +197,7 @@ const struct SpriteTemplate gMegaPunchKickSpriteTemplate =
|
||||
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.oam = &gOamData_AffineDouble_ObjNormal_32x32,
|
||||
.anims = sAnims_HandOrFoot,
|
||||
.anims = sAnims_HandsAndFeet,
|
||||
.images = NULL,
|
||||
.affineAnims = sAffineAnims_MegaPunchKick,
|
||||
.callback = AnimSpinningKickOrPunch,
|
||||
@ -216,7 +208,7 @@ const struct SpriteTemplate gStompFootSpriteTemplate =
|
||||
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = sAnims_SlidingKick,
|
||||
.anims = &sAnims_HandsAndFeet[1],
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimStompFoot,
|
||||
@ -307,7 +299,7 @@ const struct SpriteTemplate gArmThrustHandSpriteTemplate =
|
||||
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = sAnims_HandOrFoot,
|
||||
.anims = sAnims_HandsAndFeet,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = AnimArmThrustHit,
|
||||
@ -411,7 +403,7 @@ const struct SpriteTemplate gFocusPunchFistSpriteTemplate =
|
||||
.tileTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.paletteTag = ANIM_TAG_HANDS_AND_FEET,
|
||||
.oam = &gOamData_AffineDouble_ObjNormal_32x32,
|
||||
.anims = sAnims_HandOrFoot,
|
||||
.anims = sAnims_HandsAndFeet,
|
||||
.images = NULL,
|
||||
.affineAnims = sAffineAnims_FocusPunchFist,
|
||||
.callback = AnimFocusPunchFist,
|
||||
|
@ -1815,7 +1815,7 @@ void SetBattlerSpriteYOffsetFromYScale(u8 spriteId)
|
||||
{
|
||||
int var = 64 - GetBattlerYDeltaFromSpriteId(spriteId) * 2;
|
||||
u16 matrix = gSprites[spriteId].oam.matrixNum;
|
||||
int var2 = (var << 8) / gOamMatrices[matrix].d;
|
||||
int var2 = SAFE_DIV(var << 8, gOamMatrices[matrix].d);
|
||||
|
||||
if (var2 > 128)
|
||||
var2 = 128;
|
||||
@ -1828,7 +1828,7 @@ void SetBattlerSpriteYOffsetFromOtherYScale(u8 spriteId, u8 otherSpriteId)
|
||||
{
|
||||
int var = 64 - GetBattlerYDeltaFromSpriteId(otherSpriteId) * 2;
|
||||
u16 matrix = gSprites[spriteId].oam.matrixNum;
|
||||
int var2 = (var << 8) / gOamMatrices[matrix].d;
|
||||
int var2 = SAFE_DIV(var << 8, gOamMatrices[matrix].d);
|
||||
|
||||
if (var2 > 128)
|
||||
var2 = 128;
|
||||
|
@ -774,7 +774,8 @@ void BattleArena_DeductMindPoints(u8 battler, u16 stringId)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81A586C(u8 battler) // Unused.
|
||||
// Unused
|
||||
static void UpdateHPAtStart(u8 battler)
|
||||
{
|
||||
u16 *hpAtStart = gBattleStruct->arenaStartHp;
|
||||
|
||||
|
@ -529,7 +529,7 @@ static const union AnimCmd * const sAnims_Select_Pokeball[] =
|
||||
sAnim_Select_Pokeball_Moving,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_0861050C[] =
|
||||
static const union AffineAnimCmd sAffineAnim_Select_MonPicBg_Opening[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(5, 5, 0, 0),
|
||||
AFFINEANIMCMD_FRAME(0, 0, 0, 1),
|
||||
@ -545,7 +545,7 @@ static const union AffineAnimCmd gUnknown_0861050C[] =
|
||||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_0861056C[] =
|
||||
static const union AffineAnimCmd sAffineAnim_Select_MonPicBg_Closing[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(128, 5, 0, 0),
|
||||
AFFINEANIMCMD_FRAME(0, 0, 0, 1),
|
||||
@ -559,7 +559,7 @@ static const union AffineAnimCmd gUnknown_0861056C[] =
|
||||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_086105BC[] =
|
||||
static const union AffineAnimCmd sAffineAnim_Select_MonPicBg_Open[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(256, 256, 0, 0),
|
||||
AFFINEANIMCMD_END,
|
||||
@ -567,9 +567,9 @@ static const union AffineAnimCmd gUnknown_086105BC[] =
|
||||
|
||||
static const union AffineAnimCmd * const sAffineAnims_Select_MonPicBgAnim[] =
|
||||
{
|
||||
gUnknown_0861050C,
|
||||
gUnknown_0861056C,
|
||||
gUnknown_086105BC,
|
||||
sAffineAnim_Select_MonPicBg_Opening,
|
||||
sAffineAnim_Select_MonPicBg_Closing,
|
||||
sAffineAnim_Select_MonPicBg_Open,
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_Select_Pokeball =
|
||||
@ -780,7 +780,7 @@ static const union AnimCmd * const sAnims_Swap_Pokeball[] =
|
||||
sAnim_Swap_Pokeball_Moving,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_08610768[] =
|
||||
static const union AffineAnimCmd sAffineAnim_Swap_MonPicBg_Opening[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(5, 5, 0, 0),
|
||||
AFFINEANIMCMD_FRAME(0, 0, 0, 1),
|
||||
@ -796,7 +796,7 @@ static const union AffineAnimCmd gUnknown_08610768[] =
|
||||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_086107C8[] =
|
||||
static const union AffineAnimCmd sAffineAnim_Swap_MonPicBg_Closing[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(128, 5, 0, 0),
|
||||
AFFINEANIMCMD_FRAME(0, 0, 0, 1),
|
||||
@ -810,7 +810,7 @@ static const union AffineAnimCmd gUnknown_086107C8[] =
|
||||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_08610818[] =
|
||||
static const union AffineAnimCmd sAffineAnim_Swap_MonPicBg_Open[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(256, 256, 0, 0),
|
||||
AFFINEANIMCMD_END,
|
||||
@ -818,9 +818,9 @@ static const union AffineAnimCmd gUnknown_08610818[] =
|
||||
|
||||
static const union AffineAnimCmd * const sAffineAnims_Swap_MonPicBgAnim[] =
|
||||
{
|
||||
gUnknown_08610768,
|
||||
gUnknown_086107C8,
|
||||
gUnknown_08610818,
|
||||
sAffineAnim_Swap_MonPicBg_Opening,
|
||||
sAffineAnim_Swap_MonPicBg_Closing,
|
||||
sAffineAnim_Swap_MonPicBg_Open,
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_Swap_Pokeball =
|
||||
|
@ -68,9 +68,6 @@ extern const struct BgTemplate gBattleBgTemplates[];
|
||||
extern const struct WindowTemplate *const gBattleWindowTemplates[];
|
||||
|
||||
// this file's functions
|
||||
#if !defined(NONMATCHING) && MODERN
|
||||
#define static
|
||||
#endif
|
||||
static void CB2_InitBattleInternal(void);
|
||||
static void CB2_PreInitMultiBattle(void);
|
||||
static void CB2_PreInitIngamePlayerPartnerBattle(void);
|
||||
@ -579,7 +576,7 @@ void CB2_InitBattle(void)
|
||||
AllocateBattleResources();
|
||||
AllocateBattleSpritesData();
|
||||
AllocateMonSpritesGfx();
|
||||
sub_8185F84();
|
||||
RecordedBattle_ClearFrontierPassFlag();
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
|
||||
{
|
||||
@ -736,16 +733,16 @@ static void BufferPartyVsScreenHealth_AtStart(void)
|
||||
s32 i;
|
||||
|
||||
BUFFER_PARTY_VS_SCREEN_STATUS(gPlayerParty, flags, i);
|
||||
gBattleStruct->vsScreenHealthFlagsLo = flags;
|
||||
*(&gBattleStruct->vsScreenHealthFlagsHi) = flags >> 8;
|
||||
gBattleStruct->vsScreenHealthFlagsHi |= FlagGet(FLAG_SYS_FRONTIER_PASS) << 7;
|
||||
gBattleStruct->multiBuffer.linkBattlerHeader.vsScreenHealthFlagsLo = flags;
|
||||
*(&gBattleStruct->multiBuffer.linkBattlerHeader.vsScreenHealthFlagsHi) = flags >> 8;
|
||||
gBattleStruct->multiBuffer.linkBattlerHeader.vsScreenHealthFlagsHi |= FlagGet(FLAG_SYS_FRONTIER_PASS) << 7;
|
||||
}
|
||||
|
||||
static void SetPlayerBerryDataInBattleStruct(void)
|
||||
{
|
||||
s32 i;
|
||||
struct BattleStruct *battleStruct = gBattleStruct;
|
||||
struct BattleEnigmaBerry *battleBerry = &battleStruct->battleEnigmaBerry;
|
||||
struct BattleEnigmaBerry *battleBerry = &battleStruct->multiBuffer.linkBattlerHeader.battleEnigmaBerry;
|
||||
|
||||
if (IsEnigmaBerryValid() == TRUE)
|
||||
{
|
||||
@ -885,52 +882,56 @@ static void SetAllPlayersBerryData(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8036EB8(u8 arg0, u8 arg1)
|
||||
// This was inlined in Ruby/Sapphire
|
||||
static void FindLinkBattleMaster(u8 numPlayers, u8 multiPlayerId)
|
||||
{
|
||||
u8 var = 0;
|
||||
u8 found = 0;
|
||||
|
||||
if (gBlockRecvBuffer[0][0] == 256)
|
||||
// If player 1 is playing the minimum version, player 1 is master.
|
||||
if (gBlockRecvBuffer[0][0] == 0x100)
|
||||
{
|
||||
if (arg1 == 0)
|
||||
if (multiPlayerId == 0)
|
||||
gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER | BATTLE_TYPE_TRAINER;
|
||||
else
|
||||
gBattleTypeFlags |= BATTLE_TYPE_TRAINER;
|
||||
var++;
|
||||
found++;
|
||||
}
|
||||
|
||||
if (var == 0)
|
||||
if (found == 0)
|
||||
{
|
||||
// If multiple different versions are being used, player 1 is master.
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < arg0; i++)
|
||||
for (i = 0; i < numPlayers; i++)
|
||||
{
|
||||
if (gBlockRecvBuffer[0][0] != gBlockRecvBuffer[i][0])
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == arg0)
|
||||
if (i == numPlayers)
|
||||
{
|
||||
if (arg1 == 0)
|
||||
if (multiPlayerId == 0)
|
||||
gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER | BATTLE_TYPE_TRAINER;
|
||||
else
|
||||
gBattleTypeFlags |= BATTLE_TYPE_TRAINER;
|
||||
var++;
|
||||
found++;
|
||||
}
|
||||
|
||||
if (var == 0)
|
||||
if (found == 0)
|
||||
{
|
||||
for (i = 0; i < arg0; i++)
|
||||
// Lowest index player with the highest game version is master.
|
||||
for (i = 0; i < numPlayers; i++)
|
||||
{
|
||||
if (gBlockRecvBuffer[i][0] == 0x300)
|
||||
if (gBlockRecvBuffer[i][0] == 0x300 && i != multiPlayerId)
|
||||
{
|
||||
if (i != arg1 && i < arg1)
|
||||
if (i < multiPlayerId)
|
||||
break;
|
||||
}
|
||||
if (gBlockRecvBuffer[i][0] > 0x300 && i != arg1)
|
||||
if (gBlockRecvBuffer[i][0] > 0x300 && i != multiPlayerId)
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == arg0)
|
||||
if (i == numPlayers)
|
||||
gBattleTypeFlags |= BATTLE_TYPE_IS_MASTER | BATTLE_TYPE_TRAINER;
|
||||
else
|
||||
gBattleTypeFlags |= BATTLE_TYPE_TRAINER;
|
||||
@ -973,8 +974,9 @@ static void CB2_HandleStartBattle(void)
|
||||
{
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
*(&gBattleStruct->field_180) = 0;
|
||||
*(&gBattleStruct->field_181) = 3;
|
||||
// 0x300
|
||||
*(&gBattleStruct->multiBuffer.linkBattlerHeader.versionSignatureLo) = 0;
|
||||
*(&gBattleStruct->multiBuffer.linkBattlerHeader.versionSignatureHi) = 3;
|
||||
BufferPartyVsScreenHealth_AtStart();
|
||||
SetPlayerBerryDataInBattleStruct();
|
||||
|
||||
@ -984,7 +986,7 @@ static void CB2_HandleStartBattle(void)
|
||||
gLinkPlayers[1].id = 1;
|
||||
}
|
||||
|
||||
SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->field_180, 32);
|
||||
SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->multiBuffer.linkBattlerHeader, sizeof(gBattleStruct->multiBuffer.linkBattlerHeader));
|
||||
gBattleCommunication[MULTIUSE_STATE] = 2;
|
||||
}
|
||||
if (gWirelessCommType)
|
||||
@ -1005,16 +1007,16 @@ static void CB2_HandleStartBattle(void)
|
||||
u8 taskId;
|
||||
|
||||
ResetBlockReceivedFlags();
|
||||
sub_8036EB8(2, playerMultiplayerId);
|
||||
FindLinkBattleMaster(2, playerMultiplayerId);
|
||||
SetAllPlayersBerryData();
|
||||
taskId = CreateTask(InitLinkBattleVsScreen, 0);
|
||||
gTasks[taskId].data[1] = 0x10E;
|
||||
gTasks[taskId].data[2] = 0x5A;
|
||||
gTasks[taskId].data[5] = 0;
|
||||
gTasks[taskId].data[3] = gBattleStruct->vsScreenHealthFlagsLo | (gBattleStruct->vsScreenHealthFlagsHi << 8);
|
||||
gTasks[taskId].data[3] = gBattleStruct->multiBuffer.linkBattlerHeader.vsScreenHealthFlagsLo | (gBattleStruct->multiBuffer.linkBattlerHeader.vsScreenHealthFlagsHi << 8);
|
||||
gTasks[taskId].data[4] = gBlockRecvBuffer[enemyMultiplayerId][1];
|
||||
sub_8185F90(gBlockRecvBuffer[playerMultiplayerId][1]);
|
||||
sub_8185F90(gBlockRecvBuffer[enemyMultiplayerId][1]);
|
||||
RecordedBattle_SetFrontierPassFlagFromHword(gBlockRecvBuffer[playerMultiplayerId][1]);
|
||||
RecordedBattle_SetFrontierPassFlagFromHword(gBlockRecvBuffer[enemyMultiplayerId][1]);
|
||||
SetDeoxysStats();
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
@ -1181,11 +1183,12 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
*(&gBattleStruct->field_180) = 0;
|
||||
*(&gBattleStruct->field_181) = 3;
|
||||
// 0x300
|
||||
*(&gBattleStruct->multiBuffer.linkBattlerHeader.versionSignatureLo) = 0;
|
||||
*(&gBattleStruct->multiBuffer.linkBattlerHeader.versionSignatureHi) = 3;
|
||||
BufferPartyVsScreenHealth_AtStart();
|
||||
SetPlayerBerryDataInBattleStruct();
|
||||
SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->field_180, 32);
|
||||
SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->multiBuffer.linkBattlerHeader, sizeof(gBattleStruct->multiBuffer.linkBattlerHeader));
|
||||
gBattleCommunication[MULTIUSE_STATE] = 2;
|
||||
}
|
||||
|
||||
@ -1207,7 +1210,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
|
||||
u8 taskId;
|
||||
|
||||
ResetBlockReceivedFlags();
|
||||
sub_8036EB8(2, playerMultiplayerId);
|
||||
FindLinkBattleMaster(2, playerMultiplayerId);
|
||||
SetAllPlayersBerryData();
|
||||
taskId = CreateTask(InitLinkBattleVsScreen, 0);
|
||||
gTasks[taskId].data[1] = 0x10E;
|
||||
@ -1568,12 +1571,13 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
{
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
*(&gBattleStruct->field_180) = 0;
|
||||
*(&gBattleStruct->field_181) = 3;
|
||||
// 0x300
|
||||
*(&gBattleStruct->multiBuffer.linkBattlerHeader.versionSignatureLo) = 0;
|
||||
*(&gBattleStruct->multiBuffer.linkBattlerHeader.versionSignatureHi) = 3;
|
||||
BufferPartyVsScreenHealth_AtStart();
|
||||
SetPlayerBerryDataInBattleStruct();
|
||||
|
||||
SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->field_180, 32);
|
||||
SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->multiBuffer.linkBattlerHeader, sizeof(gBattleStruct->multiBuffer.linkBattlerHeader));
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
if (gWirelessCommType)
|
||||
@ -1592,7 +1596,7 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
if ((GetBlockReceivedStatus() & 0xF) == 0xF)
|
||||
{
|
||||
ResetBlockReceivedFlags();
|
||||
sub_8036EB8(4, playerMultiplayerId);
|
||||
FindLinkBattleMaster(4, playerMultiplayerId);
|
||||
SetAllPlayersBerryData();
|
||||
SetDeoxysStats();
|
||||
var = CreateTask(InitLinkBattleVsScreen, 0);
|
||||
@ -1604,7 +1608,7 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
|
||||
for (id = 0; id < MAX_LINK_PLAYERS; id++)
|
||||
{
|
||||
sub_8185F90(gBlockRecvBuffer[id][1]);
|
||||
RecordedBattle_SetFrontierPassFlagFromHword(gBlockRecvBuffer[id][1]);
|
||||
switch (gLinkPlayers[id].id)
|
||||
{
|
||||
case 0:
|
||||
@ -1789,10 +1793,10 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
case 8:
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
u32* ptr = (u32*)(&gBattleStruct->field_180);
|
||||
u32* ptr = gBattleStruct->multiBuffer.battleVideo;
|
||||
ptr[0] = gBattleTypeFlags;
|
||||
ptr[1] = gRecordedBattleRngSeed; // UB: overwrites berry data
|
||||
SendBlock(bitmask_all_link_players_but_self(), ptr, 8);
|
||||
SendBlock(bitmask_all_link_players_but_self(), ptr, sizeof(gBattleStruct->multiBuffer.battleVideo));
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
break;
|
||||
@ -2251,7 +2255,7 @@ static void EndLinkBattleInSteps(void)
|
||||
{
|
||||
u8 monsCount;
|
||||
|
||||
gMain.field_439_x4 = sub_8185FAC();
|
||||
gMain.anyLinkBattlerHasFrontierPass = RecordedBattle_GetFrontierPassFlag();
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
|
||||
monsCount = 4;
|
||||
@ -2267,7 +2271,7 @@ static void EndLinkBattleInSteps(void)
|
||||
FreeAllWindowBuffers();
|
||||
SetMainCallback2(sub_80392A8);
|
||||
}
|
||||
else if (!gMain.field_439_x4)
|
||||
else if (!gMain.anyLinkBattlerHasFrontierPass)
|
||||
{
|
||||
SetMainCallback2(gMain.savedCallback);
|
||||
FreeBattleResources();
|
||||
@ -2331,9 +2335,9 @@ static void EndLinkBattleInSteps(void)
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
break;
|
||||
case 9:
|
||||
if (!gMain.field_439_x4 || gWirelessCommType || gReceivedRemoteLinkPlayers != 1)
|
||||
if (!gMain.anyLinkBattlerHasFrontierPass || gWirelessCommType || gReceivedRemoteLinkPlayers != 1)
|
||||
{
|
||||
gMain.field_439_x4 = 0;
|
||||
gMain.anyLinkBattlerHasFrontierPass = 0;
|
||||
SetMainCallback2(gMain.savedCallback);
|
||||
FreeBattleResources();
|
||||
FreeBattleSpritesData();
|
||||
@ -2429,7 +2433,7 @@ static void sub_803939C(void)
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
break;
|
||||
case 1:
|
||||
if (gMain.field_439_x4 && gReceivedRemoteLinkPlayers == 0)
|
||||
if (gMain.anyLinkBattlerHasFrontierPass && gReceivedRemoteLinkPlayers == 0)
|
||||
CreateTask(Task_ReconnectWithLinkPlayers, 5);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
break;
|
||||
@ -2499,7 +2503,7 @@ static void sub_803939C(void)
|
||||
if (IsLinkTaskFinished() == TRUE)
|
||||
{
|
||||
HandleBattleWindow(0x18, 8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
if (gMain.field_439_x4)
|
||||
if (gMain.anyLinkBattlerHasFrontierPass)
|
||||
{
|
||||
SetLinkStandbyCallback();
|
||||
BattlePutTextOnWindow(gText_LinkStandby3, 0);
|
||||
@ -2510,15 +2514,15 @@ static void sub_803939C(void)
|
||||
case 8:
|
||||
if (--gBattleCommunication[1] == 0)
|
||||
{
|
||||
if (gMain.field_439_x4 && !gWirelessCommType)
|
||||
if (gMain.anyLinkBattlerHasFrontierPass && !gWirelessCommType)
|
||||
SetCloseLinkCallback();
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
if (!gMain.field_439_x4 || gWirelessCommType || gReceivedRemoteLinkPlayers != 1)
|
||||
if (!gMain.anyLinkBattlerHasFrontierPass || gWirelessCommType || gReceivedRemoteLinkPlayers != 1)
|
||||
{
|
||||
gMain.field_439_x4 = 0;
|
||||
gMain.anyLinkBattlerHasFrontierPass = 0;
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
SetMainCallback2(gMain.savedCallback);
|
||||
@ -2548,7 +2552,7 @@ static void sub_803939C(void)
|
||||
case 11:
|
||||
if (IsLinkTaskFinished() == TRUE && !IsTextPrinterActive(0) && --gBattleCommunication[1] == 0)
|
||||
{
|
||||
if (gMain.field_439_x4)
|
||||
if (gMain.anyLinkBattlerHasFrontierPass)
|
||||
{
|
||||
SetLinkStandbyCallback();
|
||||
BattlePutTextOnWindow(gText_LinkStandby3, 0);
|
||||
@ -2560,7 +2564,7 @@ static void sub_803939C(void)
|
||||
case 7:
|
||||
if (!IsTextPrinterActive(0))
|
||||
{
|
||||
if (gMain.field_439_x4)
|
||||
if (gMain.anyLinkBattlerHasFrontierPass)
|
||||
{
|
||||
if (IsLinkTaskFinished() == TRUE)
|
||||
{
|
||||
|
@ -57,8 +57,8 @@ static void GetRoomType(void);
|
||||
static void SetInWildMonRoom(void);
|
||||
static void ClearInWildMonRoom(void);
|
||||
static void SavePikeChallenge(void);
|
||||
static void nullsub_76(void);
|
||||
static void nullsub_124(void);
|
||||
static void PikeDummy1(void);
|
||||
static void PikeDummy2(void);
|
||||
static void GetRoomInflictedStatus(void);
|
||||
static void GetRoomInflictedStatusMon(void);
|
||||
static void HealOneOrTwoMons(void);
|
||||
@ -488,8 +488,8 @@ static void (* const sBattlePikeFunctions[])(void) =
|
||||
[BATTLE_PIKE_FUNC_SET_IN_WILD_MON_ROOM] = SetInWildMonRoom,
|
||||
[BATTLE_PIKE_FUNC_CLEAR_IN_WILD_MON_ROOM] = ClearInWildMonRoom,
|
||||
[BATTLE_PIKE_FUNC_SAVE] = SavePikeChallenge,
|
||||
[BATTLE_PIKE_FUNC_NULL_9] = nullsub_76,
|
||||
[BATTLE_PIKE_FUNC_NULL_10] = nullsub_124,
|
||||
[BATTLE_PIKE_FUNC_DUMMY_1] = PikeDummy1,
|
||||
[BATTLE_PIKE_FUNC_DUMMY_2] = PikeDummy2,
|
||||
[BATTLE_PIKE_FUNC_GET_ROOM_STATUS] = GetRoomInflictedStatus,
|
||||
[BATTLE_PIKE_FUNC_GET_ROOM_STATUS_MON] = GetRoomInflictedStatusMon,
|
||||
[BATTLE_PIKE_FUNC_HEAL_ONE_TWO_MONS] = HealOneOrTwoMons,
|
||||
@ -715,12 +715,12 @@ static void SavePikeChallenge(void)
|
||||
TrySavingData(SAVE_LINK);
|
||||
}
|
||||
|
||||
static void nullsub_76(void)
|
||||
static void PikeDummy1(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void nullsub_124(void)
|
||||
static void PikeDummy2(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ static void Cmd_trysetperishsong(void);
|
||||
static void Cmd_rolloutdamagecalculation(void);
|
||||
static void Cmd_jumpifconfusedandstatmaxed(void);
|
||||
static void Cmd_furycuttercalc(void);
|
||||
static void Cmd_happinesstodamagecalculation(void);
|
||||
static void Cmd_friendshiptodamagecalculation(void);
|
||||
static void Cmd_presentdamagecalculation(void);
|
||||
static void Cmd_setsafeguard(void);
|
||||
static void Cmd_magnitudedamagecalculation(void);
|
||||
@ -510,7 +510,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
|
||||
Cmd_rolloutdamagecalculation, //0xB3
|
||||
Cmd_jumpifconfusedandstatmaxed, //0xB4
|
||||
Cmd_furycuttercalc, //0xB5
|
||||
Cmd_happinesstodamagecalculation, //0xB6
|
||||
Cmd_friendshiptodamagecalculation, //0xB6
|
||||
Cmd_presentdamagecalculation, //0xB7
|
||||
Cmd_setsafeguard, //0xB8
|
||||
Cmd_magnitudedamagecalculation, //0xB9
|
||||
@ -8471,7 +8471,7 @@ static void Cmd_furycuttercalc(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void Cmd_happinesstodamagecalculation(void)
|
||||
static void Cmd_friendshiptodamagecalculation(void)
|
||||
{
|
||||
if (gBattleMoves[gCurrentMove].effect == EFFECT_RETURN)
|
||||
gDynamicBasePower = 10 * (gBattleMons[gBattlerAttacker].friendship) / 25;
|
||||
|
@ -878,12 +878,8 @@ static const u16 sFrontierTrainerIdRangesHard[][2] =
|
||||
{FRONTIER_TRAINER_JAXON, FRONTIER_TRAINER_GRETEL}, // 200 - 299
|
||||
};
|
||||
|
||||
// Trainer IDs? Don't make sense as part of previous array, min/max relationship reversed and never accessed
|
||||
static const u16 sUnused_085DFA1A[][2] =
|
||||
{
|
||||
{179, 141}, // FRONTIER_TRAINER_ALISON - FRONTIER_TRAINER_KAYDEN
|
||||
{200, 183}, // FRONTIER_TRAINER_JAXON - FRONTIER_TRAINER_HUNTER
|
||||
};
|
||||
// Unknown, unused data
|
||||
static const u16 sUnused[] = { 179, 141, 200, 183 };
|
||||
|
||||
static const u8 sBattleTowerPartySizes[FRONTIER_MODE_COUNT] =
|
||||
{
|
||||
|
@ -3949,7 +3949,7 @@ u8 GetMoveTarget(u16 move, u8 setTarget)
|
||||
return targetBattler;
|
||||
}
|
||||
|
||||
static bool32 IsNotEventLegalMewOrDeoxys(u8 battlerId)
|
||||
static bool32 IsMonEventLegal(u8 battlerId)
|
||||
{
|
||||
if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT)
|
||||
return TRUE;
|
||||
@ -3970,7 +3970,7 @@ u8 IsMonDisobedient(void)
|
||||
if (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT)
|
||||
return 0;
|
||||
|
||||
if (IsNotEventLegalMewOrDeoxys(gBattlerAttacker)) // only if species is Mew or Deoxys
|
||||
if (IsMonEventLegal(gBattlerAttacker)) // only false if illegal Mew or Deoxys
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && GetBattlerPosition(gBattlerAttacker) == 2)
|
||||
return 0;
|
||||
|
88
src/berry.c
@ -889,50 +889,50 @@ const struct Berry gBerries[] =
|
||||
},
|
||||
};
|
||||
|
||||
const struct UnkStruct_0858AB24 gUnknown_0858AB24[] = {
|
||||
{ 50, 20},
|
||||
{ 50, 20},
|
||||
{ 50, 20},
|
||||
{ 50, 20},
|
||||
{ 50, 20},
|
||||
{ 50, 30},
|
||||
{ 50, 30},
|
||||
{ 50, 30},
|
||||
{ 50, 30},
|
||||
{ 50, 30},
|
||||
{ 60, 50},
|
||||
{ 60, 50},
|
||||
{ 60, 50},
|
||||
{ 60, 50},
|
||||
{ 60, 50},
|
||||
{ 80, 70},
|
||||
{ 80, 70},
|
||||
{ 80, 70},
|
||||
{ 80, 70},
|
||||
{ 80, 70},
|
||||
{100, 100},
|
||||
{100, 100},
|
||||
{100, 100},
|
||||
{100, 100},
|
||||
{100, 100},
|
||||
{130, 150},
|
||||
{130, 150},
|
||||
{130, 150},
|
||||
{130, 150},
|
||||
{130, 150},
|
||||
{160, 250},
|
||||
{160, 250},
|
||||
{160, 250},
|
||||
{160, 250},
|
||||
{160, 250},
|
||||
{180, 500},
|
||||
{180, 500},
|
||||
{180, 500},
|
||||
{180, 500},
|
||||
{180, 500},
|
||||
{200, 750},
|
||||
{200, 750},
|
||||
{150, 200}
|
||||
const struct BerryCrushBerryData gBerryCrush_BerryData[] = {
|
||||
[ITEM_CHERI_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 50, .powder = 20},
|
||||
[ITEM_CHESTO_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 50, .powder = 20},
|
||||
[ITEM_PECHA_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 50, .powder = 20},
|
||||
[ITEM_RAWST_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 50, .powder = 20},
|
||||
[ITEM_ASPEAR_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 50, .powder = 20},
|
||||
[ITEM_LEPPA_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 50, .powder = 30},
|
||||
[ITEM_ORAN_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 50, .powder = 30},
|
||||
[ITEM_PERSIM_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 50, .powder = 30},
|
||||
[ITEM_LUM_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 50, .powder = 30},
|
||||
[ITEM_SITRUS_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 50, .powder = 30},
|
||||
[ITEM_FIGY_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 60, .powder = 50},
|
||||
[ITEM_WIKI_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 60, .powder = 50},
|
||||
[ITEM_MAGO_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 60, .powder = 50},
|
||||
[ITEM_AGUAV_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 60, .powder = 50},
|
||||
[ITEM_IAPAPA_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 60, .powder = 50},
|
||||
[ITEM_RAZZ_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 80, .powder = 70},
|
||||
[ITEM_BLUK_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 80, .powder = 70},
|
||||
[ITEM_NANAB_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 80, .powder = 70},
|
||||
[ITEM_WEPEAR_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 80, .powder = 70},
|
||||
[ITEM_PINAP_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 80, .powder = 70},
|
||||
[ITEM_POMEG_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 100, .powder = 100},
|
||||
[ITEM_KELPSY_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 100, .powder = 100},
|
||||
[ITEM_QUALOT_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 100, .powder = 100},
|
||||
[ITEM_HONDEW_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 100, .powder = 100},
|
||||
[ITEM_GREPA_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 100, .powder = 100},
|
||||
[ITEM_TAMATO_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 130, .powder = 150},
|
||||
[ITEM_CORNN_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 130, .powder = 150},
|
||||
[ITEM_MAGOST_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 130, .powder = 150},
|
||||
[ITEM_RABUTA_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 130, .powder = 150},
|
||||
[ITEM_NOMEL_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 130, .powder = 150},
|
||||
[ITEM_SPELON_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 160, .powder = 250},
|
||||
[ITEM_PAMTRE_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 160, .powder = 250},
|
||||
[ITEM_WATMEL_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 160, .powder = 250},
|
||||
[ITEM_DURIN_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 160, .powder = 250},
|
||||
[ITEM_BELUE_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 160, .powder = 250},
|
||||
[ITEM_LIECHI_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 180, .powder = 500},
|
||||
[ITEM_GANLON_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 180, .powder = 500},
|
||||
[ITEM_SALAC_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 180, .powder = 500},
|
||||
[ITEM_PETAYA_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 180, .powder = 500},
|
||||
[ITEM_APICOT_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 180, .powder = 500},
|
||||
[ITEM_LANSAT_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 200, .powder = 750},
|
||||
[ITEM_STARF_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 200, .powder = 750},
|
||||
[ITEM_ENIGMA_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 150, .powder = 200}
|
||||
};
|
||||
|
||||
const struct BerryTree gBlankBerryTree = {};
|
||||
|
3381
src/berry_crush.c
@ -904,7 +904,7 @@ static void Task_StartWirelessCableClubBattle(u8 taskId)
|
||||
{
|
||||
struct LinkPlayer *player = (struct LinkPlayer *)gBlockRecvBuffer[i];
|
||||
gLinkPlayers[i] = *player;
|
||||
sub_800B524(&gLinkPlayers[i]);
|
||||
ConvertLinkPlayerName(&gLinkPlayers[i]);
|
||||
ResetBlockReceivedFlag(i);
|
||||
}
|
||||
tState = 4;
|
||||
|
@ -2250,7 +2250,7 @@ const struct Item gItems[] =
|
||||
.name = _("SOOTHE BELL"),
|
||||
.itemId = ITEM_SOOTHE_BELL,
|
||||
.price = 100,
|
||||
.holdEffect = HOLD_EFFECT_HAPPINESS_UP,
|
||||
.holdEffect = HOLD_EFFECT_FRIENDSHIP_UP,
|
||||
.description = sSootheBellDesc,
|
||||
.pocket = POCKET_ITEMS,
|
||||
.type = ITEM_USE_BAG_MENU,
|
||||
|
@ -543,7 +543,7 @@ static const struct WindowTemplate sLevelUpStatsWindowTemplate =
|
||||
.baseBlock = 0x2E9,
|
||||
};
|
||||
|
||||
static const struct WindowTemplate sUnusedWindowTemplate_08615978 =
|
||||
static const struct WindowTemplate sUnusedWindowTemplate1 =
|
||||
{
|
||||
.bg = 2,
|
||||
.tilemapLeft = 2,
|
||||
@ -554,7 +554,7 @@ static const struct WindowTemplate sUnusedWindowTemplate_08615978 =
|
||||
.baseBlock = 0x1DF,
|
||||
};
|
||||
|
||||
static const struct WindowTemplate sUnusedWindowTemplate_08615980 =
|
||||
static const struct WindowTemplate sUnusedWindowTemplate2 =
|
||||
{
|
||||
.bg = 2,
|
||||
.tilemapLeft = 0,
|
||||
@ -669,7 +669,7 @@ static const u8 *const sDescriptionStringTable[] =
|
||||
[PARTYBOX_DESC_DONT_HAVE] = gText_DontHave,
|
||||
};
|
||||
|
||||
static const u16 sUnused_08615B94[] =
|
||||
static const u16 sUnusedData[] =
|
||||
{
|
||||
0x0108, 0x0151, 0x0160, 0x015b, 0x002e, 0x005c, 0x0102, 0x0153, 0x014b, 0x00ed, 0x00f1, 0x010d, 0x003a, 0x003b, 0x003f, 0x0071,
|
||||
0x00b6, 0x00f0, 0x00ca, 0x00db, 0x00da, 0x004c, 0x00e7, 0x0055, 0x0057, 0x0059, 0x00d8, 0x005b, 0x005e, 0x00f7, 0x0118, 0x0068,
|
||||
|
3210
src/data/pointillism_points.h
Normal file
@ -67,7 +67,7 @@ static bool8 TryStartCoordEventScript(struct MapPosition *);
|
||||
static bool8 TryStartWarpEventScript(struct MapPosition *, u16);
|
||||
static bool8 TryStartMiscWalkingScripts(u16);
|
||||
static bool8 TryStartStepCountScript(u16);
|
||||
static void UpdateHappinessStepCounter(void);
|
||||
static void UpdateFriendshipStepCounter(void);
|
||||
static bool8 UpdatePoisonStepCounter(void);
|
||||
|
||||
void FieldClearPlayerInput(struct FieldInput *input)
|
||||
@ -542,7 +542,7 @@ static bool8 TryStartStepCountScript(u16 metatileBehavior)
|
||||
}
|
||||
|
||||
IncrementRematchStepCounter();
|
||||
UpdateHappinessStepCounter();
|
||||
UpdateFriendshipStepCounter();
|
||||
UpdateFarawayIslandStepCounter();
|
||||
|
||||
if (!(gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_FORCED_MOVE) && !MetatileBehavior_IsForcedMovementTile(metatileBehavior))
|
||||
@ -607,14 +607,15 @@ static bool8 TryStartStepCountScript(u16 metatileBehavior)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void Unref_ClearHappinessStepCounter(void)
|
||||
// Unused
|
||||
static void ClearFriendshipStepCounter(void)
|
||||
{
|
||||
VarSet(VAR_HAPPINESS_STEP_COUNTER, 0);
|
||||
VarSet(VAR_FRIENDSHIP_STEP_COUNTER, 0);
|
||||
}
|
||||
|
||||
static void UpdateHappinessStepCounter(void)
|
||||
static void UpdateFriendshipStepCounter(void)
|
||||
{
|
||||
u16 *ptr = GetVarPointer(VAR_HAPPINESS_STEP_COUNTER);
|
||||
u16 *ptr = GetVarPointer(VAR_FRIENDSHIP_STEP_COUNTER);
|
||||
int i;
|
||||
|
||||
(*ptr)++;
|
||||
|
@ -357,40 +357,42 @@ static void DrawDoor(const struct DoorGraphics *gfx, const struct DoorAnimFrame
|
||||
}
|
||||
}
|
||||
|
||||
enum
|
||||
{
|
||||
TD_FRAMELIST = 0,
|
||||
TD_GFX = 2,
|
||||
TD_FRAME = 4,
|
||||
TD_COUNTER,
|
||||
TD_X,
|
||||
TD_Y
|
||||
};
|
||||
#define tFramesHi data[0]
|
||||
#define tFramesLo data[1]
|
||||
#define tGfxHi data[2]
|
||||
#define tGfxLo data[3]
|
||||
#define tFrameId data[4]
|
||||
#define tCounter data[5]
|
||||
#define tX data[6]
|
||||
#define tY data[7]
|
||||
|
||||
static bool32 sub_808A5F0(struct DoorGraphics *gfx, struct DoorAnimFrame *frames, s16 *taskData)
|
||||
// Draws a single frame of the door animation, or skips drawing to wait between frames.
|
||||
// Returns FALSE when the final frame has been reached
|
||||
static bool32 AnimateDoorFrame(struct DoorGraphics *gfx, struct DoorAnimFrame *frames, s16 *data)
|
||||
{
|
||||
if (taskData[TD_COUNTER] == 0)
|
||||
DrawDoor(gfx, &frames[taskData[TD_FRAME]], taskData[TD_X], taskData[TD_Y]);
|
||||
if (taskData[TD_COUNTER] == frames[taskData[TD_FRAME]].time)
|
||||
if (tCounter == 0)
|
||||
DrawDoor(gfx, &frames[tFrameId], tX, tY);
|
||||
|
||||
if (tCounter == frames[tFrameId].time)
|
||||
{
|
||||
taskData[TD_COUNTER] = 0;
|
||||
taskData[TD_FRAME]++;
|
||||
if (frames[taskData[TD_FRAME]].time == 0)
|
||||
tCounter = 0;
|
||||
tFrameId++;
|
||||
if (frames[tFrameId].time == 0)
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
taskData[TD_COUNTER]++;
|
||||
tCounter++;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void Task_AnimateDoor(u8 taskId)
|
||||
{
|
||||
u16 *taskData = gTasks[taskId].data;
|
||||
struct DoorAnimFrame *frames = (struct DoorAnimFrame *)(taskData[TD_FRAMELIST] << 16 | taskData[TD_FRAMELIST + 1]);
|
||||
struct DoorGraphics *gfx = (struct DoorGraphics *)(taskData[TD_GFX] << 16 | taskData[TD_GFX + 1]);
|
||||
u16 *data = gTasks[taskId].data;
|
||||
struct DoorAnimFrame *frames = (struct DoorAnimFrame *)(tFramesHi << 16 | tFramesLo);
|
||||
struct DoorGraphics *gfx = (struct DoorGraphics *)(tGfxHi << 16 | tGfxLo);
|
||||
|
||||
if (sub_808A5F0(gfx, frames, taskData) == FALSE)
|
||||
if (AnimateDoorFrame(gfx, frames, data) == FALSE)
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
|
||||
@ -419,16 +421,16 @@ static s8 StartDoorAnimationTask(const struct DoorGraphics *gfx, const struct Do
|
||||
else
|
||||
{
|
||||
u8 taskId = CreateTask(Task_AnimateDoor, 0x50);
|
||||
s16 *taskData = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
taskData[TD_X] = x;
|
||||
taskData[TD_Y] = y;
|
||||
tX = x;
|
||||
tY = y;
|
||||
|
||||
taskData[TD_FRAMELIST + 1] = (u32)frames;
|
||||
taskData[TD_FRAMELIST] = (u32)frames >> 16;
|
||||
tFramesLo = (u32)frames;
|
||||
tFramesHi = (u32)frames >> 16;
|
||||
|
||||
taskData[TD_GFX + 1] = (u32)gfx;
|
||||
taskData[TD_GFX] = (u32)gfx >> 16;
|
||||
tGfxLo = (u32)gfx;
|
||||
tGfxHi = (u32)gfx >> 16;
|
||||
|
||||
return taskId;
|
||||
}
|
||||
|
@ -480,13 +480,13 @@ static const struct Subsprite sSubsprites_HofMonitorBig[] =
|
||||
|
||||
static const struct SubspriteTable sSubspriteTable_HofMonitorBig = subsprite_table(sSubsprites_HofMonitorBig);
|
||||
|
||||
const union AnimCmd gSpriteAnim_855C2CC[] =
|
||||
const union AnimCmd sAnim_Static[] =
|
||||
{
|
||||
ANIMCMD_FRAME(.imageValue = 0, .duration = 1),
|
||||
ANIMCMD_JUMP(0)
|
||||
};
|
||||
|
||||
const union AnimCmd gSpriteAnim_855C2D4[] =
|
||||
const union AnimCmd sAnim_Flicker[] =
|
||||
{
|
||||
ANIMCMD_FRAME(.imageValue = 0, .duration = 16),
|
||||
ANIMCMD_FRAME(.imageValue = 1, .duration = 16),
|
||||
@ -499,15 +499,16 @@ const union AnimCmd gSpriteAnim_855C2D4[] =
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
const union AnimCmd *const gSpriteAnimTable_855C2F8[] =
|
||||
// Flicker on and off, for the Pokéballs / monitors during the PokéCenter heal effect
|
||||
const union AnimCmd *const sAnims_Flicker[] =
|
||||
{
|
||||
gSpriteAnim_855C2CC,
|
||||
gSpriteAnim_855C2D4
|
||||
sAnim_Static,
|
||||
sAnim_Flicker
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnimTable_HofMonitor[] =
|
||||
static const union AnimCmd *const sAnims_HofMonitor[] =
|
||||
{
|
||||
gSpriteAnim_855C2CC
|
||||
sAnim_Static
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_PokeballGlow =
|
||||
@ -515,7 +516,7 @@ static const struct SpriteTemplate sSpriteTemplate_PokeballGlow =
|
||||
.tileTag = 0xFFFF,
|
||||
.paletteTag = FLDEFF_PAL_TAG_POKEBALL_GLOW,
|
||||
.oam = &sOam_8x8,
|
||||
.anims = gSpriteAnimTable_855C2F8,
|
||||
.anims = sAnims_Flicker,
|
||||
.images = sPicTable_PokeballGlow,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCB_PokeballGlow
|
||||
@ -526,7 +527,7 @@ static const struct SpriteTemplate sSpriteTemplate_PokecenterMonitor =
|
||||
.tileTag = 0xFFFF,
|
||||
.paletteTag = FLDEFF_PAL_TAG_GENERAL_0,
|
||||
.oam = &sOam_16x16,
|
||||
.anims = gSpriteAnimTable_855C2F8,
|
||||
.anims = sAnims_Flicker,
|
||||
.images = sPicTable_PokecenterMonitor,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCB_PokecenterMonitor
|
||||
@ -537,7 +538,7 @@ static const struct SpriteTemplate sSpriteTemplate_HofMonitorBig =
|
||||
.tileTag = 0xFFFF,
|
||||
.paletteTag = FLDEFF_PAL_TAG_HOF_MONITOR,
|
||||
.oam = &sOam_16x16,
|
||||
.anims = sAnimTable_HofMonitor,
|
||||
.anims = sAnims_HofMonitor,
|
||||
.images = sPicTable_HofMonitorBig,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCB_HallOfFameMonitor
|
||||
@ -548,7 +549,7 @@ static const struct SpriteTemplate sSpriteTemplate_HofMonitorSmall =
|
||||
.tileTag = 0xFFFF,
|
||||
.paletteTag = FLDEFF_PAL_TAG_HOF_MONITOR,
|
||||
.oam = &sOam_32x16,
|
||||
.anims = sAnimTable_HofMonitor,
|
||||
.anims = sAnims_HofMonitor,
|
||||
.images = sPicTable_HofMonitorSmall,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCB_HallOfFameMonitor
|
||||
@ -3853,16 +3854,8 @@ static void Task_MoveDeoxysRock(u8 taskId)
|
||||
case 0:
|
||||
data[4] = sprite->pos1.x << 4;
|
||||
data[5] = sprite->pos1.y << 4;
|
||||
|
||||
// UB: Possible divide by zero
|
||||
#ifdef UBFIX
|
||||
#define DIVISOR (data[8] ? data[8] : 1);
|
||||
#else
|
||||
#define DIVISOR (data[8])
|
||||
#endif
|
||||
|
||||
data[6] = (data[2] * 16 - data[4]) / DIVISOR;
|
||||
data[7] = (data[3] * 16 - data[5]) / DIVISOR;
|
||||
data[6] = SAFE_DIV(data[2] * 16 - data[4], data[8]);
|
||||
data[7] = SAFE_DIV(data[3] * 16 - data[5], data[8]);
|
||||
data[0]++;
|
||||
case 1:
|
||||
if (data[8] != 0)
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "constants/songs.h"
|
||||
#include "constants/map_types.h"
|
||||
|
||||
// structures
|
||||
struct FlashStruct
|
||||
{
|
||||
u8 fromType;
|
||||
@ -26,7 +25,6 @@ struct FlashStruct
|
||||
void (*func)(void);
|
||||
};
|
||||
|
||||
// static functions
|
||||
static void FieldCallback_Flash(void);
|
||||
static void FldEff_UseFlash(void);
|
||||
static bool8 TryDoMapTransition(void);
|
||||
@ -42,7 +40,6 @@ static void Task_EnterCaveTransition2(u8 taskId);
|
||||
static void Task_EnterCaveTransition3(u8 taskId);
|
||||
static void Task_EnterCaveTransition4(u8 taskId);
|
||||
|
||||
// rodata
|
||||
static const struct FlashStruct sTransitionTypes[] =
|
||||
{
|
||||
{MAP_TYPE_TOWN, MAP_TYPE_UNDERGROUND, TRUE, FALSE, DoEnterCaveTransition},
|
||||
@ -64,15 +61,14 @@ static const struct FlashStruct sTransitionTypes[] =
|
||||
{},
|
||||
};
|
||||
|
||||
static const u16 gCaveTransitionPalette_White[] = INCBIN_U16("graphics/misc/cave_transition_white.gbapal");
|
||||
static const u16 gCaveTransitionPalette_Black[] = INCBIN_U16("graphics/misc/cave_transition_black.gbapal");
|
||||
static const u16 sCaveTransitionPalette_White[] = INCBIN_U16("graphics/misc/cave_transition_white.gbapal");
|
||||
static const u16 sCaveTransitionPalette_Black[] = INCBIN_U16("graphics/misc/cave_transition_black.gbapal");
|
||||
|
||||
static const u16 gUnknown_085B2890[] = INCBIN_U16("graphics/misc/85B2890.gbapal");
|
||||
static const u16 gUnknown_085B28A0[] = INCBIN_U16("graphics/misc/85B28A0.gbapal");
|
||||
static const u32 gCaveTransitionTilemap[] = INCBIN_U32("graphics/misc/cave_transition_map.bin.lz");
|
||||
static const u32 gCaveTransitionTiles[] = INCBIN_U32("graphics/misc/cave_transition.4bpp.lz");
|
||||
static const u16 sCaveTransitionPalette_Enter[] = INCBIN_U16("graphics/misc/cave_transition_enter.gbapal");
|
||||
static const u16 sCaveTransitionPalette_Exit[] = INCBIN_U16("graphics/misc/cave_transition_exit.gbapal");
|
||||
static const u32 sCaveTransitionTilemap[] = INCBIN_U32("graphics/misc/cave_transition_map.bin.lz");
|
||||
static const u32 sCaveTransitionTiles[] = INCBIN_U32("graphics/misc/cave_transition.4bpp.lz");
|
||||
|
||||
// text
|
||||
bool8 SetUpFieldMove_Flash(void)
|
||||
{
|
||||
// In Ruby and Sapphire, Registeel's tomb is opened by using Fly. In Emerald,
|
||||
@ -220,10 +216,10 @@ static void Task_ExitCaveTransition1(u8 taskId)
|
||||
static void Task_ExitCaveTransition2(u8 taskId)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, 0);
|
||||
LZ77UnCompVram(gCaveTransitionTiles, (void *)(VRAM + 0xC000));
|
||||
LZ77UnCompVram(gCaveTransitionTilemap, (void *)(VRAM + 0xF800));
|
||||
LoadPalette(gCaveTransitionPalette_White, 0xE0, 0x20);
|
||||
LoadPalette(gUnknown_085B28A0, 0xE0, 0x10);
|
||||
LZ77UnCompVram(sCaveTransitionTiles, (void *)(VRAM + 0xC000));
|
||||
LZ77UnCompVram(sCaveTransitionTilemap, (void *)(VRAM + 0xF800));
|
||||
LoadPalette(sCaveTransitionPalette_White, 0xE0, 0x20);
|
||||
LoadPalette(sCaveTransitionPalette_Exit, 0xE0, 0x10);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0
|
||||
| BLDCNT_EFFECT_BLEND
|
||||
| BLDCNT_TGT2_BG1
|
||||
@ -274,11 +270,11 @@ static void Task_ExitCaveTransition4(u8 taskId)
|
||||
if (count < 8)
|
||||
{
|
||||
gTasks[taskId].data[2]++;
|
||||
LoadPalette(&gUnknown_085B28A0[count], 0xE0, 16 - 2 * count);
|
||||
LoadPalette(&sCaveTransitionPalette_Exit[count], 0xE0, 16 - 2 * count);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadPalette(gCaveTransitionPalette_White, 0, 0x20);
|
||||
LoadPalette(sCaveTransitionPalette_White, 0, 0x20);
|
||||
gTasks[taskId].func = Task_ExitCaveTransition5;
|
||||
gTasks[taskId].data[2] = 8;
|
||||
}
|
||||
@ -305,8 +301,8 @@ static void Task_EnterCaveTransition1(u8 taskId)
|
||||
static void Task_EnterCaveTransition2(u8 taskId)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, 0);
|
||||
LZ77UnCompVram(gCaveTransitionTiles, (void *)(VRAM + 0xC000));
|
||||
LZ77UnCompVram(gCaveTransitionTilemap, (void *)(VRAM + 0xF800));
|
||||
LZ77UnCompVram(sCaveTransitionTiles, (void *)(VRAM + 0xC000));
|
||||
LZ77UnCompVram(sCaveTransitionTilemap, (void *)(VRAM + 0xF800));
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDY, 0);
|
||||
@ -319,8 +315,8 @@ static void Task_EnterCaveTransition2(u8 taskId)
|
||||
| DISPCNT_OBJ_1D_MAP
|
||||
| DISPCNT_BG0_ON
|
||||
| DISPCNT_OBJ_ON);
|
||||
LoadPalette(gCaveTransitionPalette_White, 0xE0, 0x20);
|
||||
LoadPalette(gCaveTransitionPalette_Black, 0, 0x20);
|
||||
LoadPalette(sCaveTransitionPalette_White, 0xE0, 0x20);
|
||||
LoadPalette(sCaveTransitionPalette_Black, 0, 0x20);
|
||||
gTasks[taskId].func = Task_EnterCaveTransition3;
|
||||
gTasks[taskId].data[0] = 16;
|
||||
gTasks[taskId].data[1] = 0;
|
||||
@ -335,7 +331,7 @@ static void Task_EnterCaveTransition3(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].data[2]++;
|
||||
gTasks[taskId].data[2]++;
|
||||
LoadPalette(&gUnknown_085B2890[15 - count], 0xE0, 2 * (count + 1));
|
||||
LoadPalette(&sCaveTransitionPalette_Enter[15 - count], 0xE0, 2 * (count + 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -363,7 +359,7 @@ static void Task_EnterCaveTransition4(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadPalette(gCaveTransitionPalette_Black, 0, 0x20);
|
||||
LoadPalette(sCaveTransitionPalette_Black, 0, 0x20);
|
||||
SetMainCallback2(gMain.savedCallback);
|
||||
}
|
||||
}
|
||||
|
@ -2383,13 +2383,13 @@ void ClearRankingHallRecords(void)
|
||||
{
|
||||
s32 i, j, k;
|
||||
|
||||
// BUG: Passing 0 as a pointer instead of a pointer holding a value of 0.
|
||||
#ifdef BUGFIX
|
||||
u8 zero = 0;
|
||||
#define ZERO (&zero)
|
||||
#else
|
||||
// UB: Passing 0 as a pointer instead of a pointer holding a value of 0.
|
||||
#ifdef UBFIX
|
||||
u8 emptyId[TRAINER_ID_LENGTH] = {0};
|
||||
#define ZERO emptyId
|
||||
#else
|
||||
#define ZERO 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
for (i = 0; i < HALL_FACILITIES_COUNT; i++)
|
||||
{
|
||||
|
@ -1543,9 +1543,9 @@ const u16 gUnknown_08DE3350[] = INCBIN_U16("graphics/frontier_pass/tilemap1.bin"
|
||||
const u16 gUnknown_08DE3374[] = INCBIN_U16("graphics/frontier_pass/tilemap2.bin");
|
||||
|
||||
// Berry Crush
|
||||
const u16 gUnknown_08DE3398[] = INCBIN_U16("graphics/berry_crusher/tiles.gbapal");
|
||||
const u32 gUnknown_08DE34B8[] = INCBIN_U32("graphics/berry_crusher/tiles.4bpp.lz");
|
||||
const u32 gUnknown_08DE3FD4[] = INCBIN_U32("graphics/berry_crusher/tiles.bin.lz");
|
||||
const u16 gBerryCrush_Crusher_Pal[] = INCBIN_U16("graphics/berry_crush/crusher.gbapal");
|
||||
const u32 gBerryCrush_Crusher_Gfx[] = INCBIN_U32("graphics/berry_crush/crusher.4bpp.lz");
|
||||
const u32 gBerryCrush_Crusher_Tilemap[] = INCBIN_U32("graphics/berry_crush/crusher.bin.lz");
|
||||
|
||||
// random garbage at the end.
|
||||
static const u8 sEmpty3[0x54BAC] = {0};
|
||||
|
@ -51,7 +51,9 @@ static u16 QuantizePixel_GrayscaleSmall(u16*);
|
||||
static u16 QuantizePixel_Grayscale(u16*);
|
||||
static u16 QuantizePixel_PrimaryColors(u16*);
|
||||
|
||||
extern const u8 gPointillismPoints[][3];
|
||||
#define MAX_DIMENSION 64
|
||||
|
||||
#include "data/pointillism_points.h"
|
||||
|
||||
void ApplyImageProcessingEffects(struct ImageProcessingContext *context)
|
||||
{
|
||||
@ -169,7 +171,7 @@ static void ApplyImageEffect_RedChannelGrayscaleHighlight(u8 highlight)
|
||||
static void ApplyImageEffect_Pointillism(void)
|
||||
{
|
||||
u32 i;
|
||||
for (i = 0; i < 3200; i++)
|
||||
for (i = 0; i < ARRAY_COUNT(sPointillismPoints); i++)
|
||||
AddPointillismPoints(i);
|
||||
}
|
||||
|
||||
@ -307,9 +309,9 @@ static void ApplyImageEffect_Shimmer(void)
|
||||
|
||||
// First, invert all of the colors.
|
||||
pixel = gCanvasPixels;
|
||||
for (i = 0; i < 64; i++)
|
||||
for (i = 0; i < MAX_DIMENSION; i++)
|
||||
{
|
||||
for (j = 0; j < 64; j++, pixel++)
|
||||
for (j = 0; j < MAX_DIMENSION; j++, pixel++)
|
||||
{
|
||||
if (!IS_ALPHA(*pixel))
|
||||
*pixel = QuantizePixel_Invert(pixel);
|
||||
@ -317,16 +319,16 @@ static void ApplyImageEffect_Shimmer(void)
|
||||
}
|
||||
|
||||
// Blur the pixels twice.
|
||||
for (j = 0; j < 64; j++)
|
||||
for (j = 0; j < MAX_DIMENSION; j++)
|
||||
{
|
||||
pixel = &gCanvasPixels[j];
|
||||
prevPixel = *pixel;
|
||||
*pixel = RGB_ALPHA;
|
||||
for (i = 1, pixel += 64; i < 63; i++, pixel += 64)
|
||||
for (i = 1, pixel += MAX_DIMENSION; i < MAX_DIMENSION - 1; i++, pixel += MAX_DIMENSION)
|
||||
{
|
||||
if (!IS_ALPHA(*pixel))
|
||||
{
|
||||
*pixel = QuantizePixel_BlurHard(&prevPixel, pixel, pixel + 64);
|
||||
*pixel = QuantizePixel_BlurHard(&prevPixel, pixel, pixel + MAX_DIMENSION);
|
||||
prevPixel = *pixel;
|
||||
}
|
||||
}
|
||||
@ -335,11 +337,11 @@ static void ApplyImageEffect_Shimmer(void)
|
||||
pixel = &gCanvasPixels[j];
|
||||
prevPixel = *pixel;
|
||||
*pixel = RGB_ALPHA;
|
||||
for (i = 1, pixel += 64; i < 63; i++, pixel += 64)
|
||||
for (i = 1, pixel += MAX_DIMENSION; i < MAX_DIMENSION - 1; i++, pixel += MAX_DIMENSION)
|
||||
{
|
||||
if (!IS_ALPHA(*pixel))
|
||||
{
|
||||
*pixel = QuantizePixel_BlurHard(&prevPixel, pixel, pixel + 64);
|
||||
*pixel = QuantizePixel_BlurHard(&prevPixel, pixel, pixel + MAX_DIMENSION);
|
||||
prevPixel = *pixel;
|
||||
}
|
||||
}
|
||||
@ -351,9 +353,9 @@ static void ApplyImageEffect_Shimmer(void)
|
||||
// The above blur causes the outline areas to darken, which makes
|
||||
// this inversion give the effect of light outlines.
|
||||
pixel = gCanvasPixels;
|
||||
for (i = 0; i < 64; i++)
|
||||
for (i = 0; i < MAX_DIMENSION; i++)
|
||||
{
|
||||
for (j = 0; j < 64; j++, pixel++)
|
||||
for (j = 0; j < MAX_DIMENSION; j++, pixel++)
|
||||
{
|
||||
if (!IS_ALPHA(*pixel))
|
||||
*pixel = QuantizePixel_Invert(pixel);
|
||||
@ -408,19 +410,19 @@ struct PointillismPoint
|
||||
u16 delta;
|
||||
};
|
||||
|
||||
static void AddPointillismPoints(u16 arg0)
|
||||
static void AddPointillismPoints(u16 point)
|
||||
{
|
||||
u8 i;
|
||||
bool8 offsetDownLeft;
|
||||
u8 colorType;
|
||||
struct PointillismPoint points[6];
|
||||
|
||||
points[0].column = gPointillismPoints[arg0][0];
|
||||
points[0].row = gPointillismPoints[arg0][1];
|
||||
points[0].delta = (gPointillismPoints[arg0][2] >> 3) & 7;
|
||||
points[0].column = sPointillismPoints[point][0];
|
||||
points[0].row = sPointillismPoints[point][1];
|
||||
points[0].delta = GET_POINT_DELTA(sPointillismPoints[point][2]);
|
||||
|
||||
colorType = (gPointillismPoints[arg0][2] >> 1) & 3;
|
||||
offsetDownLeft = gPointillismPoints[arg0][2] & 1;
|
||||
colorType = GET_POINT_COLOR_TYPE(sPointillismPoints[point][2]);
|
||||
offsetDownLeft = GET_POINT_OFFSET_DL(sPointillismPoints[point][2]);
|
||||
for (i = 1; i < points[0].delta; i++)
|
||||
{
|
||||
if (!offsetDownLeft)
|
||||
@ -434,7 +436,7 @@ static void AddPointillismPoints(u16 arg0)
|
||||
points[i].row = points[0].row - 1;
|
||||
}
|
||||
|
||||
if (points[i].column > 63 || points[i].row > 63)
|
||||
if (points[i].column >= MAX_DIMENSION || points[i].row >= MAX_DIMENSION)
|
||||
{
|
||||
points[0].delta = i - 1;
|
||||
break;
|
||||
@ -445,7 +447,7 @@ static void AddPointillismPoints(u16 arg0)
|
||||
|
||||
for (i = 0; i < points[0].delta; i++)
|
||||
{
|
||||
u16 *pixel = &gCanvasPixels[points[i].row * 64] + points[i].column;
|
||||
u16 *pixel = &gCanvasPixels[points[i].row * MAX_DIMENSION] + points[i].column;
|
||||
|
||||
if (!IS_ALPHA(*pixel))
|
||||
{
|
||||
@ -457,7 +459,7 @@ static void AddPointillismPoints(u16 arg0)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
switch (((gPointillismPoints[arg0][2] >> 3) & 7) % 3)
|
||||
switch (GET_POINT_DELTA(sPointillismPoints[point][2]) % 3)
|
||||
{
|
||||
case 0:
|
||||
if (red >= points[i].delta)
|
||||
|
@ -1746,7 +1746,7 @@ static void Task_Scene3_SpinPokeball(u8 taskId)
|
||||
gTasks[taskId].func = Task_Scene3_WaitGroudon;
|
||||
}
|
||||
|
||||
PanFadeAndZoomScreen(0x78, 0x50, 0x10000 / gTasks[taskId].tZoomDiv, gTasks[taskId].tAlpha);
|
||||
PanFadeAndZoomScreen(0x78, 0x50, SAFE_DIV(0x10000, gTasks[taskId].tZoomDiv), gTasks[taskId].tAlpha);
|
||||
|
||||
if (gIntroFrameCounter == TIMER_POKEBALL_FADE)
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_WHITEALPHA);
|
||||
|
@ -19,9 +19,6 @@
|
||||
extern u16 gUnknown_0203CF30[];
|
||||
|
||||
// this file's functions
|
||||
#if !defined(NONMATCHING) && MODERN
|
||||
#define static
|
||||
#endif
|
||||
static bool8 CheckPyramidBagHasItem(u16 itemId, u16 count);
|
||||
static bool8 CheckPyramidBagHasSpace(u16 itemId, u16 count);
|
||||
|
||||
|
387
src/link.c
@ -41,8 +41,8 @@ struct LinkTestBGInfo
|
||||
{
|
||||
u32 screenBaseBlock;
|
||||
u32 paletteNum;
|
||||
u32 dummy_8;
|
||||
u32 dummy_C;
|
||||
u32 baseChar;
|
||||
u32 unused;
|
||||
};
|
||||
|
||||
static struct BlockTransfer sBlockSend;
|
||||
@ -97,28 +97,26 @@ struct Link gLink;
|
||||
u8 gLastRecvQueueCount;
|
||||
u16 gLinkSavedIme;
|
||||
|
||||
EWRAM_DATA u8 gLinkTestDebugValuesEnabled = 0;
|
||||
EWRAM_DATA u8 gUnknown_020223BD = 0;
|
||||
static EWRAM_DATA u8 sLinkTestDebugValuesEnabled = 0;
|
||||
static EWRAM_DATA u8 sDummyFlag = FALSE;
|
||||
EWRAM_DATA u32 gBerryBlenderKeySendAttempts = 0;
|
||||
EWRAM_DATA u16 gBlockRecvBuffer[MAX_RFU_PLAYERS][BLOCK_BUFFER_SIZE / 2] = {};
|
||||
EWRAM_DATA u8 gBlockSendBuffer[BLOCK_BUFFER_SIZE] = {};
|
||||
EWRAM_DATA bool8 gLinkOpen = FALSE;
|
||||
static EWRAM_DATA bool8 sLinkOpen = FALSE;
|
||||
EWRAM_DATA u16 gLinkType = 0;
|
||||
EWRAM_DATA u16 gLinkTimeOutCounter = 0;
|
||||
static EWRAM_DATA u16 sTimeOutCounter = 0;
|
||||
EWRAM_DATA struct LinkPlayer gLocalLinkPlayer = {};
|
||||
EWRAM_DATA struct LinkPlayer gLinkPlayers[MAX_RFU_PLAYERS] = {};
|
||||
EWRAM_DATA struct LinkPlayer gSavedLinkPlayers[MAX_RFU_PLAYERS] = {};
|
||||
static EWRAM_DATA struct LinkPlayer sSavedLinkPlayers[MAX_RFU_PLAYERS] = {};
|
||||
EWRAM_DATA struct {
|
||||
u32 status;
|
||||
u8 lastRecvQueueCount;
|
||||
u8 lastSendQueueCount;
|
||||
u8 unk_06;
|
||||
bool8 disconnected;
|
||||
} sLinkErrorBuffer = {};
|
||||
static EWRAM_DATA u16 sReadyCloseLinkAttempts = 0; // never read
|
||||
static EWRAM_DATA void *sLinkErrorBgTilemapBuffer = NULL;
|
||||
|
||||
// Static ROM declarations
|
||||
|
||||
static void InitLocalLinkPlayer(void);
|
||||
static void VBlankCB_LinkError(void);
|
||||
static void CB2_LinkTest(void);
|
||||
@ -131,7 +129,7 @@ static void LinkCB_BlockSend(void);
|
||||
static void LinkCB_BlockSendEnd(void);
|
||||
static void SetBlockReceivedFlag(u8 who);
|
||||
static u16 LinkTestCalcBlockChecksum(const u16 *src, u16 size);
|
||||
static void LinkTest_prnthex(u32 pos, u8 a0, u8 a1, u8 a2);
|
||||
static void LinkTest_PrintHex(u32 pos, u8 a0, u8 a1, u8 a2);
|
||||
static void LinkCB_RequestPlayerDataExchange(void);
|
||||
static void Task_PrintTestData(u8 taskId);
|
||||
|
||||
@ -160,15 +158,13 @@ static void DoSend(void);
|
||||
static void StopTimer(void);
|
||||
static void SendRecvDone(void);
|
||||
|
||||
// .rodata
|
||||
|
||||
static const u16 sWirelessLinkDisplayPal[] = INCBIN_U16("graphics/interface/wireless_link_display.gbapal");
|
||||
static const u32 sWirelessLinkDisplayGfx[] = INCBIN_U32("graphics/interface/wireless_link_display.4bpp.lz");
|
||||
static const u32 sWirelessLinkDisplayTilemap[] = INCBIN_U32("graphics/interface/wireless_link_display.bin.lz");
|
||||
static const u16 sLinkTestDigitsPal[] = INCBIN_U16("graphics/interface/link_test_digits.gbapal");
|
||||
static const u16 sLinkTestDigitsGfx[] = INCBIN_U16("graphics/interface/link_test_digits.4bpp");
|
||||
static const u8 sUnusedTransparentWhite[] = _("{HIGHLIGHT TRANSPARENT}{COLOR WHITE}");
|
||||
static const u16 s2BlankTilesGfx[] = INCBIN_U16("graphics/interface/blank_1x2.4bpp");
|
||||
static const u16 sCommErrorBg_Gfx[] = INCBIN_U16("graphics/interface/comm_error_bg.4bpp");
|
||||
static const struct BlockRequest sBlockRequests[] = {
|
||||
{gBlockSendBuffer, 200},
|
||||
{gBlockSendBuffer, 200},
|
||||
@ -226,15 +222,13 @@ static const struct WindowTemplate sLinkErrorWindowTemplates[] = {
|
||||
};
|
||||
|
||||
static const u8 sTextColors[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GREY };
|
||||
static const u8 sUnused_082ED224[] = {0x00, 0xFF, 0xFE, 0xFF, 0x00};
|
||||
|
||||
// .text
|
||||
static const u8 sUnusedData[] = {0x00, 0xFF, 0xFE, 0xFF, 0x00};
|
||||
|
||||
bool8 IsWirelessAdapterConnected(void)
|
||||
{
|
||||
SetWirelessCommType1();
|
||||
InitRFUAPI();
|
||||
if (rfu_LMAN_REQBN_softReset_and_checkID() == 0x8001)
|
||||
if (rfu_LMAN_REQBN_softReset_and_checkID() == RFU_ID)
|
||||
{
|
||||
rfu_REQ_stopMode();
|
||||
rfu_waitREQComplete();
|
||||
@ -251,13 +245,13 @@ void Task_DestroySelf(u8 taskId)
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
|
||||
static void InitLinkTestBG(u8 paletteNum, u8 bgNum, u8 screenBaseBlock, u8 charBaseBlock, u16 a4)
|
||||
static void InitLinkTestBG(u8 paletteNum, u8 bgNum, u8 screenBaseBlock, u8 charBaseBlock, u16 baseChar)
|
||||
{
|
||||
LoadPalette(sLinkTestDigitsPal, paletteNum * 16, 0x20);
|
||||
DmaCopy16(3, sLinkTestDigitsGfx, (u16 *)BG_CHAR_ADDR(charBaseBlock) + (16 * a4), sizeof sLinkTestDigitsGfx);
|
||||
DmaCopy16(3, sLinkTestDigitsGfx, (u16 *)BG_CHAR_ADDR(charBaseBlock) + (16 * baseChar), sizeof sLinkTestDigitsGfx);
|
||||
gLinkTestBGInfo.screenBaseBlock = screenBaseBlock;
|
||||
gLinkTestBGInfo.paletteNum = paletteNum;
|
||||
gLinkTestBGInfo.dummy_8 = a4;
|
||||
gLinkTestBGInfo.baseChar = baseChar;
|
||||
switch (bgNum)
|
||||
{
|
||||
case 1:
|
||||
@ -274,17 +268,19 @@ static void InitLinkTestBG(u8 paletteNum, u8 bgNum, u8 screenBaseBlock, u8 charB
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS + bgNum * 4, 0);
|
||||
}
|
||||
|
||||
void sub_80094EC(u8 paletteNum, u8 bgNum, u8 screenBaseBlock, u8 charBaseBlock)
|
||||
// Unused
|
||||
static void LoadLinkTestBgGfx(u8 paletteNum, u8 bgNum, u8 screenBaseBlock, u8 charBaseBlock)
|
||||
{
|
||||
LoadPalette(sLinkTestDigitsPal, paletteNum * 16, 0x20);
|
||||
DmaCopy16(3, sLinkTestDigitsGfx, (u16 *)BG_CHAR_ADDR(charBaseBlock), sizeof sLinkTestDigitsGfx);
|
||||
gLinkTestBGInfo.screenBaseBlock = screenBaseBlock;
|
||||
gLinkTestBGInfo.paletteNum = paletteNum;
|
||||
gLinkTestBGInfo.dummy_8 = 0;
|
||||
gLinkTestBGInfo.baseChar = 0;
|
||||
SetGpuReg(sBGControlRegs[bgNum], BGCNT_SCREENBASE(screenBaseBlock) | BGCNT_CHARBASE(charBaseBlock));
|
||||
}
|
||||
|
||||
void LinkTestScreen(void)
|
||||
// Unused
|
||||
static void LinkTestScreen(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -346,10 +342,9 @@ static void InitLink(void)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < CMD_LENGTH; i++)
|
||||
{
|
||||
gSendCmd[i] = 0xEfff;
|
||||
}
|
||||
gLinkOpen = TRUE;
|
||||
gSendCmd[i] = LINKCMD_NONE;
|
||||
|
||||
sLinkOpen = TRUE;
|
||||
EnableSerial();
|
||||
}
|
||||
|
||||
@ -402,7 +397,7 @@ void CloseLink(void)
|
||||
{
|
||||
LinkRfu_Shutdown();
|
||||
}
|
||||
gLinkOpen = FALSE;
|
||||
sLinkOpen = FALSE;
|
||||
DisableSerial();
|
||||
}
|
||||
|
||||
@ -413,14 +408,14 @@ static void TestBlockTransfer(u8 nothing, u8 is, u8 used)
|
||||
|
||||
if (sLinkTestLastBlockSendPos != sBlockSend.pos)
|
||||
{
|
||||
LinkTest_prnthex(sBlockSend.pos, 2, 3, 2);
|
||||
LinkTest_PrintHex(sBlockSend.pos, 2, 3, 2);
|
||||
sLinkTestLastBlockSendPos = sBlockSend.pos;
|
||||
}
|
||||
for (i = 0; i < MAX_LINK_PLAYERS; i++)
|
||||
{
|
||||
if (sLinkTestLastBlockRecvPos[i] != sBlockRecv[i].pos)
|
||||
{
|
||||
LinkTest_prnthex(sBlockRecv[i].pos, 2, i + 4, 2);
|
||||
LinkTest_PrintHex(sBlockRecv[i].pos, 2, i + 4, 2);
|
||||
sLinkTestLastBlockRecvPos[i] = sBlockRecv[i].pos;
|
||||
}
|
||||
}
|
||||
@ -435,8 +430,8 @@ static void TestBlockTransfer(u8 nothing, u8 is, u8 used)
|
||||
ResetBlockReceivedFlag(i);
|
||||
if (gLinkTestBlockChecksums[i] != 0x0342)
|
||||
{
|
||||
gLinkTestDebugValuesEnabled = FALSE;
|
||||
gUnknown_020223BD = FALSE;
|
||||
sLinkTestDebugValuesEnabled = FALSE;
|
||||
sDummyFlag = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -469,7 +464,7 @@ static void LinkTestProcessKeyInput(void)
|
||||
{
|
||||
SetCloseLinkCallback();
|
||||
}
|
||||
if (gLinkTestDebugValuesEnabled)
|
||||
if (sLinkTestDebugValuesEnabled)
|
||||
{
|
||||
SetLinkDebugValues(gMain.vblankCounter2, gLinkCallback ? gLinkVSyncDisabled : gLinkVSyncDisabled | 0x10);
|
||||
}
|
||||
@ -489,7 +484,7 @@ u16 LinkMain2(const u16 *heldKeys)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
if (!gLinkOpen)
|
||||
if (!sLinkOpen)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -555,10 +550,10 @@ static void ProcessRecvCmds(u8 unused)
|
||||
case LINKCMD_BLENDER_SEND_KEYS:
|
||||
gLinkPartnersHeldKeys[i] = gRecvCmds[i][1];
|
||||
break;
|
||||
case LINKCMD_0x5555:
|
||||
case LINKCMD_DUMMY_1:
|
||||
gLinkDummy2 = TRUE;
|
||||
break;
|
||||
case LINKCMD_0x5566:
|
||||
case LINKCMD_DUMMY_2:
|
||||
gLinkDummy2 = TRUE;
|
||||
break;
|
||||
case LINKCMD_INIT_BLOCK:
|
||||
@ -612,7 +607,7 @@ static void ProcessRecvCmds(u8 unused)
|
||||
linkPlayer->neverRead = 0;
|
||||
linkPlayer->progressFlags = 0;
|
||||
}
|
||||
sub_800B524(linkPlayer);
|
||||
ConvertLinkPlayerName(linkPlayer);
|
||||
if (strcmp(block->magic1, sASCIIGameFreakInc) != 0
|
||||
|| strcmp(block->magic2, sASCIIGameFreakInc) != 0)
|
||||
{
|
||||
@ -664,22 +659,19 @@ static void BuildSendCmd(u16 command)
|
||||
gSendCmd[0] = LINKCMD_BLENDER_SEND_KEYS;
|
||||
gSendCmd[1] = gMain.heldKeys;
|
||||
break;
|
||||
case LINKCMD_0x5555:
|
||||
gSendCmd[0] = LINKCMD_0x5555;
|
||||
case LINKCMD_DUMMY_1:
|
||||
gSendCmd[0] = LINKCMD_DUMMY_1;
|
||||
break;
|
||||
case LINKCMD_0x6666:
|
||||
gSendCmd[0] = LINKCMD_0x6666;
|
||||
case LINKCMD_SEND_EMPTY:
|
||||
gSendCmd[0] = LINKCMD_SEND_EMPTY;
|
||||
gSendCmd[1] = 0;
|
||||
break;
|
||||
case LINKCMD_0x7777:
|
||||
case LINKCMD_SEND_0xEE:
|
||||
{
|
||||
u8 i;
|
||||
|
||||
gSendCmd[0] = LINKCMD_0x7777;
|
||||
gSendCmd[0] = LINKCMD_SEND_0xEE;
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
gSendCmd[i + 1] = 0xEE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case LINKCMD_INIT_BLOCK:
|
||||
@ -690,8 +682,8 @@ static void BuildSendCmd(u16 command)
|
||||
case LINKCMD_BLENDER_NO_PBLOCK_SPACE:
|
||||
gSendCmd[0] = LINKCMD_BLENDER_NO_PBLOCK_SPACE;
|
||||
break;
|
||||
case LINKCMD_0xAAAB:
|
||||
gSendCmd[0] = LINKCMD_0xAAAB;
|
||||
case LINKCMD_SEND_ITEM:
|
||||
gSendCmd[0] = LINKCMD_SEND_ITEM;
|
||||
gSendCmd[1] = gSpecialVar_ItemId;
|
||||
break;
|
||||
case LINKCMD_SEND_BLOCK_REQ:
|
||||
@ -702,14 +694,13 @@ static void BuildSendCmd(u16 command)
|
||||
gSendCmd[0] = LINKCMD_READY_CLOSE_LINK;
|
||||
gSendCmd[1] = gReadyCloseLinkType;
|
||||
break;
|
||||
case LINKCMD_0x5566:
|
||||
gSendCmd[0] = LINKCMD_0x5566;
|
||||
case LINKCMD_DUMMY_2:
|
||||
gSendCmd[0] = LINKCMD_DUMMY_2;
|
||||
break;
|
||||
case LINKCMD_SEND_HELD_KEYS:
|
||||
if (gHeldKeyCodeToSend == 0 || gLinkTransferringData)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
gSendCmd[0] = LINKCMD_SEND_HELD_KEYS;
|
||||
gSendCmd[1] = gHeldKeyCodeToSend;
|
||||
break;
|
||||
@ -819,7 +810,7 @@ bool32 Link_AnyPartnersPlayingFRLG_JP(void)
|
||||
void OpenLinkTimed(void)
|
||||
{
|
||||
sPlayerDataExchangeStatus = EXCHANGE_NOT_STARTED;
|
||||
gLinkTimeOutCounter = 0;
|
||||
sTimeOutCounter = 0;
|
||||
OpenLink();
|
||||
}
|
||||
|
||||
@ -892,7 +883,7 @@ u8 GetLinkPlayerDataExchangeStatusTimed(int minPlayers, int maxPlayers)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (++gLinkTimeOutCounter > 600)
|
||||
else if (++sTimeOutCounter > 600)
|
||||
{
|
||||
sPlayerDataExchangeStatus = EXCHANGE_TIMED_OUT;
|
||||
}
|
||||
@ -909,9 +900,7 @@ bool8 IsLinkPlayerDataExchangeComplete(void)
|
||||
for (i = 0; i < GetLinkPlayerCount(); i++)
|
||||
{
|
||||
if (gLinkPlayers[i].linkType == gLinkPlayers[0].linkType)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
if (count == GetLinkPlayerCount())
|
||||
{
|
||||
@ -936,9 +925,7 @@ void ResetLinkPlayers(void)
|
||||
int i;
|
||||
|
||||
for (i = 0; i <= MAX_LINK_PLAYERS; i++)
|
||||
{
|
||||
gLinkPlayers[i] = (struct LinkPlayer){};
|
||||
}
|
||||
}
|
||||
|
||||
static void ResetBlockSend(void)
|
||||
@ -966,9 +953,8 @@ static bool32 InitBlockSend(const void *src, size_t size)
|
||||
else
|
||||
{
|
||||
if (src != gBlockSendBuffer)
|
||||
{
|
||||
memcpy(gBlockSendBuffer, src, size);
|
||||
}
|
||||
|
||||
sBlockSend.src = gBlockSendBuffer;
|
||||
}
|
||||
BuildSendCmd(LINKCMD_INIT_BLOCK);
|
||||
@ -980,9 +966,7 @@ static bool32 InitBlockSend(const void *src, size_t size)
|
||||
static void LinkCB_BlockSendBegin(void)
|
||||
{
|
||||
if (++sBlockSendDelayCounter > 2)
|
||||
{
|
||||
gLinkCallback = LinkCB_BlockSend;
|
||||
}
|
||||
}
|
||||
|
||||
static void LinkCB_BlockSend(void)
|
||||
@ -1020,13 +1004,9 @@ void SetBerryBlenderLinkCallback(void)
|
||||
{
|
||||
gBerryBlenderKeySendAttempts = 0;
|
||||
if (gWirelessCommType)
|
||||
{
|
||||
Rfu_SetBerryBlenderLinkCallback();
|
||||
}
|
||||
else
|
||||
{
|
||||
gLinkCallback = LinkCB_BerryBlenderSendHeldKeys;
|
||||
}
|
||||
}
|
||||
|
||||
// Unused
|
||||
@ -1044,9 +1024,8 @@ static void SendBerryBlenderNoSpaceForPokeblocks(void)
|
||||
u8 GetMultiplayerId(void)
|
||||
{
|
||||
if (gWirelessCommType == TRUE)
|
||||
{
|
||||
return Rfu_GetMultiplayerId();
|
||||
}
|
||||
|
||||
return SIO_MULTI_CNT->id;
|
||||
}
|
||||
|
||||
@ -1061,18 +1040,16 @@ u8 bitmask_all_link_players_but_self(void)
|
||||
bool8 SendBlock(u8 unused, const void *src, u16 size)
|
||||
{
|
||||
if (gWirelessCommType == TRUE)
|
||||
{
|
||||
return Rfu_InitBlockSend(src, size);
|
||||
}
|
||||
|
||||
return InitBlockSend(src, size);
|
||||
}
|
||||
|
||||
bool8 SendBlockRequest(u8 blockReqType)
|
||||
{
|
||||
if (gWirelessCommType == TRUE)
|
||||
{
|
||||
return Rfu_SendBlockRequest(blockReqType);
|
||||
}
|
||||
|
||||
if (gLinkCallback == NULL)
|
||||
{
|
||||
gBlockRequestType = blockReqType;
|
||||
@ -1085,31 +1062,25 @@ bool8 SendBlockRequest(u8 blockReqType)
|
||||
bool8 IsLinkTaskFinished(void)
|
||||
{
|
||||
if (gWirelessCommType == TRUE)
|
||||
{
|
||||
return IsLinkRfuTaskFinished();
|
||||
}
|
||||
|
||||
return gLinkCallback == NULL;
|
||||
}
|
||||
|
||||
u8 GetBlockReceivedStatus(void)
|
||||
{
|
||||
if (gWirelessCommType == TRUE)
|
||||
{
|
||||
return Rfu_GetBlockReceivedStatus();
|
||||
}
|
||||
|
||||
return (gBlockReceivedStatus[3] << 3) | (gBlockReceivedStatus[2] << 2) | (gBlockReceivedStatus[1] << 1) | (gBlockReceivedStatus[0] << 0);
|
||||
}
|
||||
|
||||
static void SetBlockReceivedFlag(u8 who)
|
||||
{
|
||||
if (gWirelessCommType == TRUE)
|
||||
{
|
||||
Rfu_SetBlockReceivedFlag(who);
|
||||
}
|
||||
else
|
||||
{
|
||||
gBlockReceivedStatus[who] = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void ResetBlockReceivedFlags(void)
|
||||
@ -1119,16 +1090,12 @@ void ResetBlockReceivedFlags(void)
|
||||
if (gWirelessCommType == TRUE)
|
||||
{
|
||||
for (i = 0; i < MAX_RFU_PLAYERS; i++)
|
||||
{
|
||||
Rfu_ResetBlockReceivedFlag(i);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < MAX_LINK_PLAYERS; i++)
|
||||
{
|
||||
gBlockReceivedStatus[i] = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1147,9 +1114,7 @@ void ResetBlockReceivedFlag(u8 who)
|
||||
void CheckShouldAdvanceLinkState(void)
|
||||
{
|
||||
if ((gLinkStatus & LINK_STAT_MASTER) && EXTRACT_PLAYER_COUNT(gLinkStatus) > 1)
|
||||
{
|
||||
gShouldAdvanceLinkState = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static u16 LinkTestCalcBlockChecksum(const u16 *src, u16 size)
|
||||
@ -1159,92 +1124,90 @@ static u16 LinkTestCalcBlockChecksum(const u16 *src, u16 size)
|
||||
|
||||
chksum = 0;
|
||||
for (i = 0; i < size / 2; i++)
|
||||
{
|
||||
chksum += src[i];
|
||||
}
|
||||
|
||||
return chksum;
|
||||
}
|
||||
|
||||
static void LinkTest_prnthexchar(char a0, u8 a1, u8 a2)
|
||||
static void LinkTest_PrintNumChar(char val, u8 x, u8 y)
|
||||
{
|
||||
u16 *vAddr;
|
||||
|
||||
vAddr = (u16 *)BG_SCREEN_ADDR(gLinkTestBGInfo.screenBaseBlock);
|
||||
vAddr[a2 * 32 + a1] = (gLinkTestBGInfo.paletteNum << 12) | (a0 + 1 + gLinkTestBGInfo.dummy_8);
|
||||
vAddr[y * 32 + x] = (gLinkTestBGInfo.paletteNum << 12) | (val + 1 + gLinkTestBGInfo.baseChar);
|
||||
}
|
||||
|
||||
static void LinkTest_prntchar(char a0, u8 a1, u8 a2)
|
||||
static void LinkTest_PrintChar(char val, u8 x, u8 y)
|
||||
{
|
||||
u16 *vAddr;
|
||||
|
||||
vAddr = (u16 *)BG_SCREEN_ADDR(gLinkTestBGInfo.screenBaseBlock);
|
||||
vAddr[a2 * 32 + a1] = (gLinkTestBGInfo.paletteNum << 12) | (a0 + gLinkTestBGInfo.dummy_8);
|
||||
vAddr[y * 32 + x] = (gLinkTestBGInfo.paletteNum << 12) | (val + gLinkTestBGInfo.baseChar);
|
||||
}
|
||||
|
||||
static void LinkTest_prnthex(u32 pos, u8 a0, u8 a1, u8 a2)
|
||||
static void LinkTest_PrintHex(u32 num, u8 x, u8 y, u8 length)
|
||||
{
|
||||
char sp[32 / 2];
|
||||
char buff[16];
|
||||
int i;
|
||||
|
||||
for (i = 0; i < a2; i++)
|
||||
for (i = 0; i < length; i++)
|
||||
{
|
||||
sp[i] = pos & 0xf;
|
||||
pos >>= 4;
|
||||
buff[i] = num & 0xF;
|
||||
num >>= 4;
|
||||
}
|
||||
for (i = a2 - 1; i >= 0; i--)
|
||||
for (i = length - 1; i >= 0; i--)
|
||||
{
|
||||
LinkTest_prnthexchar(sp[i], a0, a1);
|
||||
a0++;
|
||||
LinkTest_PrintNumChar(buff[i], x, y);
|
||||
x++;
|
||||
}
|
||||
}
|
||||
|
||||
static void LinkTest_prntint(int a0, u8 a1, u8 a2, u8 a3)
|
||||
static void LinkTest_PrintInt(int num, u8 x, u8 y, u8 length)
|
||||
{
|
||||
char sp[32 / 2];
|
||||
int sp10;
|
||||
char buff[16];
|
||||
int negX;
|
||||
int i;
|
||||
|
||||
sp10 = -1;
|
||||
if (a0 < 0)
|
||||
negX = -1;
|
||||
if (num < 0)
|
||||
{
|
||||
sp10 = a1;
|
||||
a0 = -a0;
|
||||
negX = x;
|
||||
num = -num;
|
||||
}
|
||||
for (i = 0; i < a3; i++)
|
||||
for (i = 0; i < length; i++)
|
||||
{
|
||||
sp[i] = a0 % 10;
|
||||
a0 /= 10;
|
||||
buff[i] = num % 10;
|
||||
num /= 10;
|
||||
}
|
||||
for (i = a3 - 1; i >= 0; i--)
|
||||
for (i = length - 1; i >= 0; i--)
|
||||
{
|
||||
LinkTest_prnthexchar(sp[i], a1, a2);
|
||||
a1++;
|
||||
}
|
||||
if (sp10 != -1)
|
||||
{
|
||||
LinkTest_prnthexchar(*"\n", sp10, a2);
|
||||
LinkTest_PrintNumChar(buff[i], x, y);
|
||||
x++;
|
||||
}
|
||||
|
||||
if (negX != -1)
|
||||
LinkTest_PrintNumChar(*"\n", negX, y);
|
||||
}
|
||||
|
||||
static void LinkTest_prntstr(const char *a0, u8 a1, u8 a2)
|
||||
static void LinkTest_PrintString(const char *str, u8 x, u8 y)
|
||||
{
|
||||
int r6;
|
||||
int xOffset;
|
||||
int i;
|
||||
int r5;
|
||||
int yOffset;
|
||||
|
||||
r5 = 0;
|
||||
r6 = 0;
|
||||
for (i = 0; a0[i] != 0; a0++)
|
||||
yOffset = 0;
|
||||
xOffset = 0;
|
||||
for (i = 0; str[i] != 0; str++)
|
||||
{
|
||||
if (a0[i] == *"\n")
|
||||
if (str[i] == *"\n")
|
||||
{
|
||||
r5++;
|
||||
r6 = 0;
|
||||
yOffset++;
|
||||
xOffset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
LinkTest_prntchar(a0[i], a1 + r6, a2 + r5);
|
||||
r6++;
|
||||
LinkTest_PrintChar(str[i], x + xOffset, y + yOffset);
|
||||
xOffset++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1260,29 +1223,28 @@ static void LinkCB_RequestPlayerDataExchange(void)
|
||||
|
||||
static void Task_PrintTestData(u8 taskId)
|
||||
{
|
||||
char sp[32];
|
||||
char testTitle[32];
|
||||
int i;
|
||||
|
||||
strcpy(sp, sASCIITestPrint);
|
||||
LinkTest_prntstr(sp, 5, 2);
|
||||
LinkTest_prnthex(gShouldAdvanceLinkState, 2, 1, 2);
|
||||
LinkTest_prnthex(gLinkStatus, 15, 1, 8);
|
||||
LinkTest_prnthex(gLink.state, 2, 10, 2);
|
||||
LinkTest_prnthex(EXTRACT_PLAYER_COUNT(gLinkStatus), 15, 10, 2);
|
||||
LinkTest_prnthex(GetMultiplayerId(), 15, 12, 2);
|
||||
LinkTest_prnthex(gLastSendQueueCount, 25, 1, 2);
|
||||
LinkTest_prnthex(gLastRecvQueueCount, 25, 2, 2);
|
||||
LinkTest_prnthex(GetBlockReceivedStatus(), 15, 5, 2);
|
||||
LinkTest_prnthex(gLinkDebugSeed, 2, 12, 8);
|
||||
LinkTest_prnthex(gLinkDebugFlags, 2, 13, 8);
|
||||
LinkTest_prnthex(GetSioMultiSI(), 25, 5, 1);
|
||||
LinkTest_prnthex(IsSioMultiMaster(), 25, 6, 1);
|
||||
LinkTest_prnthex(IsLinkConnectionEstablished(), 25, 7, 1);
|
||||
LinkTest_prnthex(HasLinkErrorOccurred(), 25, 8, 1);
|
||||
strcpy(testTitle, sASCIITestPrint);
|
||||
LinkTest_PrintString(testTitle, 5, 2);
|
||||
LinkTest_PrintHex(gShouldAdvanceLinkState, 2, 1, 2);
|
||||
LinkTest_PrintHex(gLinkStatus, 15, 1, 8);
|
||||
LinkTest_PrintHex(gLink.state, 2, 10, 2);
|
||||
LinkTest_PrintHex(EXTRACT_PLAYER_COUNT(gLinkStatus), 15, 10, 2);
|
||||
LinkTest_PrintHex(GetMultiplayerId(), 15, 12, 2);
|
||||
LinkTest_PrintHex(gLastSendQueueCount, 25, 1, 2);
|
||||
LinkTest_PrintHex(gLastRecvQueueCount, 25, 2, 2);
|
||||
LinkTest_PrintHex(GetBlockReceivedStatus(), 15, 5, 2);
|
||||
LinkTest_PrintHex(gLinkDebugSeed, 2, 12, 8);
|
||||
LinkTest_PrintHex(gLinkDebugFlags, 2, 13, 8);
|
||||
LinkTest_PrintHex(GetSioMultiSI(), 25, 5, 1);
|
||||
LinkTest_PrintHex(IsSioMultiMaster(), 25, 6, 1);
|
||||
LinkTest_PrintHex(IsLinkConnectionEstablished(), 25, 7, 1);
|
||||
LinkTest_PrintHex(HasLinkErrorOccurred(), 25, 8, 1);
|
||||
|
||||
for (i = 0; i < MAX_LINK_PLAYERS; i++)
|
||||
{
|
||||
LinkTest_prnthex(gLinkTestBlockChecksums[i], 10, 4 + i, 4);
|
||||
}
|
||||
LinkTest_PrintHex(gLinkTestBlockChecksums[i], 10, 4 + i, 4);
|
||||
}
|
||||
|
||||
void SetLinkDebugValues(u32 seed, u32 flags)
|
||||
@ -1298,9 +1260,8 @@ u8 GetSavedLinkPlayerCountAsBitFlags(void)
|
||||
|
||||
flags = 0;
|
||||
for (i = 0; i < gSavedLinkPlayerCount; i++)
|
||||
{
|
||||
flags |= (1 << i);
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
@ -1311,9 +1272,8 @@ u8 GetLinkPlayerCountAsBitFlags(void)
|
||||
|
||||
flags = 0;
|
||||
for (i = 0; i < GetLinkPlayerCount(); i++)
|
||||
{
|
||||
flags |= (1 << i);
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
@ -1324,9 +1284,7 @@ void SaveLinkPlayers(u8 playerCount)
|
||||
gSavedLinkPlayerCount = playerCount;
|
||||
gSavedMultiplayerId = GetMultiplayerId();
|
||||
for (i = 0; i < MAX_RFU_PLAYERS; i++)
|
||||
{
|
||||
gSavedLinkPlayers[i] = gLinkPlayers[i];
|
||||
}
|
||||
sSavedLinkPlayers[i] = gLinkPlayers[i];
|
||||
}
|
||||
|
||||
// The number of players when trading began. This is frequently compared against the
|
||||
@ -1349,7 +1307,7 @@ bool8 DoesLinkPlayerCountMatchSaved(void)
|
||||
|
||||
for (i = 0; i < gSavedLinkPlayerCount; i++)
|
||||
{
|
||||
if (gLinkPlayers[i].trainerId == gSavedLinkPlayers[i].trainerId)
|
||||
if (gLinkPlayers[i].trainerId == sSavedLinkPlayers[i].trainerId)
|
||||
{
|
||||
if (gLinkType == LINKTYPE_BATTLE_TOWER)
|
||||
{
|
||||
@ -1375,12 +1333,15 @@ bool8 DoesLinkPlayerCountMatchSaved(void)
|
||||
void ClearSavedLinkPlayers(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
// Clearly not what was meant to be written, but here it is anyway.
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
CpuSet(&gSavedLinkPlayers[i], NULL, sizeof(struct LinkPlayer));
|
||||
}
|
||||
// The CpuSet loop below is incorrectly writing to NULL
|
||||
// instead of sSavedLinkPlayers.
|
||||
// Additionally it's using the wrong array size.
|
||||
#ifdef UBFIX
|
||||
memset(sSavedLinkPlayers, 0, sizeof(sSavedLinkPlayers));
|
||||
#else
|
||||
for (i = 0; i < MAX_LINK_PLAYERS; i++)
|
||||
CpuSet(&sSavedLinkPlayers[i], NULL, sizeof(struct LinkPlayer));
|
||||
#endif
|
||||
}
|
||||
|
||||
void CheckLinkPlayersMatchSaved(void)
|
||||
@ -1389,8 +1350,8 @@ void CheckLinkPlayersMatchSaved(void)
|
||||
|
||||
for (i = 0; i < gSavedLinkPlayerCount; i++)
|
||||
{
|
||||
if (gSavedLinkPlayers[i].trainerId != gLinkPlayers[i].trainerId
|
||||
|| StringCompare(gSavedLinkPlayers[i].name, gLinkPlayers[i].name) != 0)
|
||||
if (sSavedLinkPlayers[i].trainerId != gLinkPlayers[i].trainerId
|
||||
|| StringCompare(sSavedLinkPlayers[i].name, gLinkPlayers[i].name) != 0)
|
||||
{
|
||||
gLinkErrorOccurred = TRUE;
|
||||
CloseLink();
|
||||
@ -1413,9 +1374,8 @@ u8 GetLinkPlayerCount_2(void)
|
||||
bool8 IsLinkMaster(void)
|
||||
{
|
||||
if (gWirelessCommType)
|
||||
{
|
||||
return Rfu_IsMaster();
|
||||
}
|
||||
|
||||
return EXTRACT_MASTER(gLinkStatus);
|
||||
}
|
||||
|
||||
@ -1568,9 +1528,8 @@ void SetLinkStandbyCallback(void)
|
||||
else
|
||||
{
|
||||
if (gLinkCallback == NULL)
|
||||
{
|
||||
gLinkCallback = LinkCB_Standby;
|
||||
}
|
||||
|
||||
gLinkDummy1 = FALSE;
|
||||
}
|
||||
}
|
||||
@ -1606,7 +1565,7 @@ static void LinkCB_StandbyForAll(void)
|
||||
|
||||
static void CheckErrorStatus(void)
|
||||
{
|
||||
if (gLinkOpen && EXTRACT_LINK_ERRORS(gLinkStatus))
|
||||
if (sLinkOpen && EXTRACT_LINK_ERRORS(gLinkStatus))
|
||||
{
|
||||
if (!gSuppressLinkErrorMessage)
|
||||
{
|
||||
@ -1620,12 +1579,12 @@ static void CheckErrorStatus(void)
|
||||
}
|
||||
}
|
||||
|
||||
void BufferLinkErrorInfo(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, bool8 unk_06)
|
||||
void BufferLinkErrorInfo(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, bool8 disconnected)
|
||||
{
|
||||
sLinkErrorBuffer.status = status;
|
||||
sLinkErrorBuffer.lastSendQueueCount = lastSendQueueCount;
|
||||
sLinkErrorBuffer.lastRecvQueueCount = lastRecvQueueCount;
|
||||
sLinkErrorBuffer.unk_06 = unk_06;
|
||||
sLinkErrorBuffer.disconnected = disconnected;
|
||||
}
|
||||
|
||||
void CB2_LinkError(void)
|
||||
@ -1645,16 +1604,15 @@ void CB2_LinkError(void)
|
||||
ScanlineEffect_Stop();
|
||||
if (gWirelessCommType)
|
||||
{
|
||||
if (!sLinkErrorBuffer.unk_06)
|
||||
{
|
||||
if (!sLinkErrorBuffer.disconnected)
|
||||
gWirelessCommType = 3;
|
||||
}
|
||||
|
||||
ResetLinkRfuGFLayer();
|
||||
}
|
||||
SetVBlankCallback(VBlankCB_LinkError);
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
InitBgsFromTemplates(0, sLinkErrorBgTemplates, ARRAY_COUNT(sLinkErrorBgTemplates));
|
||||
sLinkErrorBgTilemapBuffer = tilemapBuffer = malloc(0x800);
|
||||
sLinkErrorBgTilemapBuffer = tilemapBuffer = malloc(BG_SCREEN_SIZE);
|
||||
SetBgTilemapBuffer(1, tilemapBuffer);
|
||||
if (InitWindows(sLinkErrorWindowTemplates))
|
||||
{
|
||||
@ -1680,9 +1638,9 @@ void CB2_LinkError(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_800B080(void)
|
||||
static void ErrorMsg_MoveCloserToPartner(void)
|
||||
{
|
||||
LoadBgTiles(0, s2BlankTilesGfx, 0x20, 0);
|
||||
LoadBgTiles(0, sCommErrorBg_Gfx, 0x20, 0);
|
||||
DecompressAndLoadBgGfxUsingHeap(1, sWirelessLinkDisplayGfx, FALSE, 0, 0);
|
||||
CopyToBgTilemapBuffer(1, sWirelessLinkDisplayTilemap, 0, 0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
@ -1697,9 +1655,9 @@ static void sub_800B080(void)
|
||||
CopyWindowToVram(2, 3);
|
||||
}
|
||||
|
||||
static void sub_800B138(void)
|
||||
static void ErrorMsg_CheckConnections(void)
|
||||
{
|
||||
LoadBgTiles(0, s2BlankTilesGfx, 0x20, 0);
|
||||
LoadBgTiles(0, sCommErrorBg_Gfx, 0x20, 0);
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(0));
|
||||
FillWindowPixelBuffer(2, PIXEL_FILL(0));
|
||||
AddTextPrinterParameterized3(1, 3, 2, 0, sTextColors, 0, gText_CommErrorCheckConnections);
|
||||
@ -1714,21 +1672,17 @@ static void CB2_PrintErrorMessage(void)
|
||||
switch (gMain.state)
|
||||
{
|
||||
case 00:
|
||||
if (sLinkErrorBuffer.unk_06)
|
||||
{
|
||||
sub_800B080();
|
||||
}
|
||||
// Below is only true for the RFU, so the other error
|
||||
// type is inferred to be from a wired connection
|
||||
if (sLinkErrorBuffer.disconnected)
|
||||
ErrorMsg_MoveCloserToPartner();
|
||||
else
|
||||
{
|
||||
sub_800B138();
|
||||
}
|
||||
ErrorMsg_CheckConnections();
|
||||
break;
|
||||
case 02:
|
||||
ShowBg(0);
|
||||
if (sLinkErrorBuffer.unk_06)
|
||||
{
|
||||
if (sLinkErrorBuffer.disconnected)
|
||||
ShowBg(1);
|
||||
}
|
||||
break;
|
||||
case 30:
|
||||
PlaySE(SE_BOO);
|
||||
@ -1741,13 +1695,9 @@ static void CB2_PrintErrorMessage(void)
|
||||
break;
|
||||
case 130:
|
||||
if (gWirelessCommType == 2)
|
||||
{
|
||||
AddTextPrinterParameterized3(0, 3, 2, 20, sTextColors, 0, gText_ABtnTitleScreen);
|
||||
}
|
||||
else if (gWirelessCommType == 1)
|
||||
{
|
||||
AddTextPrinterParameterized3(0, 3, 2, 20, sTextColors, 0, gText_ABtnRegistrationCounter);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (gMain.state == 160)
|
||||
@ -1758,7 +1708,7 @@ static void CB2_PrintErrorMessage(void)
|
||||
{
|
||||
PlaySE(SE_PIN);
|
||||
gWirelessCommType = 0;
|
||||
sLinkErrorBuffer.unk_06 = 0;
|
||||
sLinkErrorBuffer.disconnected = FALSE;
|
||||
sub_81700F8();
|
||||
}
|
||||
}
|
||||
@ -1772,10 +1722,9 @@ static void CB2_PrintErrorMessage(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (gMain.state != 160)
|
||||
{
|
||||
gMain.state++;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: there might be a file boundary here, let's name it
|
||||
@ -1805,7 +1754,7 @@ bool8 HasLinkErrorOccurred(void)
|
||||
return gLinkErrorOccurred;
|
||||
}
|
||||
|
||||
void sub_800B348(void)
|
||||
void LocalLinkPlayerToBlock(void)
|
||||
{
|
||||
struct LinkPlayerBlock *block;
|
||||
|
||||
@ -1826,11 +1775,11 @@ void LinkPlayerFromBlock(u32 who)
|
||||
block = (struct LinkPlayerBlock *)gBlockRecvBuffer[who_];
|
||||
player = &gLinkPlayers[who_];
|
||||
*player = block->linkPlayer;
|
||||
sub_800B524(player);
|
||||
if (strcmp(block->magic1, sASCIIGameFreakInc) != 0 || strcmp(block->magic2, sASCIIGameFreakInc) != 0)
|
||||
{
|
||||
ConvertLinkPlayerName(player);
|
||||
|
||||
if (strcmp(block->magic1, sASCIIGameFreakInc) != 0
|
||||
|| strcmp(block->magic2, sASCIIGameFreakInc) != 0)
|
||||
SetMainCallback2(CB2_LinkError);
|
||||
}
|
||||
}
|
||||
|
||||
bool8 HandleLinkConnection(void)
|
||||
@ -1842,21 +1791,17 @@ bool8 HandleLinkConnection(void)
|
||||
{
|
||||
gLinkStatus = LinkMain1(&gShouldAdvanceLinkState, gSendCmd, gRecvCmds);
|
||||
LinkMain2(&gMain.heldKeys);
|
||||
if ((gLinkStatus & LINK_STAT_RECEIVED_NOTHING) && sub_808766C() == TRUE)
|
||||
{
|
||||
if ((gLinkStatus & LINK_STAT_RECEIVED_NOTHING) && IsSendingKeysOverCable() == TRUE)
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
r4 = sub_8010EC0();
|
||||
r5 = sub_8010F1C();
|
||||
if (sub_808766C() == TRUE)
|
||||
if (IsSendingKeysOverCable() == TRUE)
|
||||
{
|
||||
if (r4 == TRUE || IsRfuRecvQueueEmpty() || r5)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
@ -1865,42 +1810,34 @@ bool8 HandleLinkConnection(void)
|
||||
void SetWirelessCommType1(void)
|
||||
{
|
||||
if (gReceivedRemoteLinkPlayers == 0)
|
||||
{
|
||||
gWirelessCommType = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void SetWirelessCommType0_Internal(void)
|
||||
{
|
||||
if (gReceivedRemoteLinkPlayers == 0)
|
||||
{
|
||||
gWirelessCommType = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void SetWirelessCommType0(void)
|
||||
{
|
||||
if (gReceivedRemoteLinkPlayers == 0)
|
||||
{
|
||||
gWirelessCommType = 0;
|
||||
}
|
||||
}
|
||||
|
||||
u32 GetLinkRecvQueueLength(void)
|
||||
{
|
||||
if (gWirelessCommType != 0)
|
||||
{
|
||||
return GetRfuRecvQueueLength();
|
||||
}
|
||||
|
||||
return gLink.recvQueue.count;
|
||||
}
|
||||
|
||||
bool32 sub_800B504(void)
|
||||
bool32 IsLinkRecvQueueLengthAtLeast3(void)
|
||||
{
|
||||
if (GetLinkRecvQueueLength() > 2)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -1910,9 +1847,9 @@ u8 GetWirelessCommType(void)
|
||||
return gWirelessCommType;
|
||||
}
|
||||
|
||||
void sub_800B524(struct LinkPlayer *player)
|
||||
void ConvertLinkPlayerName(struct LinkPlayer *player)
|
||||
{
|
||||
player->progressFlagsCopy = player->progressFlags;
|
||||
player->progressFlagsCopy = player->progressFlags; // ? Perhaps relocating for a longer name field
|
||||
ConvertInternationalString(player->name, player->language);
|
||||
}
|
||||
|
||||
@ -2420,9 +2357,7 @@ void ResetSendBuffer(void)
|
||||
for (i = 0; i < CMD_LENGTH; i++)
|
||||
{
|
||||
for (j = 0; j < QUEUE_CAPACITY; j++)
|
||||
{
|
||||
gLink.sendQueue.data[i][j] = 0xEFFF;
|
||||
}
|
||||
gLink.sendQueue.data[i][j] = LINKCMD_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2439,9 +2374,7 @@ void ResetRecvBuffer(void)
|
||||
for (j = 0; j < CMD_LENGTH; j++)
|
||||
{
|
||||
for (k = 0; k < QUEUE_CAPACITY; k++)
|
||||
{
|
||||
gLink.recvQueue.data[i][j][k] = 0xEFFF;
|
||||
}
|
||||
gLink.recvQueue.data[i][j][k] = LINKCMD_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1697,7 +1697,7 @@ static void sub_801084C(u8 taskId)
|
||||
if (AreNoPlayersReceiving())
|
||||
{
|
||||
ResetBlockReceivedFlags();
|
||||
sub_800B348();
|
||||
LocalLinkPlayerToBlock();
|
||||
gTasks[taskId].data[0]++;
|
||||
}
|
||||
break;
|
||||
@ -1786,7 +1786,7 @@ static void ReceiveRfuLinkPlayers(const struct SioInfo *sioInfo)
|
||||
for (i = 0; i < MAX_RFU_PLAYERS; i++)
|
||||
{
|
||||
gLinkPlayers[i] = sioInfo->linkPlayers[i];
|
||||
sub_800B524(gLinkPlayers + i);
|
||||
ConvertLinkPlayerName(gLinkPlayers + i);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1831,7 +1831,7 @@ static void Task_ExchangeLinkPlayers(u8 taskId)
|
||||
ResetBlockReceivedFlag(r4);
|
||||
r2 = (struct LinkPlayerBlock *)gBlockRecvBuffer[r4];
|
||||
gLinkPlayers[r4] = r2->linkPlayer;
|
||||
sub_800B524(gLinkPlayers + r4);
|
||||
ConvertLinkPlayerName(gLinkPlayers + r4);
|
||||
gTasks[taskId].data[0]++;
|
||||
}
|
||||
break;
|
||||
@ -1887,7 +1887,7 @@ static void sub_8010D0C(u8 taskId)
|
||||
case 0:
|
||||
if (Rfu.playerCount)
|
||||
{
|
||||
sub_800B348();
|
||||
LocalLinkPlayerToBlock();
|
||||
SendBlock(0, gBlockSendBuffer, sizeof(struct LinkPlayerBlock));
|
||||
gTasks[taskId].data[0]++;
|
||||
}
|
||||
@ -2472,7 +2472,7 @@ void RfuVSync(void)
|
||||
rfu_LMAN_syncVBlank();
|
||||
}
|
||||
|
||||
void sub_8011AC8(void)
|
||||
void ClearRecvCommands(void)
|
||||
{
|
||||
CpuFill32(0, gRecvCmds, sizeof(gRecvCmds));
|
||||
}
|
||||
|
19
src/m4a.c
@ -1616,6 +1616,9 @@ void ply_xcmd_0C(struct MusicPlayerInfo *mplayInfo, struct MusicPlayerTrack *tra
|
||||
void ply_xcmd_0D(struct MusicPlayerInfo *mplayInfo, struct MusicPlayerTrack *track)
|
||||
{
|
||||
u32 unk;
|
||||
#ifdef UBFIX
|
||||
unk = 0;
|
||||
#endif
|
||||
|
||||
READ_XCMD_BYTE(unk, 0) // UB: uninitialized variable
|
||||
READ_XCMD_BYTE(unk, 1)
|
||||
@ -1657,18 +1660,12 @@ start_song:
|
||||
mplayInfo = &gPokemonCryMusicPlayers[i];
|
||||
mplayInfo->ident++;
|
||||
|
||||
#define CRY ((s32)&gPokemonCrySongs + i * sizeof(struct PokemonCrySong))
|
||||
#define CRY_OFS(field) offsetof(struct PokemonCrySong, field)
|
||||
gPokemonCrySongs[i] = gPokemonCrySong;
|
||||
|
||||
memcpy((void *)CRY, &gPokemonCrySong, sizeof(struct PokemonCrySong));
|
||||
|
||||
*(u32 *)(CRY + CRY_OFS(tone)) = (u32)tone;
|
||||
*(u32 *)(CRY + CRY_OFS(part)) = CRY + CRY_OFS(part0);
|
||||
*(u32 *)(CRY + CRY_OFS(part) + 4) = CRY + CRY_OFS(part1);
|
||||
*(u32 *)(CRY + CRY_OFS(gotoTarget)) = CRY + CRY_OFS(cont);
|
||||
|
||||
#undef CRY_OFS
|
||||
#undef CRY
|
||||
gPokemonCrySongs[i].tone = tone;
|
||||
gPokemonCrySongs[i].part[0] = &gPokemonCrySongs[i].part0;
|
||||
gPokemonCrySongs[i].part[1] = &gPokemonCrySongs[i].part1;
|
||||
gPokemonCrySongs[i].gotoTarget = (u32)&gPokemonCrySongs[i].cont;
|
||||
|
||||
mplayInfo->ident = ID_NUMBER;
|
||||
|
||||
|
@ -593,7 +593,7 @@ static bool8 MailReadBuildGraphics(void)
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
if (sub_8087598() == TRUE)
|
||||
if (Overworld_LinkRecvQueueLengthMoreThan2() == TRUE)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ void AgbMain()
|
||||
DoSoftReset();
|
||||
}
|
||||
|
||||
if (sub_8087634() == 1)
|
||||
if (Overworld_SendKeysToLinkIsRunning() == TRUE)
|
||||
{
|
||||
gLinkTransferringData = TRUE;
|
||||
UpdateLinkAndCallCallbacks();
|
||||
@ -143,7 +143,7 @@ void AgbMain()
|
||||
gLinkTransferringData = FALSE;
|
||||
UpdateLinkAndCallCallbacks();
|
||||
|
||||
if (sub_80875C8() == 1)
|
||||
if (Overworld_RecvKeysFromLinkIsRunning() == TRUE)
|
||||
{
|
||||
gMain.newKeys = 0;
|
||||
ClearSpriteCopyRequests();
|
||||
|
@ -197,8 +197,8 @@ static const u8 * const gBattlePyramid_MapHeaderStrings[] =
|
||||
gText_Pyramid,
|
||||
};
|
||||
|
||||
// text
|
||||
bool8 sub_80D47D4(void)
|
||||
// Unused
|
||||
static bool8 StartMenu_ShowMapNamePopup(void)
|
||||
{
|
||||
HideStartMenu();
|
||||
ShowMapNamePopup();
|
||||
@ -333,24 +333,36 @@ static void ShowMapNamePopUpWindow(void)
|
||||
CopyWindowToVram(GetMapNamePopUpWindowId(), 3);
|
||||
}
|
||||
|
||||
static void sub_80D4A78(u8 bg, u8 x, u8 y, u8 deltaX, u8 deltaY, u8 unused)
|
||||
#define TILE_TOP_EDGE_START 0x21D
|
||||
#define TILE_TOP_EDGE_END 0x228
|
||||
#define TILE_LEFT_EDGE_TOP 0x229
|
||||
#define TILE_RIGHT_EDGE_TOP 0x22A
|
||||
#define TILE_LEFT_EDGE_MID 0x22B
|
||||
#define TILE_RIGHT_EDGE_MID 0x22C
|
||||
#define TILE_LEFT_EDGE_BOT 0x22D
|
||||
#define TILE_RIGHT_EDGE_BOT 0x22E
|
||||
#define TILE_BOT_EDGE_START 0x22F
|
||||
#define TILE_BOT_EDGE_END 0x23A
|
||||
|
||||
static void DrawMapNamePopUpFrame(u8 bg, u8 x, u8 y, u8 deltaX, u8 deltaY, u8 unused)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 12; i++)
|
||||
{
|
||||
FillBgTilemapBufferRect(bg, 0x21D + i, i - 1 + x, y - 1, 1, 1, 0xE);
|
||||
}
|
||||
FillBgTilemapBufferRect(bg, 0x229, x - 1, y, 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x22A, deltaX + x, y, 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x22B, x - 1, y + 1 , 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x22C, deltaX + x, y + 1, 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x22D, x - 1, y + 2, 1, 1, 0xE);
|
||||
FillBgTilemapBufferRect(bg, 0x22E, deltaX + x, y + 2, 1, 1, 0xE);
|
||||
for (i = 0; i < 12; i++)
|
||||
{
|
||||
FillBgTilemapBufferRect(bg, 0x22F + i, i - 1 + x, y + deltaY, 1, 1, 0xE);
|
||||
}
|
||||
// Draw top edge
|
||||
for (i = 0; i < 1 + TILE_TOP_EDGE_END - TILE_TOP_EDGE_START; i++)
|
||||
FillBgTilemapBufferRect(bg, TILE_TOP_EDGE_START + i, i - 1 + x, y - 1, 1, 1, 14);
|
||||
|
||||
// Draw sides
|
||||
FillBgTilemapBufferRect(bg, TILE_LEFT_EDGE_TOP, x - 1, y, 1, 1, 14);
|
||||
FillBgTilemapBufferRect(bg, TILE_RIGHT_EDGE_TOP, deltaX + x, y, 1, 1, 14);
|
||||
FillBgTilemapBufferRect(bg, TILE_LEFT_EDGE_MID, x - 1, y + 1, 1, 1, 14);
|
||||
FillBgTilemapBufferRect(bg, TILE_RIGHT_EDGE_MID, deltaX + x, y + 1, 1, 1, 14);
|
||||
FillBgTilemapBufferRect(bg, TILE_LEFT_EDGE_BOT, x - 1, y + 2, 1, 1, 14);
|
||||
FillBgTilemapBufferRect(bg, TILE_RIGHT_EDGE_BOT, deltaX + x, y + 2, 1, 1, 14);
|
||||
|
||||
// Draw bottom edge
|
||||
for (i = 0; i < 1 + TILE_BOT_EDGE_END - TILE_BOT_EDGE_START; i++)
|
||||
FillBgTilemapBufferRect(bg, TILE_BOT_EDGE_START + i, i - 1 + x, y + deltaY, 1, 1, 14);
|
||||
}
|
||||
|
||||
static void LoadMapNamePopUpWindowBg(void)
|
||||
@ -369,7 +381,7 @@ static void LoadMapNamePopUpWindowBg(void)
|
||||
popUpThemeId = gRegionMapSectionId_To_PopUpThemeIdMapping[regionMapSectionId];
|
||||
|
||||
LoadBgTiles(GetWindowAttribute(popupWindowId, WINDOW_BG), gMapPopUp_Outline_Table[popUpThemeId], 0x400, 0x21D);
|
||||
CallWindowFunction(popupWindowId, sub_80D4A78);
|
||||
CallWindowFunction(popupWindowId, DrawMapNamePopUpFrame);
|
||||
PutWindowTilemap(popupWindowId);
|
||||
if (gMapHeader.weather == WEATHER_UNDERWATER_BUBBLES)
|
||||
LoadPalette(&gUnknown_0857F444, 0xE0, 0x20);
|
||||
|
@ -425,21 +425,21 @@ static void StartBardSong(bool8 useTemporaryLyrics)
|
||||
gTasks[taskId].tUseTemporaryLyrics = useTemporaryLyrics;
|
||||
}
|
||||
|
||||
static void sub_81206F0(void)
|
||||
static void EnableTextPrinters(void)
|
||||
{
|
||||
gUnknown_03002F84 = FALSE;
|
||||
gDisableTextPrinters = FALSE;
|
||||
}
|
||||
|
||||
static void BardSong_TextSubPrinter(struct TextPrinterTemplate * printer, u16 a1)
|
||||
static void BardSong_DisableTextPrinters(struct TextPrinterTemplate * printer, u16 a1)
|
||||
{
|
||||
gUnknown_03002F84 = TRUE;
|
||||
gDisableTextPrinters = TRUE;
|
||||
}
|
||||
|
||||
static void sub_8120708(const u8 * src)
|
||||
{
|
||||
DrawDialogueFrame(0, 0);
|
||||
AddTextPrinterParameterized(0, 1, src, 0, 1, 1, BardSong_TextSubPrinter);
|
||||
gUnknown_03002F84 = TRUE;
|
||||
AddTextPrinterParameterized(0, 1, src, 0, 1, 1, BardSong_DisableTextPrinters);
|
||||
gDisableTextPrinters = TRUE;
|
||||
CopyWindowToVram(0, 3);
|
||||
}
|
||||
|
||||
@ -620,7 +620,7 @@ static void Task_BardSong(u8 taskId)
|
||||
else if (gStringVar4[task->tCharIndex] == CHAR_SPACE)
|
||||
{
|
||||
|
||||
sub_81206F0();
|
||||
EnableTextPrinters();
|
||||
task->tCharIndex++;
|
||||
task->tState = 2;
|
||||
task->data[2] = 0;
|
||||
@ -640,7 +640,7 @@ static void Task_BardSong(u8 taskId)
|
||||
else if (gStringVar4[task->tCharIndex] == CHAR_SONG_WORD_SEPARATOR)
|
||||
{
|
||||
gStringVar4[task->tCharIndex] = CHAR_SPACE; // restore it back to a space
|
||||
sub_81206F0();
|
||||
EnableTextPrinters();
|
||||
task->tCharIndex++;
|
||||
task->data[2] = 0;
|
||||
}
|
||||
@ -649,7 +649,7 @@ static void Task_BardSong(u8 taskId)
|
||||
switch (task->data[1])
|
||||
{
|
||||
case 0:
|
||||
sub_81206F0();
|
||||
EnableTextPrinters();
|
||||
task->data[1]++;
|
||||
break;
|
||||
case 1:
|
||||
|
@ -312,14 +312,14 @@ static bool8 sub_81221D0(void)
|
||||
if (!MenuHelpers_LinkSomething())
|
||||
return FALSE;
|
||||
else
|
||||
return sub_8087598();
|
||||
return Overworld_LinkRecvQueueLengthMoreThan2();
|
||||
}
|
||||
|
||||
bool8 MenuHelpers_CallLinkSomething(void)
|
||||
{
|
||||
if (sub_81221D0() == TRUE)
|
||||
return TRUE;
|
||||
else if (sub_800B504() != TRUE)
|
||||
else if (IsLinkRecvQueueLengthAtLeast3() != TRUE)
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
|
@ -5,15 +5,366 @@
|
||||
#include "sound.h"
|
||||
#include "task.h"
|
||||
#include "trig.h"
|
||||
#include "minigame_countdown.h"
|
||||
#include "constants/songs.h"
|
||||
|
||||
/*
|
||||
This file contains two types of '3-2-1 Start' countdowns intended for use by the wireless minigames.
|
||||
|
||||
One is static, where the numbers simply appear and disappear without moving. This version is unused.
|
||||
The other (used) version has the numbers squish and bounce up as they appear.
|
||||
*/
|
||||
|
||||
#define TAG_STATIC_COUNTDOWN 0x2000
|
||||
|
||||
enum {
|
||||
STATE_IDLE = 1,
|
||||
STATE_START,
|
||||
STATE_RUN,
|
||||
STATE_END,
|
||||
};
|
||||
|
||||
enum {
|
||||
FUNC_INIT,
|
||||
FUNC_FREE,
|
||||
FUNC_START,
|
||||
FUNC_RUN,
|
||||
};
|
||||
|
||||
enum {
|
||||
ANIM_THREE,
|
||||
ANIM_TWO,
|
||||
ANIM_ONE,
|
||||
ANIM_START_LEFT,
|
||||
ANIM_START_MID,
|
||||
ANIM_START_RIGHT,
|
||||
};
|
||||
|
||||
extern const struct OamData gOamData_AffineOff_ObjNormal_32x32;
|
||||
|
||||
static void sub_802E6D0(u8 taskId);
|
||||
static void sub_802E83C(u8 taskId);
|
||||
static void sub_802E8C8(u8 taskId);
|
||||
static void sub_802EA50(u8 taskId);
|
||||
static void sub_802EAB0(u8 taskId);
|
||||
static void Task_StaticCountdown(u8 taskId);
|
||||
static void Task_StaticCountdown_Init(u8 taskId);
|
||||
static void Task_StaticCountdown_Free(u8 taskId);
|
||||
static void Task_StaticCountdown_Start(u8 taskId);
|
||||
static void Task_StaticCountdown_Run(u8 taskId);
|
||||
|
||||
static const u16 s321Start_Static_Pal[] = INCBIN_U16("graphics/minigame_countdown/321start_static.gbapal");
|
||||
static const u32 s321Start_Static_Gfx[] = INCBIN_U32("graphics/minigame_countdown/321start_static.4bpp.lz");
|
||||
|
||||
static const struct CompressedSpriteSheet sSpriteSheet_321Start_Static[] =
|
||||
{
|
||||
{s321Start_Static_Gfx, 0xC00, TAG_STATIC_COUNTDOWN},
|
||||
{},
|
||||
};
|
||||
|
||||
static const struct SpritePalette sSpritePalette_321Start_Static[] =
|
||||
{
|
||||
{s321Start_Static_Pal, TAG_STATIC_COUNTDOWN},
|
||||
{},
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_StaticCountdown_Three[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_StaticCountdown_Two[] =
|
||||
{
|
||||
ANIMCMD_FRAME(16, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_StaticCountdown_One[] =
|
||||
{
|
||||
ANIMCMD_FRAME(32, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_StaticCountdown_StartLeft[] =
|
||||
{
|
||||
ANIMCMD_FRAME(64, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_StaticCountdown_StartMid[] =
|
||||
{
|
||||
ANIMCMD_FRAME(48, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_StaticCountdown_StartRight[] =
|
||||
{
|
||||
ANIMCMD_FRAME(80, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnims_StaticCountdown[] =
|
||||
{
|
||||
[ANIM_THREE] = sAnim_StaticCountdown_Three,
|
||||
[ANIM_TWO] = sAnim_StaticCountdown_Two,
|
||||
[ANIM_ONE] = sAnim_StaticCountdown_One,
|
||||
[ANIM_START_LEFT] = sAnim_StaticCountdown_StartLeft,
|
||||
[ANIM_START_MID] = sAnim_StaticCountdown_StartMid,
|
||||
[ANIM_START_RIGHT] = sAnim_StaticCountdown_StartRight
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_StaticCountdown[] =
|
||||
{
|
||||
{
|
||||
.tileTag = TAG_STATIC_COUNTDOWN,
|
||||
.paletteTag = TAG_STATIC_COUNTDOWN,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = sAnims_StaticCountdown,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy,
|
||||
},
|
||||
};
|
||||
|
||||
static const TaskFunc sStaticCountdownFuncs[][4] =
|
||||
{
|
||||
{
|
||||
[FUNC_INIT] = Task_StaticCountdown_Init,
|
||||
[FUNC_FREE] = Task_StaticCountdown_Free,
|
||||
[FUNC_START] = Task_StaticCountdown_Start,
|
||||
[FUNC_RUN] = Task_StaticCountdown_Run
|
||||
},
|
||||
};
|
||||
|
||||
#define tState data[0]
|
||||
#define tFuncSetId data[1] // These 4 data elements are indexes into
|
||||
#define tSpriteTemplateId data[2] // arrays that only have 1 element with
|
||||
#define tSpriteSheetId data[3] // data. As such their only legal value
|
||||
#define tSpritePalId data[4] // is 0. Unclear why they were used.
|
||||
#define tInterval data[5]
|
||||
#define tPriority data[6]
|
||||
#define tSubpriority data[7]
|
||||
#define tNumSprites data[8]
|
||||
#define tX data[9]
|
||||
#define tY data[10]
|
||||
#define tPrevTime data[10] // Re-used
|
||||
#define tTimer data[11]
|
||||
#define tLinkTimer data[12]
|
||||
// 13-15 hold sprite ids
|
||||
// tSpriteIds(0) is used for the number sprites, and the leftmost part of 'Start'
|
||||
// tSpriteIds(1) is used for the middle part of 'Start'
|
||||
// tSpriteIds(2) is used for for the rightmost part of 'Start'
|
||||
#define tSpriteIds(i) data[13 + i]
|
||||
|
||||
#define sInterval data[1] // Never read
|
||||
#define sAnimNum data[2]
|
||||
#define sTaskId data[3]
|
||||
#define sId data[4] // Never read
|
||||
#define sNumberSpriteId data[5] // Never read
|
||||
|
||||
// Unused
|
||||
static u32 CreateStaticCountdownTask(u8 funcSetId, u8 taskPriority)
|
||||
{
|
||||
u8 taskId = CreateTask(Task_StaticCountdown, taskPriority);
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
task->tState = STATE_IDLE;
|
||||
task->tFuncSetId = funcSetId;
|
||||
sStaticCountdownFuncs[funcSetId][FUNC_INIT](taskId);
|
||||
return taskId;
|
||||
}
|
||||
|
||||
static bool32 StartStaticCountdown(void)
|
||||
{
|
||||
u8 taskId = FindTaskIdByFunc(Task_StaticCountdown);
|
||||
if (taskId == TASK_NONE)
|
||||
return FALSE;
|
||||
|
||||
gTasks[taskId].tState = STATE_START;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool32 IsStaticCountdownRunning(void)
|
||||
{
|
||||
return FuncIsActiveTask(Task_StaticCountdown);
|
||||
}
|
||||
|
||||
static void Task_StaticCountdown(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
switch (tState)
|
||||
{
|
||||
// STATE_IDLE does nothing; wait until started
|
||||
case STATE_START:
|
||||
sStaticCountdownFuncs[tFuncSetId][FUNC_START](taskId);
|
||||
tState = STATE_RUN;
|
||||
break;
|
||||
case STATE_RUN:
|
||||
sStaticCountdownFuncs[tFuncSetId][FUNC_RUN](taskId);
|
||||
break;
|
||||
case STATE_END:
|
||||
sStaticCountdownFuncs[tFuncSetId][FUNC_FREE](taskId);
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void StaticCountdown_CreateSprites(u8 taskId, s16 *data)
|
||||
{
|
||||
u8 i;
|
||||
struct Sprite *sprite;
|
||||
|
||||
LoadCompressedSpriteSheet(&sSpriteSheet_321Start_Static[tSpriteSheetId]);
|
||||
LoadSpritePalette(&sSpritePalette_321Start_Static[tSpritePalId]);
|
||||
for (i = 0; i < tNumSprites; i++)
|
||||
tSpriteIds(i) = CreateSprite(&sSpriteTemplate_StaticCountdown[tSpriteTemplateId], tX, tY, tSubpriority);
|
||||
for (i = 0; i < tNumSprites; i++)
|
||||
{
|
||||
sprite = &gSprites[tSpriteIds(i)];
|
||||
sprite->oam.priority = tPriority;
|
||||
sprite->invisible = TRUE;
|
||||
sprite->sInterval = tInterval;
|
||||
sprite->sTaskId = taskId;
|
||||
sprite->sId = i;
|
||||
sprite->sNumberSpriteId = tSpriteIds(0);
|
||||
}
|
||||
}
|
||||
|
||||
static void Task_StaticCountdown_Init(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
tSpriteTemplateId = 0;
|
||||
tSpriteSheetId = 0;
|
||||
tSpritePalId = 0;
|
||||
tInterval = 60;
|
||||
tPriority = 0;
|
||||
tSubpriority = 0;
|
||||
tNumSprites = 3;
|
||||
tX = 120;
|
||||
tY = 88;
|
||||
StaticCountdown_CreateSprites(taskId, data);
|
||||
|
||||
StartSpriteAnim(&gSprites[tSpriteIds(1)], ANIM_START_MID);
|
||||
gSprites[tSpriteIds(1)].pos2.x = -32;
|
||||
|
||||
StartSpriteAnim(&gSprites[tSpriteIds(2)], ANIM_START_RIGHT);
|
||||
gSprites[tSpriteIds(2)].pos2.x = 32;
|
||||
}
|
||||
|
||||
static void Task_StaticCountdown_Free(u8 taskId)
|
||||
{
|
||||
u8 i = 0;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
for (i = 0; i < tNumSprites; i++)
|
||||
DestroySprite(&gSprites[tSpriteIds(i)]);
|
||||
FreeSpriteTilesByTag(sSpriteSheet_321Start_Static[tSpriteSheetId].tag);
|
||||
FreeSpritePaletteByTag(sSpritePalette_321Start_Static[tSpritePalId].tag);
|
||||
}
|
||||
|
||||
static void SpriteCB_StaticCountdown(struct Sprite *sprite)
|
||||
{
|
||||
s16 *data = gTasks[sprite->sTaskId].data;
|
||||
|
||||
if (tTimer % tInterval != 0)
|
||||
return;
|
||||
if (tTimer == tPrevTime)
|
||||
return;
|
||||
|
||||
tPrevTime = tTimer;
|
||||
switch (sprite->sAnimNum)
|
||||
{
|
||||
case ANIM_THREE:
|
||||
sprite->invisible = FALSE;
|
||||
case ANIM_TWO:
|
||||
case ANIM_ONE:
|
||||
// Set sprite to a number
|
||||
PlaySE(SE_BALL_BOUNCE_1);
|
||||
StartSpriteAnim(sprite, sprite->sAnimNum);
|
||||
break;
|
||||
case ANIM_START_LEFT:
|
||||
// Set sprite to 'Start'
|
||||
PlaySE(SE_PIN);
|
||||
StartSpriteAnim(sprite, sprite->sAnimNum);
|
||||
gSprites[tSpriteIds(1)].invisible = FALSE;
|
||||
gSprites[tSpriteIds(2)].invisible = FALSE;
|
||||
break;
|
||||
case ANIM_START_LEFT + 1: // End
|
||||
// Hide countdown
|
||||
sprite->invisible = TRUE;
|
||||
gSprites[tSpriteIds(1)].invisible = TRUE;
|
||||
gSprites[tSpriteIds(2)].invisible = TRUE;
|
||||
tState = STATE_END;
|
||||
return;
|
||||
}
|
||||
sprite->sAnimNum++;
|
||||
}
|
||||
|
||||
static void Task_StaticCountdown_Start(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
PlaySE(SE_BALL_BOUNCE_1);
|
||||
gSprites[tSpriteIds(0)].callback = SpriteCB_StaticCountdown;
|
||||
gSprites[tSpriteIds(0)].invisible = FALSE;
|
||||
gTasks[taskId].tState = STATE_RUN;
|
||||
}
|
||||
|
||||
// Increment timer for progressing the countdown.
|
||||
// If the player is the link leader, increment a
|
||||
// separate timer and send it to group members for
|
||||
// them to read and use.
|
||||
static void Task_StaticCountdown_Run(u8 taskId)
|
||||
{
|
||||
u16 packet[RFU_PACKET_SIZE];
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
if (gReceivedRemoteLinkPlayers != 0)
|
||||
{
|
||||
// Read link timer
|
||||
if (gRecvCmds[0][1] == LINKCMD_COUNTDOWN)
|
||||
tTimer = gRecvCmds[0][2];
|
||||
|
||||
if (GetMultiplayerId() == 0)
|
||||
{
|
||||
// Player is link leader.
|
||||
// Send timer to group members
|
||||
tLinkTimer++;
|
||||
memset(packet, 0, sizeof(packet));
|
||||
packet[0] = LINKCMD_COUNTDOWN;
|
||||
packet[1] = tLinkTimer;
|
||||
Rfu_SendPacket(packet);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Local, just increment own timer
|
||||
tTimer++;
|
||||
}
|
||||
}
|
||||
|
||||
#undef tState
|
||||
#undef tFuncSetId
|
||||
#undef tSpriteTemplateId
|
||||
#undef tSpriteSheetId
|
||||
#undef tSpritePalId
|
||||
#undef tInterval
|
||||
#undef tPriority
|
||||
#undef tSubpriority
|
||||
#undef tNumSprites
|
||||
#undef tX
|
||||
#undef tY
|
||||
#undef tPrevTime
|
||||
#undef tTimer
|
||||
#undef tLinkTimer
|
||||
#undef tSpriteIds
|
||||
#undef sInterval
|
||||
#undef sAnimNum
|
||||
#undef sTaskId
|
||||
#undef sId
|
||||
#undef sNumberSpriteId
|
||||
|
||||
/*
|
||||
The countdown that actually gets used by
|
||||
the wireless minigames starts here
|
||||
*/
|
||||
|
||||
static void Task_MinigameCountdown(u8 taskId);
|
||||
static bool32 RunMinigameCountdownDigitsAnim(u8 spriteId);
|
||||
static bool32 IsStartGraphicAnimRunning(u8 spriteId);
|
||||
@ -23,260 +374,8 @@ static void CreateStartSprite(u16 tileTag, u16 palTag, s16 x, s16 y, u8 subprior
|
||||
static void InitStartGraphic(u8 spriteId1, u8 spriteId2, u8 spriteId3);
|
||||
static void SpriteCB_Start(struct Sprite *sprite);
|
||||
|
||||
static const u16 sSpritePal_321Start_2[] = INCBIN_U16("graphics/link_games/321start_2.gbapal");
|
||||
static const u32 sSpriteSheet_321Start_2[] = INCBIN_U32("graphics/link_games/321start_2.4bpp.lz");
|
||||
|
||||
static const struct CompressedSpriteSheet gUnknown_082FE6C8[] =
|
||||
{
|
||||
{sSpriteSheet_321Start_2, 0xC00, 0x2000},
|
||||
{},
|
||||
};
|
||||
|
||||
static const struct SpritePalette gUnknown_082FE6D8[] =
|
||||
{
|
||||
{sSpritePal_321Start_2, 0x2000},
|
||||
{},
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_82FE6E8[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_82FE6F0[] =
|
||||
{
|
||||
ANIMCMD_FRAME(16, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_82FE6F8[] =
|
||||
{
|
||||
ANIMCMD_FRAME(32, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_82FE700[] =
|
||||
{
|
||||
ANIMCMD_FRAME(64, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_82FE708[] =
|
||||
{
|
||||
ANIMCMD_FRAME(48, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sSpriteAnim_82FE710[] =
|
||||
{
|
||||
ANIMCMD_FRAME(80, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sSpriteAnimTable_82FE718[] =
|
||||
{
|
||||
sSpriteAnim_82FE6E8,
|
||||
sSpriteAnim_82FE6F0,
|
||||
sSpriteAnim_82FE6F8,
|
||||
sSpriteAnim_82FE700,
|
||||
sSpriteAnim_82FE708,
|
||||
sSpriteAnim_82FE710
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gUnknown_082FE730[] =
|
||||
{
|
||||
{
|
||||
.tileTag = 0x2000,
|
||||
.paletteTag = 0x2000,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x32,
|
||||
.anims = sSpriteAnimTable_82FE718,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy,
|
||||
},
|
||||
};
|
||||
|
||||
static const TaskFunc gUnknown_082FE748[][4] =
|
||||
{
|
||||
{
|
||||
sub_802E83C,
|
||||
sub_802E8C8,
|
||||
sub_802EA50,
|
||||
sub_802EAB0
|
||||
},
|
||||
};
|
||||
|
||||
static const u16 sSpritePal_321Start[] = INCBIN_U16("graphics/link_games/321start.gbapal");
|
||||
static const u32 sSpriteSheet_321Start[] = INCBIN_U32("graphics/link_games/321start.4bpp.lz");
|
||||
|
||||
// Unused
|
||||
static u32 sub_802E63C(u8 funcSetId, u8 taskPriority)
|
||||
{
|
||||
u8 taskId = CreateTask(sub_802E6D0, taskPriority);
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
task->data[0] = 1;
|
||||
task->data[1] = funcSetId;
|
||||
gUnknown_082FE748[funcSetId][0](taskId);
|
||||
return taskId;
|
||||
}
|
||||
|
||||
static bool32 sub_802E688(void)
|
||||
{
|
||||
u8 taskId = FindTaskIdByFunc(sub_802E6D0);
|
||||
if (taskId == TASK_NONE)
|
||||
return FALSE;
|
||||
|
||||
gTasks[taskId].data[0] = 2;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool32 sub_802E6BC(void)
|
||||
{
|
||||
return FuncIsActiveTask(sub_802E6D0);
|
||||
}
|
||||
|
||||
static void sub_802E6D0(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
switch (data[0])
|
||||
{
|
||||
case 2:
|
||||
gUnknown_082FE748[data[1]][2](taskId);
|
||||
data[0] = 3;
|
||||
break;
|
||||
case 3:
|
||||
gUnknown_082FE748[data[1]][3](taskId);
|
||||
break;
|
||||
case 4:
|
||||
gUnknown_082FE748[data[1]][1](taskId);
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_802E75C(u8 taskId, s16 *data)
|
||||
{
|
||||
u8 i;
|
||||
struct Sprite *sprite;
|
||||
|
||||
LoadCompressedSpriteSheet(&gUnknown_082FE6C8[data[3]]);
|
||||
LoadSpritePalette(&gUnknown_082FE6D8[data[4]]);
|
||||
for (i = 0; i < data[8]; i++)
|
||||
data[13 + i] = CreateSprite(&gUnknown_082FE730[data[2]], data[9], data[10], data[7]);
|
||||
for (i = 0; i < data[8]; i++)
|
||||
{
|
||||
sprite = &gSprites[data[13 + i]];
|
||||
sprite->oam.priority = data[6];
|
||||
sprite->invisible = TRUE;
|
||||
sprite->data[1] = data[5];
|
||||
sprite->data[3] = taskId;
|
||||
sprite->data[4] = i;
|
||||
sprite->data[5] = data[13];
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_802E83C(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
data[2] = 0;
|
||||
data[3] = 0;
|
||||
data[4] = 0;
|
||||
data[5] = 60;
|
||||
data[6] = 0;
|
||||
data[7] = 0;
|
||||
data[8] = 3;
|
||||
data[9] = 120;
|
||||
data[10] = 88;
|
||||
sub_802E75C(taskId, data);
|
||||
|
||||
StartSpriteAnim(&gSprites[data[14]], 4);
|
||||
gSprites[data[14]].pos2.x = -32;
|
||||
|
||||
StartSpriteAnim(&gSprites[data[15]], 5);
|
||||
gSprites[data[15]].pos2.x = 32;
|
||||
}
|
||||
|
||||
static void sub_802E8C8(u8 taskId)
|
||||
{
|
||||
u8 i = 0;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
for (i = 0; i < data[8]; i++)
|
||||
DestroySprite(&gSprites[data[13 + i]]);
|
||||
FreeSpriteTilesByTag(gUnknown_082FE6C8[data[3]].tag);
|
||||
FreeSpritePaletteByTag(gUnknown_082FE6D8[data[4]].tag);
|
||||
}
|
||||
|
||||
static void sub_802E938(struct Sprite *sprite)
|
||||
{
|
||||
s16 *data = gTasks[sprite->data[3]].data;
|
||||
|
||||
if (data[11] % data[5] != 0)
|
||||
return;
|
||||
if (data[11] == data[10])
|
||||
return;
|
||||
|
||||
data[10] = data[11];
|
||||
switch (sprite->data[2])
|
||||
{
|
||||
case 0:
|
||||
sprite->invisible = FALSE;
|
||||
case 1:
|
||||
case 2:
|
||||
PlaySE(SE_BALL_BOUNCE_1);
|
||||
StartSpriteAnim(sprite, sprite->data[2]);
|
||||
break;
|
||||
case 3:
|
||||
PlaySE(SE_PIN);
|
||||
StartSpriteAnim(sprite, sprite->data[2]);
|
||||
gSprites[data[14]].invisible = FALSE;
|
||||
gSprites[data[15]].invisible = FALSE;
|
||||
break;
|
||||
case 4:
|
||||
sprite->invisible = TRUE;
|
||||
gSprites[data[14]].invisible = TRUE;
|
||||
gSprites[data[15]].invisible = TRUE;
|
||||
data[0] = 4;
|
||||
return;
|
||||
}
|
||||
sprite->data[2]++;
|
||||
}
|
||||
|
||||
static void sub_802EA50(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
PlaySE(SE_BALL_BOUNCE_1);
|
||||
gSprites[data[13]].callback = sub_802E938;
|
||||
gSprites[data[13]].invisible = FALSE;
|
||||
gTasks[taskId].data[0] = 3;
|
||||
}
|
||||
|
||||
static void sub_802EAB0(u8 taskId)
|
||||
{
|
||||
u16 packet[6];
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
if (gReceivedRemoteLinkPlayers != 0)
|
||||
{
|
||||
if (gRecvCmds[0][1] == LINKCMD_0x7FFF)
|
||||
data[11] = gRecvCmds[0][2];
|
||||
if (GetMultiplayerId() == 0)
|
||||
{
|
||||
data[12]++;
|
||||
memset(packet, 0, sizeof(packet));
|
||||
packet[0] = LINKCMD_0x7FFF;
|
||||
packet[1] = data[12];
|
||||
Rfu_SendPacket(packet);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
data[11]++;
|
||||
}
|
||||
}
|
||||
static const u16 s321Start_Pal[] = INCBIN_U16("graphics/minigame_countdown/321start.gbapal");
|
||||
static const u32 s321Start_Gfx[] = INCBIN_U32("graphics/minigame_countdown/321start.4bpp.lz");
|
||||
|
||||
#define tState data[0]
|
||||
#define tTilesTag data[2]
|
||||
@ -288,7 +387,7 @@ static void sub_802EAB0(u8 taskId)
|
||||
#define tSpriteId2 data[8]
|
||||
#define tSpriteId3 data[9]
|
||||
|
||||
void StartMinigameCountdown(s16 tilesTag, s16 palTag, s16 x, s16 y, u8 subpriority)
|
||||
void StartMinigameCountdown(u16 tilesTag, u16 palTag, s16 x, s16 y, u8 subpriority)
|
||||
{
|
||||
u8 taskId = CreateTask(Task_MinigameCountdown, 80);
|
||||
gTasks[taskId].tTilesTag = tilesTag;
|
||||
@ -337,69 +436,82 @@ static void Task_MinigameCountdown(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
#define sState data[0]
|
||||
#define sTimer data[2]
|
||||
#define sAnimNum data[4]
|
||||
|
||||
static bool32 RunMinigameCountdownDigitsAnim(u8 spriteId)
|
||||
{
|
||||
struct Sprite *sprite = &gSprites[spriteId];
|
||||
|
||||
switch (sprite->data[0])
|
||||
switch (sprite->sState)
|
||||
{
|
||||
case 0:
|
||||
sub_8007E18(sprite, 0x800, 0x1A);
|
||||
sprite->data[0]++;
|
||||
sprite->sState++;
|
||||
// fallthrough
|
||||
case 1:
|
||||
if (sprite->data[2] == 0)
|
||||
if (sprite->sTimer == 0)
|
||||
PlaySE(SE_BALL_BOUNCE_2);
|
||||
if (++sprite->data[2] >= 20)
|
||||
|
||||
if (++sprite->sTimer >= 20)
|
||||
{
|
||||
sprite->data[2] = 0;
|
||||
// Ready for jump
|
||||
sprite->sTimer = 0;
|
||||
StartSpriteAffineAnim(sprite, 1);
|
||||
sprite->data[0]++;
|
||||
sprite->sState++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (sprite->affineAnimEnded)
|
||||
sprite->data[0]++;
|
||||
sprite->sState++;
|
||||
break;
|
||||
case 3:
|
||||
if (++sprite->data[2] >= 4)
|
||||
if (++sprite->sTimer >= 4)
|
||||
{
|
||||
sprite->data[2] = 0;
|
||||
sprite->data[0]++;
|
||||
// Start jump
|
||||
sprite->sTimer = 0;
|
||||
sprite->sState++;
|
||||
StartSpriteAffineAnim(sprite, 2);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
// Moving up from jump
|
||||
sprite->pos1.y -= 4;
|
||||
if (++sprite->data[2] >= 8)
|
||||
if (++sprite->sTimer >= 8)
|
||||
{
|
||||
if (sprite->data[4] <= 1)
|
||||
if (sprite->sAnimNum < 2)
|
||||
{
|
||||
StartSpriteAnim(sprite, sprite->data[4] + 1);
|
||||
sprite->data[2] = 0;
|
||||
sprite->data[0]++;
|
||||
// Swap to the next number
|
||||
StartSpriteAnim(sprite, sprite->sAnimNum + 1);
|
||||
sprite->sTimer = 0;
|
||||
sprite->sState++;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->data[0] = 7;
|
||||
// End
|
||||
sprite->sState = 7;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
// Falling after jump
|
||||
sprite->pos1.y += 4;
|
||||
if (++sprite->data[2] >= 8)
|
||||
if (++sprite->sTimer >= 8)
|
||||
{
|
||||
sprite->data[2] = 0;
|
||||
// Land from jump
|
||||
sprite->sTimer = 0;
|
||||
StartSpriteAffineAnim(sprite, 3);
|
||||
sprite->data[0]++;
|
||||
sprite->sState++;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (sprite->affineAnimEnded)
|
||||
{
|
||||
sprite->data[4]++;
|
||||
sprite->data[0] = 1;
|
||||
// Restart for next number
|
||||
sprite->sAnimNum++;
|
||||
sprite->sState = 1;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
@ -409,6 +521,10 @@ static bool32 RunMinigameCountdownDigitsAnim(u8 spriteId)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#undef sState
|
||||
#undef sTimer
|
||||
#undef sAnimNum
|
||||
|
||||
// First argument is unused.
|
||||
static void InitStartGraphic(u8 spriteId1, u8 spriteId2, u8 spriteId3)
|
||||
{
|
||||
@ -425,60 +541,70 @@ static bool32 IsStartGraphicAnimRunning(u8 spriteId)
|
||||
return gSprites[spriteId].callback == SpriteCB_Start;
|
||||
}
|
||||
|
||||
#define sState data[0]
|
||||
#define sTimer data[1]
|
||||
#define sYSpeed data[4]
|
||||
#define sY data[5]
|
||||
|
||||
static void SpriteCB_Start(struct Sprite *sprite)
|
||||
{
|
||||
int y;
|
||||
s16 *data = sprite->data;
|
||||
|
||||
switch (data[0])
|
||||
switch (sState)
|
||||
{
|
||||
case 0:
|
||||
data[4] = 64;
|
||||
data[5] = sprite->pos2.y << 4;
|
||||
data[0]++;
|
||||
sYSpeed = 64;
|
||||
sY = sprite->pos2.y << 4;
|
||||
sState++;
|
||||
case 1:
|
||||
data[5] += data[4];
|
||||
data[4]++;
|
||||
sprite->pos2.y = data[5] >> 4;
|
||||
sY += sYSpeed;
|
||||
sYSpeed++;
|
||||
sprite->pos2.y = sY >> 4;
|
||||
if (sprite->pos2.y >= 0)
|
||||
{
|
||||
PlaySE(SE_BALL_BOUNCE_2);
|
||||
sprite->pos2.y = 0;
|
||||
data[0]++;
|
||||
sState++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
data[1] += 12;
|
||||
if (data[1] >= 128)
|
||||
sTimer += 12;
|
||||
if (sTimer >= 128)
|
||||
{
|
||||
PlaySE(SE_BALL_BOUNCE_2);
|
||||
data[1] = 0;
|
||||
data[0]++;
|
||||
sTimer = 0;
|
||||
sState++;
|
||||
}
|
||||
y = gSineTable[data[1]];
|
||||
y = gSineTable[sTimer];
|
||||
sprite->pos2.y = -(y >> 4);
|
||||
break;
|
||||
case 3:
|
||||
data[1] += 16;
|
||||
if (data[1] >= 128)
|
||||
sTimer += 16;
|
||||
if (sTimer >= 128)
|
||||
{
|
||||
PlaySE(SE_BALL_BOUNCE_2);
|
||||
data[1] = 0;
|
||||
data[0]++;
|
||||
sTimer = 0;
|
||||
sState++;
|
||||
}
|
||||
sprite->pos2.y = -(gSineTable[data[1]] >> 5);
|
||||
sprite->pos2.y = -(gSineTable[sTimer] >> 5);
|
||||
break;
|
||||
case 4:
|
||||
if (++data[1] > 40)
|
||||
if (++sTimer > 40)
|
||||
sprite->callback = SpriteCallbackDummy;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#undef sState
|
||||
#undef sTimer
|
||||
#undef sYSpeed
|
||||
#undef sY
|
||||
|
||||
static void Load321StartGfx(u16 tileTag, u16 palTag)
|
||||
{
|
||||
struct CompressedSpriteSheet spriteSheet = {sSpriteSheet_321Start, 0xE00, 0};
|
||||
struct SpritePalette spritePalette = {sSpritePal_321Start, 0};
|
||||
struct CompressedSpriteSheet spriteSheet = {s321Start_Gfx, 0xE00, 0};
|
||||
struct SpritePalette spritePalette = {s321Start_Pal, 0};
|
||||
|
||||
spriteSheet.tag = tileTag;
|
||||
spritePalette.tag = palTag;
|
||||
@ -564,26 +690,26 @@ static const union AnimCmd *const sAnimTable_Start[] =
|
||||
sAnim_StartRight
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd sAffineAnim_Numbers_0[] =
|
||||
static const union AffineAnimCmd sAffineAnim_Numbers_Normal[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(256, 256, 0, 0),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd sAffineAnim_Numbers_1[] =
|
||||
static const union AffineAnimCmd sAffineAnim_Numbers_Squash[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(256, 256, 0, 0),
|
||||
AFFINEANIMCMD_FRAME(16, -16, 0, 8),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd sAffineAnim_Numbers_2[] =
|
||||
static const union AffineAnimCmd sAffineAnim_Numbers_Stretch[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(-18, 18, 0, 8),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd sAffineAnim_Numbers_3[] =
|
||||
static const union AffineAnimCmd sAffineAnim_Numbers_Land[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME( 6, -6, 0, 8),
|
||||
AFFINEANIMCMD_FRAME( -4, 4, 0, 8),
|
||||
@ -593,10 +719,10 @@ static const union AffineAnimCmd sAffineAnim_Numbers_3[] =
|
||||
|
||||
static const union AffineAnimCmd *const sAffineAnimTable_Numbers[] =
|
||||
{
|
||||
sAffineAnim_Numbers_0,
|
||||
sAffineAnim_Numbers_1,
|
||||
sAffineAnim_Numbers_2,
|
||||
sAffineAnim_Numbers_3
|
||||
sAffineAnim_Numbers_Normal,
|
||||
sAffineAnim_Numbers_Squash, // Push down before the jump
|
||||
sAffineAnim_Numbers_Stretch, // Stretch up for the jump
|
||||
sAffineAnim_Numbers_Land // Land after the jump
|
||||
};
|
||||
|
||||
static u8 CreateNumberSprite(u16 tileTag, u16 palTag, s16 x, s16 y, u8 subpriority)
|
||||
|
@ -75,7 +75,7 @@ static u8 ButtonMode_ProcessInput(u8 selection);
|
||||
static void ButtonMode_DrawChoices(u8 selection);
|
||||
static void DrawTextOption(void);
|
||||
static void DrawOptionMenuTexts(void);
|
||||
static void sub_80BB154(void);
|
||||
static void DrawBgWindowFrames(void);
|
||||
|
||||
EWRAM_DATA static bool8 sArrowPressed = FALSE;
|
||||
|
||||
@ -228,7 +228,7 @@ void CB2_InitOptionMenu(void)
|
||||
DrawOptionMenuTexts();
|
||||
gMain.state++;
|
||||
case 9:
|
||||
sub_80BB154();
|
||||
DrawBgWindowFrames();
|
||||
gMain.state++;
|
||||
break;
|
||||
case 10:
|
||||
@ -642,25 +642,37 @@ static void DrawOptionMenuTexts(void)
|
||||
CopyWindowToVram(WIN_OPTIONS, 3);
|
||||
}
|
||||
|
||||
static void sub_80BB154(void)
|
||||
#define TILE_TOP_CORNER_L 0x1A2
|
||||
#define TILE_TOP_EDGE 0x1A3
|
||||
#define TILE_TOP_CORNER_R 0x1A4
|
||||
#define TILE_LEFT_EDGE 0x1A5
|
||||
#define TILE_RIGHT_EDGE 0x1A7
|
||||
#define TILE_BOT_CORNER_L 0x1A8
|
||||
#define TILE_BOT_EDGE 0x1A9
|
||||
#define TILE_BOT_CORNER_R 0x1AA
|
||||
|
||||
static void DrawBgWindowFrames(void)
|
||||
{
|
||||
// bg, tileNum, x, y, width, height, pal
|
||||
FillBgTilemapBufferRect(1, 0x1A2, 1, 0, 1, 1, 7);
|
||||
FillBgTilemapBufferRect(1, 0x1A3, 2, 0, 0x1B, 1, 7);
|
||||
FillBgTilemapBufferRect(1, 0x1A4, 28, 0, 1, 1, 7);
|
||||
FillBgTilemapBufferRect(1, 0x1A5, 1, 1, 1, 2, 7);
|
||||
FillBgTilemapBufferRect(1, 0x1A7, 28, 1, 1, 2, 7);
|
||||
FillBgTilemapBufferRect(1, 0x1A8, 1, 3, 1, 1, 7);
|
||||
FillBgTilemapBufferRect(1, 0x1A9, 2, 3, 0x1B, 1, 7);
|
||||
FillBgTilemapBufferRect(1, 0x1AA, 28, 3, 1, 1, 7);
|
||||
FillBgTilemapBufferRect(1, 0x1A2, 1, 4, 1, 1, 7);
|
||||
FillBgTilemapBufferRect(1, 0x1A3, 2, 4, 0x1A, 1, 7);
|
||||
FillBgTilemapBufferRect(1, 0x1A4, 28, 4, 1, 1, 7);
|
||||
FillBgTilemapBufferRect(1, 0x1A5, 1, 5, 1, 0x12, 7);
|
||||
FillBgTilemapBufferRect(1, 0x1A7, 28, 5, 1, 0x12, 7);
|
||||
FillBgTilemapBufferRect(1, 0x1A8, 1, 19, 1, 1, 7);
|
||||
FillBgTilemapBufferRect(1, 0x1A9, 2, 19, 0x1A, 1, 7);
|
||||
FillBgTilemapBufferRect(1, 0x1AA, 28, 19, 1, 1, 7);
|
||||
// bg, tile, x, y, width, height, palNum
|
||||
// Draw title window frame
|
||||
FillBgTilemapBufferRect(1, TILE_TOP_CORNER_L, 1, 0, 1, 1, 7);
|
||||
FillBgTilemapBufferRect(1, TILE_TOP_EDGE, 2, 0, 27, 1, 7);
|
||||
FillBgTilemapBufferRect(1, TILE_TOP_CORNER_R, 28, 0, 1, 1, 7);
|
||||
FillBgTilemapBufferRect(1, TILE_LEFT_EDGE, 1, 1, 1, 2, 7);
|
||||
FillBgTilemapBufferRect(1, TILE_RIGHT_EDGE, 28, 1, 1, 2, 7);
|
||||
FillBgTilemapBufferRect(1, TILE_BOT_CORNER_L, 1, 3, 1, 1, 7);
|
||||
FillBgTilemapBufferRect(1, TILE_BOT_EDGE, 2, 3, 27, 1, 7);
|
||||
FillBgTilemapBufferRect(1, TILE_BOT_CORNER_R, 28, 3, 1, 1, 7);
|
||||
|
||||
// Draw options list window frame
|
||||
FillBgTilemapBufferRect(1, TILE_TOP_CORNER_L, 1, 4, 1, 1, 7);
|
||||
FillBgTilemapBufferRect(1, TILE_TOP_EDGE, 2, 4, 26, 1, 7);
|
||||
FillBgTilemapBufferRect(1, TILE_TOP_CORNER_R, 28, 4, 1, 1, 7);
|
||||
FillBgTilemapBufferRect(1, TILE_LEFT_EDGE, 1, 5, 1, 18, 7);
|
||||
FillBgTilemapBufferRect(1, TILE_RIGHT_EDGE, 28, 5, 1, 18, 7);
|
||||
FillBgTilemapBufferRect(1, TILE_BOT_CORNER_L, 1, 19, 1, 1, 7);
|
||||
FillBgTilemapBufferRect(1, TILE_BOT_EDGE, 2, 19, 26, 1, 7);
|
||||
FillBgTilemapBufferRect(1, TILE_BOT_CORNER_R, 28, 19, 1, 1, 7);
|
||||
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
}
|
||||
|
@ -125,14 +125,14 @@ static void CreateLinkPlayerSprite(u8 linkPlayerId, u8 gameVersion);
|
||||
static void GetLinkPlayerCoords(u8 linkPlayerId, u16 *x, u16 *y);
|
||||
static u8 GetLinkPlayerFacingDirection(u8 linkPlayerId);
|
||||
static u8 GetLinkPlayerElevation(u8 linkPlayerId);
|
||||
static s32 sub_80878E4(u8 linkPlayerId);
|
||||
static s32 GetLinkPlayerObjectStepTimer(u8 linkPlayerId);
|
||||
static u8 GetLinkPlayerIdAt(s16 x, s16 y);
|
||||
static void SetPlayerFacingDirection(u8 linkPlayerId, u8 a2);
|
||||
static void ZeroObjectEvent(struct ObjectEvent *objEvent);
|
||||
static void SpawnLinkPlayerObjectEvent(u8 linkPlayerId, s16 x, s16 y, u8 a4);
|
||||
static void InitLinkPlayerObjectEventPos(struct ObjectEvent *objEvent, s16 x, s16 y);
|
||||
static void sub_80877DC(u8 linkPlayerId, u8 a2);
|
||||
static void sub_808780C(u8 linkPlayerId);
|
||||
static void SetLinkPlayerObjectRange(u8 linkPlayerId, u8 a2);
|
||||
static void DestroyLinkPlayerObject(u8 linkPlayerId);
|
||||
static u8 GetSpriteForLinkedPlayer(u8 linkPlayerId);
|
||||
static void RunTerminateLinkScript(void);
|
||||
static u32 GetLinkSendQueueLength(void);
|
||||
@ -172,7 +172,7 @@ static u8 sPlayerTradingStates[MAX_LINK_PLAYERS];
|
||||
// adjusted key code, effectively intercepting the input before anything
|
||||
// can process it.
|
||||
static u16 (*sPlayerKeyInterceptCallback)(u32);
|
||||
static bool8 sUnknown_03000E18;
|
||||
static bool8 sReceivingFromLink;
|
||||
static u8 sRfuKeepAliveTimer;
|
||||
|
||||
// IWRAM common
|
||||
@ -1626,7 +1626,7 @@ static void CB2_ReturnToFieldLocal(void)
|
||||
|
||||
static void CB2_ReturnToFieldLink(void)
|
||||
{
|
||||
if (!sub_8087598() && ReturnToFieldLink(&gMain.state))
|
||||
if (!Overworld_LinkRecvQueueLengthMoreThan2() && ReturnToFieldLink(&gMain.state))
|
||||
SetMainCallback2(CB2_Overworld);
|
||||
}
|
||||
|
||||
@ -2823,18 +2823,18 @@ static void RunTerminateLinkScript(void)
|
||||
ScriptContext2_Enable();
|
||||
}
|
||||
|
||||
bool32 sub_8087598(void)
|
||||
bool32 Overworld_LinkRecvQueueLengthMoreThan2(void)
|
||||
{
|
||||
if (!IsUpdateLinkStateCBActive())
|
||||
return FALSE;
|
||||
if (GetLinkRecvQueueLength() >= 3)
|
||||
sUnknown_03000E18 = TRUE;
|
||||
sReceivingFromLink = TRUE;
|
||||
else
|
||||
sUnknown_03000E18 = FALSE;
|
||||
return sUnknown_03000E18;
|
||||
sReceivingFromLink = FALSE;
|
||||
return sReceivingFromLink;
|
||||
}
|
||||
|
||||
bool32 sub_80875C8(void)
|
||||
bool32 Overworld_RecvKeysFromLinkIsRunning(void)
|
||||
{
|
||||
u8 temp;
|
||||
|
||||
@ -2849,8 +2849,8 @@ bool32 sub_80875C8(void)
|
||||
else if (sPlayerKeyInterceptCallback != KeyInterCB_DeferToEventScript)
|
||||
return FALSE;
|
||||
|
||||
temp = sUnknown_03000E18;
|
||||
sUnknown_03000E18 = FALSE;
|
||||
temp = sReceivingFromLink;
|
||||
sReceivingFromLink = FALSE;
|
||||
|
||||
if (temp == TRUE)
|
||||
return TRUE;
|
||||
@ -2860,7 +2860,7 @@ bool32 sub_80875C8(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 sub_8087634(void)
|
||||
bool32 Overworld_SendKeysToLinkIsRunning(void)
|
||||
{
|
||||
if (GetLinkSendQueueLength() < 2)
|
||||
return FALSE;
|
||||
@ -2874,7 +2874,7 @@ bool32 sub_8087634(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 sub_808766C(void)
|
||||
bool32 IsSendingKeysOverCable(void)
|
||||
{
|
||||
if (gWirelessCommType != 0)
|
||||
return FALSE;
|
||||
@ -2923,15 +2923,15 @@ static void SpawnLinkPlayerObjectEvent(u8 linkPlayerId, s16 x, s16 y, u8 gender)
|
||||
ZeroLinkPlayerObjectEvent(linkPlayerObjEvent);
|
||||
ZeroObjectEvent(objEvent);
|
||||
|
||||
linkPlayerObjEvent->active = 1;
|
||||
linkPlayerObjEvent->active = TRUE;
|
||||
linkPlayerObjEvent->linkPlayerId = linkPlayerId;
|
||||
linkPlayerObjEvent->objEventId = objEventId;
|
||||
linkPlayerObjEvent->movementMode = MOVEMENT_MODE_FREE;
|
||||
|
||||
objEvent->active = 1;
|
||||
objEvent->active = TRUE;
|
||||
linkGender(objEvent) = gender;
|
||||
linkDirection(objEvent) = DIR_NORTH;
|
||||
objEvent->spriteId = 64;
|
||||
objEvent->spriteId = MAX_SPRITES;
|
||||
|
||||
InitLinkPlayerObjectEventPos(objEvent, x, y);
|
||||
}
|
||||
@ -2947,7 +2947,7 @@ static void InitLinkPlayerObjectEventPos(struct ObjectEvent *objEvent, s16 x, s1
|
||||
ObjectEventUpdateZCoord(objEvent);
|
||||
}
|
||||
|
||||
static void sub_80877DC(u8 linkPlayerId, u8 dir)
|
||||
static void SetLinkPlayerObjectRange(u8 linkPlayerId, u8 dir)
|
||||
{
|
||||
if (gLinkPlayerObjectEvents[linkPlayerId].active)
|
||||
{
|
||||
@ -2957,7 +2957,7 @@ static void sub_80877DC(u8 linkPlayerId, u8 dir)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_808780C(u8 linkPlayerId)
|
||||
static void DestroyLinkPlayerObject(u8 linkPlayerId)
|
||||
{
|
||||
struct LinkPlayerObjectEvent *linkPlayerObjEvent = &gLinkPlayerObjectEvents[linkPlayerId];
|
||||
u8 objEventId = linkPlayerObjEvent->objEventId;
|
||||
@ -2998,7 +2998,7 @@ static u8 GetLinkPlayerElevation(u8 linkPlayerId)
|
||||
return objEvent->currentElevation;
|
||||
}
|
||||
|
||||
static s32 sub_80878E4(u8 linkPlayerId)
|
||||
static s32 GetLinkPlayerObjectStepTimer(u8 linkPlayerId)
|
||||
{
|
||||
u8 objEventId = gLinkPlayerObjectEvents[linkPlayerId].objEventId;
|
||||
struct ObjectEvent *objEvent = &gObjectEvents[objEventId];
|
||||
@ -3048,32 +3048,32 @@ static void SetPlayerFacingDirection(u8 linkPlayerId, u8 facing)
|
||||
}
|
||||
|
||||
|
||||
static u8 MovementEventModeCB_Normal(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 a3)
|
||||
static u8 MovementEventModeCB_Normal(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||
{
|
||||
return gLinkPlayerFacingHandlers[a3](linkPlayerObjEvent, objEvent, a3);
|
||||
return gLinkPlayerFacingHandlers[dir](linkPlayerObjEvent, objEvent, dir);
|
||||
}
|
||||
|
||||
static u8 MovementEventModeCB_Ignored(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 a3)
|
||||
static u8 MovementEventModeCB_Ignored(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||
{
|
||||
return FACING_UP;
|
||||
}
|
||||
|
||||
// Duplicate Function
|
||||
static u8 MovementEventModeCB_Normal_2(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 a3)
|
||||
static u8 MovementEventModeCB_Normal_2(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||
{
|
||||
return gLinkPlayerFacingHandlers[a3](linkPlayerObjEvent, objEvent, a3);
|
||||
return gLinkPlayerFacingHandlers[dir](linkPlayerObjEvent, objEvent, dir);
|
||||
}
|
||||
|
||||
static bool8 FacingHandler_DoNothing(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 a3)
|
||||
static bool8 FacingHandler_DoNothing(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool8 FacingHandler_DpadMovement(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 a3)
|
||||
static bool8 FacingHandler_DpadMovement(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||
{
|
||||
s16 x, y;
|
||||
|
||||
linkDirection(objEvent) = FlipVerticalAndClearForced(a3, linkDirection(objEvent));
|
||||
linkDirection(objEvent) = FlipVerticalAndClearForced(dir, linkDirection(objEvent));
|
||||
ObjectEventMoveDestCoords(objEvent, linkDirection(objEvent), &x, &y);
|
||||
|
||||
if (LinkPlayerDetectCollision(linkPlayerObjEvent->objEventId, linkDirection(objEvent), x, y))
|
||||
@ -3089,9 +3089,9 @@ static bool8 FacingHandler_DpadMovement(struct LinkPlayerObjectEvent *linkPlayer
|
||||
}
|
||||
}
|
||||
|
||||
static bool8 FacingHandler_ForcedFacingChange(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 a3)
|
||||
static bool8 FacingHandler_ForcedFacingChange(struct LinkPlayerObjectEvent *linkPlayerObjEvent, struct ObjectEvent *objEvent, u8 dir)
|
||||
{
|
||||
linkDirection(objEvent) = FlipVerticalAndClearForced(a3, linkDirection(objEvent));
|
||||
linkDirection(objEvent) = FlipVerticalAndClearForced(dir, linkDirection(objEvent));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -4904,7 +4904,7 @@ void ItemUseCB_RareCandy(u8 taskId, TaskFunc task)
|
||||
else
|
||||
{
|
||||
gPartyMenuUseExitCallback = TRUE;
|
||||
PlayFanfareByFanfareNum(0);
|
||||
PlayFanfareByFanfareNum(FANFARE_LEVEL_UP);
|
||||
UpdateMonDisplayInfoAfterRareCandy(gPartyMenu.slotId, mon);
|
||||
RemoveBagItem(gSpecialVar_ItemId, 1);
|
||||
GetMonNickname(mon, gStringVar1);
|
||||
|
@ -3032,17 +3032,8 @@ static void SpriteCB_PokedexListMonSprite(struct Sprite *sprite)
|
||||
else
|
||||
{
|
||||
u32 var;
|
||||
|
||||
sprite->pos2.y = gSineTable[(u8)sprite->data[5]] * 76 / 256;
|
||||
// UB: possible division by zero
|
||||
#ifdef UBFIX
|
||||
if (gSineTable[sprite->data[5] + 64] != 0)
|
||||
var = 0x10000 / gSineTable[sprite->data[5] + 64];
|
||||
else
|
||||
var = 0;
|
||||
#else
|
||||
var = 0x10000 / gSineTable[sprite->data[5] + 64];
|
||||
#endif //UBFIX
|
||||
var = SAFE_DIV(0x10000, gSineTable[sprite->data[5] + 64]);
|
||||
if (var > 0xFFFF)
|
||||
var = 0xFFFF;
|
||||
SetOamMatrix(sprite->data[1] + 1, 0x100, 0, 0, var);
|
||||
|