Skip to content
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

Add clarification for blt functions, grammar fixes #497

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ For specific instructions, please refer to [this page](https://github.com/kitao/

### Try Pyxel Examples

After installing Pyxel, the examples of Pyxel will be copied to the current directory with the following command:
After installing Pyxel, you can copy some example projects to the current directory with the following command:

```sh
pyxel copy_examples
```

The examples to be copied are as follows:
This will create a new directory `pyxel_examples/` with the following projects:

<table>
<tr>
Expand Down Expand Up @@ -225,7 +225,7 @@ pyxel play 30SecondsOfDaylight.pyxapp

### Create Pyxel Application

After importing the Pyxel module in your python script, specify the window size with `init` function first, then starts the Pyxel application with `run` function.
After importing the Pyxel module in your python script, specify the window size with the `init` function first, then starts the Pyxel application with the `run` function.

```python
import pyxel
Expand Down Expand Up @@ -509,12 +509,12 @@ Pyxel application file also can be converted to an executable or an HTML file wi
Fill the area connected with the same color as (`x`, `y`) with color `col`.

- `blt(x, y, img, u, v, w, h, [colkey])`<br>
Copy the region of size (`w`, `h`) from (`u`, `v`) of the image bank `img` (0-2) to (`x`, `y`). If negative value is set for `w` and/or `h`, it will reverse horizontally and/or vertically. If `colkey` is specified, treated as transparent color.
Copy the region of size (`w`, `h`) from (`u`, `v`) of the image bank `img` (0-2) to (`x`, `y`). If a negative value is set for `w` and/or `h`, it will reverse horizontally and/or vertically. If `colkey` is specified, that color will be treated as transparent. A resource file must first be loaded using the `load` function in order to copy from the image bank.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would also be helpful to mention that the first example, 01_hello_world.py, demonstrates the use of Image.load.


<img src="docs/images/blt_figure.png">

- `bltm(x, y, tm, u, v, w, h, [colkey])`<br>
Copy the region of size (`w`, `h`) from (`u`, `v`) of the tilemap `tm` (0-7) to (`x`, `y`). If negative value is set for `w` and/or `h`, it will reverse horizontally and/or vertically. If `colkey` is specified, treated as transparent color. The size of a tile is 8x8 pixels and is stored in a tilemap as a tuple of `(tile_x, tile_y)`.
Copy the region of size (`w`, `h`) from (`u`, `v`) of the tilemap `tm` (0-7) to (`x`, `y`). If a negative value is set for `w` and/or `h`, it will reverse horizontally and/or vertically. If `colkey` is specified, that color will be treated as transparent. The size of a tile is 8x8 pixels and is stored in a tilemap as a tuple of `(tile_x, tile_y)`. A resource file must first be loaded using the `load` function in order to copy from the image bank.

<img src="docs/images/bltm_figure.png">

Expand Down