import from github

This commit is contained in:
2022-05-19 17:14:13 +00:00
parent 5247c34f50
commit ab32b30591
12612 changed files with 1905035 additions and 83 deletions

51
docs/bugs_and_glitches.md Normal file
View File

@ -0,0 +1,51 @@
# Bugs and Glitches
These are known bugs and glitches in the original Pokémon Emerald game: code that clearly does not work as intended, or that only works in limited circumstances but has the possibility to fail or crash. Defining the `BUGFIX` and `UBFIX` preprocessor variables will fix some of these automatically. `UBFIX` will already be defined for MODERN builds.
Fixes are written in the `diff` format. If you've used Git before, this should look familiar:
```diff
this is some code
-delete red - lines
+add green + lines
```
## Contents
- [Scrolling through items in the bag causes the image to flicker](#scrolling-through-items-in-the-bag-causes-the-image-to-flicker)
## Scrolling through items in the bag causes the image to flicker
**Fix:** Add the following function to [src/item_menu_icons.c](https://github.com/pret/pokeemerald/blob/master/src/item_menu_icons.c):
```diff
+void HideBagItemIconSprite(u8 id)
+{
+ u8 *spriteId = &gBagMenu->spriteId[10];
+ if (spriteId[id] != 0xFF)
+ {
+ gSprites[spriteId[id]].invisible = TRUE;
+ }
+}
```
and its corresponding declaration in [include/item_menu_icons.h](https://github.com/pret/pokeemerald/blob/master/include/item_menu_icons.h):
```diff
+void HideBagItemIconSprite(u8 id);
```
Then edit `BagMenu_MoveCursorCallback` in [src/item_menu.c](https://github.com/pret/pokeemerald/blob/master/src/item_menu.c):
```diff
...
{
- RemoveBagItemIconSprite(1 ^ gBagMenu->itemIconSlot);
+ HideBagItemIconSprite(gBagMenu->itemIconSlot ^ 1);
+ RemoveBagItemIconSprite(gBagMenu->itemIconSlot);
if (itemIndex != LIST_CANCEL)
...
```

View File

@ -0,0 +1,41 @@
### Setting up WSL1 (Legacy Portion)
1. Certain packages are required to build pokeemerald. Install these packages by running the following command:
```bash
sudo apt install build-essential git libpng-dev gdebi-core
```
> Note: If the above command does not work, try the above command but replacing `apt` with `apt-get`.
2. Once the packages have finished installing, download the devkitPro pacman package [here](https://github.com/devkitPro/pacman/releases). The file to download is `devkitpro-pacman.amd64.deb`.
3. WSL has its own file system that's not accessible from Windows, but Windows files *are* accessible from WSL. To install the devkitPro package, you'll need to change to the **current working directory** where the package file was saved.
For example, if the package file was saved to **C:\Users\\_\<user>_\Downloads** (the Downloads location for most users), enter this command, where *\<user>* is your **Windows** username:
```bash
cd /mnt/c/Users/<user>/Downloads
```
> Note 1: The Windows C:\ drive is called /mnt/c/ in WSL.
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "/mnt/c/users/<user>/Downloads folder"`.
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn't needed
4. Once the directory has been changed to the folder containing the devkitPro pacman package, run the following commands to install devkitARM.
```bash
sudo gdebi devkitpro-pacman.amd64.deb
sudo dkp-pacman -Sy
sudo dkp-pacman -S gba-dev
```
The last command will ask for the selection of packages to install. Just press Enter to install all of them, followed by entering Y to proceed with the installation.
> Note: `devkitpro-pacman.amd64.deb` is the expected filename of the devkitPro package downloaded (for the first command). If the downloaded package filename differs, then use that filename instead.
5. Run the following command to set devkitPro related environment variables (alternatively, close and re-open WSL):
```bash
source /etc/profile.d/devkit-env.sh
```
Proceed to [Choosing where to store pokeemerald (WSL1) of the current INSTALL.md](/INSTALL.md#choosing-where-to-store-pokeemerald-WSL1).