Skip to content

Declare prototypes #300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ __pycache__
/sprites-gfx
/glsl-shaders
/token.txt
.venv
venv/
venv.bak/
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,36 @@ Same Steps 1-4 above<br/>
13. Configure with `zelda3.ini` in the main dir<br/>

## Installing libraries on Linux/MacOS
Changes in Python encourages use of virtual environments within projects instead of poluting the global space. The `virtualenv` package is available outside of Python via `brew` on Linux/MacOS (homebrew is available [here](https://brew.sh/)):

1. Open a terminal
2. Install pip if not already installed
```sh
python3 -m ensurepip
```
3. Clone the repo and `cd` into it
2. Clone the repo and cd into it:
```sh
git clone https://github.com/snesrev/zelda3
cd zelda3
```
4. Install requirements using pip
3. Install `virtualenv` via brew:
```sh
brew install virtualenv
```
4. Create a new virtual environment for Python in the `venv` directory within the cloned repo:
```sh
virtualenv -p python3 venv
```
5. Confirm that the virtual python environment is configured:
```sh
which pip
/path/to/zelda2/venv/bin/pip
```
6. Install requirements using `pip`:
```sh
python3 -m pip install -r requirements.txt
```
5. Install SDL2
* Ubuntu/Debian `sudo apt install libsdl2-dev`
* Fedora Linux `sudo dnf install SDL2-devel`
* Arch Linux `sudo pacman -S sdl2`
* macOS: `brew install sdl2` (you can get homebrew [here](https://brew.sh/))
* macOS: `brew install sdl2`

## Compiling on Linux/MacOS
1. Place your US ROM file named `zelda3.sfc` in `zelda3`
Expand Down
2 changes: 1 addition & 1 deletion snes/snes.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Snes* snes_init(uint8_t *ram) {
snes->cpu = cpu_init(snes, 0);
snes->apu = apu_init();
snes->dma = dma_init(snes);
snes->ppu = ppu_init(snes);
snes->ppu = ppu_init();
snes->cart = cart_init(snes);
snes->input1 = input_init(snes);
snes->input2 = input_init(snes);
Expand Down
2 changes: 1 addition & 1 deletion src/messaging.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void RenderText_Draw_BorderIncremental();
void RenderText_Draw_CharacterTilemap();
void RenderText_Draw_MessageCharacters();
void RenderText_Draw_Finish();
void VWF_RenderSingle();
void VWF_RenderSingle(int a);
void RenderText_Draw_Choose2LowOr3();
void RenderText_Draw_ChooseItem();
void RenderText_FindYItem_Previous();
Expand Down
2 changes: 1 addition & 1 deletion src/zelda_rtl.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ static void ZeldaRunGameLoop() {

void ZeldaInitialize() {
g_zenv.dma = dma_init(NULL);
g_zenv.ppu = ppu_init(NULL);
g_zenv.ppu = ppu_init();
g_zenv.ram = g_ram;
g_zenv.sram = (uint8*)calloc(8192, 1);
g_zenv.vram = g_zenv.ppu->vram;
Expand Down