Skip to content

Commit

Permalink
Removed license of unused SDL2 cython libs, and fixed some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
krs013 authored and Baekalfen committed Oct 22, 2022
1 parent b26a059 commit 600164d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 31 deletions.
15 changes: 0 additions & 15 deletions LICENSE.SDL2.txt

This file was deleted.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It is highly recommended to read the [report](https://github.com/Baekalfen/PyBoy

If you've read the report and want more explicit details, have a look at the [Pan Docs](http://bgb.bircd.org/pandocs.htm).

__If you are looking to make a bot or AI__, you can find all the external components in the [PyBoy Documentation](https://baekalfen.github.io/PyBoy/index.html). There is also a short example on our Wiki page [Scripts, AI and Bots](https://github.com/Baekalfen/PyBoy/wiki/Scripts,-AI-and-Bots) as well as in the [examples directory](https://github.com/Baekalfen/PyBoy/tree/master/examples). If more features are needed, or if you find a bug, don't hesitate to make an issue here on GitHub, or write on our [Discord channel](https://discord.gg/Zrf2nyH).
__If you are looking to make a bot or AI__, you can find all the external components in the [PyBoy Documentation](https://baekalfen.github.io/PyBoy/index.html). There is also a short example on our Wiki page [Scripts, AI and Bots](https://github.com/Baekalfen/PyBoy/wiki/Scripts,-AI-and-Bots) as well as in the [examples directory](https://github.com/Baekalfen/PyBoy/tree/master/examples). If more features are needed, or if you find a bug, don't hesitate to make an issue here on GitHub, or post on our [Discord channel](https://discord.gg/Zrf2nyH).


<!---
Expand Down Expand Up @@ -49,7 +49,7 @@ Generate GIF with the layout and captions

Installation
============
The instructions are simple, if you already have a functioning Python environment on your machine.
The instructions are simple if you already have a functioning Python environment on your machine.

1. Install PyBoy using __`pip install pyboy`__ (add __` --user`__ if your system asks)
2. If your system isn't supported by [pysdl2-dll](https://pypi.org/project/pysdl2-dll/), you'll need to install SDL2 from your package manager.
Expand Down Expand Up @@ -85,13 +85,13 @@ pil_image = pyboy.screen_image()
pil_image.save('screenshot.png')
```

At the Wiki page, you will also find out how to interface with PyBoy from your own project: [Wiki](https://github.com/Baekalfen/PyBoy/wiki).
The Wiki shows how to interface with PyBoy from your own project: [Wiki](https://github.com/Baekalfen/PyBoy/wiki).


Contributors
============

Thanks to all the people, who have contributed to the project!
Thanks to all the people who have contributed to the project!

Original Developers
-------------------
Expand All @@ -114,7 +114,7 @@ Student Projects

Contribute
==========
Any contribution is appreciated. The currently known errors are registered in the Issues tab. Feel free to take a swing at any one of them.
Any contribution is appreciated. The currently known problems are tracked in the Issues tab. Feel free to take a swing at any one of them.

For the more major features, there are the following that you can give a try. They are also described in more detail in the [project list](https://github.com/Baekalfen/PyBoy/raw/master/Projects/Projects.pdf):
* Link Cable
Expand Down
3 changes: 2 additions & 1 deletion pyboy/core/ram.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
from libc.stdint cimport uint8_t
from pyboy.utils cimport IntIOInterface


cdef class RAM:
cdef void save_state(self, IntIOInterface)
cdef void load_state(self, IntIOInterface, int)

cdef uint8_t[:] internal_ram0 # Dynamic size for DMG/CGB
cdef uint8_t[0x60] non_io_internal_ram0
cdef uint8_t[0x4C] io_ports
cdef uint8_t[0x7F] internal_ram1
cdef uint8_t[0x34] non_io_internal_ram1
cdef bint cgb

16 changes: 8 additions & 8 deletions pyboy/core/ram.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ def __init__(self, cgb, randomize=False):
self.non_io_internal_ram1 = array("B", [0] * (NON_IO_INTERNAL_RAM1))

if randomize:
for i in range(INTERNAL_RAM0_CGB if cgb else INTERNAL_RAM0):
self.internal_ram0[i] = getrandbits(8)
for i in range(NON_IO_INTERNAL_RAM0):
self.non_io_internal_ram0[i] = getrandbits(8)
for i in range(INTERNAL_RAM1):
self.internal_ram1[i] = getrandbits(8)
for i in range(NON_IO_INTERNAL_RAM1):
self.non_io_internal_ram1[i] = getrandbits(8)
for n in range(INTERNAL_RAM0_CGB if cgb else INTERNAL_RAM0):
self.internal_ram0[n] = getrandbits(8)
for n in range(NON_IO_INTERNAL_RAM0):
self.non_io_internal_ram0[n] = getrandbits(8)
for n in range(INTERNAL_RAM1):
self.internal_ram1[n] = getrandbits(8)
for n in range(NON_IO_INTERNAL_RAM1):
self.non_io_internal_ram1[n] = getrandbits(8)

def save_state(self, f):
for n in range(INTERNAL_RAM0_CGB if self.cgb else INTERNAL_RAM0):
Expand Down
4 changes: 2 additions & 2 deletions pyboy/plugins/game_wrapper_super_mario_land.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ def set_world_level(self, world, level):
Patches the handler for pressing start in the menu. It hardcodes a world and level to always "continue" from.
Args:
world (int): The wanted number of lives
level (int): The wanted number of lives
world (int): The world to select a level from, 0-3
level (int): The level to start from, 0-2
"""

for i in range(0x450, 0x461):
Expand Down

0 comments on commit 600164d

Please sign in to comment.