Commit Graph

6408 Commits

Author SHA1 Message Date
Hajime Hoshi
6c54fac018 Add Johnny to AUTHORS 2021-07-29 02:35:20 +09:00
Johnny
52df607413
ebitenutil: added NewImageFromReader(io.Reader) (#1735) 2021-07-29 02:34:35 +09:00
Hajime Hoshi
e5254482fe Add tests for the Steam Runtime
Closes #1733
2021-07-28 23:37:27 +09:00
Hajime Hoshi
c06e8a5501 ebiten: Fix tests for a very restricted environment (Steam Runtime)
Updates #1733
2021-07-28 22:04:13 +09:00
Hajime Hoshi
37231a33e4 Update AUTHORS 2021-07-28 03:21:40 +09:00
nanoslayer
e52a933506
text: Fix nil pointer dereference in drawGlyph (#1732)
drawGlyph can panic when provided with a nil *ebiten.DrawImageOptions
reference. Check that the pointer is not nil before dereferencing.
2021-07-28 03:20:35 +09:00
Hajime Hoshi
6efe7cbb8b text: Fix comments 2021-07-27 17:38:34 +09:00
Hajime Hoshi
656d9dccc0 text: Add DrawWithOptions
Closes #1461
2021-07-27 17:36:21 +09:00
Hajime Hoshi
59aa41a3c2 internal/affine: Improve ColorM Scale's performance
The benchmark result comparing the previous commit and this commit is this:

```
name           old time/op    new time/op    delta
ColorMScale-8    9.75µs ± 6%    1.30µs ±22%  -86.67%  (p=0.000 n=10+9)

name           old alloc/op   new alloc/op   delta
ColorMScale-8   1.34kB ±100%    1.19kB ±19%     ~     (p=0.421 n=10+8)

name           old allocs/op  new allocs/op  delta
ColorMScale-8      3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.000 n=10+10)
```

Updates #1658
2021-07-27 13:45:09 +09:00
Hajime Hoshi
79e067b0f8 ebiten: Add BenchmarkColorMScale
Updates #1658
2021-07-27 13:31:37 +09:00
Hajime Hoshi
bcb30f8595 Update go-gl/glfw for GLFW 3.3.4 2021-07-27 12:54:11 +09:00
Hajime Hoshi
e4329d0349 internal/driver: Refactoring: Reduce dependencies on affine 2021-07-27 12:19:50 +09:00
Hajime Hoshi
21aa96f9f5 internal/affine: Refactoring: Make ColorM interface 2021-07-27 12:10:22 +09:00
Hajime Hoshi
5f03f4f195 internal/affine: Add coloMImpl interface and colorMImplScale
Closes #1658
2021-07-26 22:18:10 +09:00
Hajime Hoshi
7e5b259dd2 internal/affine: Use a pointer of an array for UnsafeElements 2021-07-26 21:19:53 +09:00
Hajime Hoshi
2c26e85183 internal/affine: Replace isInited with isIdentity 2021-07-26 21:07:51 +09:00
Hajime Hoshi
d0ae73084b internal/affine: Separate ColorM implementation
Updates #1658
2021-07-26 15:21:12 +09:00
Hajime Hoshi
e84506dfc3 internal/affine: Add String 2021-07-26 14:26:59 +09:00
Hajime Hoshi
18757cff16 internal/affine: Refactoring 2021-07-25 22:10:38 +09:00
Hajime Hoshi
1706d9436a ebiten: Add FPSModeType, FPSMode, SetFPSMode, and ScheduleFrame
This change adds these APIs:

  * type FPSModeType
  * func FPSMode
  * func SetFPSMode
  * func ScheduleFrame

and deprecates these APIs:

  * func SetVsyncEnabled
  * func IsVsyncEnabled

Closes #1556
2021-07-24 16:09:13 +09:00
Hajime Hoshi
cf8aa0a7b2 ebiten: Fix old and wrong comments 2021-07-24 15:47:11 +09:00
Hajime Hoshi
fee004c28d internal/uidriver/js: Remove unnecessary event handlers 2021-07-23 11:23:01 +09:00
Hajime Hoshi
0ec5b7b857 internal/uidriver/js: Bug fix: Suppress warnings on SetFullscreen
Closes #1727
2021-07-23 02:15:46 +09:00
Hajime Hoshi
52567c459f ebiten: Remove unnecessary casts 2021-07-23 00:57:17 +09:00
Hajime Hoshi
2503323557 internal/driver: Add FPSMode
Updates #1556
2021-07-23 00:47:09 +09:00
Hajime Hoshi
c28bcc26fc internal/clock: Rename UncappedTPS -> SyncWithFPS
Closes #1726
2021-07-22 22:46:24 +09:00
Hajime Hoshi
da2db2f54e ebiten: Add comments about SetCursorShape / CursorShape 2021-07-22 19:17:14 +09:00
Hajime Hoshi
1c3eaba6e3 ebiten: Fix wrong comments 2021-07-22 19:15:11 +09:00
Hajime Hoshi
92bc5c1908 audio: Add (*Context).NewPlayer and (*Context).NewPlayerFromBytes
Closes #1708
2021-07-22 16:41:04 +09:00
Hajime Hoshi
1dc8002689 examples: Reduce global variables
Closes #1669
2021-07-22 01:38:55 +09:00
Hajime Hoshi
c2a5f4ab94 audio/internal/readerdriver: Add comments about Windows
Updates #1710
2021-07-21 23:23:12 +09:00
Hajime Hoshi
5750c48a3b audio/internal/oboe: Remove 'generate' build tag 2021-07-21 21:33:31 +09:00
Hajime Hoshi
e9d0c84803 audio/internal/oboe: Add //go:build 2021-07-21 21:25:30 +09:00
Hajime Hoshi
50320eeb5b internal/glfw: Bug fix: Crash after disconnecting a gamepad on Windows (Wine) 2021-07-21 17:50:47 +09:00
Hajime Hoshi
d7bedd165a internal/driver: Bug fix: Compile error for browsers 2021-07-21 17:20:09 +09:00
Hajime Hoshi
93a156a718 internal/uidriver/glfw: Use glfwGameGamepadState
This change replaces the usage of gamepaddb package with glfwGetGamepadState.

Updates #1557
2021-07-21 16:09:30 +09:00
Hajime Hoshi
ee4ec5047e internal/gamepaddb: Support general XInput devices 2021-07-21 14:38:47 +09:00
Hajime Hoshi
291a38f2e2 Remove nintendoswitch package
Use the standard gamepad layout instead.

Closes #1720
2021-07-21 01:47:49 +09:00
Hajime Hoshi
1fce527414 internal/uidriver/js: Use the same gamepad API on go2cpp 2021-07-20 23:10:56 +09:00
Hajime Hoshi
8656786721 internal/uidriver/js: Refactoring: Detect the standard layout at update 2021-07-20 21:56:15 +09:00
Hajime Hoshi
c54418c3e4 examples/flappy: Use A/B buttons for the standard gamepad layout
Also this change limits the available keys.
2021-07-20 20:53:19 +09:00
Hajime Hoshi
984275d0a0 examples/blocks: Skip the gamepad configuration if a standard layout is available 2021-07-20 03:48:01 +09:00
Hajime Hoshi
d32b58d050 examples/blocks/blocks: Unify the terms 'abstract' and 'virtual' 2021-07-20 03:02:37 +09:00
Hajime Hoshi
5004fdcf02 ebiten: Update comments 2021-07-20 02:53:13 +09:00
Hajime Hoshi
f192971080 ebiten: Rename HasGamepadStandardLayoutMapping -> IsStandardGamepadLayoutAvailable
Updates #1557
2021-07-20 02:46:12 +09:00
Hajime Hoshi
51f83b1527 inpututil: Add APIs for the standard gamepad layout
This change adds these APIs to inpututil:

  * IsStandardGamepadButtonJustPressed
  * IsStandardGamepadButtonJustReleased
  * StandardGamepadButtonPressDuration

Closes #1557
2021-07-20 02:37:12 +09:00
Hajime Hoshi
aa694be6f6 ebiten: Add the standard gamepad layout
This change introduces the standard gamepad layout. This changes adds
these APIs:

  * func HasGamepadStandardLayoutMapping
  * func IsGamepadStandardButtonPressed
  * func GamepadStandardAxisValue
  * type StandardGamepadButton
  * type StandardGamepadAxis

The standard gamepad layout is based on the web standard. See
https://www.w3.org/TR/gamepad/#remapping.

On desktops, the SDL's gamecontrllerdb.txt is used. If the gamepad is
listed in the text file, the mapping works. GLFW's mapping featrue is
not used.

On browsers, the property of a gamepad 'mapping' is used. When the
mapping value is 'standard', the gamepad is recognized to have the
standard mapping.

On mobiles, the implementation is still WIP.

Updates #1557
2021-07-20 01:32:28 +09:00
Hajime Hoshi
f882dbda77 ebiten: Fix comments 2021-07-20 01:12:17 +09:00
Hajime Hoshi
fcfdf9b2ba Update URLs 2021-07-19 23:09:27 +09:00
Hajime Hoshi
f305a04453 cmd/ebitenmobile: Update URLs 2021-07-19 23:00:41 +09:00