Commit Graph

844 Commits

Author SHA1 Message Date
Hajime Hoshi
36b7b85477 examples: change the name convention: Num -> Count 2022-07-13 02:02:48 +09:00
Hajime Hoshi
5f17264c74 ebiten: rename Gamepad(Axis|Button)Num -> Gamepad(Axis|Button)Count 2022-07-13 01:27:14 +09:00
Hajime Hoshi
bd72ca971e examples/shader: bug fix: the CRT example crashed 2022-07-09 22:29:59 +09:00
Hajime Hoshi
be356390e0 examples/gamepad: add vibrations 2022-07-09 16:58:54 +09:00
Hajime Hoshi
75e84f6eda audio/mp3, audio/vorbis, audio/wav: add DecodeWithoutResampling
Updates #2055
2022-07-01 01:46:37 +09:00
Hajime Hoshi
4836266c2b examples/tiles: improve readability by calculating tileXNum on the fly 2022-06-10 23:54:45 +09:00
Hajime Hoshi
2c4ac5625b examples/flappy: add GoMain when Windows+Cgo
This is a hack to compile the example with -buildmode=c-archive (.a).

Updates #2084
2022-05-02 22:46:26 +09:00
Hajime Hoshi
b1bcbbeeea ebiten: add comments at DrawTriangles 2022-04-26 23:23:31 +09:00
Julian Merkle
d68f770561
examples/stars: refactor (#2070)
Minor adjustments because of:

* Function abs(int) is unused.
* Color fields are assigned without explicit names
* Color variable shadows the color package name
2022-04-13 18:42:04 +09:00
Hajime Hoshi
8f524b5c23 examples/vibrate: refactoring 2022-04-12 00:11:11 +09:00
Hajime Hoshi
55447679ee examples/vibrate: bug fix: touches didn't work correctly 2022-04-12 00:05:55 +09:00
Hajime Hoshi
699b58c02b examples/flappy: bug fix: touches didn't work
Closes #2067
2022-04-11 10:44:41 +09:00
Hajime Hoshi
b53f93c614 examples/windowclosing: update the message 2022-04-11 01:10:48 +09:00
Hajime Hoshi
e4d6381452 examples/fullscreen: forbid quiting on browsers 2022-04-10 20:04:52 +09:00
Hajime Hoshi
535e64f2bf examples/audioinfiniteloop, examples/audiopanning: avoid resamplings 2022-04-10 19:41:44 +09:00
Hajime Hoshi
a65631bccc examples/spriteshd: remove a call of SetWindowSize 2022-04-10 19:15:39 +09:00
Hajime Hoshi
648c8ed1f9 examples/flappy: use DecodeWithSampleRate instead of Decode 2022-04-10 14:55:48 +09:00
Hajime Hoshi
9b7328442b examples/minify: reorder renderings 2022-04-09 23:27:58 +09:00
Hajime Hoshi
d6fe8ed694 examples/fullscreen: handle F key to enter fullscreen
On browsers, fullscreen requires an explicit user input.
2022-04-09 16:23:23 +09:00
Hajime Hoshi
063960c9bd examples/font: simplify the logic 2022-04-09 16:08:20 +09:00
Hajime Hoshi
d58ef294b2 examples/text: add leading space characters 2022-04-04 00:18:35 +09:00
Hajime Hoshi
7a33837ed7 audio: change the type of SetBufferSize to time.Duration
Updates #2026
2022-03-25 20:47:01 +09:00
Hajime Hoshi
08783542eb audio: add Player.SetBufferSize
This change also adds examples/realtimepcm.

Closes #2026
2022-03-25 19:27:25 +09:00
Bertrand Jung
2453f8f0df
examples/shader: add CRT shader example (#2012)
Closes #2008
2022-03-10 00:02:07 +09:00
divVerent
99aef33970
examples/blur: fix the blur filter example to be a real box blur. (#2000)
Also add a note that this is not how games should implement a blur if avoidable.

Krita's blur and the original blur:
https://rm.cloudns.org/img/uploaded/29c0418f25bf56b802f746d2f269e215.png
The original image and the new blur (Krita's): 
https://rm.cloudns.org/img/uploaded/bd04828baf6c01fcf7301a6672a4c406.png

Note how Ebiten's blur has almost no vertical component.

Note how after the change it looks basically like Krita's.
2022-02-24 03:15:52 +09:00
Hajime Hoshi
2c2c4bc428 ebiten: add WindowResizingModeType and its constants and functions
This allows a new state to disallow resizing the window but allow
making the window fullscreen on macOS by a user.

This change adds the new type WindowResizingModeType. There are
these constants of this type:

 * WindowResizingModeDisabled
 * WindowResizingModeOnlyFullscreenEnabled
 * WindowResizingModeEnabled

Closes #1819
2022-02-11 04:59:04 +09:00
Hajime Hoshi
35b9dd0846 internal/ui: give up SetWindowAspectRatioFixed
Unfortunately, it is almost impossible to provide a consistent behavior
to keep the aspect ratio of the window on Windows. Instead of having an
incomplete API, let's remove this.

Closes #1988
2022-02-10 18:35:00 +09:00
Hajime Hoshi
891ca2a08d ebiten: add IsWindowAspectRatioFixed
This also updates examples/windowsize.

Closes #1804
2022-02-09 20:06:18 +09:00
Hajime Hoshi
7482cae978 internal/ui: bug fix: the aspect ratio must be updated whenever the window size is forcibly updated
This also adds a new flag -aspectratiofixed to examples/windowsize

Updates #1804
2022-02-09 19:56:50 +09:00
Hajime Hoshi
fb3a022327 ebiten: use the DB's name for GamepadName
Updates #1949
2022-01-25 21:14:03 +09:00
Hajime Hoshi
210036a5a5 examples/gamepad: do not get an SDL ID from a disconnected gamepad
The result of ebiten.GamepadSDLID should not be reliable for a
disconnected gamepad.
2022-01-22 21:27:58 +09:00
Elias Daler
12c144070f
internal/uidriver/glfw: fix window float enable/disable (#1962)
Closes #1960
2022-01-17 00:28:25 +09:00
Hajime Hoshi
e687865c8c ebiten: add ColorM.ScaleWithColor
Updates #1944
2022-01-10 17:36:46 +09:00
Hajime Hoshi
245cbc2f4d examples/vibrate: bug fix: compile error
Updates #1452
2022-01-10 16:19:33 +09:00
Hajime Hoshi
3b0ce21a56 Revert "internal/graphicsdriver: bug fix: render semi-transparent vectors correctly"
This reverts commit 202f642395.

Reason: TestImageEvenOdd failed

Updates #1933
2022-01-06 03:19:46 +09:00
Hajime Hoshi
202f642395 internal/graphicsdriver: bug fix: render semi-transparent vectors correctly
Closes #1933
2022-01-06 03:00:25 +09:00
Hajime Hoshi
583c2cf17e examples/resources: reorder items 2021-12-31 05:30:37 +09:00
Jacob Salmela
e77985139b
examples/resources: bug fix: add a missing item Spritesheet_png (#1924)
the Spritesheet_png was not included with go generate so this adds that in

Signed-off-by: Jacob Salmela <me@jacobsalmela.com>
2021-12-31 05:28:41 +09:00
Hajime Hoshi
13c2d38b97 examples/flappy: add main_cbackend.go 2021-12-30 03:02:11 +09:00
ebiiim
4d988b2457
examples/airship: chore: fix typo (#1907) 2021-12-20 21:54:24 +09:00
Hajime Hoshi
12b5a6c3d6 examples: update README 2021-12-13 11:55:08 +09:00
Hajime Hoshi
39ef252c2e
ebiten: Add VibrationOptions to specify intensity (#1891)
Updates #1452
2021-12-04 22:14:02 +09:00
Hajime Hoshi
b4f87f9651 internal/uidriver/mobile: Implement Vibrate for Android
This change also adds AndroidManifest.xml for the example. This is
used for `gomobile install` command.

Updates #1452
2021-11-19 01:49:22 +09:00
Hajime Hoshi
732b125349 text: Add AppendGlyphs and Glyphs
Closes #1767
Closes #1871
2021-11-12 02:31:53 +09:00
wasedaigo
851733397e
examples/audioinfiniteloop: Use const to represent bytePerSample (#1867)
Co-authored-by: wasedaigo <daigo@odencat.com>
2021-11-08 15:52:53 +09:00
Hajime Hoshi
2aa232878d ebiten: Add VibrateGamepad and implement this on browsers
Updates #1452
2021-10-25 02:30:42 +09:00
Hajime Hoshi
7c6f2fd799 ebiten: Vibrate takes time durations instead of the options
Android and browsers can specify only a time duration for vibration.

VibrateOptions is renamed to GamepadVibrateOptions for gamepads.

Updates #1452
2021-10-24 05:02:49 +09:00
Hajime Hoshi
b8a5ea7bd6 ebiten: Add Vibrate and VibrateOptions, and implement this on browsers
Updates #1452
2021-10-24 01:05:33 +09:00
r3vit
57c45a13e4
Remove dot imports from tests - Remove dot imports (#1837)
Closes #1824
2021-10-02 19:58:48 +09:00
Hajime Hoshi
3c8c17eace examples/isometric: Recreate the offscreen when the screen size changes 2021-10-02 13:00:33 +09:00