Compare commits

...
Sign in to create a new pull request.

1362 commits

Author SHA1 Message Date
Hendrik Brummermann
fcd8330db0
Merge pull request #769 from arianne/dependabot/npm_and_yarn/npm_and_yarn-53cbaf2a5b
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Java CI / build (push) Has been cancelled
Bump esbuild from 0.27.2 to 0.28.1 in the npm_and_yarn group across 1 directory
2026-07-12 06:51:38 +02:00
dependabot[bot]
98864f3802
Bump esbuild in the npm_and_yarn group across 1 directory
Some checks failed
Java CI / build (push) Has been cancelled
Bumps the npm_and_yarn group with 1 update in the / directory: [esbuild](https://github.com/evanw/esbuild).


Updates `esbuild` from 0.27.2 to 0.28.1
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2025.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.27.2...v0.28.1)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.28.1
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-14 11:54:18 +00:00
dimitris
0dff60f98e Guard external link launch against ActivityNotFoundException 2026-06-04 15:04:24 -07:00
Hendrik Brummermann
246d9ce288 converted BarehandAttackSprite and RangedAttackSprite to ImageBitmap 2026-03-01 23:04:12 +01:00
Hendrik Brummermann
31d417e31f code cleanup 2026-03-01 23:04:12 +01:00
Hendrik Brummermann
60d20f593b use ImageBitmap for SkillEffect 2026-03-01 23:04:11 +01:00
Hendrik Brummermann
f44e519104
Merge pull request #762 from arianne/dependabot/npm_and_yarn/npm_and_yarn-fb4fae9948
Bump minimatch from 9.0.5 to 9.0.9 in the npm_and_yarn group across 1 directory
2026-03-01 12:54:22 +01:00
dependabot[bot]
70dc2ded31
Bump minimatch in the npm_and_yarn group across 1 directory
Some checks failed
Java CI / build (push) Has been cancelled
Bumps the npm_and_yarn group with 1 update in the / directory: [minimatch](https://github.com/isaacs/minimatch).


Updates `minimatch` from 9.0.5 to 9.0.9
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v9.0.5...v9.0.9)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-version: 9.0.9
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-01 10:34:11 +00:00
Hendrik Brummermann
542f4524db converted StatusIconDrawer to ImageBitmap 2026-02-28 18:55:14 +01:00
Hendrik Brummermann
0d25beefa8 refactored singleton class StatusIconDrawer out of RPEntity 2026-02-28 03:14:24 +01:00
Hendrik Brummermann
3a478f341d use HeldObjectManager.get() 2026-02-28 02:30:16 +01:00
Hendrik Brummermann
c9f865a894 slightly reduce size of drag icon to so players focus cursor position 2026-02-23 22:26:32 +01:00
Hendrik Brummermann
afd5329fcc Item uses ImageBitmap instead of HTMLImageElement 2026-02-23 22:08:35 +01:00
Hendrik Brummermann
b8edcfb252 code cleanup 2026-02-22 19:48:41 +01:00
Hendrik Brummermann
bebce66517 use ImageBitmap in DomesticAnimal 2026-02-22 19:32:51 +01:00
Hendrik Brummermann
6f58eef4f5 updated marauroa.jar to set _rpclass before init() 2026-02-22 19:29:26 +01:00
Hendrik Brummermann
4d2925aa4b cleaned up HTMLImageStorage usage 2026-02-22 10:53:57 +01:00
Hendrik Brummermann
fb2ae76fc5 renamed SpriteStore to HTMLImageStore and access it directly 2026-02-22 09:59:37 +01:00
Hendrik Brummermann
aadec09b5d clean up factory class 2026-02-22 09:16:33 +01:00
Hendrik Brummermann
9fd4316d0f removed stendhal.data.sprites variable 2026-02-22 09:09:49 +01:00
Hendrik Brummermann
e1d01dea79 replaced stendhal.ui.gamewindow and stendhal.ui.viewport 2026-02-12 23:52:30 +01:00
Hendrik Brummermann
dd500a36e5 replaced stendhal.zone with Zone.get() 2026-02-12 22:29:45 +01:00
Hendrik Brummermann
8b2727f392 converted stendhal.ui.html into static class HTMLUtil 2026-02-12 21:59:12 +01:00
Hendrik Brummermann
d350c2b494 invoke singleton get-methods instead of SingletonRepo 2026-02-12 21:27:15 +01:00
Hendrik Brummermann
2022b28b76 access OutfitStore singleton directly 2026-02-12 01:42:32 +01:00
Hendrik Brummermann
1f9242ae6f converted to image bitmap 2026-02-10 23:24:15 +01:00
Hendrik Brummermann
03654e4459 prevent path traversal 2026-02-09 22:32:04 +01:00
Hendrik Brummermann
fcadfcdbd3 use ImageBitmap 2026-02-09 22:28:39 +01:00
Hendrik Brummermann
581ffc886a use ImageBitmap and ImageManager 2026-02-09 00:32:54 +01:00
Hendrik Brummermann
e2146721d1 use ImageBitmap in ActivityIndicatorSprite 2026-02-08 22:02:29 +01:00
Hendrik Brummermann
c6a51ffcf3 converted Blood from SpriteStore to ImageManager 2026-02-08 18:45:22 +01:00
Hendrik Brummermann
d846fa5818 created an ImageSprite class for ImageManager ImageRefs and use it 2026-02-08 18:45:05 +01:00
Hendrik Brummermann
13fc7f6b1a deleted unused classes EmptySprite, ImageSprite, Sprite, Tileset 2026-02-08 16:45:36 +01:00
Hendrik Brummermann
86cf9c0959 deleted class ImageSprite 2026-02-08 15:19:16 +01:00
Hendrik Brummermann
7c5cef1181 fixed ctrl direction change 2026-02-08 00:27:36 +01:00
Hendrik Brummermann
72f23a7bc1 call super.destroy() 2026-02-07 22:24:24 +01:00
Hendrik Brummermann
404263a1ef code cleanup 2026-02-07 22:23:33 +01:00
Hendrik Brummermann
b479ec3d52 use ImageManager instead of SpriteStore for weather images 2026-02-07 02:04:40 +01:00
Hendrik Brummermann
b796ba36b0 use ImageManager instead of SpriteStore 2026-02-07 02:01:55 +01:00
Hendrik Brummermann
07a41fddfe cache tileset-images to speed up zone changes 2026-02-07 02:01:21 +01:00
Hendrik Brummermann
97ea5ab442 use ImageManager 2026-02-05 22:09:59 +01:00
Hendrik Brummermann
659c155a36 apply preferences to own outfit 2026-02-05 22:09:39 +01:00
Hendrik Brummermann
0f3ecbd3dd code cleanup 2026-02-05 22:08:12 +01:00
Hendrik Brummermann
535e7f5727 use ImageManager images for preview of outfit parts into Outfit Dialog 2026-02-04 22:57:48 +01:00
Hendrik Brummermann
1bf34316fb support ImageRef.free() without going through the ImageManager 2026-02-04 22:57:01 +01:00
Hendrik Brummermann
c7befd2fe1 support cleanup of ImageManager 2026-02-04 22:15:01 +01:00
Hendrik Brummermann
230b25e5fa added support for filtered images 2026-02-02 22:10:18 +01:00
Hendrik Brummermann
3b6d652aa8 dont return the image in waitFor because it might have expired 2026-02-02 22:04:07 +01:00
Hendrik Brummermann
41604ca00e code cleanup 2026-02-02 21:59:34 +01:00
Hendrik Brummermann
7e0fbe0f16 split ImageRef and ImageRefImpl to hide management methods 2026-02-02 20:54:03 +01:00
Hendrik Brummermann
2bd16f0307 implemented ImageRef.waitFor() 2026-02-01 22:43:01 +01:00
Hendrik Brummermann
afb06b8f97 started to work on ImageManager and ImageRef 2026-02-01 22:25:24 +01:00
Hendrik Brummermann
95f373bd1c removed reference to global stendhal object 2026-02-01 22:25:06 +01:00
Hendrik Brummermann
e58e6a54cb do not use failsave sprite for drag image 2026-01-31 23:11:37 +01:00
Hendrik Brummermann
f109b551f5 optimized image creation 2026-01-31 23:10:42 +01:00
Hendrik Brummermann
5f4d9d9460 moved SpriteStore.getAreaOf() to HTMLImageElementUtil 2026-01-31 21:28:43 +01:00
Hendrik Brummermann
61f047a955 prevent negative positions of dialogs 2026-01-31 17:18:58 +01:00
Hendrik Brummermann
3534bf384f close outfit dialog preview ImageBitmap 2026-01-31 17:06:49 +01:00
Hendrik Brummermann
6b1296e059 renamed MultilayerImage to MultilayerImageLoader 2026-01-31 15:50:39 +01:00
Hendrik Brummermann
c19e4b0627 added filter support to MultilayerImage 2026-01-31 15:50:19 +01:00
Hendrik Brummermann
72d569343a implemented MultilayerImage loader 2026-01-31 14:55:56 +01:00
Hendrik Brummermann
a6708ee0c2 removed references to stendhal.data.map and SingletonRepo.getMap() 2026-01-25 23:43:17 +01:00
Hendrik Brummermann
e0dce1a242 access TileMap directly without referencing stendhal.data.map 2026-01-25 23:33:25 +01:00
Hendrik Brummermann
55e802b988 changed module and moduleResolution for better compatibility 2026-01-25 23:09:08 +01:00
Hendrik Brummermann
d24e452f59 inlined LandscapeRender.ts into CombinedTilesetRenderingStrategy.ts 2026-01-25 23:08:26 +01:00
Hendrik Brummermann
8fc173d923 replaced tileset loader "ImagePreloader" as ImageCache using ImageBitmap 2026-01-25 20:01:31 +01:00
Hendrik Brummermann
1484f872da code cleanup 2026-01-25 19:59:25 +01:00
Hendrik Brummermann
93a99c9c10 moved CombinedTilesetRenderingStrategy out of LandscapeRenderingStrategy 2026-01-25 01:53:13 +01:00
Hendrik Brummermann
79ba39a030 fixed moduleResolution setting 2026-01-25 01:41:35 +01:00
Hendrik Brummermann
1c50a2a454 moved sprite/image/ImageFilter out of data/SpriteStore 2026-01-25 01:40:28 +01:00
Hendrik Brummermann
4feb1e628a use OffscreenCanvas to create outfit sprite 2026-01-24 23:13:03 +01:00
Hendrik Brummermann
662aab6ded use ImageBitmap for minimap static collisions 2026-01-24 18:39:35 +01:00
Hendrik Brummermann
f9fc0230f5 use OffscreenCanvas 2026-01-24 15:13:40 +01:00
Hendrik Brummermann
ba6d507924 inlined DrawingStage into Outfit 2026-01-23 23:00:04 +01:00
Hendrik Brummermann
e121d44356 added TODOs and fixed compiler warnings 2026-01-23 22:47:34 +01:00
Hendrik Brummermann
8b61de02e6 converted Singleton DrawingStage to instance and use Offscreen 2026-01-23 22:47:17 +01:00
Hendrik Brummermann
1ca1f0e47e fixed undefined _hsMap() error 2026-01-23 21:31:57 +01:00
Jordan Irwin
3026afe931
Manually build code in CodeQL workflow as default target has changed 2026-01-20 21:52:22 -08:00
Jordan Irwin
f9a37f122e
Update instances of CodeQL Action to v3 as v2 is now deprecated 2026-01-20 21:39:33 -08:00
Jordan Irwin
fd2cff8618
Clean up README 2026-01-20 20:27:21 -08:00
Jordan Irwin
30494af57c
Fix running server with 'ant server_run' 2026-01-20 19:41:59 -08:00
Jordan Irwin
2ed431fd6a
Add Spanish translations for lemon, banana, & corn 2026-01-20 01:27:31 -08:00
Jordan Irwin
cc4918a5ed
Add Spanish translation for map description 2026-01-20 01:26:38 -08:00
Jordan Irwin
6608eb2b02
Add Spanish translations for some newer items 2026-01-20 01:26:09 -08:00
Jordan Irwin
79622ee9cf
Update Spanish translations for some renamed items 2026-01-20 01:12:57 -08:00
Jordan Irwin
c6f2718aec
Remove trailing periods from translated names 2026-01-20 01:12:06 -08:00
Jordan Irwin
1fd97009eb
Update Spanish translations of item & entity descriptions 2026-01-20 00:19:55 -08:00
Jordan Irwin
517b62c5b1
Update Spanash locale file header 2026-01-20 00:19:29 -08:00
Jordan Irwin
de36580350
Run 'ant locale_update' 2026-01-20 00:14:16 -08:00
Jordan Irwin
3d971f37b5
Update locale template 2026-01-20 00:13:41 -08:00
Jordan Irwin
4666911be6
Don't need English language file 2026-01-20 00:13:30 -08:00
AntumDeluge
c4723aba93 Merge pull request 'Clean Up Ant Build' (#32) from AntumDeluge/stendhal:build_cleanup into master
Reviewed-on: https://codeberg.org/arianne/stendhal/pulls/32
2026-01-20 03:47:18 +01:00
Jordan Irwin
8c93122d1e
Rename target locale_build_template to locale_template 2026-01-19 18:07:18 -08:00
Jordan Irwin
2bec3a151b
Remove unneeded aliases 2026-01-19 18:03:56 -08:00
Jordan Irwin
38f5c0124d
Remove build target descriptions
Descriptions now available in `ant help` target.
2026-01-19 18:03:56 -08:00
Jordan Irwin
2df3243f2d
Make 'help' default target 2026-01-19 18:03:55 -08:00
Jordan Irwin
08873546ba
Add help info to ant build 2026-01-19 18:03:47 -08:00
Jordan Irwin
26c4723749
Move build properties to sub-module 2026-01-19 17:38:39 -08:00
Jordan Irwin
6eeff4766d
Make compile_stendhaltools target alias of compile_tools 2026-01-19 17:38:39 -08:00
Jordan Irwin
737cac9495
Make compile_stendhaltextclient build target alias of compile_textclient 2026-01-19 17:38:33 -08:00
Hendrik Brummermann
5ae5d33438 updated marauroa.jar
Some checks failed
Java CI / build (push) Has been cancelled
2026-01-18 21:41:30 +01:00
Hendrik Brummermann
621a43579a fixed import 2026-01-18 21:05:29 +01:00
Hendrik Brummermann
45cd2ac30e moved onPerceptionEnd method from Client to StendhalPerceptionListener 2026-01-18 14:13:13 +01:00
Hendrik Brummermann
b328b1aedf moved RPObject, RPEvent and RPSlot from Stendhal to Marauroa 2026-01-17 23:50:58 +01:00
Hendrik Brummermann
d633ebf947 use instance of Marauroa class instead of global marauroa object 2026-01-17 15:15:33 +01:00
Hendrik Brummermann
f4935f4928 updated marauroa.jar 2026-01-16 22:07:55 +01:00
Hendrik Brummermann
b71a29f883 user register for RPObjects 2026-01-16 22:04:56 +01:00
Hendrik Brummermann
3424b898b8 created dedicated CorpseSlot class 2026-01-16 22:04:20 +01:00
Hendrik Brummermann
1f3abca39c use register for events 2026-01-16 22:03:57 +01:00
Hendrik Brummermann
d6ca574a20 fixed references to wrong "ui" variable 2026-01-15 21:42:09 +01:00
Hendrik Brummermann
612b4a6b88 code cleanup 2026-01-14 23:09:37 +01:00
Hendrik Brummermann
a13ee36fe8 converted all events to TypeScript 2026-01-14 22:56:50 +01:00
Jordan Irwin
2abc8df666
Run 'ant cleanwhitespace' 2026-01-13 19:12:13 -08:00
Jordan Irwin
14d7e046be
Process ant build files in 'cleanwhitespace' target 2026-01-13 19:09:24 -08:00
Jordan Irwin
6c64621496
Don't try to clean removed 'tiled' directory 2026-01-13 19:09:23 -08:00
Hendrik Brummermann
6a4009c790 fixed build 2026-01-13 23:07:55 +01:00
Hendrik Brummermann
38934a8c09 fixed local builds after esbuild migration 2026-01-13 09:13:54 +01:00
Hendrik Brummermann
738d3cd830 explicitly define marauroa global variable 2026-01-10 00:24:12 +01:00
Hendrik Brummermann
8cb1a7b050 converted stendhal object into a static class 2026-01-09 00:06:37 +01:00
Hendrik Brummermann
d1fc6947b7 use esbuild 2026-01-06 21:45:58 +01:00
Hendrik Brummermann
402bb84c43 fixed this-reference and redirect to character selection on disconnect 2026-01-06 21:44:41 +01:00
Hendrik Brummermann
819b80913f added esbuild as devDependencies 2026-01-06 21:43:57 +01:00
Hendrik Brummermann
da4378d30c updated marauroa 2026-01-06 21:43:35 +01:00
Hendrik Brummermann
37d3e1c84d fixed init order and wrong "this". 2026-01-02 04:11:34 +01:00
Hendrik Brummermann
f1d98fff56 access SpriteStore via singletons instead of stendhal-variable 2026-01-02 04:11:33 +01:00
Jordan Irwin
8f642ac446
Increment version to 1.49.5 2026-01-01 18:33:01 -08:00
Jordan Irwin
6224a0638a
Run 'ant init' to update copyright year 2026-01-01 18:31:27 -08:00
Jordan Irwin
c38740eaab
Use 'versionName' instead of 'versionCode' in Android output filename 2026-01-01 18:24:56 -08:00
Hendrik Brummermann
cbf971e632 replace stendhal.paths with Paths to ensure correct init order 2026-01-02 01:37:39 +01:00
Hendrik Brummermann
7546fbba80 removed unused library 2025-12-30 00:24:38 +01:00
Hendrik Brummermann
face9f3a67 use OffscreenCanvas and ImageBitmap instead of img- and canvas-elements 2025-12-28 18:59:53 +01:00
Hendrik Brummermann
703fa61329 cleaned up references to animations 2025-12-28 18:13:15 +01:00
Hendrik Brummermann
4dbe1f73fe implemented light rendering (to test "/debug light" and change zone) 2025-12-28 17:51:51 +01:00
Hendrik Brummermann
09371bff47 restore transparency after blending 2025-12-28 14:41:39 +01:00
Hendrik Brummermann
6ff59a0040 refactored drawCombinedTileAtIndex and drawTile in preparation for blend 2025-12-28 12:40:28 +01:00
Hendrik Brummermann
063d03c45f used Canvas and RenderingContext2D to allow OffscreenCanvas 2025-12-28 12:32:20 +01:00
Hendrik Brummermann
d191c14232 updated typescript and typedoc 2025-12-28 12:31:20 +01:00
Hendrik Brummermann
d9b51f0d15 disabled code to draw lights (alpha is broken) 2025-12-28 10:04:14 +01:00
Hendrik Brummermann
44f6a4a9fe marked event listener as passive to prevent scroll delay 2025-12-27 13:10:16 +01:00
Hendrik Brummermann
d1d4eb5c49 removed setting alpha in applyHSLFilter method 2025-12-27 13:00:05 +01:00
Hendrik Brummermann
0d56d2b63b renamed Map to TileMap and use type definition 2025-12-26 14:57:00 +01:00
Hendrik Brummermann
a000e5f788 made blend layer available 2025-12-26 14:41:21 +01:00
Jordan Irwin
cc5414894f
Use JDK version 17 in Android Build Test workflow
Current bundled Gradle Wrapper version is 7.5.1, which isn't
compatible with more recent Java releases.
2025-12-24 22:10:38 -08:00
Jordan Irwin
2e5dbc12c6
Validate Gradle Wrapper .jar in Android Build Test workflow 2025-12-24 22:01:09 -08:00
Jordan Irwin
f756534846
Validate Gradle Wrapper distribution checksum not .jar checksum 2025-12-24 21:59:21 -08:00
Jordan Irwin
7174c32521
Send Android Build error report to Discord dev channel 2025-12-24 18:21:32 -08:00
Jordan Irwin
049b91e98b
Don't send details to Discord 2025-12-24 18:21:01 -08:00
Jordan Irwin
a5db37305e
Fix 'run' line 2025-12-24 18:13:57 -08:00
Jordan Irwin
179bc4d5e7
Fix code alignment in Android Build Test GitHub workflow 2025-12-24 18:10:25 -08:00
Jordan Irwin
31c4f9cfb4
Discord webhook for Android Build Test failure 2025-12-24 18:07:00 -08:00
Jordan Irwin
c4491004d2
Parse job ID in Android Build Test GitHub workflow 2025-12-24 18:05:36 -08:00
Jordan Irwin
e910892a16
Build .apk packages using Ant in Android Build Test GitHub workflow 2025-12-24 17:31:39 -08:00
Jordan Irwin
7beb123117
Allow dispatching Android build workflow manually 2025-12-24 17:11:58 -08:00
Hendrik Brummermann
a141cc187d properly format item names in description text of shop windows 2025-12-22 19:21:51 +01:00
Hendrik Brummermann
c68f0a59d5 show outfits in shop sign dialog 2025-12-22 18:06:00 +01:00
Hendrik Brummermann
a3bd4b328a code cleanup 2025-12-22 18:05:49 +01:00
Hendrik Brummermann
9e56945faf use proper table for item shop signs 2025-12-22 17:31:24 +01:00
Hendrik Brummermann
6f783d3ef6 moved ShowItemListEvent and ShowOutfitListEvent out of EventRegistry 2025-12-22 17:02:31 +01:00
Hendrik Brummermann
ccee5a42b3 added experiment to .gitignore 2025-12-21 22:11:50 +01:00
Jordan Irwin
f2d519a29f
Revert "Ensure cargo-license installed for nativehelper build"
This reverts commit d516c738bf.
2025-11-03 03:43:05 -08:00
Jordan Irwin
d516c738bf
Ensure cargo-license installed for nativehelper build 2025-11-03 03:29:09 -08:00
Jordan Irwin
ad92b7f2a9
make sure extensions/binary directory exists when building Neutralinojos app 2025-11-03 00:14:27 -08:00
Hendrik Brummermann
2ee0aaa5e7 created stendhal-client.zip file and renamed executables 2025-11-02 12:12:50 +01:00
Jordan Irwin
6592f5c245
Fix Gourmet achievement
Coal for Haunchy quest slot state was changed to use "done" instead of "waiting".

Closes: https://codeberg.org/arianne/stendhal/issues/28
2025-11-01 00:18:03 -07:00
Jordan Irwin
8206631665
Fix Unit test for Gwen's updated shop prices 2025-10-31 18:21:40 -07:00
Jordan Irwin
bdb34e8628
Reduce outfit prices in Gwen's shop by 50% 2025-10-31 18:07:20 -07:00
Jordan Irwin
0fba46d89b
Minor change to script text output 2025-10-31 17:56:18 -07:00
Jordan Irwin
4a55c4a706
Trim large music files to decrease size to 2MB or less
Should help to mitigate issue with Java client failing to load large music data on systems with low resources.

https://github.com/arianne/stendhal/issues/750
2025-10-31 17:43:09 -07:00
Jordan Irwin
4253e1e73b
Python script to check audio files sizes
Prints warning if file size exceeds 2MB.

https://github.com/arianne/stendhal/issues/750
2025-10-31 17:42:55 -07:00
Jordan Irwin
4e8fe0592e
Add license boilerplates 2025-10-15 20:15:19 -07:00
Jordan Irwin
5709a85824
Set Java client compilation to 8
Support for 7 removed in newer Java versions.
2025-09-25 22:03:44 -07:00
Jordan Irwin
700e3ee730
Replace calls to deprecated URL constructors 2025-09-25 21:58:36 -07:00
Jordan Irwin
0b2cb9df08
Set User-Agent string for Wikipedia API requests
Closes: https://codeberg.org/arianne/stendhal/issues/27
2025-09-25 21:58:27 -07:00
Jordan Irwin
63d9667264
Fix typo in quest dialogue 2025-09-25 19:48:53 -07:00
Jordan Irwin
920ed5a3a2
Add start screen screenshot for F-Droid 2025-09-24 13:15:29 -07:00
Jordan Irwin
f02fc6b04f
Add phone screenshots for F-Droid
Closes https://github.com/arianne/stendhal/issues/754
2025-09-24 13:02:57 -07:00
Jordan Irwin
807a8bb40a
Print authentication status when nativehelper connection closes 2025-09-12 10:40:28 -07:00
Jordan Irwin
e6180e9ff5
Update changes 2025-09-08 23:05:15 -07:00
Jordan Irwin
3de1141898
Close nativehelper extension when clientDisconnect event triggered
Closes https://github.com/neutralinojs/neutralinojs/issues/1458
Closes https://github.com/arianne/stendhal/issues/736
2025-09-08 22:46:57 -07:00
Jordan Irwin
3e31e6b788
Update changes 2025-09-07 13:08:15 -07:00
Jordan Irwin
ff9fb76ab3
Update Neutralino.js to 6.2.0
Closes: https://github.com/arianne/stendhal/issues/696

Commit reference: f46403677c
2025-08-26 13:49:09 -07:00
Jordan Irwin
ccb229efe9
Clean up indentation in Neutralino.js config 2025-08-26 13:48:21 -07:00
Jordan Irwin
5f3f86c6e7
Normalize line endings in Tiled maps 2025-07-26 18:44:53 -07:00
Jordan Irwin
42c30cdbda
Run 'ant clean_whitespace' 2025-07-26 16:08:05 -07:00
Jordan Irwin
01dddc103f
Update Android source location in clean_whitespace target 2025-07-26 16:07:12 -07:00
Hendrik Brummermann
70bcbc3066 perfer Codeberg over Github 2025-01-22 22:18:29 +01:00
Hendrik Brummermann
3c7b1a30ae use Mastodon instead of Twitter 2025-01-22 22:13:20 +01:00
Jordan Irwin
e82524ec2f
Adjust coloring alpha setting to better match Java client 2025-01-09 02:54:59 -08:00
Jordan Irwin
f224b79094
Don't check movement radius if NPC has path 2025-01-02 23:56:42 -08:00
Jordan Irwin
a7e66a4288
Ignore movement limit when radius set to 0
Fixes SilentNPC paths
Closes https://codeberg.org/arianne/stendhal/issues/7
2025-01-02 23:55:56 -08:00
Jordan Irwin
79e882fe5f
Code optimization 2025-01-02 21:50:19 -08:00
Jordan Irwin
8b63897d37
Update copyright year 2025-01-02 14:38:31 -08:00
Jordan Irwin
a24774cda9
Template F-Droid release announcment file for master branch 2024-12-21 15:14:49 -08:00
Jordan Irwin
2746ee1411
Increment version 2024-12-21 15:11:30 -08:00
Jordan Irwin
962bd11aec
Fix Mr Ross's head 2024-12-21 14:57:16 -08:00
Jordan Irwin
a9ae0db9a9
Disable encrypted DependencyInfoBlock in APK build
https://gitlab.com/fdroid/fdroiddata/-/issues/3330
2024-12-20 19:58:47 -08:00
Jordan Irwin
06f4e5eb78
Remove unreachable code block 2024-12-17 19:26:16 -08:00
Jordan Irwin
ade5f226a9
Fix random selecting between patrolling & wander idle behavior 2024-12-17 18:44:43 -08:00
Jordan Irwin
d2f549394d
Touch up scaling artifacts in necrosophia overlay 2024-12-15 22:27:45 -08:00
Hendrik Brummermann
4f9ffc1a48 treat undefined strings as empty 2024-12-11 21:18:38 +01:00
Jordan Irwin
178cd60429
Remove music with questionable licensing from Athor map &...
...restore bongos.
2024-12-03 11:43:16 -08:00
tigertoes
f4f6fd6a2c added second level checking set of portals for entwives 2024-08-08 00:24:19 -04:00
tigertoes
23412db466 modified map to house mithril dragons - access to come 2024-08-07 23:01:42 -04:00
Jordan Irwin
65d0e04af3
Add FIXME note 2024-07-31 04:00:30 -07:00
Jordan Irwin
2cee409a77
Add TODO note 2024-07-31 01:51:35 -07:00
Jordan Irwin
aba72381ea
Override keypress events in login dialog...
Allows using tab key to select fields.
2024-07-31 00:14:02 -07:00
Jordan Irwin
14586c634c
Add logout button to choose character dialog 2024-07-30 23:46:27 -07:00
Jordan Irwin
796a1e09cb
Hide close button of login & character select dialogs 2024-07-30 22:47:00 -07:00
Jordan Irwin
706d485113
Method to hide close button of floating window 2024-07-30 22:37:55 -07:00
Jordan Irwin
a10ec0272d
Add support for rotating outfit preview 2024-07-30 22:15:04 -07:00
Jordan Irwin
d53d3f690e
Use OutfitPreviewComponent for composite preview in outfit dialog 2024-07-30 22:13:11 -07:00
Jordan Irwin
52b1df5f96
Component for creating an outfit preview 2024-07-30 22:11:06 -07:00
Jordan Irwin
76feee77fd
Class to represent an entity's outfit 2024-07-30 22:11:06 -07:00
Jordan Irwin
bf60fed1b8
Method to add image directly to SpriteStore cache 2024-07-30 22:10:43 -07:00
Jordan Irwin
c4aa1a9786
Add method to OutfitStore to check if layer uses "skin" coloring 2024-07-30 21:34:06 -07:00
Jordan Irwin
21d00772ad
Move layer names to OutfitStore 2024-07-30 21:23:52 -07:00
Jordan Irwin
2d232b1646
Drawing stage class for manipulating images before they are...
...displayed
2024-07-30 21:13:15 -07:00
Jordan Irwin
0f2a5117f5
Function to check if string is empty or contains whitespace only 2024-07-30 21:04:40 -07:00
Jordan Irwin
cb6db786f2
Function for padding string on left side 2024-07-30 21:03:54 -07:00
Jordan Irwin
212eba66d5
Convert StringUtil class to namespace 2024-07-30 20:58:19 -07:00
Jordan Irwin
cdadb33ca0
Add license boilerplate 2024-07-25 18:54:41 -07:00
Jordan Irwin
5e4d873a38
Flip pathfinding button icon & fill with white 2024-07-25 15:27:03 -07:00
Jordan Irwin
cb4d5b609f
Update changes 2024-07-25 02:32:39 -07:00
Jordan Irwin
a6f3e22538
Create test for dojo seller/repairer NPC (Akutagawa) 2024-07-25 02:32:39 -07:00
Jordan Irwin
7c1b52bff6
Fix Akutagawa's repair prices 2024-07-25 02:32:38 -07:00
Jordan Irwin
8930612a49
Fix repairer checks & conditions 2024-07-25 02:32:38 -07:00
Jordan Irwin
b7c552cdf4
Fix supported item check in repair request 2024-07-25 02:32:38 -07:00
Jordan Irwin
236bb8bd72
Fix repairer dynamic responses 2024-07-25 02:32:37 -07:00
Jordan Irwin
89ee706681
Set conversation state in ChatAction 2024-07-25 02:32:37 -07:00
Jordan Irwin
ef768a1ba6
Don't pass item name to canRepair method 2024-07-25 02:32:36 -07:00
Jordan Irwin
c8f5d45eef
Support plural & case-insensitive repair requests 2024-07-25 02:32:36 -07:00
Jordan Irwin
98e0cf4222
Reset assassin repairer when conversation ends or repair is executed 2024-07-25 02:32:36 -07:00
Jordan Irwin
b6f066508f
Remove fixme note & unneeded warning suppression 2024-07-25 02:32:35 -07:00
Jordan Irwin
2dc2318a3b
Move methods from AssassinRepairerAdder to AssassinRepairer 2024-07-25 02:32:35 -07:00
Jordan Irwin
bbe8c03b97
Fixed condition to check if player dropped items before confirming...
...repair
2024-07-25 02:32:34 -07:00
Jordan Irwin
e06b6737c4
Convert response IDs to enum 2024-07-25 02:32:17 -07:00
Jordan Irwin
d6428edaf3
Set locale when converting to lower case 2024-07-25 02:31:42 -07:00
Jordan Irwin
b71d3a7ccc
Add doc string 2024-07-25 02:31:15 -07:00
Jordan Irwin
42f98da03f
Add "repair" to chat options merchant activities list 2024-07-25 01:56:01 -07:00
Jordan Irwin
418d9cde03
Add repair phrases to ConversationPhrases 2024-07-25 01:56:01 -07:00
Jordan Irwin
9e387d13ec
Methods to get entities by class type 2024-07-25 01:23:01 -07:00
Jordan Irwin
cbf59d11b8
Don't try to autobind if player is null 2024-07-25 01:22:56 -07:00
Jordan Irwin
0de7b82913
Add todo notes 2024-07-24 19:01:03 -07:00
Jordan Irwin
228898fa15
Add/Clean up doc strings 2024-07-24 19:00:32 -07:00
Jordan Irwin
21b6930a11
Reword changes section 2024-07-23 22:08:03 -07:00
Jordan Irwin
38c71e284e
Update changes 2024-07-23 17:28:48 -07:00
Jordan Irwin
593d27f2c4
Hide screen capture behing debugging property 2024-07-23 17:24:32 -07:00
Jordan Irwin
26b56245b9
Add support for viewport video capture using application menu 2024-07-23 17:24:31 -07:00
Jordan Irwin
e867756659
Add support for viewport video capture using slash action 2024-07-23 17:24:31 -07:00
Jordan Irwin
f33639737c
Class for capturing video of viewport 2024-07-23 17:24:30 -07:00
Jordan Irwin
a70721a98f
Make DownloadUtil.timestamp public 2024-07-23 17:24:28 -07:00
Jordan Irwin
96e8aa1a1f
Add ring of clarity drop to golden orc 2024-07-23 16:57:09 -07:00
Jordan Irwin
743eaf8384
Add ring of clarity drop to unicorn 2024-07-23 16:57:04 -07:00
Jordan Irwin
e81ee6a33c
Ring of clarity (increases atk accuracy by 25%) 2024-07-23 16:44:49 -07:00
Jordan Irwin
585981f8c4
Add item attribute to affect hit chance 2024-07-23 16:38:57 -07:00
Jordan Irwin
d5f3712ee7
Add method to get all items from equipment slots 2024-07-23 16:38:52 -07:00
Jordan Irwin
68b99deaec
Fix typo 2024-07-23 15:30:19 -07:00
Jordan Irwin
1bc83e61c0
Use variable instance instead of raw value 2024-07-23 15:30:00 -07:00
Jordan Irwin
c76392f854
Add fixme/todo notes 2024-07-23 15:29:35 -07:00
Jordan Irwin
c2a79db036
Use xml config to set up dojo seller/repairer NPC 2024-07-23 02:09:54 -07:00
Jordan Irwin
4794564af9
Remove ShopsList.addBuyer method 2024-07-23 02:09:07 -07:00
Jordan Irwin
254ebf2ee1
Un-deprecated overload of ShopsList.add 2024-07-23 02:06:14 -07:00
Jordan Irwin
d5a889c58e
Replace calls to deprecated ShopsList.get 2024-07-23 00:56:32 -07:00
Jordan Irwin
5e7b1f9c73
Remove calls to deprecated get & init methods in ShopsXMLLoader 2024-07-23 00:33:23 -07:00
Jordan Irwin
ce872ef5d2
Suppress unused method warning 2024-07-23 00:33:19 -07:00
Jordan Irwin
ed42b5a074
Parameterize references to generic type Class<T> 2024-07-23 00:28:55 -07:00
Jordan Irwin
26883d7afa
Add license boilerplate 2024-07-22 23:50:34 -07:00
Jordan Irwin
e166b717b3
Un-deprecate NPC.moveRandomly 2024-07-22 23:39:11 -07:00
Jordan Irwin
24fbeee56b
Return Point instead of Pair from getRandomSpawnPosition 2024-07-22 23:28:07 -07:00
Jordan Irwin
f520851d46
Add TODO note 2024-07-22 15:56:15 -07:00
Jordan Irwin
e76888cc51
Support setting wander radius limit in IdleBehaviourFactory 2024-07-22 15:49:47 -07:00
Jordan Irwin
5cf76c7f03
Apply wander behavior to dog NPCs 2024-07-22 15:41:23 -07:00
Jordan Irwin
9bd676a3c3
Support returning to origin in wander behavior 2024-07-22 15:25:23 -07:00
Jordan Irwin
81b46c3fa0
Return squared distance when calculating distance to entity origin...
...and make method public
2024-07-22 15:08:36 -07:00
Jordan Irwin
2edcfb1cf7
Return squared distance when calculating distance to entity origin 2024-07-22 15:07:25 -07:00
Jordan Irwin
bf5a4e73bd
Overload Rand.flipCoin for result with even probability 2024-07-22 14:11:20 -07:00
Jordan Irwin
485e626083
Add doc strings & code cleanup 2024-07-22 09:55:33 -07:00
Jordan Irwin
1f5d4be5ed
Update TODO note 2024-07-22 05:17:46 -07:00
Jordan Irwin
423bd033e0
Add TODO note 2024-07-22 03:52:16 -07:00
Jordan Irwin
96acebae7d
Admin script to manage clover 2024-07-21 21:38:48 -07:00
Jordan Irwin
40db53c75d
Add method to check for spawned clover 2024-07-21 21:38:18 -07:00
Jordan Irwin
01a3d15134
Don't try to remove clover from zone if it has already been...
...picked up by player
2024-07-21 21:36:32 -07:00
Jordan Irwin
345926808a
Add TODO note 2024-07-20 15:45:51 -07:00
Jordan Irwin
637effbf69
New quest: Lucky Four-Leaf Clover 2024-07-20 15:00:13 -07:00
Jordan Irwin
e2cf347731
New NPC: Maple, a clover hunter 2024-07-20 15:00:13 -07:00
Jordan Irwin
e681dc2fcc
Sprite image for clover hunter NPC (OGA BY)
Using dress 55 & hair 46.
2024-07-20 15:00:12 -07:00
Jordan Irwin
02ef1ed34f
New achievement: Luck O' the Irish
Find the four-leaf clover
2024-07-20 15:00:12 -07:00
Jordan Irwin
05ff7ffd66
Mark Sikhw maps as innaccessible 2024-07-20 15:00:11 -07:00
Jordan Irwin
336d83854f
Configure four-leaf clover spawner with 0_semos_plains_n map 2024-07-20 15:00:11 -07:00
Jordan Irwin
ac34c133ee
Four-leaf clover configurator 2024-07-20 15:00:04 -07:00
Jordan Irwin
e6b34706ac
Four-leaf clover spawner
https://stendhalgame.org/wiki/Stendhal_Quest_Ideas/Lucky_Four_Leaf_Clover
2024-07-20 14:59:06 -07:00
Jordan Irwin
aad2005dc0
Return item in growNewFruit 2024-07-20 14:57:16 -07:00
Jordan Irwin
e6e0d60bf5
Four-leaf clover item 2024-07-20 14:57:16 -07:00
Jordan Irwin
845df00bdd
Image for clover item (OGA BY)
Copied from lucky charm
2024-07-20 14:57:15 -07:00
Jordan Irwin
1af92af6af
Methods to get a random spawn position in a zone 2024-07-20 14:57:15 -07:00
Jordan Irwin
dcc390c30a
Method to get seconds to midnight from current time 2024-07-20 14:57:14 -07:00
Jordan Irwin
d5adb7c5ae
Add touched up base to kid1npc sprite 2024-07-18 10:43:57 -07:00
Jordan Irwin
92752ac7fe
Add touched up template for laying human adult 2024-07-18 10:43:18 -07:00
Jordan Irwin
e1f897fa30
Update changes 2024-07-15 11:01:35 -07:00
Jordan Irwin
3ba6448011
Make Amber wander 2024-07-15 10:39:22 -07:00
Jordan Irwin
0d334d4a22
Use wander idle behavior with rabbits in Fado 2024-07-15 10:39:21 -07:00
Jordan Irwin
2848042ea7
Don't stop or change direction until after position change to prevent...
...sprite jumping
2024-07-15 10:39:21 -07:00
Jordan Irwin
fccda47c93
Add support for using idle behavior with other NPC types 2024-07-15 10:39:20 -07:00
Jordan Irwin
a4fc86c04a
Add pre-logic to NPC types 2024-07-15 10:39:19 -07:00
Jordan Irwin
4dd4e8840c
Move wander idle behavior class to NPC package 2024-07-15 10:39:18 -07:00
Jordan Irwin
52a3809c35
Move idle behavior classes to NPC package 2024-07-15 10:39:17 -07:00
Jordan Irwin
757eb04038
Make idle behaviour work with NPC class 2024-07-15 10:39:16 -07:00
Jordan Irwin
6653634128
Add wander behavior to crabs in addition to patrolling 2024-07-15 10:38:47 -07:00
Jordan Irwin
8d42afbf0d
Change turtle behavior to wander 2024-07-15 10:38:46 -07:00
Jordan Irwin
2d43a41541
Allow randomly selecting between "patrolling" & "wander" behavior...
...when both are included in AI profiles
2024-07-15 10:38:46 -07:00
Jordan Irwin
858320c8e2
Reset idler to prevent stopping creature during chase 2024-07-15 10:38:45 -07:00
Jordan Irwin
95bf1616ba
Handle creature collision in idler if available 2024-07-15 10:38:44 -07:00
Jordan Irwin
0616ea3a8b
AI profile for "wandering" entities 2024-07-15 10:38:43 -07:00
Jordan Irwin
246a5b47dc
Add reset method to idle behavior classes 2024-07-15 10:38:42 -07:00
Jordan Irwin
0f118cbe46
Add onMoved method to idle behavior classes 2024-07-15 10:38:42 -07:00
Jordan Irwin
2f78691d05
Add methods to handle collision in idle behavior classes 2024-07-15 10:38:41 -07:00
Jordan Irwin
28b7ae2a23
Abstract idle behavior class 2024-07-15 10:38:40 -07:00
Jordan Irwin
f8a09deb53
Add method to randomly change NPC direction 2024-07-15 10:38:39 -07:00
Jordan Irwin
87c1111b63
Don't load sounds for events that are too far to be heard
https://github.com/arianne/stendhal/issues/742
2024-07-15 09:40:35 -07:00
Jordan Irwin
d0d0330ea2
Fall back to default sound radius 2024-07-15 09:36:33 -07:00
Jordan Irwin
7412928f51
Move sound event to its own class file 2024-07-15 09:36:32 -07:00
Jordan Irwin
a2bcd77959
Move default sound radius to common class 2024-07-15 09:36:32 -07:00
Jordan Irwin
ee715a5fe5
Announce new offers with Harold in chat/IRC 2024-07-14 19:50:10 -07:00
Jordan Irwin
b614dad186
Fix licensing of lucky charm 2024-07-11 00:29:43 -07:00
Jordan Irwin
179520b9df
Clean up item graphics sources 2024-07-11 00:26:59 -07:00
Jordan Irwin
ba56253b84
Clean up comment 2024-07-09 20:26:34 -07:00
Jordan Irwin
e906f1f3df
Add Region.DENIRAN_CITY & change appropriate quests 2024-07-09 20:26:33 -07:00
Jordan Irwin
4d2d68907a
Specify how many unicorn horns Zelan needs
Closes https://github.com/arianne/stendhal/issues/421
2024-07-09 16:20:35 -07:00
Jordan Irwin
8a75706607
Clean up grammar in Zelan's dialogue 2024-07-09 16:14:13 -07:00
Jordan Irwin
d6f528f81a
Treat "chaos" as both singular & plural
Closes https://github.com/arianne/stendhal/issues/586
2024-07-09 15:56:47 -07:00
Jordan Irwin
4db3ad4d67
Change Elodrin's skin color to match elves
Closes https://github.com/arianne/stendhal/issues/616
2024-07-09 15:04:19 -07:00
Jordan Irwin
fc644a9755
Update changes 2024-07-09 14:57:15 -07:00
Jordan Irwin
0c32227a7b
Clean up bestiary window layout
Closes https://github.com/arianne/stendhal/issues/675
2024-07-09 14:56:23 -07:00
Jordan Irwin
a39f2e65db
Move bestiary event to its own class 2024-07-09 14:25:46 -07:00
Jordan Irwin
65fb1748a7
Add transformation effect to vampires 2024-07-09 00:10:58 -07:00
Jordan Irwin
df48d0daac
Update changes 2024-07-08 23:16:17 -07:00
Jordan Irwin
a26777d722
Redraw electricity overlays 2024-07-08 23:10:52 -07:00
Jordan Irwin
9f532e2bc3
Extract flames from necrosophia sprite & use as overlay...
...animation (WIP)
2024-07-08 23:10:51 -07:00
Jordan Irwin
1827a40eac
Fix attack sprite animation 2024-07-08 23:10:51 -07:00
Jordan Irwin
091c6deb79
Use OverlaySpriteImpl as base for AttackSprite 2024-07-08 23:10:50 -07:00
Jordan Irwin
abcbc1dbae
Rename ActionSprite to AttackSprite 2024-07-08 23:10:49 -07:00
Jordan Irwin
1d3a249d76
Replace Aenihata's static overlay with animated one 2024-07-08 23:10:49 -07:00
Jordan Irwin
7929acb4d2
Add ice sparkles overlay to ice giant 2024-07-08 23:10:48 -07:00
Jordan Irwin
54d149a7bd
Add ice sparkles overlay to ice golem 2024-07-08 23:10:47 -07:00
Jordan Irwin
c0f3e237c1
Create ice sparkles overlay animation 2024-07-08 23:10:47 -07:00
Jordan Irwin
4c05093b01
Extract electricity from dark elf master sprite & use as...
...overlay animation
2024-07-08 23:10:46 -07:00
Jordan Irwin
c22e919f9c
Extract electricity from dark elf viceroy sprite & use as...
...overlay animation
2024-07-08 23:10:45 -07:00
Jordan Irwin
4d1251c906
Extract electricity from imperial demon lord sprite & use as...
...overlay animation
2024-07-08 23:10:45 -07:00
Jordan Irwin
f662040941
Extract beams from albino elf magician sprite & use as overlay...
...animation
2024-07-08 23:10:44 -07:00
Jordan Irwin
77972930a5
Extract blue flame from emperor dalmung sprite & use as overlay...
...animation
2024-07-08 23:10:44 -07:00
Jordan Irwin
19346b3143
Extract flame from archrat sprite & use as overlay animation 2024-07-08 23:10:43 -07:00
Jordan Irwin
20b9335645
Extract magic sparkles from Tywysoga sprite & use as overlay...
...animation
2024-07-08 23:10:42 -07:00
Jordan Irwin
5a4904c96f
Add support for direction dependent overlay animations 2024-07-08 23:10:41 -07:00
Jordan Irwin
d028bc624e
Move overlay effect creation to EntityOverlayRegistry 2024-07-08 23:10:41 -07:00
Jordan Irwin
ace5065bd3
Add setting to disable entity overlay effects 2024-07-08 23:10:32 -07:00
Jordan Irwin
f2055ab79e
Sprite class to represent an entity skill animation 2024-07-08 21:58:07 -07:00
Jordan Irwin
2e6bcc67ba
Sprite class to represent an entity overlay animation 2024-07-08 21:58:05 -07:00
Jordan Irwin
fe5cde1145
Add support for animated overlay for NPC & creature entities 2024-07-08 21:58:03 -07:00
Jordan Irwin
5c883098c2
Touch up Barbarus's sprite 2024-07-08 21:49:15 -07:00
Jordan Irwin
8f9aa9825b
Adjust glow monster's eyes 2024-07-08 20:06:18 -07:00
Jordan Irwin
78a60745a5
Draw mohawk on glow monster & remove fins
https://github.com/arianne/stendhal/issues/624
2024-07-08 19:57:58 -07:00
Jordan Irwin
d7703f3721
Draw daggers for blordrough storm trooper
https://github.com/arianne/stendhal/issues/624
2024-07-08 19:28:05 -07:00
Jordan Irwin
ba6e2848f0
Add staff from dark elf wizard to emperor dalmung
https://github.com/arianne/stendhal/issues/624
2024-07-08 19:04:13 -07:00
Jordan Irwin
6771560c91
Draw sword for barbarian elite
https://github.com/arianne/stendhal/issues/624
2024-07-08 18:26:50 -07:00
Jordan Irwin
a510097efb
Add cape from chaos soldier to minotaur king
https://github.com/arianne/stendhal/issues/624
2024-07-06 02:54:40 -07:00
Jordan Irwin
fbdc8e33cf
Draw bracers & nose ring for minotaurs
https://github.com/arianne/stendhal/issues/624
2024-07-06 02:38:55 -07:00
Jordan Irwin
4d5fc5cee2
Draw sword for armed naga
https://github.com/arianne/stendhal/issues/624
2024-07-06 01:51:57 -07:00
Jordan Irwin
d5153a72af
Draw staff for oni priest
https://github.com/arianne/stendhal/issues/624
2024-07-06 01:16:45 -07:00
Jordan Irwin
fc81162673
Touch-ups to dark elf matronmother to make sword more noticable
https://github.com/arianne/stendhal/issues/624
2024-07-06 00:24:54 -07:00
Jordan Irwin
c1078e197c
Touch-ups to dark elf ranger cape 2024-07-06 00:13:35 -07:00
Jordan Irwin
c653a2b35c
Remove hat, add hairband & cape to resemble old dark elf ranger...
...sprite better

https://github.com/arianne/stendhal/issues/624
2024-07-05 23:52:13 -07:00
Jordan Irwin
792ca5e414
Add kerchief from risicia thug to dark elf ranger
https://github.com/arianne/stendhal/issues/624
2024-07-05 23:16:08 -07:00
Jordan Irwin
b09aa4e2c2
Revert catching error when opening audio resource 2024-07-05 23:16:08 -07:00
Jordan Irwin
45b271bd72
Update changes 2024-07-05 22:29:04 -07:00
Jordan Irwin
32a2ac6957
Rename parameter 2024-07-05 22:16:59 -07:00
Jordan Irwin
96df82c461
Catch general error/exception when loading audio resource 2024-07-05 22:15:57 -07:00
Jordan Irwin
b936af9375
Add pitchfork from chaos dragonrider to dark mutant
https://github.com/arianne/stendhal/issues/624
2024-07-04 04:36:49 -07:00
Jordan Irwin
675913dcfa
Add sword from chaos warrior to soldier elf
https://github.com/arianne/stendhal/issues/624
2024-07-04 04:04:46 -07:00
Jordan Irwin
84d1b7aab4
Draw new shield for veteran goblin
https://github.com/arianne/stendhal/issues/624
2024-07-03 22:06:34 -07:00
Jordan Irwin
062b4d1667
Draw new helmet for soldier goblin
https://github.com/arianne/stendhal/issues/624
2024-07-03 20:58:55 -07:00
Jordan Irwin
8a46d1e8ce
Touch ups to chaos lord's swords 2024-07-03 20:18:52 -07:00
Jordan Irwin
958a36d2de
Add swords from imperial general to chaos lord
https://github.com/arianne/stendhal/issues/624
2024-07-03 20:03:40 -07:00
Jordan Irwin
873048f98b
Draw new claw for chaos commander
https://github.com/arianne/stendhal/issues/624
2024-07-03 19:53:19 -07:00
Jordan Irwin
66d280f10c
Add knife from risecia thug to fallen angel
https://github.com/arianne/stendhal/issues/624
2024-07-02 17:48:23 -07:00
Jordan Irwin
92089cbcaa
Make Waerryna look like a dark elf
Closes https://github.com/arianne/stendhal/issues/615
2024-07-02 03:15:29 -07:00
Jordan Irwin
0ce79fdad8
Add special case to prevent Mayor Chalmers from taking...
...experimental sandwiches rewarded from Meal for Groongo quest

Closes https://github.com/arianne/stendhal/issues/729
2024-07-02 02:27:28 -07:00
Jordan Irwin
d60d216466
Add methods to exclude quest non-submittable items 2024-07-02 02:18:59 -07:00
Jordan Irwin
4746f125ed
Add methods to check if an item should be submittable in quests 2024-07-02 02:15:51 -07:00
Jordan Irwin
3e5d472bc3
Move RPEntity.nameMatches to static Item.nameMatches 2024-07-02 01:24:05 -07:00
Jordan Irwin
3845fc69da
Add hint about apothecary breadcrumbs in Traps for Klaas travel log
Closes https://github.com/arianne/stendhal/issues/617
2024-07-01 19:38:09 -07:00
Jordan Irwin
97ff41869f
Fix typo in Klaas's dialogue 2024-07-01 19:36:10 -07:00
Jordan Irwin
a5251127dc
Add attribution to rg1024 for bag cursors 2024-06-23 22:13:44 -07:00
Jordan Irwin
46f63776cb
Fix license & attribution of attack & harvest cursors 2024-06-23 21:52:30 -07:00
Jordan Irwin
d6aed77641
Quick menu button to toggle pathfinding via ground 2024-06-23 21:51:30 -07:00
Jordan Irwin
a6ddc99d8d
Use arrow function notation when registering click listener for...
...quick menu buttons
2024-06-23 21:41:17 -07:00
Jordan Irwin
46e399b30f
Add release notes text 2024-06-23 19:40:22 -07:00
Jordan Irwin
22b57a3e5e
Delete old Lua documentation 2024-06-23 19:39:21 -07:00
Jordan Irwin
8ce87348e1
Clean up ant build properties 2024-06-23 19:11:58 -07:00
Jordan Irwin
a2747d3f80
Delete unused ant build properties 2024-06-23 19:09:56 -07:00
Jordan Irwin
b01060f667
Remove unnecessary override 2024-06-22 02:02:48 -07:00
Jordan Irwin
8ede1b841a
Use ActiveEntity.getFaceDirection to determine sprite drawing...
...index. Defaults to "down" when facing direction cannot be determined.

Closes: https://github.com/arianne/stendhal/issues/721
2024-06-21 22:27:52 -07:00
Jordan Irwin
542fe5be1b
Add method ActiveEntity.getFaceDirection 2024-06-21 22:27:30 -07:00
Jordan Irwin
e80ce98382
Add failsafe to ActiveEntity.getWalkDirection 2024-06-21 22:27:15 -07:00
Jordan Irwin
c3f81e5d31
Add failsafe to SoundManager.normVolume
Underlying issue may still need fixed.

https://github.com/arianne/stendhal/issues/714
2024-06-21 22:26:55 -07:00
Jordan Irwin
2df0596cfc
Fix conversion between int/float volume ranges 2024-06-21 00:55:37 -07:00
Jordan Irwin
947fc79489
New music for Athor Island
- Island Mountain by David Kvistorf (CC0): https://opengameart.org/node/78672
- Jump and Run Tropics by Bart Kelsey (CC BY-SA 3.0): https://opengameart.org/node/3801
2024-06-20 22:09:03 -07:00
Jordan Irwin
43353e1ef8
Change default master volume to 50 2024-06-15 23:48:44 -07:00
Jordan Irwin
98e2f70218
Description for pelt
https://sourceforge.net/p/arianne/patches/762/
2024-06-15 18:34:00 -07:00
Jordan Irwin
30399d830d
Description for polar bear
https://sourceforge.net/p/arianne/patches/761/
2024-06-15 18:31:24 -07:00
Jordan Irwin
60026dde03
Description for elder cannibal
https://sourceforge.net/p/arianne/patches/760/
2024-06-15 18:29:46 -07:00
Jordan Irwin
9a5e5b0223
Description for giant killer bat
https://sourceforge.net/p/arianne/patches/759/
2024-06-15 18:27:00 -07:00
Jordan Irwin
356f36ad07
Method to add listener to update config on change event 2024-06-15 17:04:43 -07:00
Jordan Irwin
60cb09077f
Support multiple change event listeners 2024-06-15 17:04:43 -07:00
Jordan Irwin
4d50010790
Code cleanup 2024-06-15 17:04:40 -07:00
tigertoes
2b10df791f fix grammar for hole in the ground 2024-06-15 19:53:04 -04:00
Jordan Irwin
752626b3aa
Use Tooltip class in SettingsComponent 2024-06-13 22:15:02 -07:00
Jordan Irwin
4b6319d910
Move Component.refresh to super class 2024-06-13 22:10:15 -07:00
Jordan Irwin
29d53375c0
Rework tooltip class 2024-06-13 22:05:02 -07:00
Jordan Irwin
582748b551
Clean up docstrings 2024-06-13 20:35:25 -07:00
Jordan Irwin
6f5a275694
Display quickmenu by default for touch devices 2024-06-13 20:34:51 -07:00
Jordan Irwin
98d5349bb4
Add "cloaks" to Josephine's known chat options
https://github.com/arianne/stendhal/issues/640
Closes https://github.com/arianne/stendhal/issues/612
2024-06-13 15:53:37 -07:00
Jordan Irwin
c1241a3e08
Add workaround to display "loan" & "nothing" triggers in Lost...
...Wedding Ring quest

https://github.com/arianne/stendhal/issues/640
2024-06-13 15:16:07 -07:00
Jordan Irwin
16a6731d24
Methods to delete transition matching state, trigger, & condition 2024-06-13 15:14:00 -07:00
Jordan Irwin
d1c96181a5
Add workaround to display "clothes" trigger in Supplies for Phalk quest
https://github.com/arianne/stendhal/issues/640
2024-06-13 13:42:17 -07:00
Jordan Irwin
7f06ef1346
Add methods to force triggers to display as chat options even if not...
...registered in transition
2024-06-13 13:42:03 -07:00
Jordan Irwin
4e4fa1aeca
Call learnWordsInCurrentConversation in overloaded SpeakerNPC.say...
...method
2024-06-13 13:27:53 -07:00
Jordan Irwin
0c2ff23ed1
Add "rent" to Gordon's known chat options
https://github.com/arianne/stendhal/issues/640
2024-06-13 11:40:46 -07:00
Jordan Irwin
d1174e5fd6
Add FIXME note 2024-06-13 11:40:45 -07:00
Jordan Irwin
7fa046294b
Don't process learned words from conversation when not attending to a...
...player
2024-06-13 11:40:45 -07:00
Jordan Irwin
01b6cf9dc7
Show chat options marked as "known" even when not included in...
...transition triggers
2024-06-13 11:40:44 -07:00
Jordan Irwin
fa0a522070
Normalize known chat options to lower case 2024-06-13 11:40:33 -07:00
Jordan Irwin
5a8add7e5d
Use Debug class for marking settings & touch for debugging 2024-06-12 16:30:36 -07:00
Jordan Irwin
e3188b3986
Class for marking properties for debugging 2024-06-12 16:26:55 -07:00
Jordan Irwin
5072211638
Setting to disable parallax backgrounds 2024-06-10 10:42:22 -07:00
Jordan Irwin
0bc610eb6c
Add stars parallax background to lower levels of wizards tower 2024-06-09 19:40:17 -07:00
Jordan Irwin
ee7faac1da
Add parallax backgrounds to Semos Tower levels 8 & 9 2024-06-08 02:07:49 -07:00
Jordan Irwin
9c0315793a
Change attribute name to "parallax_ignore_tiles" 2024-06-08 01:24:48 -07:00
Jordan Irwin
a39087c1ab
Update changes 2024-06-08 00:44:42 -07:00
Jordan Irwin
f9af9aa9df
Add parallax background to Kika Clouds 2024-06-08 00:32:44 -07:00
Jordan Irwin
f7baa36ede
Add parallax background to Kika Islands 2024-06-08 00:32:43 -07:00
Jordan Irwin
1cef2c4f6a
Add to clouds tileset for use with edges 2024-06-08 00:32:43 -07:00
Jordan Irwin
086cfbe00b
Create parallax background for area surrounding Semos 2024-06-08 00:32:42 -07:00
Jordan Irwin
59a0727dd1
Add support for alternate floor layer for client's that support...
...parallax backgrounds
2024-06-08 00:32:42 -07:00
Jordan Irwin
7e1f493839
Add support for specifying tiles not to draw in web client 2024-06-07 23:35:25 -07:00
Jordan Irwin
d9a045f2d5
Update changes 2024-06-07 20:24:51 -07:00
Jordan Irwin
3675593ae4
Disable "roof" & "roof_add" layers in Kika Clouds 2024-06-07 20:23:49 -07:00
Jordan Irwin
631fd7d932
Don't load map layer marked as "locked" and not "visible" 2024-06-07 20:23:09 -07:00
Jordan Irwin
b2447e8c7d
Add animated clouds to Kika Clouds 2024-06-07 01:03:30 -07:00
Jordan Irwin
07f367b9bc
Animated clouds 2024-06-07 01:02:30 -07:00
Jordan Irwin
eca1a46448
Make transitions code more readable 2024-06-06 14:38:30 -07:00
Jordan Irwin
9257fe4ee5
Add support for parallax scrolling backgrounds in web client 2024-06-06 08:10:54 -07:00
Jordan Irwin
13f136adc8
Cache failsafe image at startup 2024-06-06 08:09:06 -07:00
Jordan Irwin
9fb6a0d96e
Fix layers opacity 2024-06-06 08:07:55 -07:00
Jordan Irwin
6356e1f23c
Don't assume on-time delivery when timestamp isn't available 2024-06-05 22:44:44 -07:00
Jordan Irwin
8f6c3cacdf
Fix paths in map rendering build targets 2024-06-05 02:13:18 -07:00
Jordan Irwin
a08d9ae3e2
Move vampire_maplabel script to bin directory 2024-06-05 01:57:06 -07:00
Jordan Irwin
9f854e7ab7
Make vampire_maplabel position independent 2024-06-05 01:53:54 -07:00
Jordan Irwin
6cb9be3b49
Clean up vampire_maplabel script 2024-06-04 23:03:22 -07:00
Jordan Irwin
1e4bbaa84a
Move system dependent properties to Ant submodule 2024-06-04 22:50:05 -07:00
Jordan Irwin
033b302d9f
Clean up system executables properties 2024-06-04 22:38:44 -07:00
Jordan Irwin
0c722d8a12
Fix location of locale-template script 2024-06-04 22:32:51 -07:00
Jordan Irwin
2ae840aaf1
Fix location of vampire_maplabel script 2024-06-04 22:25:36 -07:00
Jordan Irwin
0f1e8927ea
Use global neu executable 2024-06-04 21:25:47 -07:00
Jordan Irwin
5f8d34f249
Fix calling neu executable on Windows 2024-06-04 21:07:27 -07:00
Jordan Irwin
07346dd0eb
Clean up indentation 2024-06-04 20:19:44 -07:00
Jordan Irwin
7336fc1821
Allow aborting/restarting deliver item quest in case player lost item...
...or quest is stuck in state where player cannot finish
2024-06-03 18:47:38 -07:00
Jordan Irwin
953b7b5b20
Add failsafe to DeliverItemTask.isDeliveryTooLate 2024-06-03 14:31:06 -07:00
Jordan Irwin
3927596105
Fix parsing completions count of Kill Enemy Army quest 2024-06-03 14:11:43 -07:00
Jordan Irwin
fd39cda6e3
Animated fog for web client 2024-06-01 15:08:44 -07:00
Jordan Irwin
3ab51b17ea
Tileable fog for animation generated with G'MIC: https://gmic.eu/ 2024-06-01 15:08:31 -07:00
Jordan Irwin
85d6cff21a
Convert client entry point to TypeScript 2024-05-31 23:02:05 -07:00
Jordan Irwin
c53a1ebef7
Fix event parameter type 2024-05-31 22:39:28 -07:00
Jordan Irwin
8873a242b2
Add TODO note 2024-05-31 20:55:58 -07:00
Jordan Irwin
38d0e8d715
Replace refrences to getSoundManager with stendhal.sound where appropriate 2024-05-31 20:51:27 -07:00
Jordan Irwin
347008b896
Replace references to stendhal.ui.soundMan with stendhal.sound 2024-05-31 20:39:30 -07:00
Jordan Irwin
77f6e44abb
Minor optimization 2024-05-31 20:31:35 -07:00
Jordan Irwin
8128bed44e
Don't store sound manager instances in class properties 2024-05-31 20:29:00 -07:00
Jordan Irwin
3496eb9af4
Store sound manager instance in stendhal.sound 2024-05-31 20:14:20 -07:00
Jordan Irwin
c1b967d1b5
Move SoundManager & LoopedSoundSourceManger classes to data/sound 2024-05-31 20:04:29 -07:00
Jordan Irwin
60173d582d
Move SoundLayer enum to data/sound 2024-05-31 19:43:53 -07:00
Jordan Irwin
7d2c2e128f
Move SoundFactory class to data/sound 2024-05-31 19:40:30 -07:00
Jordan Irwin
68cf101189
Increment version 2024-05-31 17:49:51 -07:00
Hendrik Brummermann
a9baa4af19 updated Android release notes 2024-05-30 23:25:04 +02:00
Jordan Irwin
7113c11d53
Fix parsing error 2024-05-29 02:24:29 -07:00
Jordan Irwin
6723d7f5bf
Replace program logic in quest manuscript classes 2024-05-28 21:28:14 -07:00
Jordan Irwin
fb158dbc11
Quest manuscript completions count always in index 2 2024-05-28 21:02:42 -07:00
Jordan Irwin
bcedecad50
Correct grammar in House Buying history 2024-05-28 20:15:07 -07:00
Jordan Irwin
057afa534a
Support possessive form in Grammar 2024-05-28 20:14:32 -07:00
Jordan Irwin
e61506126c
Update changes 2024-05-28 18:58:27 -07:00
Jordan Irwin
212dc7623e
Show House Buying in open quests during owed taxes period
https://github.com/arianne/stendhal/issues/716
2024-05-28 18:54:35 -07:00
Jordan Irwin
dbc3de7055
Admin script to manage House Buying 2024-05-28 18:54:20 -07:00
Jordan Irwin
a7bdde5331
Don't play weather sound if weather is disabled 2024-05-28 04:59:54 -07:00
Jordan Irwin
9e4ef5146b
Performance optimization: Require refresh/map change to update...
...lighting effects setting
2024-05-28 04:45:56 -07:00
Jordan Irwin
bf275d84bf
Use standard message when changing weather setting 2024-05-28 04:30:23 -07:00
Jordan Irwin
02cdffe0af
Add setting to enable/disable activity indicator animation 2024-05-28 04:21:28 -07:00
Jordan Irwin
45b94965e9
Convert activity indicator setting to component 2024-05-28 04:00:38 -07:00
Jordan Irwin
c9c06ad5a7
Require refresh/map change to update activity indicator setting 2024-05-28 03:57:15 -07:00
Jordan Irwin
c302d2dcd6
Class for displaying some commonly used messages in chat log 2024-05-28 03:20:11 -07:00
Jordan Irwin
c0288c5360
Add visuals tab to settings dialog 2024-05-28 02:59:57 -07:00
Jordan Irwin
2277a276fb
Add TODO note 2024-05-28 02:58:10 -07:00
Hendrik Brummermann
f376b0cb87 added TODO about removing program logic from quest manuscripts 2024-05-26 23:07:52 +02:00
Jordan Irwin
05eb315e41
Reword changes 2024-05-26 12:51:42 -07:00
Jordan Irwin
6385ed51cb
Disable sliders when sound not enabled 2024-05-26 12:45:46 -07:00
Jordan Irwin
05d61c6bcb
Add ComponentBase.setEnabled method 2024-05-26 12:45:05 -07:00
Jordan Irwin
71ad4108fd
Add SettingsComponent.getValue method 2024-05-26 12:44:31 -07:00
Jordan Irwin
4379d81a25
Add sliders for remaining sound layers in settings dialog 2024-05-26 11:59:55 -07:00
Jordan Irwin
b9de8c3117
Fix button spacing of chat log context menu 2024-05-26 05:03:23 -07:00
Jordan Irwin
23332a7c8c
Add FIXME note 2024-05-26 04:45:12 -07:00
Jordan Irwin
477a0ed37d
Add support for passing filename parameter to DownloadHandler.download 2024-05-26 04:26:27 -07:00
Jordan Irwin
4276878a60
Support plain text download in Android client
Closes: https://github.com/arianne/stendhal/issues/727
2024-05-26 04:20:11 -07:00
Jordan Irwin
75895904e6
Clean up extra trailing semicolon 2024-05-26 03:13:04 -07:00
Jordan Irwin
356937fe33
Remove unused property TimeUtil.TURNS_IN_MINUTE 2024-05-26 01:13:21 -07:00
Jordan Irwin
59abb15ba5
Use seconds instead of turns for entity path suspensions 2024-05-26 01:11:10 -07:00
Jordan Irwin
f7f01ecaa0
Update changes pertaining to Android release 2024-05-25 20:08:15 -07:00
Jordan Irwin
2049f2b4b7
Add TODO note 2024-05-25 01:21:23 -07:00
Jordan Irwin
02602f0bc5
Reword changes 2024-05-25 01:12:36 -07:00
Jordan Irwin
07d34cf25b
Disable Portuguese translation pending review 2024-05-25 01:05:31 -07:00
Jordan Irwin
0bc6f28204
In case of logout in arena, update deathmatch slot after teleport to...
...allow player to start again

Closes: https://github.com/arianne/stendhal/issues/724
2024-05-25 01:00:27 -07:00
Jordan Irwin
e02d87b8e6
Add FIXME note 2024-05-25 00:54:18 -07:00
Jordan Irwin
0b056f3b81
Show number of hot deliveries in Pizza Delivery quest history 2024-05-24 20:58:12 -07:00
Jordan Irwin
31911288d7
Class for adding a customized result to BuiltQuest history 2024-05-24 20:55:52 -07:00
Jordan Irwin
0e4bca7399
Delete Enum class 2024-05-21 19:23:12 -07:00
Jordan Irwin
0ccc0ecf71
Delete unused NumericEnum class 2024-05-21 18:47:23 -07:00
Jordan Irwin
e8ca6e4c6d
Convert Layout to standard enum 2024-05-21 18:46:08 -07:00
Jordan Irwin
3224e60189
Move Layout enum to data/enum 2024-05-21 18:37:42 -07:00
Jordan Irwin
43e45c29ff
Convert WidgetType to standard enum 2024-05-21 18:37:35 -07:00
Jordan Irwin
ad6d75617f
Rename SettingsType enum to WidgetType 2024-05-21 18:09:19 -07:00
Jordan Irwin
511828cff1
Move re-tell action to its own class 2024-05-21 13:51:28 -07:00
Jordan Irwin
f4202cb65d
Move tell action to its own class 2024-05-21 13:51:20 -07:00
Jordan Irwin
8fd4876f4f
Add TODO note 2024-05-21 13:04:21 -07:00
Jordan Irwin
ff3debc55c
Make characer name chat tab completions case insensitive 2024-05-21 11:32:27 -07:00
Jordan Irwin
a8bfff60a8
Remove content limit in Pair 2024-05-21 09:19:59 -07:00
Jordan Irwin
9575e933c0
Use 'stendhal' object instead of setting class file variables 2024-05-20 06:12:27 -07:00
Jordan Irwin
d3b6ad1509
Limit pair data types values 2024-05-20 06:06:48 -07:00
Jordan Irwin
497c14aaac
Clean up indentation 2024-05-20 06:06:29 -07:00
Jordan Irwin
85d9a37189
Schedule freezing hell at server startup
Can be disabled with -Dstendhal.nohellfreezer
2024-05-19 21:29:16 -07:00
Jordan Irwin
92a215ea3b
Convert freeze hell script to AbstractAdminScript 2024-05-19 21:29:12 -07:00
Hendrik Brummermann
be6e05ac4c
Merge pull request #720 from KarajuSs/pl-fdroid
Polish description translations for F-Droid
2024-05-19 23:54:40 +02:00
Jordan Irwin
a1889565a5
Add TODO notes 2024-05-18 08:05:51 -07:00
Jordan Irwin
16cbe8ee7b
Move util/Color to data/color/Color 2024-05-17 01:32:10 -07:00
Jordan Irwin
b04807320f
Move locale template script to bin directory 2024-05-17 00:53:17 -07:00
Jordan Irwin
ae99d29757
Remove duplicate license boilerplate 2024-05-17 00:41:06 -07:00
Jordan Irwin
8af14b678f
Script for checking & optionally updating copyright...
...boilerplate year(s) in source files
2024-05-17 00:40:57 -07:00
Jordan Irwin
c7a4b5b915
Fix content policy error regarding inline style in LICENSE.html 2024-05-16 13:43:27 -07:00
Jordan Irwin
582b0fdc33
Allow browser's context menu in about dialog 2024-05-16 12:15:40 -07:00
Jordan Irwin
1da8d96d76
Update changes 2024-05-16 08:00:03 -07:00
Jordan Irwin
93e7d4e6cc
Remove experimental flag from light effects & enable by default 2024-05-16 07:57:09 -07:00
Jordan Irwin
4a04d40354
Draw coloring directly onto canvas instead of using slow filter 2024-05-16 07:48:31 -07:00
Jordan Irwin
a1fd258665
Fix color classes & helper methods 2024-05-16 07:45:16 -07:00
Jordan Irwin
c607055942
Better number to hex string method 2024-05-16 07:42:48 -07:00
Jordan Irwin
28347f0089
Add static path to maps root directory 2024-05-16 00:24:24 -07:00
Jordan Irwin
28eb3e111a
Add FIXME note 2024-05-14 22:16:04 -07:00
Jordan Irwin
3c30c36642
Allow requesting different item for Ultimate Collector quest...
...after 6 months

Closes: https://github.com/arianne/stendhal/issues/719
2024-05-14 12:06:15 -07:00
Jordan Irwin
04e0516af5
Add constants for minutes in a year & half year 2024-05-14 11:58:01 -07:00
Jordan Irwin
3cf04e90a4
Check for empty string for clarity 2024-05-14 01:21:08 -07:00
Jordan Irwin
c226c7529a
Add master volume slider to settings dialog 2024-05-13 21:53:36 -07:00
Jordan Irwin
fa071e486c
Component to represet slider widget & label 2024-05-13 21:52:37 -07:00
Jordan Irwin
c63d39c80d
Widget component abstract class 2024-05-13 21:50:04 -07:00
Jordan Irwin
a899c8d0d4
Update volume levels at client startup
Closes: https://github.com/arianne/stendhal/issues/722
2024-05-13 21:28:04 -07:00
Jordan Irwin
52d1569418
Move French & Italian description translations to temporary...
...files until certified by a fluent speaker.
2024-05-13 16:52:03 -07:00
Kamil Lewicki
2fa88a3fa2
Corrected polish full description 2024-05-12 23:44:42 +02:00
Kamil Lewicki
cb2b22e062
Add Polish full description translation for F-Droid 2024-05-12 23:35:03 +02:00
Kamil Lewicki
4c25015baf
Add shorten polish description translation for F-Droid 2024-05-12 23:34:45 +02:00
Hendrik Brummermann
7ff2b3213e replaced machine translated text with English version 2024-05-12 21:47:31 +02:00
Jordan Irwin
5e92cca27b
Move SoundID to data/sound 2024-05-10 19:43:52 -07:00
Jordan Irwin
9695c3b169
Add TODO note 2024-05-10 19:37:19 -07:00
Jordan Irwin
f980165564
Add optional parameter to specify private message sender name 2024-05-10 19:36:36 -07:00
Jordan Irwin
61bf897294
Wrapper for RPClass to avoid using attribute names set in constructor 2024-05-10 19:36:14 -07:00
Jordan Irwin
dd759e2d1d
Add sounds tab to settings dialog 2024-05-10 05:47:46 -07:00
Jordan Irwin
a47ccb6e2f
Component class to represent configuration setting element 2024-05-10 05:47:45 -07:00
Jordan Irwin
af9f6c1335
Enumeration class for sound layers 2024-05-10 05:47:36 -07:00
Jordan Irwin
32eba455c2
String type enumeration class 2024-05-10 05:37:36 -07:00
Jordan Irwin
78df10f5e4
Component base class that doesn't require DOM element to exist at construction 2024-05-10 05:37:19 -07:00
Jordan Irwin
7e4be06914
Move & rename enumeration classes 2024-05-10 05:37:05 -07:00
Jordan Irwin
1fef7ea24e
Make Enumeration class abstract 2024-05-10 05:36:53 -07:00
Jordan Irwin
5c3d00d1d7
Fix RingsmithNPC Lua script 2024-05-09 02:16:06 -07:00
Jordan Irwin
6a79c25963
Expose TimeUtil class to Lua 2024-05-09 02:15:48 -07:00
Jordan Irwin
287bdc71be
Code & whitespace cleanup 2024-05-09 01:15:07 -07:00
Jordan Irwin
2f5480a1cf
Add default case 2024-05-09 01:13:32 -07:00
Jordan Irwin
5b167c69fd
Add boilerplates 2024-05-09 01:10:31 -07:00
Jordan Irwin
3375a4b1da
Add annotations to suppress unused parameter warning of some...
...protected methods
2024-05-09 01:05:02 -07:00
Jordan Irwin
17ca660a86
Add annotations to suppress unused parameter warning of some public...
...constructors & methods
2024-05-09 00:42:08 -07:00
Jordan Irwin
58c07e1879
Add method to check tile animation JSON data 2024-05-08 23:39:46 -07:00
Jordan Irwin
fea1e459e0
Move MathHelper members to TimeUtil since only used by server 2024-05-08 22:01:50 -07:00
Jordan Irwin
ef2725881b
Prevent "menu" attribute from being removed from persistent items
https://github.com/arianne/stendhal/issues/699
2024-05-07 06:42:43 -07:00
Jordan Irwin
106ee5bac4
Don't require admin member to be set in abstract admin script 2024-05-07 06:05:10 -07:00
Jordan Irwin
abce198c17
Throw error when param count max is less than min 2024-05-07 06:02:06 -07:00
Jordan Irwin
2c9bb43815
Make standard messages more robust 2024-05-07 06:01:22 -07:00
Jordan Irwin
185f4d1317
Admin script for debugging weather server side 2024-05-07 00:46:13 -07:00
Jordan Irwin
677dbf791d
Add wrapper methods for sending admin script messages 2024-05-07 00:46:13 -07:00
Jordan Irwin
657acc2a9c
Add standard message 2024-05-07 00:45:54 -07:00
Jordan Irwin
c0054efbf7
Set continuous movement attribute by default for house portals
Can be disabled with "disable_movecont" attribute
2024-05-06 07:07:48 -07:00
Jordan Irwin
8bf15d9226
Add resistance to portal in Ados house 70 2024-05-06 05:49:15 -07:00
Jordan Irwin
073c720bea
Set admin script member instead of passing instance to methods 2024-05-06 05:49:15 -07:00
Jordan Irwin
6e05acb3a9
Include admin script help info by default 2024-05-06 05:49:15 -07:00
Jordan Irwin
9046201324
Return empty list by default instead of null 2024-05-06 05:49:14 -07:00
Jordan Irwin
11f53c059b
Fix indenting admin script output 2024-05-06 05:49:13 -07:00
Jordan Irwin
c986b39065
Add more standard messages 2024-05-06 05:44:32 -07:00
Hendrik Brummermann
5c57b1e2bf added triggers and quote 2024-05-05 23:50:38 +02:00
Hendrik Brummermann
c31baea485 reorganized legal section to emphazize that everything is free software 2024-05-05 23:49:40 +02:00
Hendrik Brummermann
495ac0c564 replaced subclass of ArrayList with standard HashSet 2024-05-05 00:02:49 +02:00
Jordan Irwin
92a29f8e83
Factory for creating sound objects 2024-05-04 02:25:34 -07:00
Jordan Irwin
ecd9ee8995
Move Sound inteface to data.SoundFactory.SoundObject 2024-05-04 02:25:09 -07:00
Jordan Irwin
3101478f26
Clean up imports 2024-05-04 02:24:44 -07:00
Jordan Irwin
165243496b
Show a "none" option on touch enabled devices when travel log...
...items list is empty
2024-05-03 19:01:38 -07:00
Jordan Irwin
84331c9c28
Add method to detect touch enabled devices 2024-05-03 19:01:09 -07:00
Jordan Irwin
ba18071fe0
Set first item as selected & trigger "change" event when travel...
...log type changes
2024-05-03 18:59:58 -07:00
Jordan Irwin
693886254b
Don't send event for travel log options without value 2024-05-03 18:32:13 -07:00
Jordan Irwin
315329d601
Display larger buttons on any system using coarse pointer (touch) 2024-05-03 17:26:36 -07:00
Jordan Irwin
7f39b6498a
Update localate template 2024-05-02 03:08:22 -07:00
Jordan Irwin
ec0a24d710
Add theming to context menus 2024-05-01 01:48:37 -07:00
Jordan Irwin
4d3b231164
Add support for left/right aligned tabs 2024-05-01 01:43:33 -07:00
Jordan Irwin
090bf94b45
Make layout parameter require & change tab elements initial ordering 2024-05-01 01:38:08 -07:00
Jordan Irwin
a008d8737a
Add padding to settings dialog tabs contents 2024-05-01 00:51:59 -07:00
Jordan Irwin
dd340e8079
Convert settings dialog to tabbed interface 2024-05-01 00:46:19 -07:00
Jordan Irwin
3d50f62a9a
Make AboutDialog inherit TabDialogContentComponent 2024-05-01 00:40:18 -07:00
Jordan Irwin
db59996152
Component for creating dialog contents with tabbed interface 2024-05-01 00:38:32 -07:00
Jordan Irwin
d10b81197b
Add methods to get theme & font maps from config manager 2024-05-01 00:37:01 -07:00
Jordan Irwin
5d01675294
Restore initial display style instead of setting to block 2024-05-01 00:36:30 -07:00
Jordan Irwin
b1508b1391
Remove unneeded extra outer container in settings dialog 2024-04-30 22:29:22 -07:00
Jordan Irwin
ca9af8f66f
Add methods to create dialog buttons 2024-04-30 22:26:16 -07:00
Jordan Irwin
ea40a18c18
Add optional contents parameter to TabPanelComponent.addTab 2024-04-30 20:01:49 -07:00
Jordan Irwin
7355a3d934
Change travel log tabs to match other tabbed components 2024-04-30 19:27:16 -07:00
Jordan Irwin
f9de2abe7d
Add some padding above dialog buttons 2024-04-30 19:10:27 -07:00
Jordan Irwin
7ebc0839ee
Place about dialog tabs above contents 2024-04-30 19:03:46 -07:00
Jordan Irwin
d667689a04
Add support for placing component tabs above contents 2024-04-30 19:03:37 -07:00
Jordan Irwin
77bb08ca0a
Enumeration type representing layout of elements 2024-04-30 18:26:25 -07:00
Jordan Irwin
076559bfe7
Classes to represent enumeration types 2024-04-30 18:25:20 -07:00
Jordan Irwin
f6b55032e3
Clean up line breaks (limit to 100 characters) 2024-04-29 22:12:29 -07:00
Jordan Irwin
7139a82d52
Add German full description translation for F-Droid 2024-04-29 22:09:52 -07:00
Jordan Irwin
c0553eba5e
Clean up line breaks (limit to 100 characters) 2024-04-29 20:52:42 -07:00
Jordan Irwin
970296890d
Add Italian full description translation for F-Droid 2024-04-29 20:44:16 -07:00
Jordan Irwin
6828b22dfe
Add French full description translation for F-Droid 2024-04-29 19:31:49 -07:00
Jordan Irwin
6512a2bc0c
Add Portuguese full description translation for F-Droid 2024-04-28 01:29:36 -07:00
Jordan Irwin
51a0bf94f4
Add Spanish full description translation for F-Droid 2024-04-28 01:29:35 -07:00
Jordan Irwin
3e5871007a
Update changes 2024-04-27 22:01:09 -07:00
Jordan Irwin
0280e8083a
Display travel log dialog while waiting for server response 2024-04-27 22:00:43 -07:00
Jordan Irwin
946ba0ab30
Move progressstatus action into separate class file 2024-04-27 21:41:29 -07:00
Jordan Irwin
91fb13c933
Add wrapper method SlashAction.send 2024-04-27 21:34:01 -07:00
Jordan Irwin
fc67f54be6
Fix infinite request loop when travel log dialog items list is...
...technically empty
2024-04-27 21:05:49 -07:00
Jordan Irwin
54eb03c5e9
Change 30 Minutes or Less achievement to 25 quest completions 2024-04-27 18:23:15 -07:00
Jordan Irwin
f71d98c8aa
New achievement: 30 Minutes or Less
Deliver 5 hot pizzas
2024-04-26 00:15:11 -07:00
Jordan Irwin
be279d48cc
Track on time deliveries 2024-04-25 23:28:39 -07:00
Jordan Irwin
4b31550218
Fix note 2024-04-25 22:54:07 -07:00
Jordan Irwin
4bc4732d9a
Add "menubutton" class to character select buttons
https://github.com/arianne/stendhal/issues/417
2024-04-25 21:08:25 -07:00
Jordan Irwin
3d4a30c06e
Make buttons, inputs, & selects larger on small screens where...
...fine pointing device isn't detected (touch screens)

https://github.com/arianne/stendhal/issues/417
2024-04-25 21:06:15 -07:00
Jordan Irwin
7a00021188
Move font face declarations into separate stylesheet 2024-04-25 18:35:41 -07:00
Jordan Irwin
e8d9413d40
Move stylesheets into css directory 2024-04-25 18:34:02 -07:00
Jordan Irwin
256d80226b Don't throw error if build directory doesn't exist 2024-04-24 00:27:26 -07:00
Jordan Irwin
c6bbd109e7 Disable default excludes 2024-04-24 00:27:26 -07:00
Jordan Irwin
70456c41ad
Exclude build/eclipse from ant clean target 2024-04-23 19:23:10 -07:00
Jordan Irwin
11edc7ed84
Use relative link to contributors page 2024-04-22 17:59:51 -07:00
Jordan Irwin
530d29fde3
Update legal section of README 2024-04-22 17:56:52 -07:00
Jordan Irwin
490767249f
Update how to play section of README 2024-04-22 17:56:28 -07:00
Jordan Irwin
860b9cbbfc
Add some details & shading to age achievement icon 2024-04-22 16:42:35 -07:00
Jordan Irwin
5923af3576
Move on-screen joystick management into its own class 2024-04-21 23:01:43 -07:00
Jordan Irwin
8beac8192c
Add support for saving chat log to plain text file 2024-04-21 23:01:37 -07:00
Jordan Irwin
3c2e41d05e
Move screenshot creation to DownloadUtil 2024-04-21 22:38:45 -07:00
Jordan Irwin
7d92d1e28e
Classes for creating downloadable files 2024-04-21 22:38:32 -07:00
Jordan Irwin
0811ef4077
Create constructor for MenuItem class 2024-04-21 22:38:31 -07:00
Jordan Irwin
d2bc58dccd Fix potential null pointer access 2024-04-21 14:23:19 -07:00
Jordan Irwin
d06b044367 Replace deprecated call to ShopsList.configureNPC 2024-04-21 14:23:19 -07:00
Jordan Irwin
b75e11e846 Parameterize ShopInventory instances as suggested by Eclipse 2024-04-21 14:23:19 -07:00
Jordan Irwin
3fe87fdee8 Clean up unused values in ShopsXMLLoader 2024-04-21 14:23:19 -07:00
Jordan Irwin
52b5cd4a61 Add unused notations suggested by Eclipse 2024-04-21 14:23:19 -07:00
Jordan Irwin
dab41ffa97 Use ShopGroupXMLLoader to configure merchant NPC tests 2024-04-21 14:23:19 -07:00
Hendrik Brummermann
7a328e22cc
Merge pull request #694 from AntumDeluge/dev_depends
Save typedoc & showdown Node modules as dev depends to prevent re-downloading
2024-04-21 20:34:41 +02:00
nhnb
623c6ae35f Merge pull request 'Add Romanian description for F-Droid' (#1) from cosmin/stendhal:translate-fdroid-ro into master
Reviewed-on: https://codeberg.org/arianne/stendhal/pulls/1
2024-04-21 08:28:21 +00:00
Cosmin Humeniuc
96c3b54ee0
Add Romanian description for F-Droid 2024-04-21 10:15:01 +03:00
Jordan Irwin
85dbe3330a
Show joystick/d-pad by default if pointer device is not detected 2024-04-20 14:48:10 -07:00
Jordan Irwin
5ab1003a8d
Add option to config manager to check if a key value is set 2024-04-20 14:45:35 -07:00
Jordan Irwin
000bbc05eb
Save typedoc & showdown modules as dev depends to prevent re-downloading 2024-04-19 17:30:07 -07:00
Jordan Irwin
a28525fe23
Shorten description translations for F-Droid character limit 2024-04-19 16:43:47 -07:00
Jordan Irwin
e9b07fa02c
Merge pull request #706 from licaon-kter/patch-1
Shorten short-description
2024-04-19 16:34:46 -07:00
Licaon_Kter
c30ef6e91f
Shorten short-description 2024-04-18 12:06:02 +00:00
Jordan Irwin
417d0a41ef
Remove note about achievement idea added to wiki 2024-04-17 00:06:16 -07:00
Jordan Irwin
6195a0687f
Update Unicorn Horns for Zelan quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 19:04:02 -07:00
Jordan Irwin
a45fc7b47d
Update Traps for Klaas quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 19:01:07 -07:00
Jordan Irwin
2cccd40b66
Update Pizza Delivery quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:57:44 -07:00
Jordan Irwin
7d62bbb723
Update Eggs for Marianne quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:54:50 -07:00
Jordan Irwin
66bac0618f
Update Clean Athor's Underground quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:51:47 -07:00
Jordan Irwin
7289b9f9de
Update Kill Gnomes quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:42:53 -07:00
Jordan Irwin
087b5b4733
Update Rhosyd for Elf Princess quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:30:46 -07:00
Jordan Irwin
904f0a3c8d
Update Campfire quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:30:12 -07:00
Jordan Irwin
412bcb28bc
Update Amazon Princess quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:29:33 -07:00
Jordan Irwin
86910286fa
Update Find Jef's Mother quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:28:40 -07:00
Jordan Irwin
f41e13d519
Update Kill Enemy Army quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:28:09 -07:00
Jordan Irwin
725378d44a
Update Kill Monks quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:27:24 -07:00
Jordan Irwin
1f2642c29e
Update Maze quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:26:44 -07:00
Jordan Irwin
ab93c838f2
Update Meal for Groongo Rahnnt quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:26:13 -07:00
Jordan Irwin
4a24e4dde9
Update Water for Xiphin Zohos quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:25:08 -07:00
Jordan Irwin
3230330097
Update Restock the Flower Shop quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:24:33 -07:00
Jordan Irwin
db13a55826
Update Kirdneh Museum Needs Help quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:23:45 -07:00
Jordan Irwin
1452578b46
Update Help Tomi quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:22:58 -07:00
Jordan Irwin
691432302a
Update Coded Message from Finn Farmer quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:22:21 -07:00
Jordan Irwin
1d57393ad5
Update Balloon for Bobby quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 18:20:57 -07:00
Jordan Irwin
5e99f8ab20
Check that slot index is not empty string 2024-04-15 18:19:00 -07:00
Jordan Irwin
9409a68f7b
Add FIXME note 2024-04-15 15:55:09 -07:00
Jordan Irwin
d4597e578f
Update Coal for Haunchy quest for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 15:42:08 -07:00
Jordan Irwin
6f2239da6f
Update daily monster & item quests for checking completions
https://github.com/arianne/stendhal/issues/230
2024-04-15 15:41:27 -07:00
Jordan Irwin
437c3ed967
Add support for retrieving completions count to quest manuscript
https://github.com/arianne/stendhal/issues/230
2024-04-15 15:39:18 -07:00
Jordan Irwin
814be97fe6
Track which slot indexes are used to store quest completions count in...
...QuestInfo

https://github.com/arianne/stendhal/issues/230
2024-04-15 15:36:57 -07:00
Jordan Irwin
4c16c2549f
Count open quests being repeated toward QuestCountCompletedCondition
https://github.com/arianne/stendhal/issues/230
2024-04-15 12:32:14 -07:00
Jordan Irwin
29616e2133
Add support for retrieving number of times player has completed a quest
https://github.com/arianne/stendhal/issues/230
2024-04-15 12:27:51 -07:00
Jordan Irwin
eb155be8ea
Leave "quantity" attribute undefined by default in summon action
Closes: https://github.com/arianne/stendhal/issues/702
2024-04-12 11:49:37 -07:00
Jordan Irwin
cc048d5c79
Add unicorn to grammar test 2024-04-12 10:56:14 -07:00
Jordan Irwin
d2af9d48a9
Change registered prefix of leather thread item to "strand(s) of"
Closes: https://github.com/arianne/stendhal/issues/701
2024-04-12 10:55:03 -07:00
Jordan Irwin
4643200553
Clean up indentation 2024-04-12 09:54:09 -07:00
Jordan Irwin
42a28c8956
Add knife to soldier goblin (from risecia thug)
https://github.com/arianne/stendhal/issues/624
2024-04-11 15:21:55 -07:00
Jordan Irwin
e24382e9ff
Update blordrough sprites attributions 2024-04-11 14:55:21 -07:00
Jordan Irwin
cb08241687
Add sword to blordrough corporal
Based on Vollrat's sword (CC0): https://opengameart.org/node/72575

https://github.com/arianne/stendhal/issues/624
2024-04-11 14:48:18 -07:00
Jordan Irwin
c97f7f84df
Add sword to dark elf knight
Based on Vollrat's sword (CC0): https://opengameart.org/node/72575

https://github.com/arianne/stendhal/issues/624
2024-04-11 14:27:24 -07:00
Jordan Irwin
ea210a0e23
Adjust imperial commander's sword 2024-04-11 14:09:44 -07:00
Jordan Irwin
662c6bd923
Add balloon to babybear
https://github.com/arianne/stendhal/issues/624
2024-04-11 13:54:15 -07:00
Jordan Irwin
f5c22b9005
Add sword to dark angel
Sword by Cethiel (CC0): https://opengameart.org/node/95842

https://github.com/arianne/stendhal/issues/624
2024-04-11 13:34:37 -07:00
Jordan Irwin
ce22d05396
Add sword to angel
Sword by Cethiel (CC0): https://opengameart.org/node/95575

https://github.com/arianne/stendhal/issues/624
2024-04-11 12:48:58 -07:00
Jordan Irwin
36b73047a8
Clean up angels' halo 2024-04-11 10:45:06 -07:00
Jordan Irwin
8a3c1738d6
Update fixme note 2024-04-08 08:53:15 -07:00
Jordan Irwin
31a900ecde
Minor optimization 2024-04-05 15:14:16 -07:00
Jordan Irwin
0119e4b3a9
Update description for F-Droid 2024-04-04 01:49:56 -07:00
Jordan Irwin
cda456080e
Fix ClientView layout 2024-04-04 00:32:13 -07:00
Jordan Irwin
4b415d238d
Create class to handle splash image 2024-04-04 00:09:24 -07:00
Jordan Irwin
d88ee79505
Fix NPE 2024-04-04 00:08:02 -07:00
Jordan Irwin
1c53e95726
Change some ClientView static methods to instance methods 2024-04-03 22:45:15 -07:00
Jordan Irwin
2dd548262c
Preliminary support for multiple ClientView instances 2024-04-03 21:28:22 -07:00
Jordan Irwin
d628936d89
Programmatically create ClientView instance 2024-04-03 21:20:13 -07:00
Jordan Irwin
e062d5407a
Don't store ClientView static instance 2024-04-03 17:21:01 -07:00
Jordan Irwin
fb85ccf246
Make release logger functional to show message dialogs 2024-04-03 17:18:23 -07:00
Jordan Irwin
1f74b65ba7
Don't need to pass MainActivity instance to Logger initializer 2024-04-03 17:06:43 -07:00
Jordan Irwin
b0f94e366d
Change default level for Logger.notify to info 2024-04-03 16:42:29 -07:00
Jordan Irwin
b792bd871b
Reference static MainActivity instance with full name 2024-04-03 16:39:13 -07:00
Jordan Irwin
c5a6942081
Fix dialog contexts 2024-04-03 16:32:32 -07:00
Jordan Irwin
79f72864ef
Make Menu class true singleton 2024-04-03 16:12:58 -07:00
Jordan Irwin
ed0bef6caf
Move ClientView.playTitleMusic to MusicPlayer.playTitleMusic 2024-04-03 15:55:36 -07:00
Jordan Irwin
d1141799ec
Move MusicPlayer class to main package 2024-04-03 15:54:33 -07:00
Jordan Irwin
b47f6440a4
Don't need to make static reference to MainActivity.this 2024-04-01 19:42:43 -07:00
Jordan Irwin
cbb6a019fb
Remove unused value 2024-04-01 19:17:52 -07:00
Jordan Irwin
bb317ad4cc
Fix unnecessary casts from Context to MainActivity 2024-04-01 19:15:26 -07:00
Jordan Irwin
2bb9c12814
Fix call to static method 2024-04-01 19:06:32 -07:00
Jordan Irwin
50a5a35d00
Clean up imports 2024-04-01 18:54:20 -07:00
Jordan Irwin
bd15e460c6
Android: Add portrait splash & background color 2024-03-31 20:38:34 -07:00
Hendrik Brummermann
5945b940d3 exit Neutralino process on window close 2024-03-31 22:07:00 +02:00
Hendrik Brummermann
21304c2c09 fixed ant compilejs to work with Eclipse 2024-03-31 21:58:33 +02:00
Hendrik Brummermann
dfd81f03a7 added logout button 2024-03-31 12:42:05 +02:00
Jordan Irwin
454e100aea
Fix Seven Cherubs quest slot affected by Update Converter bug
Closes: https://github.com/arianne/stendhal/issues/695
2024-03-30 17:55:55 -07:00
Jordan Irwin
37448f470c
Don't trim empty slot states when updating quests
https://github.com/arianne/stendhal/issues/695
2024-03-30 17:47:31 -07:00
Jordan Irwin
e29228c2c4
Add Android meta data for F-Droid 2024-03-30 16:33:20 -07:00
Jordan Irwin
7fdbe9111d
Remove old unused sprites 2024-03-30 13:48:58 -07:00
Jordan Irwin
797372adbb
Exclude converted contributors.html from source distribution 2024-03-30 13:44:54 -07:00
Hendrik Brummermann
cd53f56e7a don't include result of compilejs in source distribution 2024-03-29 23:21:07 +01:00
Jordan Irwin
e9d88dcc90 Use same tileset directory for both development & distribution...
...package for simplicity
2024-03-28 17:50:18 -07:00
Jordan Irwin
66f5f93c9a Move web client source to src/js directory
https://github.com/arianne/stendhal/issues/628
2024-03-28 17:50:18 -07:00
Jordan Irwin
977f5e6f35
Update changes 2024-03-28 16:17:20 -07:00
Jordan Irwin
d520815d89 Rename chef Patrick to Preston
https://github.com/arianne/stendhal/issues/551
2024-03-28 12:18:49 -07:00
Jordan Irwin
837fb5646d Reserve name Patrick for Herald
https://github.com/arianne/stendhal/issues/551
2024-03-28 12:18:49 -07:00
Jordan Irwin
24a1679c55 Add method to reserve names for dynamically created NPCs 2024-03-28 12:18:49 -07:00
Jordan Irwin
65fa0d8db6
Add Gradle wrapper SHA-256 checksum info recommend by F-Droid
https://gitlab.com/fdroid/fdroiddata/-/merge_requests/14774#note_1837005543
2024-03-28 11:17:09 -07:00
Jordan Irwin
010c8689ac
Increment version to 1.46.5 2024-03-28 09:16:51 -07:00
Hendrik Brummermann
ac72f383a5 fixed size of notification bubble 2024-03-28 00:53:17 +01:00
Hendrik Brummermann
f790e89bf7 implemented updater 2024-03-28 00:19:12 +01:00
Jordan Irwin
647ca5d566
Use Locale.ENGLISH when calling String.toLowerCase 2024-03-26 23:41:28 -07:00
Jordan Irwin
053b6331e0
Fix changes 2024-03-26 19:14:31 -07:00
Jordan Irwin
589a8bba14
Add support for single globalized zone music to Java client
Doesn't restart if changed zone uses same music.
2024-03-26 19:06:19 -07:00
Jordan Irwin
6a758f3ed0
Fix changes 2024-03-26 18:57:22 -07:00
Jordan Irwin
bcd146b70b
Fix developing mode tileset path 2024-03-24 16:27:54 -07:00
Hendrik Brummermann
9a8d0e32b7 fixed compiler error 2024-03-25 00:09:08 +01:00
Jordan Irwin
506122aea0
Update changes 2024-03-21 15:03:56 -07:00
Jordan Irwin
221e059542
Fix update converter to handle quest slot sections containing...
...multiple object names delimited by commas

https://github.com/arianne/stendhal/issues/691
2024-03-21 14:59:52 -07:00
Jordan Irwin
19f419d064
Fix whitespace in Ritati Dragontracker's dialogue 2024-03-20 03:24:44 -07:00
Hendrik Brummermann
593387a7a0 run webclient build on dist 2024-03-19 23:15:11 +01:00
Hendrik Brummermann
0db115207a added missing dependencies to documentation 2024-03-19 22:38:00 +01:00
Jordan Irwin
764c63e093
Add tab to about dialog to display contributor information
https://github.com/arianne/stendhal/issues/651
2024-03-18 22:01:39 -07:00
Jordan Irwin
2109090efe
Allow passing element to Component & Panel constructors 2024-03-18 22:01:39 -07:00
Jordan Irwin
f69fec71d9
Convert contributors.md to HTML for use in web client 2024-03-18 22:01:38 -07:00
Jordan Irwin
e5799a01ec
Ensure using correct implementation of setTimeout & clearTimeout global functions 2024-03-18 21:49:34 -07:00
Jordan Irwin
0a072dd907
Fix path to font in vampire script 2024-03-18 15:55:05 -07:00
Jordan Irwin
6ab2bd3a80
Disable Android built-in about dialog
Web client now has about dialog.
2024-03-18 12:52:04 -07:00
Jordan Irwin
384c24de64
Docstring edit 2024-03-18 04:42:45 -07:00
Jordan Irwin
aaa08b702d
Support opening chat log context menu with touch
Closes: https://github.com/arianne/stendhal/issues/603
2024-03-18 03:35:26 -07:00
Jordan Irwin
c8f3838b42
Add option to enable/disable pinch & double-tap zoom
Closes: https://github.com/arianne/stendhal/issues/687
2024-03-18 03:05:57 -07:00
Jordan Irwin
904de865af
Fix controlling mute & volume level of single global music instance
Closes: https://github.com/arianne/stendhal/issues/688
2024-03-18 01:31:19 -07:00
Jordan Irwin
4ca4709789
Fix web client tileset path
https://github.com/arianne/stendhal/pull/669 places tiled maps & tilesets
in data directory so `data-tileset-path` attribute is no longer needed for
test server
2024-03-18 00:14:26 -07:00
Jordan Irwin
194713f7bb
Move stairs portals indexes into separate static class & make immutable 2024-03-18 00:02:49 -07:00
Jordan Irwin
517f4924f1
Add continuous movement attribute to Amazon portals 2024-03-17 22:44:36 -07:00
Jordan Irwin
ec3dafd39b
Add continuous movement attribute to Orril Mountain entrance 2024-03-17 22:22:30 -07:00
Jordan Irwin
e46bda70ac
Add continuous movement attribute to Ados townhall portal 2024-03-17 22:19:15 -07:00
Jordan Irwin
f00011f98e
Convert Tiled maps with CRLF line endings to LF 2024-03-17 19:32:49 -07:00
Jordan Irwin
8d38a6e694
Clean up mixed line endings in Tiled maps 2024-03-17 19:28:00 -07:00
Jordan Irwin
8964104538
Don't need to build separate webclient package with ant dist
Included in server package.
2024-03-17 18:23:17 -07:00
Jordan Irwin
7432652e66
Move sbin scripts to bin
https://github.com/arianne/stendhal/issues/628
2024-03-17 18:16:54 -07:00
Jordan Irwin
144a0e8d1a
Change Eclipse's build output directory to build/eclipse
https://github.com/arianne/stendhal/issues/628
2024-03-17 18:12:49 -07:00
Jordan Irwin
5778cb85e9 Change web client default tileset search path to data/maps/tileset 2024-03-17 17:53:52 -07:00
Jordan Irwin
bb79b9f419 Migrate tiled directory to data/maps
https://github.com/arianne/stendhal/issues/628
2024-03-17 17:53:52 -07:00
Jordan Irwin
5257669348 Dynamically create slash action help info 2024-03-17 17:53:22 -07:00
Jordan Irwin
77ad5a24a0 Class to represent action/command parameter info 2024-03-17 17:53:22 -07:00
Jordan Irwin
79dd5ab89b
Update changes 2024-03-17 00:51:40 -07:00
Jordan Irwin
7b2670bba8
Fix redundant check 2024-03-17 00:25:27 -07:00
Jordan Irwin
5f566f8988
Revert "Fix multi-touch support in item inventories"
This reverts commit 1551389c75.
2024-03-17 00:21:00 -07:00
Jordan Irwin
ee7233d0eb
Fix corpse & chest cursor when quick pickup enabled
Closes: https://github.com/arianne/stendhal/issues/601
2024-03-16 18:35:53 -07:00
Jordan Irwin
4610c46263
Update changes 2024-03-15 02:55:27 -07:00
Jordan Irwin
89eec90f73
Add text highlighting support in speech bubbles
https://github.com/arianne/stendhal/issues/489
2024-03-15 02:51:36 -07:00
Jordan Irwin
1551389c75
Fix multi-touch support in item inventories
https://github.com/arianne/stendhal/issues/672
2024-03-14 20:20:06 -07:00
Jordan Irwin
3907293cae
Add docstrings 2024-03-14 20:07:06 -07:00
Jordan Irwin
c466742e5d
Declare return type of TouchHandler.isTouchEvent 2024-03-14 20:06:40 -07:00
Jordan Irwin
4f393c209a
Detect touch index when extracting position & target from event 2024-03-14 19:13:58 -07:00
Jordan Irwin
6145773b2a
Fix undefined variable (how this worked before I do not know) 2024-03-14 18:51:10 -07:00
Jordan Irwin
988882cc96
Don't inject javascript into web client from Android client 2024-03-14 18:29:18 -07:00
Jordan Irwin
6c07a1d627
Trim whitespace between command & player name in tab completion
Closes: https://github.com/arianne/stendhal/issues/684
2024-03-14 18:20:38 -07:00
Jordan Irwin
872baf12c4
Add name to player list at time of Player creation in case a...
...player_logged_on isn't received
2024-03-14 18:20:15 -07:00
Jordan Irwin
0ebf803db0
Fix cycling commands & names with tab completion
https://github.com/arianne/stendhal/issues/684
2024-03-14 16:47:15 -07:00
Hendrik Brummermann
8ff0fe15a1 updated marauroa.jar 2024-03-15 00:02:28 +01:00
Jordan Irwin
3435eb69ec Fix admin action test 2024-03-13 20:16:53 -07:00
Jordan Irwin
e17500be7d
Don't allow admins to change name property of entities
Closes: https://github.com/arianne/stendhal/issues/680
2024-03-13 19:21:49 -07:00
Hendrik Brummermann
745162c6d6 display license in about dialog 2024-03-13 23:55:45 +01:00
Hendrik Brummermann
ead049dd8c added about dialog 2024-03-13 23:24:47 +01:00
Hendrik Brummermann
a64438fa7b added about link to menu 2024-03-13 22:41:51 +01:00
Jordan Irwin
3836aa3d31 Fix tab completion displaying last command twice
https://github.com/arianne/stendhal/issues/684
2024-03-13 03:36:38 -07:00
Jordan Irwin
6ee0391208 Add unlisted commands to tab completion
https://github.com/arianne/stendhal/issues/684
2024-03-13 03:01:07 -07:00
Jordan Irwin
1efd87967a Fix web client/server dist package 2024-03-12 21:23:57 -07:00
Jordan Irwin
4a44b39492 Disable unfinished weapon-style attack sprites 2024-03-12 18:06:13 -07:00
Jordan Irwin
36ab9314d3 New icon for travel log quick menu button & use old travel log...
...icon for main menu button.
2024-03-12 17:44:48 -07:00
Hendrik Brummermann
f441c0dd06
Merge pull request #673 from nhnb/neutralino_5
support for neutralino 5.0
2024-03-12 22:06:53 +01:00
Hendrik Brummermann
3410d444ae ported nativehelper to neutralino 5.0
Some checks failed
Java CI / build (push) Has been cancelled
2024-03-12 21:54:20 +01:00
Hendrik Brummermann
d50acecd70 updated to neutralino 5.0.0 2024-03-12 21:45:14 +01:00
Jordan Irwin
e6134dc152
Upgrade Gradle wrapper to 7.5.1 2024-03-11 18:06:16 -07:00
Jordan Irwin
b76a4a10ae
Set Java compatibility to 11 for Android build 2024-03-11 17:42:01 -07:00
Hendrik Brummermann
66289a6361 updated marauroa 2024-03-10 00:37:33 +01:00
Hendrik Brummermann
2cef8a54d4 cleaned code 2024-03-10 00:25:32 +01:00
Jordan Irwin
956ef6c5fa
Make Gradle build script F-Droid compatible 2024-03-09 03:15:37 -08:00
Jordan Irwin
3a2f5298de
Add workflow to run Android build 2024-03-09 02:54:41 -08:00
Jordan Irwin
a4a9d163cd
Move debug key property condition check 2024-03-09 02:23:34 -08:00
Jordan Irwin
35d969ea39
Don't automatically generate ~/.android/debug.keystore
Require parameter -Pgenerate-debug-key for generation.
2024-03-08 22:39:17 -08:00
Jordan Irwin
c1d7afec3f
Support creating unsigned Android package 2024-03-08 21:53:02 -08:00
Jordan Irwin
824dbfc6b7
Fix Android version info 2024-03-07 23:13:36 -08:00
Jordan Irwin
396d981506
Fix server jar manifest classpath
Closes: https://github.com/arianne/stendhal/issues/594
2024-03-07 03:17:18 -08:00
Jordan Irwin
c2170e12ea
Use EventTarget object for pos.target property
Not sure if this really matters.
2024-03-06 18:37:51 -08:00
Jordan Irwin
12ef5175d5
Add TypeScript docstrings 2024-03-05 16:53:07 -08:00
Jordan Irwin
58241ba4ca
Clean up indentation 2024-03-05 14:20:18 -08:00
Jordan Irwin
1d6c2859ca
Add visual feedback to chat options buttons 2024-03-05 00:57:59 -08:00
Jordan Irwin
280fcf7c69
Clean up imports 2024-03-05 00:08:27 -08:00
Jordan Irwin
f906ba583f
Rename ElementClickHandler to ElementClickListener 2024-03-04 22:31:53 -08:00
Jordan Irwin
f39d80c9f7
Revert "Make element click handler more robust to support more listeners"
This reverts commit 36cb8fc718.
2024-03-04 21:46:48 -08:00
Jordan Irwin
557954e06e
Remove client version check
Reverts d573746771
2024-03-04 21:45:07 -08:00
Jordan Irwin
36cb8fc718
Make element click handler more robust to support more listeners 2024-03-01 19:52:42 -08:00
Jordan Irwin
a310578b16
Add secondary touch support to main quick menu button
https://github.com/arianne/stendhal/issues/417
2024-03-01 19:38:40 -08:00
Jordan Irwin
24c7aefeb5
Move quick menu click listener registration to class for...
...global use

https://github.com/arianne/stendhal/issues/417
2024-03-01 19:30:57 -08:00
Jordan Irwin
ccb16cb0c2
Support secondary touch events in quick menu buttons
https://github.com/arianne/stendhal/issues/417
2024-03-01 19:11:19 -08:00
Jordan Irwin
ff6cf0bfa5
Add touch index parameter to extractPosition & extractTarget in HTMLManager 2024-03-01 19:10:38 -08:00
Jordan Irwin
55a8d0c934
Make floating window title text unclickable
Closes: https://github.com/arianne/stendhal/issues/620
2024-03-01 18:09:29 -08:00
Jordan Irwin
3906f39ebd
Make click indicator non-interactive
https://github.com/arianne/stendhal/issues/417
2024-03-01 18:02:09 -08:00
Jordan Irwin
385a72e51e
Make FreezeHell script work with release package 2024-03-01 14:54:08 -08:00
Jordan Irwin
36dcb8017a
Require that runserver scripts be run server root directory 2024-03-01 11:42:35 -08:00
Jordan Irwin
fd449cd2c9
Move root scripts to sbin directory
The plan is to use bin directory but that is currently used by
Eclipse's build.

https://github.com/arianne/stendhal/issues/628
2024-03-01 11:35:23 -08:00
Jordan Irwin
a03170bee1
Remove build-archive directory from Git
https://github.com/arianne/stendhal/issues/628
2024-03-01 11:21:47 -08:00
Jordan Irwin
e20d31a762
Add fixme note 2024-03-01 01:55:31 -08:00
Jordan Irwin
5e5f8c282c
Add list of unused music files 2024-03-01 01:55:06 -08:00
Jordan Irwin
d38788270f
Set global zone music in Nalwor River maps
https://github.com/arianne/stendhal/issues/334
2024-03-01 01:52:58 -08:00
Jordan Irwin
9a16a2c4df
Set global zone music in Kalavan City maps
https://github.com/arianne/stendhal/issues/334
2024-03-01 01:37:00 -08:00
Jordan Irwin
61811b68fc
Set global zone music in Kika Caves maps
https://github.com/arianne/stendhal/issues/334
2024-03-01 01:33:44 -08:00
Jordan Irwin
32fc69fd10
Set global zone music in Kalavan Castle maps
https://github.com/arianne/stendhal/issues/334
2024-03-01 01:24:25 -08:00
Jordan Irwin
4258e21d1e
Set global zone music in Ados City maps
https://github.com/arianne/stendhal/issues/334
2024-03-01 01:16:44 -08:00
Jordan Irwin
d3b3c32464
Set global zone music in maps surrounding Semos City
https://github.com/arianne/stendhal/issues/334
2024-03-01 01:08:21 -08:00
Jordan Irwin
9553a922fe
Set global zone music in Atlantis maps
https://github.com/arianne/stendhal/issues/334
2024-03-01 01:00:16 -08:00
Jordan Irwin
395acbae7d
Set global zone music in Deniran region maps
https://github.com/arianne/stendhal/issues/334
2024-03-01 00:57:23 -08:00
Jordan Irwin
f68aa6d7cd
Set global zone music in Semos Catacombs maps
https://github.com/arianne/stendhal/issues/334
2024-03-01 00:25:47 -08:00
Jordan Irwin
abb32a1111
Support global music loop that continues play accross zone changes
https://github.com/arianne/stendhal/issues/334
2024-03-01 00:22:12 -08:00
Jordan Irwin
bff2f58b06
Allow passing sound name as parameter to SoundManager.stop 2024-02-29 23:22:52 -08:00
Jordan Irwin
2fe9bd7ee3
Allow passing string layer name to SoundManager.stop 2024-02-29 23:22:48 -08:00
Jordan Irwin
38bf9c4238
Add property to identify sounds by string 2024-02-29 22:33:01 -08:00
Jordan Irwin
f802ec0b5f
Replace SoundManager method getLayerName with checkLayer 2024-02-29 22:32:58 -08:00
Jordan Irwin
ac313c3732
Sound manager code & docstring cleanup 2024-02-29 20:51:15 -08:00
Jordan Irwin
bb3804b860
Initialize sound manager properties in constructor 2024-02-29 19:24:01 -08:00
Jordan Irwin
72a8c0ec58
Copy lettuce grower image for backward compatibility 2024-02-27 16:23:21 -08:00
Jordan Irwin
b5b6c61122
Rename salad grower image to match renamed item 2024-02-27 16:22:06 -08:00
Jordan Irwin
998a2b9e5a
Include missing source map file in webclient & server dist packages 2024-02-26 02:23:24 -08:00
Jordan Irwin
5c0353adee
Remove empty log directory from Git
https://github.com/arianne/stendhal/issues/628
2024-02-26 01:01:47 -08:00
Jordan Irwin
c16569fc22 Don't create staging directory for MkDocs & include TypeScript...
...reference in "docs" build target
2024-02-26 00:51:11 -08:00
Jordan Irwin
0f157122e7 Add support for documenting TypeScript code with TypeDoc Node module 2024-02-26 00:51:11 -08:00
Jordan Irwin
05121adcc2
Update wordlist 2024-02-25 23:59:09 -08:00
Jordan Irwin
6360d4c498
Enforce LF line endings when updating wordlist 2024-02-25 23:50:21 -08:00
Jordan Irwin
a14a8ae012
Create print/write stream classes classes to enforce UTF-8 & LF 2024-02-25 23:48:28 -08:00
Jordan Irwin
e07d66661e
Add license boilerplates 2024-02-25 22:15:25 -08:00
Jordan Irwin
032041e38c
Clean up line endings 2024-02-25 22:02:09 -08:00
Jordan Irwin
31eb62eb62
Clean up indentation 2024-02-25 21:45:39 -08:00
Jordan Irwin
f380f5e5ba
Clean up indentation 2024-02-25 20:18:51 -08:00
Jordan Irwin
892d906d90
Update wordlist scripts 2024-02-25 18:59:22 -08:00
Jordan Irwin
5684fda8d4
Fix tombstone portal in Lich Palace to not require using via...
...context menu
2024-02-25 18:49:42 -08:00
Jordan Irwin
92d17e15b0
Prepare melee attack sprite for multiple frames 2024-02-25 17:13:21 -08:00
Jordan Irwin
32ef5e4765
Fix retrieving rotated sprite 2024-02-25 17:08:15 -08:00
Jordan Irwin
30911af4d8
Move sprite initialization into MeleeAttackSprite constructor 2024-02-25 15:05:09 -08:00
Jordan Irwin
66e8cc656a
Fix frame indexing of attack sprites 2024-02-25 14:52:38 -08:00
Jordan Irwin
78bfc26949
Use Direction class in MeleeAttackSprite 2024-02-25 13:19:03 -08:00
Jordan Irwin
f7b21e714e
Fix updating deprecated config key for items quickpickup...
...from inventory
2024-02-25 11:52:59 -08:00
Jordan Irwin
4d59418a8b
Fix positioning of door sprites
Closes: https://github.com/arianne/stendhal/issues/614
2024-02-24 01:36:05 -08:00
Jordan Irwin
39dc2fee9d
Fix errant collision tiles on Atlantis map
Closes: https://github.com/arianne/stendhal/issues/629
2024-02-24 00:38:52 -08:00
Jordan Irwin
618a5e974a
Fix "mute" slash action 2024-02-24 00:28:22 -08:00
Jordan Irwin
180ba80281
Merge pull request #667 from AntumDeluge/autocomplete
Autocomplete Support
2024-02-24 00:26:54 -08:00
Jordan Irwin
24b72e147a
Disable autocomplete of admin commands for non-admins 2024-02-24 00:19:48 -08:00
Jordan Irwin
3bd55aab47
Add remaining player related chat commands to chat completions 2024-02-24 00:04:38 -08:00
Jordan Irwin
30483e5615
Update changes 2024-02-23 18:56:09 -08:00
Jordan Irwin
7f10ec9242
Fix cycling through autocomplete commands & player names. 2024-02-23 18:55:17 -08:00
Jordan Irwin
e3a9841c11
Store names of logged on players 2024-02-23 17:58:12 -08:00
Jordan Irwin
57d58ca5ab
Begin work on autocomplete 2024-02-23 17:09:50 -08:00
Jordan Irwin
41b9e7524a
Set portal default action to "use" when on collision tile
Closes: https://github.com/arianne/stendhal/issues/487
2024-02-23 16:13:50 -08:00
Jordan Irwin
20a88c0905
Remove debugging checks for touch drag-and-drop 2024-02-23 15:49:38 -08:00
Jordan Irwin
d0a0d591b6
Clean up imports 2024-02-23 15:40:59 -08:00
Jordan Irwin
6e1f1d4a38
Fix touch drag-and-drop to/from content containers 2024-02-23 15:40:46 -08:00
Jordan Irwin
85d720b500
Add method to get inventory by HTML element 2024-02-23 15:39:47 -08:00
Jordan Irwin
f6437e4bec
Fix issue with long touch causing item to be "held" in...
...background of item container.
2024-02-23 11:54:45 -08:00
Jordan Irwin
a9d321865f
Merge pull request #663 from leechex/master
Semos and Fado Tree Tilesets fix
2024-02-23 10:55:31 -08:00
Jordan Irwin
36ae2be5d0
Update changes 2024-02-23 10:21:41 -08:00
Jordan Irwin
35814ead31
Copy zucchini sprites to courgette for backward compatibility 2024-02-23 10:09:08 -08:00
Jordan Irwin
8c089fa6c4
Rename item "courgette" to "zucchini"
https://github.com/arianne/stendhal/issues/637
2024-02-23 10:07:22 -08:00
Jordan Irwin
c33e9916e4
Update fado sign with "lettuce" 2024-02-21 01:32:58 -08:00
Jordan Irwin
6b99f62702
Copy lettuce image for backward compatibility 2024-02-21 01:23:21 -08:00
Jordan Irwin
c173c26586
Rename item "salad" to "lettuce"
https://github.com/arianne/stendhal/issues/637
2024-02-21 01:22:49 -08:00
Jordan Irwin
a5183f90c5
Add "train" to Omura Sumitada's known chat options 2024-02-21 00:40:35 -08:00
Jordan Irwin
b712518e6f
Hide lighting in experimental settings 2024-02-21 00:29:32 -08:00
Jordan Irwin
ac1c9a6840
Store weather setting initial state 2024-02-21 00:28:15 -08:00
Jordan Irwin
eb2bb96a6c
Remove deprecated tooltip stating weather not supported 2024-02-21 00:27:42 -08:00
Jordan Irwin
437a0464f9
Add "look" option to useable entities
Closes: https://github.com/arianne/stendhal/issues/660
2024-02-20 22:54:40 -08:00
Jordan Irwin
b3f4622ad3
Make scrying orbs functional
https://github.com/arianne/stendhal/issues/660
2024-02-20 22:05:35 -08:00
Jordan Irwin
ec96ad0305
Create User.moveTo method to send "moveto" action to server 2024-02-20 21:58:08 -08:00
Jordan Irwin
782a1f6543
Update changes 2024-02-20 18:05:16 -08:00
Jordan Irwin
982deb72e8
Fix double click/tap so subsequent single clicks/taps aren't...
...counted as double

https://github.com/arianne/stendhal/issues/417
2024-02-20 18:02:58 -08:00
Jordan Irwin
d958b81dcc
Add offset to weather drawing to prevent appearing to move...
...with player

Closes: https://github.com/arianne/stendhal/issues/518
2024-02-20 17:52:12 -08:00
Jordan Irwin
231f7b8544
Update seed test 2024-02-20 17:31:08 -08:00
Jordan Irwin
608738bc85
Support closing chat/notification bubbles with tap/touch
https://github.com/arianne/stendhal/issues/417
2024-02-20 17:14:17 -08:00
Jordan Irwin
2737077d8d
Include clientX & clientY in HTMLManager.extractPosition 2024-02-20 17:12:17 -08:00
Jordan Irwin
55642ffa03
Change viewport ID from "gamewindow" to "viewport" 2024-02-20 16:34:28 -08:00
Jordan Irwin
fbf6816a2e
Set min/max width for chat options & emoji dialogs 2024-02-20 16:22:40 -08:00
Jordan Irwin
11a4aad83c
Allow sowing seeds from within inventory
Closes: https://github.com/arianne/stendhal/issues/643
2024-02-20 16:03:42 -08:00
Jordan Irwin
fba72e4c65
Only register inventory double clicks/taps if target ID is same...
...for both

https://github.com/arianne/stendhal/issues/417
2024-02-20 14:25:52 -08:00
Jordan Irwin
758139c014
Support touch drag-and-drop from ground to inventory 2024-02-20 13:55:42 -08:00
Jordan Irwin
6d1eabb7af
Remove redundant code 2024-02-20 13:46:13 -08:00
Jordan Irwin
5157d3093a
Fix touch drag-and-drop between inventories 2024-02-20 13:45:49 -08:00
Jordan Irwin
9cc8b3ae2c
Add method to extract target from event 2024-02-20 12:26:00 -08:00
Jordan Irwin
fd8453c183
Don't draw built-in emoji when native emojis enabled 2024-02-20 11:22:56 -08:00
Jordan Irwin
392cf8bf3e
Fix updating inner joystick button position 2024-02-20 11:02:46 -08:00
Jordan Irwin
c4b51df493
Add FIXME notes 2024-02-20 10:45:17 -08:00
Jordan Irwin
02966a39d5
Android: Don't allow default handling of URLs when overridden 2024-02-20 09:59:25 -08:00
Jordan Irwin
460bb69f45
Server-side bug was fixed 2024-02-20 09:58:34 -08:00
Jordan Irwin
a708a01d14
Code cleanup & add docstrings 2024-02-20 09:50:58 -08:00
Jordan Irwin
3de9892fa9
Android: Open login URL in external browser 2024-02-20 08:20:30 -08:00
Jordan Irwin
a59a784071
Android: Temporary workaround for server-side bug where...
...STENDHAL_LOGIN_TARGET is not expanded in intent URL.
2024-02-20 08:19:08 -08:00
Jordan Irwin
c24e81a6c6
Android: Fix loading of initial page 2024-02-20 08:16:02 -08:00
Hendrik Brummermann
c2d0f9add9 implemented login protocol 2024-02-18 23:50:21 +01:00
Hendrik Brummermann
1cdcbdf1df added @leechex to contributors 2024-02-18 13:50:37 +01:00
Hendrik Brummermann
93ef1c48ef renamed LogButton to TravelLogButton 2024-02-18 13:49:18 +01:00
Jordan Irwin
5e83321220
Parse URL to load from Intent 2024-02-17 00:33:46 -08:00
Jordan Irwin
476a35f377
Close OpenAppByUrl activity after check sending intent to ClientView 2024-02-17 00:32:54 -08:00
Jordan Irwin
c72439f30c
Replace deprecated Android method WebViewClient.shouldOverrideUrlLoading 2024-02-16 23:49:13 -08:00
Jordan Irwin
5c28ce8814
Remove deprecated Android WebView constructor 2024-02-16 23:37:30 -08:00
Jordan Irwin
03b2679fdb
Replace deprecated Android preferences classes with compat implementations 2024-02-16 23:34:47 -08:00
Jordan Irwin
e363ccb550
Android: Handle intent URL by redirecting to character select or client URL 2024-02-16 22:54:18 -08:00
Jordan Irwin
90832b1e2d
Android: Add method to check for intent URL 2024-02-16 20:50:32 -08:00
Jordan Irwin
5d1d2b6c80
Android: Move state query parameters to URL loading method 2024-02-16 20:26:32 -08:00
Jordan Irwin
3828c766ef
Android: Change initial page to login URL 2024-02-16 20:18:44 -08:00
Jordan Irwin
6fbb866c17
Android: Check that login URI is hierarchical 2024-02-16 20:11:56 -08:00
Jordan Irwin
632a1739bb
Android: Show stacktrace for unhandled exceptions 2024-02-16 20:04:42 -08:00
Jordan Irwin
172ba6b92b
Android: Fix checkLoginIntent method to load correct client URL 2024-02-16 18:55:08 -08:00
Jordan Irwin
5c37bf38aa
Android: Fix UrlHelper.checkClientUrl 2024-02-16 18:52:26 -08:00
Jordan Irwin
3549cbd0af
Android: Don't need to check for login URL in OpenAppByUrl class 2024-02-16 17:57:50 -08:00
Jordan Irwin
e209272ff2
Android: Add optional "notify" parameter to other Logger methods 2024-02-16 17:56:48 -08:00
Jordan Irwin
7c1b661221
Android: Write to log file when calling Logger.debug with "notify" parameter 2024-02-16 17:56:02 -08:00
Jordan Irwin
0cfdb0c50c
Android: Move LogLevel enum to its own file 2024-02-16 17:41:55 -08:00
Jordan Irwin
8558920dcf
Android: Hide Logger constructor & add doc strings 2024-02-16 17:32:36 -08:00
Jordan Irwin
6638db67cf
Manually set saturation to 1.0 as temporary workaround 2024-02-16 03:05:50 -08:00
Jordan Irwin
8e13e79dff
Clean up color methods & viewport filter 2024-02-16 02:41:27 -08:00
Jordan Irwin
174747f3e1
Don't invert hue rotation 2024-02-16 01:10:21 -08:00
Jordan Irwin
51a2447638
Use HSL filter instead of manipulating pixel data...
...Also only apply to landscape layers, entities, & weather.
2024-02-16 00:37:11 -08:00
Jordan Irwin
2b3e498e77
Proper case-insensitive string comparison for testing daylight phase 2024-02-15 19:59:41 -08:00
Jordan Irwin
2aab6f2992
Proof of concept map coloring 2024-02-15 19:56:34 -08:00
Jordan Irwin
ef6c9c3a5e
Move MathHelper methods into MathUtil 2024-02-15 18:25:24 -08:00
Jordan Irwin
3ac671ac48
Improve minimap contrast
Use same background color as Java client
2024-02-15 17:13:01 -08:00
Jordan Irwin
2ec34a5fa4
Add method to parse color string to RGB values object 2024-02-15 17:07:14 -08:00
Jordan Irwin
c657b1c0f4
Use Color class for MiniMap values 2024-02-15 16:20:08 -08:00
Jordan Irwin
8e00ed7f45
Make private message text darker 2024-02-15 16:13:39 -08:00
Jordan Irwin
8c7feede6a
Update colors 2024-02-15 16:13:12 -08:00
Jordan Irwin
add1f6ede3
Fix HP bar coloring
Closes: https://github.com/arianne/stendhal/issues/665
2024-02-15 15:17:55 -08:00
Leechex
8a7c8a2489 semos and fado tilesets fix
second update to fix tilesets in trees in the semos and fado regions
2024-02-14 21:06:23 -03:00
Leozera
b7c8cc5318
Merge branch 'arianne:master' into master 2024-02-14 20:25:35 -03:00
Jordan Irwin
ab909c2ba6
Proof of concept: Drag items from inventory to inventory or ground 2024-02-13 20:24:44 -08:00
Jordan Irwin
4ab33610dc
Add parameter to enable touch debugging 2024-02-13 20:08:48 -08:00
Jordan Irwin
9f9d78bbf7
Correct target element for "touchmove" & "touchend" events 2024-02-13 20:01:01 -08:00
Jordan Irwin
a75e0bbef6
New implementation to display items "held" using touch event
WIP: The intention is to eventually support following touchmove event.
2024-02-13 17:31:27 -08:00
Jordan Irwin
09c580d4eb
Don't create drop quanity selector if target slot is same as source 2024-02-13 04:26:51 -08:00
Jordan Irwin
2744e2ec84
Fix re-ordering inventories
Closes: https://github.com/arianne/stendhal/issues/605
2024-02-13 04:15:49 -08:00
Jordan Irwin
0f0f46dada
Handle sending of move & face events to server in User class 2024-02-13 01:26:26 -08:00
Jordan Irwin
8dbfa09b26
Make JoystickImpl.isEngaged public 2024-02-13 01:26:25 -08:00
Jordan Irwin
3bf1d69c97
Support cancelling auto-walk in on-screen joystick implementations
Closes: https://github.com/arianne/stendhal/issues/625
2024-02-13 01:26:21 -08:00
Jordan Irwin
8b88d53aab
Add method to ActiveEntity to convert walking direction to...
...util.Direction.Direction instance
2024-02-12 22:44:44 -08:00
Jordan Irwin
98adf5fa1f
Change joystick implementation to set property denoting...
...engaged state instead of relying on current direction
2024-02-12 22:12:23 -08:00
Jordan Irwin
1641fef765
Optimize direction change handling in DirectionPad class 2024-02-12 22:06:31 -08:00
Jordan Irwin
a5618fe08d
Initialize direction pad buttons in array 2024-02-12 21:59:25 -08:00
Jordan Irwin
3c2f62cca8
Revert custom build parameters for Android 2024-02-12 18:26:33 -08:00
Jordan Irwin
1cf41d3163
Android: Allow configuring custom build parameters 2024-02-12 01:55:58 -08:00
Jordan Irwin
8af605ff1f
Android: Set app name at build time from properties file 2024-02-12 01:45:29 -08:00
Jordan Irwin
b497f8f18c
Used buffered stop in joystick same as direction pad
Fixes issue of player sometimes stopping after immediate direction
change due to inner button passing through dead zone.
2024-02-11 17:10:01 -08:00
Jordan Irwin
404ac4fdd2
Clean up imports 2024-02-10 22:16:15 -08:00
Jordan Irwin
a43ae896ad
Request group management event from server if group not...
...detected at login. Workaround for issue with some events
not receieved at login.

Closes: https://github.com/arianne/stendhal/issues/642
2024-02-10 22:16:13 -08:00
Jordan Irwin
4357ae3c2f
Add method TabPanelComponent.getCurrentIndex 2024-02-10 22:09:08 -08:00
Jordan Irwin
50db36630f
Add function property to TabPanelComponent to optionally be...
...executed when tab changes
2024-02-10 22:07:42 -08:00
Jordan Irwin
0657742df8
Support displaying members' HP in group panel 2024-02-10 20:52:32 -08:00
Jordan Irwin
06ae86e8f2
Add Zone.findPlayer method 2024-02-10 20:52:31 -08:00
Jordan Irwin
a21f589e5d
Move onEnterZone/onExitZone methods to Player superclass 2024-02-10 20:52:30 -08:00
Jordan Irwin
4abe2a6efd
Add TODO note 2024-02-10 20:52:30 -08:00
Jordan Irwin
7abfa4046b
Convert Zone class to singleton 2024-02-10 20:52:26 -08:00
Jordan Irwin
a1d75bfec5
Preliminary work for using secondary directions of movement
https://github.com/arianne/stendhal/issues/608
2024-02-10 05:12:09 -08:00
Jordan Irwin
7c1b253348
Make AngleRange properties public & add method to get range size 2024-02-10 05:11:14 -08:00
Jordan Irwin
ea731fb486
Return Point instance in FloatingWindow.checkPos 2024-02-10 03:18:05 -08:00
Jordan Irwin
57ba30a85d
Return Point instance in Joystick.keepInside 2024-02-10 03:18:05 -08:00
Jordan Irwin
f5bddf4c0c
Use point class for window states 2024-02-10 03:18:04 -08:00
Jordan Irwin
398153ff1f
Class to represent an X/Y coordinate point 2024-02-10 03:18:04 -08:00
Jordan Irwin
6c0d0b61ce
Cache window state when retrieving from config manager 2024-02-10 03:16:52 -08:00
Jordan Irwin
adc57a1d37
Minor indentation cleanup 2024-02-10 02:32:50 -08:00
Jordan Irwin
3b214d7624
Update changes 2024-02-10 01:51:18 -08:00
Jordan Irwin
495502483e
Fix restricting joystick inner button movement range
References:
- https://stackoverflow.com/a/8528999/4677917
- https://github.com/arianne/stendhal/issues/608
2024-02-10 01:44:03 -08:00
Jordan Irwin
12af344288
Fix four sector detection of Joystick implementation
https://github.com/arianne/stendhal/issues/608
2024-02-10 00:13:11 -08:00
Jordan Irwin
31eb5fd19f
New class to represent a range of angles of degrees 2024-02-10 00:06:54 -08:00
Jordan Irwin
e6591e4283
New class for helping with mathematical calculations & conversions 2024-02-10 00:06:04 -08:00
Jordan Irwin
24b0254719
New class to represent a pair of objects 2024-02-10 00:05:10 -08:00
Jordan Irwin
fbdd119543
Use 'sourcepath'/'sourcefiles' instead of 'fileset' to build...
...Java documentation. Windows systems struggle with long path
names when using 'fileset'.

Closes: https://github.com/arianne/stendhal/issues/659
2024-02-08 18:36:27 -08:00
Jordan Irwin
1e0957349f
Forgot to update 'ant init' when changing android source directory 2024-02-08 14:02:07 -08:00
Leechex
aa65ee6d36 Update mountain_n_w2.tmx 2024-02-08 13:59:38 -08:00
Leechex
6eba2ee7a1 Nalwor maps Tree tilesets fix.
Correction of tilesets with errors on Nalwor maps.
2024-02-08 13:59:38 -08:00
Leechex
697301aed8 Fixed the alignment between Orril Mountain Maps
Fixed the alignment between Orril mountain_nw.tmx and Orril mountain_n_w2.tmx maps.
2024-02-08 13:59:38 -08:00
Jordan Irwin
c1537855d5
Workaround to prevent accidentally using items when joystick is...
...engaged
2024-02-07 22:12:47 -08:00
Jordan Irwin
e13a57d313
Move menu & sound buttons event handler registration 2024-02-07 21:53:00 -08:00
Jordan Irwin
d4dc060250
Retain joystick control when mouse cursor moves beyond joystick...
...radius.
2024-02-07 20:55:49 -08:00
Jordan Irwin
e092e91035
Add some TypeScript docstrings 2024-02-07 19:44:07 -08:00
Jordan Irwin
dc6ac81ce0
Rename JoystickBase class to JoystickImpl 2024-02-07 17:59:08 -08:00
Jordan Irwin
9600f92b15
Make joystick implementations singletons instead of...
...re-creating every time on-screen joystick is updated.
Also makes the class ui.joystick.JoystickBase.JoystickBase
abstract & places DPadButton into its own class file.
2024-02-07 17:53:33 -08:00
Jordan Irwin
11aa2eb277
Don't call ChatButton.update twice 2024-02-07 16:38:05 -08:00
Jordan Irwin
c1d4f9b91c
Move quick menu button registration to constructor 2024-02-07 16:31:56 -08:00
Jordan Irwin
310f68fe5f
Update quick menu joystick button in viewport method 2024-02-07 16:12:07 -08:00
Jordan Irwin
cf6cf12718 Add note 2024-02-05 23:01:12 -08:00
Jordan Irwin
a25286965c Add default values for theme & chat history so they are...
...reset with ConfigManager.clear
2024-02-05 22:48:29 -08:00
Jordan Irwin
65dc88fc43 Use separate config value for pathfinding in minimap 2024-02-05 22:46:01 -08:00
Jordan Irwin
8abb67a43a Access window.localStorage directly instead of referencing from property 2024-02-05 22:46:01 -08:00
Jordan Irwin
e5400ccfd3 Fix migrating config values 2024-02-05 22:20:13 -08:00
Jordan Irwin
21eb5f78b7 Replace keycode number constant comparison with KeyCode.ENTER 2024-02-05 22:20:13 -08:00
Jordan Irwin
67f38b8c63 Use shorthand for optional parameter 2024-02-05 22:20:13 -08:00
Jordan Irwin
d5871bd167 Add return type notation to some methods 2024-02-05 22:20:13 -08:00
Jordan Irwin
1f05bd6388 Add/Update TypeScript docstrings 2024-02-05 22:20:09 -08:00
Jordan Irwin
8515790a8d Standardize config keys prefixed by "client." & hide prefix from...
...code outside config manager
2024-02-05 22:17:48 -08:00
Jordan Irwin
c81cd83ac4 Normalize config keys using dash in place of underscore 2024-02-05 19:38:12 -08:00
Leechex
67ca0c89c6 Update mountain_n_w2.tmx 2024-02-03 13:32:06 -03:00
Leechex
328619f2cc Nalwor maps Tree tilesets fix.
Correction of tilesets with errors on Nalwor maps.
2024-02-03 13:23:34 -03:00
Leechex
3f31df3195 Fixed the alignment between Orril Mountain Maps
Fixed the alignment between Orril mountain_nw.tmx and Orril mountain_n_w2.tmx maps.
2024-02-02 21:47:04 -03:00
Jordan Irwin
8f4fa66d0e
Don't add joystick to DOM until position is updated 2024-02-01 21:45:25 -08:00
Jordan Irwin
5c2997983a
Add settings dialog option to enable/disable on-screen joystick 2024-02-01 21:37:29 -08:00
Jordan Irwin
b5c970d798
Don't need to set new joystick style value if old not "dpad" 2024-02-01 21:22:09 -08:00
Jordan Irwin
10bf6311d6
Fix updating joystick config values 2024-02-01 21:13:30 -08:00
Jordan Irwin
65c3949a36
Prefix stats panel settings keys with "client" 2024-02-01 21:09:31 -08:00
Jordan Irwin
067f380c2a
Prefix window states settings keys with "client" 2024-02-01 21:03:01 -08:00
Jordan Irwin
7645133878
Prefix sound settings keys with "client" 2024-02-01 20:50:16 -08:00
Jordan Irwin
8de84924a5
Prefix font settings keys with "client" 2024-02-01 20:41:21 -08:00
Jordan Irwin
81f76124f9
Fix updating deprecated config values 2024-02-01 20:39:39 -08:00
Jordan Irwin
d573746771
Working on a way to suggest clearing browser cache after release 2024-02-01 20:18:47 -08:00
Jordan Irwin
236f063d53
Don't update deprecated config keys if value is null 2024-02-01 19:34:30 -08:00
Jordan Irwin
801fdcb02a
XML config cleanup 2024-02-01 19:28:31 -08:00
Jordan Irwin
0eaa5eea67
Clean up item & creatures descriptions whitespace 2024-02-01 19:28:05 -08:00
Jordan Irwin
8e68b69ed0
Add some debugging output to Gradle build script 2024-02-01 18:44:05 -08:00
Jordan Irwin
b034276738
Remove unneeded property "outputName" 2024-02-01 18:16:46 -08:00
Jordan Irwin
9f64e24930
Android: Set app ID & output name to package namespace value 2024-02-01 18:14:36 -08:00
Jordan Irwin
e80cf2dcc6
Normalize xml indentation with tabs 2024-02-01 17:31:39 -08:00
Jordan Irwin
d47dcbc867
Set Android namespace in build.gradle instead of...
...deprecated "package" attribute in AndroidManifest.xml.

https://developer.android.com/build/configure-app-module#set-namespace
2024-02-01 16:28:16 -08:00
Jordan Irwin
23f4b87d60
Move Android source to app/android/client 2024-02-01 16:16:31 -08:00
Jordan Irwin
6700282f48
Android: Use same date/time stamp format as web client for screenshots downloads 2024-02-01 16:08:45 -08:00
Jordan Irwin
7fb33ea68e
Change screenshot default filename formatting to "stendhal_yyyy-mm-dd_HH.MM.SS" 2024-02-01 16:08:14 -08:00
Jordan Irwin
fb5045a31b
Clarify instructions for keystore.properties file in Android build 2024-02-01 15:43:32 -08:00
Jordan Irwin
4dfce7f431
Don't initialize value inside method parameter 2024-02-01 15:17:43 -08:00
Jordan Irwin
bb0889688c
Fix Jailed Dwarf quest erroneously marked as repeatable
https://github.com/arianne/stendhal/pull/580
2024-02-01 15:08:04 -08:00
Jordan Irwin
6c621bedea
Clean up imports 2024-02-01 14:51:24 -08:00
Jordan Irwin
1893c184d8
Whitespace cleanup 2024-02-01 14:45:58 -08:00
Tomasz Wiernik
cefbd43100 removed imports 2024-02-01 14:43:17 -08:00
Tomasz Wiernik
7991b367f7 JailedDwarfTest 2024-02-01 14:43:17 -08:00
Jordan Irwin
5f4ec066f9
CSS cleanup 2024-02-01 14:32:55 -08:00
Jordan Irwin
cf8e4c90b0
Merge pull request #654 from leechex/master
Update forest_w.tmx
2024-02-01 14:30:13 -08:00
Leechex
8141835d3f Update forest_w.tmx
fix missing tiles on the map.
2024-01-31 22:18:56 -03:00
Jordan Irwin
1e87430da4
Don't send continuous movement attribute action until user has been initially constructed
Fixes continuous movement state not always updated at startup
2024-01-30 21:17:08 -08:00
Jordan Irwin
278ef0802c
Make UI.displayReady property static 2024-01-30 16:54:54 -08:00
Jordan Irwin
c8405cc70b
Add note about package builds unrelated to project 2024-01-30 16:50:56 -08:00
Jordan Irwin
7aee4cc29c
Minor CSS cleanup 2024-01-30 15:54:24 -08:00
Jordan Irwin
9056d5d7fc
Update changes 2024-01-30 15:53:33 -08:00
Jordan Irwin
2a60ef1fef
Add method to verify login intent state 2024-01-29 22:15:37 -08:00
Jordan Irwin
20776f42c1
Create ClientView.setPage method 2024-01-29 22:09:37 -08:00
Jordan Irwin
820b3f7364
Ensure initial page URL is formatted correctly when character name fragment is set 2024-01-29 20:50:13 -08:00
Jordan Irwin
d06899ec47
Move some methods from ClientView to UrlHelper class 2024-01-29 20:34:18 -08:00
Jordan Irwin
4dda51df86
Return empty string if url parameter is null 2024-01-29 20:01:01 -08:00
Jordan Irwin
4edb33e5f0
Add url helper class 2024-01-29 20:00:57 -08:00
Jordan Irwin
8d66bb6718
Add methods getDefaultServerUri, getDefaultHost, & isLoginUri to ClientView 2024-01-29 17:54:29 -08:00
Jordan Irwin
78dd34540f
Change ClientView.isInternalUrl to ClientView.isInternalUri 2024-01-29 17:45:10 -08:00
Jordan Irwin
1d07cc4a2b
Rename ClientView.getDomain to ClientView.stripHost 2024-01-29 17:20:51 -08:00
Jordan Irwin
07cbd0b3c5
Add copyright boilerplate 2024-01-29 15:56:08 -08:00
Jordan Irwin
1e7bd34212
Clean up indentation 2024-01-29 15:55:06 -08:00
Jordan Irwin
587250795f
Rename DebugLog class to Logger 2024-01-29 15:48:33 -08:00
Jordan Irwin
f7f2c8b6c5
Add option to show notification when calling DebugLog.debug 2024-01-29 15:32:43 -08:00
Jordan Irwin
90e05f2a40
Change DebugLog.notify default level to "info" 2024-01-29 15:31:50 -08:00
Jordan Irwin
a34437c981
Remove old fixme note 2024-01-29 13:18:59 -08:00
Jordan Irwin
f34fa71c38
Generate random state & pass to query string when loading initial page 2024-01-28 18:02:35 -08:00
Jordan Irwin
5b0e786483
Re-organize quick menu buttons 2024-01-28 17:36:54 -08:00
Jordan Irwin
379f0412da
Android: add build & version info to query string when loading initial URL 2024-01-28 17:21:53 -08:00
Jordan Irwin
ad7998e3c4
Add build & version info to Android resources 2024-01-28 16:49:31 -08:00
Jordan Irwin
5268a20505
Use ant to update Android version 2024-01-28 16:08:33 -08:00
Jordan Irwin
3c1b2282d1
Use static value for Android version 2024-01-28 16:07:08 -08:00
Hendrik Brummermann
0f39f21183 proof of concept to redirect from browser back to the app 2024-01-28 18:15:16 +01:00
Hendrik Brummermann
cedec0d0bc recolored and changed default 2024-01-28 10:48:48 +01:00
Jordan Irwin
b881c9c400
Add function to translate asdw keys to direction
https://github.com/arianne/stendhal/issues/524
2024-01-27 21:14:18 -08:00
Jordan Irwin
a4acf4bec4
Rename KeyHandler.DIR_CODES to KeyHandler.dirCodes & make private 2024-01-27 21:11:03 -08:00
Jordan Irwin
a69ea0f465
Move HTMLManager.extractKeyCode to KeyCode.extract 2024-01-27 19:45:43 -08:00
Jordan Irwin
91a49789b4
Class representing keyboard key codes 2024-01-27 18:59:04 -08:00
Jordan Irwin
9ab9dff5d0
Trigger hiding software keyboard by removing focus from chat input 2024-01-27 18:57:03 -08:00
Jordan Irwin
dbce1648cb
Add note 2024-01-27 15:01:01 -08:00
Jordan Irwin
a70ea57b31
Add activity indicator to note in apothecary's cabin 2024-01-27 14:58:29 -08:00
Jordan Irwin
7925376b2e
Support showing activity indicator for signs 2024-01-27 14:57:43 -08:00
Jordan Irwin
6bdda3899c
Unhide chat panel when text is added to chat input component 2024-01-27 14:19:06 -08:00
Jordan Irwin
ec036540d5
Fix positioning of corpse indicator
Closes: https://github.com/arianne/stendhal/issues/641
2024-01-27 14:19:06 -08:00
Jordan Irwin
288a341117
Rename CorpseIndicatorSprite to ActivityIndicatorSprite 2024-01-27 14:19:05 -08:00
Hendrik Brummermann
d6ebff9a75 restored usesCleartextTraffic on debug builds 2024-01-27 20:18:28 +01:00
Hendrik Brummermann
1daeae8c50 use standard keyboard 2024-01-27 20:03:18 +01:00
Hendrik Brummermann
bf91c0a8de removed unneccessary manifest entries 2024-01-27 20:02:44 +01:00
Hendrik Brummermann
493ae1df34 Android Studio updated Gradle 2024-01-27 19:39:49 +01:00
Hendrik Brummermann
268a93f804 use packagename as apk filename 2024-01-27 14:53:46 +01:00
Jordan Irwin
27c74cc3cf
Only remove local storage values related to client config when calling ConfigManage.clear 2024-01-26 19:07:46 -08:00
Jordan Irwin
17b5ae807c
Prioritize getting config values from session memory over local storage
Closes: https://github.com/arianne/stendhal/issues/650
2024-01-26 19:05:32 -08:00
Jordan Irwin
73484efa4f
Disable chat toggle button when chat panel not floating
Closes: https://github.com/arianne/stendhal/issues/647
2024-01-26 18:06:03 -08:00
Jordan Irwin
0a3ccdda5b
Rename quick menu classes 2024-01-26 17:23:28 -08:00
Jordan Irwin
4cc6193640
Mark auto-hide chat setting as experimental 2024-01-26 17:07:18 -08:00
Jordan Irwin
c33b9aade6
Hide settings marked as "experimental" by default 2024-01-26 17:06:42 -08:00
Jordan Irwin
1a3a996d69
Update Ketteh Wehoh to respond to singular "manner"
https://github.com/arianne/stendhal/issues/640
2024-01-26 15:41:55 -08:00
Jordan Irwin
42758e4f12
Fix setting chat log scrolled position when chat panel visibility is restored
Closes: https://github.com/arianne/stendhal/issues/648
2024-01-26 15:33:51 -08:00
Jordan Irwin
048c02ec00
Fix setting component visible display property 2024-01-26 15:33:50 -08:00
Jordan Irwin
e5390390ae
Quick menu button to show chat options dialog 2024-01-26 12:07:20 -08:00
Jordan Irwin
5ec24bca50
Fix retrieving build & version info from web client 2024-01-25 16:26:51 -08:00
Jordan Irwin
e16fc08c84
Revert "Add web client build & version info to DOM elements"
This reverts commit a708c03964.

Need better way Android client to get version info.
2024-01-25 15:48:50 -08:00
Jordan Irwin
3eed117f21
Android: Retrieving web client version info still broken 2024-01-25 15:35:37 -08:00
Jordan Irwin
9a915a0b55
Android: Fix getting version info from web client 2024-01-25 15:22:25 -08:00
Jordan Irwin
a708c03964
Add web client build & version info to DOM elements 2024-01-25 15:20:27 -08:00
Jordan Irwin
a83d612057
Rename JSInterface to WebClientInfo 2024-01-25 11:40:31 -08:00
Jordan Irwin
1a3d31f432
Restore accidentally deleted JSInterface 2024-01-25 11:33:11 -08:00
Jordan Irwin
597860da95
Only close application menu if button pressed 2024-01-25 11:17:43 -08:00
Jordan Irwin
41355cba76
Prioritize NPC title over name in chat options dialog
Closes: https://github.com/arianne/stendhal/issues/644
2024-01-24 18:24:29 -08:00
Jordan Irwin
58dc4c8794
Add option to switch between inline and floating menu styles 2024-01-23 23:30:23 -08:00
Jordan Irwin
63bcc993d1
Fix call to ViewPort.getElement 2024-01-23 23:30:22 -08:00
Jordan Irwin
e54645006d
Create method SettingsDialog.createSelectFromConfig 2024-01-23 23:30:22 -08:00
Jordan Irwin
c79b1c8565
Create mechanism for retrieving predefined configuration key=value pairs 2024-01-23 23:30:21 -08:00
Jordan Irwin
61ff7eda4e
Restore traditional application menu & sound button 2024-01-23 23:30:21 -08:00
Jordan Irwin
c574c5fe60
Add note 2024-01-23 23:30:21 -08:00
Jordan Irwin
05fd87cfc6
Move function to create application menu into UI class 2024-01-23 23:30:20 -08:00
Jordan Irwin
18826d0e95
Move sound toggling function into SoundManager class 2024-01-23 23:30:20 -08:00
Hendrik Brummermann
8428ca211b updated marauroa.jar to handle EOFException 2024-01-24 08:10:41 +01:00
Jordan Irwin
b0da490f7f
Remove theming from middle column & only add to chat panel when inline 2024-01-23 18:17:15 -08:00
Jordan Irwin
6204fe2698
Don't set ChatPanel CSS display style to "none"
Closes: https://github.com/arianne/stendhal/issues/645
2024-01-23 18:01:09 -08:00
Hendrik Brummermann
67eb65b4f2 restored favour trigger 2024-01-23 23:44:33 +01:00
Hendrik Brummermann
5dcdeebf6e restored favour trigger 2024-01-23 23:44:02 +01:00
Jordan Irwin
75d430b1f4
Expand chat log height to fill page 2024-01-23 11:49:08 -08:00
Jordan Irwin
c6c9d0dcbf
Make center panel themable 2024-01-23 11:48:57 -08:00
Jordan Irwin
e975234eff
Fit viewport for floating chat panel 2024-01-23 11:13:17 -08:00
Jordan Irwin
77e80ab1c4
Don't update joystick image on every mouse movement 2024-01-23 02:01:18 -08:00
Jordan Irwin
bed40b588f
Allow toggling floating chat panel 2024-01-23 01:08:37 -08:00
Jordan Irwin
b3bac2e0c1
Use enter key and ChatInputComponent.send to toggle chat panel visibility
https://github.com/arianne/stendhal/issues/524
2024-01-23 01:08:36 -08:00
Jordan Irwin
2a3dcf7904
Add method to check if component has focus 2024-01-23 01:08:35 -08:00
Jordan Irwin
dfbdb26c87
Make chat panel semi-transparent 2024-01-23 01:08:35 -08:00
Jordan Irwin
3634d833d8
Make chat panel float
https://github.com/arianne/stendhal/issues/417
2024-01-23 01:08:34 -08:00
Jordan Irwin
5f83907123
Add method to get viewport HTMLElement 2024-01-23 01:08:33 -08:00
Jordan Irwin
5c04fb64d0
Add quick menu button to toggle chat panel visibility 2024-01-23 01:08:32 -08:00
Jordan Irwin
02c1ff8024
Initialize UI update observer after client interface is displayed 2024-01-23 01:07:38 -08:00
Jordan Irwin
a456c2b7fc
Fix setting component's visible state when initially hidden 2024-01-23 01:06:51 -08:00
Jordan Irwin
745333dce3
Make quick menu buttons components 2024-01-22 23:42:59 -08:00
Jordan Irwin
3990a494b7
Move quick button update methods to super class 2024-01-22 23:42:58 -08:00
Jordan Irwin
2c3917053b
Add docstrings 2024-01-22 18:50:40 -08:00
Jordan Irwin
d4f772a386
Don't attempt to change user direction via joystick if display not ready 2024-01-22 17:33:05 -08:00
Jordan Irwin
ea1d6772ae
Move display readiness check into UI class 2024-01-22 17:32:06 -08:00
Jordan Irwin
d27fd314f3
Add quick menu buttons to rotate user 2024-01-22 17:29:47 -08:00
Jordan Irwin
7dea5054ac
Class for managing user's facing direction 2024-01-22 17:27:57 -08:00
Jordan Irwin
c9fc1096d7
Move KeyHandler class into util directory 2024-01-22 16:25:15 -08:00
Jordan Irwin
502785255f
Use Direction class in KeyHandler 2024-01-22 16:17:23 -08:00
Jordan Irwin
912160cdc5
Position quick menu buttons relative to top of viewport instead of page 2024-01-22 14:14:34 -08:00
Jordan Irwin
771f11ba56
Call UI.onDisplayUpdate when screen orientation changes 2024-01-22 12:04:24 -08:00
Jordan Irwin
8ce006e20e
Try to detected if display is marked as ready before calling UI.onDisplayUpdate 2024-01-22 12:03:40 -08:00
Jordan Irwin
2e16fe8878 Update quick menu buttons positioning on changes to viewport 2024-01-21 19:51:26 -08:00
Jordan Irwin
8c132ccbf8 Fix initial positioning of quick menu buttons 2024-01-21 19:49:22 -08:00
Jordan Irwin
81ea17dca5 Remove old FIXME note 2024-01-21 18:59:10 -08:00
Jordan Irwin
bfb35f48e3 Fix potential TypeError referencing SingletonRepo 2024-01-21 18:58:52 -08:00
Jordan Irwin
1120f2ff2e Disable highlight selecting joystick buttons 2024-01-21 18:40:47 -08:00
Jordan Irwin
27916a4d57 Add "ring" to Raven's known chat options 2024-01-21 18:32:14 -08:00
Jordan Irwin
ea8f11fd77 Add Lua helper function to add chat options to NPC 2024-01-21 18:31:39 -08:00
Jordan Irwin
2f46a9def6 Disable highlight selecting quick menu buttons 2024-01-21 10:29:49 -08:00
Jordan Irwin
5f41e2b245 Android add option to clear WebView cache 2024-01-21 10:14:25 -08:00
Jordan Irwin
921fd069de
Add y parameter to ButtonBase.setPos 2024-01-20 14:31:59 -08:00
Jordan Irwin
f00c8b349a
Don't show on-screen joystick until client is ready 2024-01-20 14:19:47 -08:00
Jordan Irwin
df733d94ad
Create observer for display initialization & changes to viewport attributes 2024-01-20 14:16:26 -08:00
Jordan Irwin
7b34903747
Better contrasting quick menu buttons 2024-01-20 10:34:31 -08:00
Jordan Irwin
a563feba5a
Rename "system" emojis to "native" 2024-01-19 18:44:28 -08:00
Jordan Irwin
59311ac2c9
Always allow links from stendhalgame.org 2024-01-19 18:10:57 -08:00
Jordan Irwin
fc79d816f0
Don't cast from Context to Activity 2024-01-19 18:10:57 -08:00
Jordan Irwin
4e7c66da0c
Fix call to static method 2024-01-19 18:10:56 -08:00
Jordan Irwin
84374005dc
Add missing override annotations 2024-01-19 18:10:56 -08:00
Jordan Irwin
7bdf1eed8d
Clean up imports 2024-01-19 18:10:55 -08:00
Jordan Irwin
d2a131c1d2
Fix DebugLog.init parameter 2024-01-19 18:10:55 -08:00
Jordan Irwin
9b1ca60e97
Fix name of layout class 2024-01-19 18:10:54 -08:00
Jordan Irwin
7c670ad224
Android: Change app ID to org.stendhalgame.client 2024-01-19 18:10:53 -08:00
Jordan Irwin
719da37e5d
Fix order 2024-01-19 18:10:50 -08:00
Hendrik Brummermann
a8b80074c2 don't set a second timeout 2024-01-20 02:17:30 +01:00
Jordan Irwin
5e6ef26779
Add buffer to d-pad to prevent sending stop event if player changes direction immediately 2024-01-19 11:00:15 -08:00
Jordan Irwin
49a192befa Add FIXME note 2024-01-19 06:41:00 -08:00
Jordan Irwin
20c016dc40 Move joystick initialization 2024-01-19 06:37:31 -08:00
Jordan Irwin
4041802d1f Touch up quick menu button images 2024-01-19 06:23:54 -08:00
Jordan Irwin
3bc6fada79 Add settings button to quick menu 2024-01-19 05:48:53 -08:00
Jordan Irwin
e4d6f04b91 Android: Don't restrict landscape orientation 2024-01-19 05:11:00 -08:00
Jordan Irwin
f31be0f271 Support changing direction with dpad by dragging 2024-01-19 05:04:43 -08:00
Jordan Irwin
a33f8d7306 Make quick menu buttons non-draggable 2024-01-19 03:19:23 -08:00
Jordan Irwin
f6e2725d2a Cursor for quick menu buttons 2024-01-19 03:12:15 -08:00
Jordan Irwin
1fc063d620 New icon for menu button (CC0)
https://openclipart.org/detail/28703
2024-01-19 02:08:11 -08:00
Jordan Irwin
b05c2f786c Add quick menu button to open travel log 2024-01-19 02:08:11 -08:00
Jordan Irwin
e545ca0430 Make ButtonBase.onClick abstract method 2024-01-19 02:08:06 -08:00
Jordan Irwin
1b9cf48481 Rotate quick menu button instead of using second image 2024-01-17 21:05:50 -08:00
Jordan Irwin
3fed4e66a2 Redraw main quick menu button 2024-01-17 20:48:41 -08:00
Jordan Irwin
50f777e789 Add FIXME note 2024-01-17 20:20:13 -08:00
Jordan Irwin
a9f187de4f Move application menu button to quick menu 2024-01-17 20:19:42 -08:00
Jordan Irwin
bbecad9e9e Fix reading joystick position 2024-01-17 19:15:12 -08:00
Jordan Irwin
cdd652e729 Move sound toggling function to quick menu button 2024-01-17 19:09:20 -08:00
Jordan Irwin
93f1593815 Enable quick menu 2024-01-17 18:19:38 -08:00
Jordan Irwin
d3f0cda9d1 Create quick menu button for toggling on-screen joystick 2024-01-17 18:19:07 -08:00
Jordan Irwin
fa2c54ae13 Rework direction pad implementation 2024-01-17 18:17:37 -08:00
Jordan Irwin
8cfd879e96 Split joystick config into two settings for enabled & style 2024-01-17 18:16:20 -08:00
Jordan Irwin
6e7a2a5f66 New image for sound quick menu button 2024-01-17 18:07:45 -08:00
Jordan Irwin
2ffff28175 Support cleaning up deprecated config values 2024-01-17 18:01:27 -08:00
Jordan Irwin
28236dedd1 Make ConfigManager properties readonly 2024-01-17 16:06:41 -08:00
Jordan Irwin
edd0adffdc Use Direction class in joystick implementations 2024-01-17 14:02:21 -08:00
Jordan Irwin
fbe10a0179 Quick menu (WIP) 2024-01-17 09:36:38 -08:00
Jordan Irwin
3b2ef85ba9 Use default font size for character name in stats panel 2024-01-17 05:31:09 -08:00
Jordan Irwin
bedc123746 Normalize spelling of "recognise" to American English
https://github.com/arianne/stendhal/issues/637
2024-01-17 02:29:44 -08:00
Jordan Irwin
39b604c8ec Normalize spelling of "organise" to American English
https://github.com/arianne/stendhal/issues/637
2024-01-17 02:20:10 -08:00
Jordan Irwin
5c0ee892a7 Normalize spelling of "fulfil" to American English
https://github.com/arianne/stendhal/issues/637
2024-01-17 02:11:26 -08:00
Jordan Irwin
db0a6d7f17 Normalize spelling of "colour" to American English
https://github.com/arianne/stendhal/issues/637
2024-01-17 02:01:00 -08:00
Jordan Irwin
07858d12ba Normalize spelling of "defence" to American English
https://github.com/arianne/stendhal/issues/637
2024-01-17 01:31:26 -08:00
Jordan Irwin
d2edc4720a Normalize spelling of "favour" to American English
https://github.com/arianne/stendhal/issues/637
2024-01-17 01:08:01 -08:00
Jordan Irwin
bd4c169b9c Normalize spelling of "favourite" to American English
https://github.com/arianne/stendhal/issues/637
2024-01-17 00:41:08 -08:00
Jordan Irwin
f22d396edc Make Hogart respond to singular "catacomb"
https://github.com/arianne/stendhal/issues/640
2024-01-16 22:40:32 -08:00
Jordan Irwin
ce47346eb2 Make Agnus respond to singular "child"
https://github.com/arianne/stendhal/issues/640
2024-01-16 22:37:23 -08:00
Jordan Irwin
995730bf8a Make Lupos respond to singular "secret"
https://github.com/arianne/stendhal/issues/640
2024-01-16 22:35:34 -08:00
Jordan Irwin
136bea254e Add "flower" to Tywysoga's known chat options
https://github.com/arianne/stendhal/issues/640
2024-01-16 22:34:24 -08:00
Jordan Irwin
32ee910854 Add "pay" to Mr Taxman's known chat options
https://github.com/arianne/stendhal/issues/640
2024-01-16 22:31:56 -08:00
Jordan Irwin
8dcf0084e7 Add "show" to Harolds known chat options
https://github.com/arianne/stendhal/issues/640
2024-01-16 22:30:46 -08:00
Jordan Irwin
780cc1bac0 Add "patronage" to known chat options for NPCs associated with Community Supporter achievement 2024-01-16 21:53:32 -08:00
Jordan Irwin
683d8d1860 Add "stake" to Ramon's known chat options 2024-01-16 21:52:27 -08:00
Jordan Irwin
060f55e011 Change Orchiwald to stop instead of reverse path on collision 2024-01-16 21:05:18 -08:00
Jordan Irwin
229595f57a New sound to play when ferry arrives at mainland & island
Author: Inchadney
License: CC BY 4.0
Source: https://freesound.org/s/157284/
2024-01-16 20:59:14 -08:00
Jordan Irwin
2ca973f8dd Add commerce sound when paying house taxes 2024-01-16 20:38:23 -08:00
Jordan Irwin
ed92e8ddc2 Clean up indentation 2024-01-16 20:35:29 -08:00
Jordan Irwin
725d13e88c Add commerce sound to ferry conveyers when paying to board 2024-01-16 20:29:42 -08:00
Jordan Irwin
ccf2e782ea Play commerce sound when redeeming IOU from McPegleg 2024-01-16 19:43:12 -08:00
Jordan Irwin
35b9d361b5 Add commerce sound to Pdiddi when purchasing rainbow beans 2024-01-16 19:32:40 -08:00
Jordan Irwin
81e31e0f0c Clean up indentation 2024-01-16 18:47:52 -08:00
Jordan Irwin
61199a5411 Optional indicator for corpses containing items 2024-01-15 19:17:22 -08:00
Jordan Irwin
515141bf1c Android: Add setting to lock orientation 2024-01-15 13:29:33 -08:00
Jordan Irwin
cff67dd675 Android: Show debugging logs directory in about dialog 2024-01-15 11:05:21 -08:00
Jordan Irwin
d79b40491b Fix chest open/close behavior 2024-01-15 03:37:21 -08:00
Jordan Irwin
461d0da3d2 Don't attempt to open chest inventory window if player not in range 2024-01-15 03:06:41 -08:00
Jordan Irwin
b6ffbfe149 Don't attempt to open corpse inventory window if player not in range
Closes: https://github.com/arianne/stendhal/issues/632
2024-01-15 02:22:22 -08:00
Jordan Irwin
88040cfb61 Fix block scope 2024-01-14 20:42:52 -08:00
Jordan Irwin
dd0d9f1747 Handle quest slot key=value pairs when renaming items/creatures 2024-01-14 20:32:14 -08:00
Hendrik Brummermann
19a4cdc30a added a paragraph about not using personal data commercially 2024-01-14 09:51:21 +01:00
Jordan Irwin
cdd199d69f Copy iron_bar.png for 1.45 compatibility 2024-01-13 16:51:25 -08:00
Jordan Irwin
ce48ca560e Rename item "iron" to "iron bar"
https://stendhalgame.org/chat/2024-01-13.html#log
2024-01-13 16:48:45 -08:00
Jordan Irwin
fe900f0c16 Update dress 62 for current character bases
Closes: https://github.com/arianne/stendhal/issues/633
2024-01-11 23:03:41 -08:00
Jordan Irwin
e72bbb773e Fix dresses 28 & 50 to show hands
https://github.com/arianne/stendhal/issues/633
2024-01-11 22:38:55 -08:00
Hendrik Brummermann
b51f58c334 handle situations in which nativehelper is not working 2024-01-09 19:50:28 +01:00
Jordan Irwin
1f73394ac8 Android: Set apk output to build root in Gradle config instead of copying with Ant 2024-01-08 02:13:36 -08:00
Jordan Irwin
381ff5130e Android: Exclude "-release" suffix from apk package name 2024-01-08 01:41:34 -08:00
Jordan Irwin
540b49a663 Android: Clean up about dialog 2024-01-08 00:58:59 -08:00
Jordan Irwin
f5ed9e30ce Update Android TODO 2024-01-07 22:59:36 -08:00
Jordan Irwin
4b69a9d861 Re-draw soft blue ground tileset 2024-01-07 18:48:18 -08:00
Hendrik Brummermann
46a333fe36 don't increment movementOffset in isMoveComplete() to prevent double inc 2024-01-07 13:09:22 +01:00
Jordan Irwin
0b811c70fd don't add duplicates of last remembered string in chat history 2024-01-07 02:05:52 -08:00
Jordan Irwin
a1638dde48 Close chat options dialog if NPC is no longer attending 2024-01-07 01:31:02 -08:00
Jordan Irwin
70649752a1 Update open chat options dialog on ChatOptionsEvent 2024-01-07 00:46:58 -08:00
Jordan Irwin
57c59e277e Don't automatically close chat options dialog 2024-01-07 00:27:14 -08:00
Jordan Irwin
4f1ce41332 Disable native emoji fonts
Closes: https://github.com/arianne/stendhal/issues/630
2024-01-07 00:24:35 -08:00
Jordan Irwin
880d1c4dd5 Move Android build instructions to apps ant module 2024-01-06 23:35:34 -08:00
Jordan Irwin
5bfc8a762a Move Android WebView source to app directory
https://github.com/arianne/stendhal/issues/628
2024-01-06 23:17:52 -08:00
Hendrik Brummermann
1785d63cc7 zoom improvements for mobile phones 2024-01-07 01:17:13 +01:00
Hendrik Brummermann
4bce49a8ce expand hidden def factors into item stats 2024-01-06 12:45:04 +01:00
Hendrik Brummermann
29c875b79c set font size to 16px 2024-01-05 22:46:34 +01:00
Hendrik Brummermann
d53a2b4598 improved callback handling 2024-01-04 23:19:24 +01:00
Jordan Irwin
732ec163e2 Experimental system emoji support 2024-01-01 21:36:46 -08:00
Jordan Irwin
fbc22d998b Add settings option to debug command 2024-01-01 20:46:12 -08:00
Jordan Irwin
18670eecd9 Run 'ant init' to update copyright year in MkDocs config 2024-01-01 15:20:54 -08:00
Jordan Irwin
0e5530fe21 Use 'ant init' target to update copyright year in README 2024-01-01 15:20:10 -08:00
Hendrik Brummermann
ddadba10bc updated year 2024-01-01 17:35:30 +01:00
Jordan Irwin
495e32bba0 Android: Remove prerelease build type 2023-12-31 19:57:01 -08:00
Jordan Irwin
e99bfcca9b Remove reference to android/deps directory 2023-12-31 19:14:31 -08:00
Hendrik Brummermann
f38e685f43 removed marauroa from the android build 2023-12-31 11:34:52 +01:00
Hendrik Brummermann
9c794cf5a6 fixed usage of application icon 2023-12-30 22:33:25 +01:00
Hendrik Brummermann
ac718784b8 optimized builds 2023-12-30 15:18:12 +01:00
Hendrik Brummermann
ff05f96d07 generate LICENSE.txt based on dependencies 2023-12-30 15:18:04 +01:00
Hendrik Brummermann
e1cab48576 use POST 2023-12-30 13:18:21 +01:00
Hendrik Brummermann
e12f3b2a54 code cleanup 2023-12-30 12:20:15 +01:00
Hendrik Brummermann
f915d6a191 cleaned up neutralinojs build 2023-12-29 22:31:51 +01:00
Hendrik Brummermann
ef6e8f4830 optimized builds of nativehelper 2023-12-29 22:30:29 +01:00
Hendrik Brummermann
631f6f5a14 refactored code to avoid depending on Marauroa 2023-12-29 00:38:01 +01:00
Cosmin Humeniuc
c30495455b
fix: robustness and portability of runserver.sh
- use a Bash shebang instead of the one for sh,
  as the script is Bash, not POSIX sh
- fix shellcheck warnings and errors:
  - SC2046 (warning): Quote to prevent word splitting.
  - SC2164 (warning): Use 'cd ... || exit' in case cd fails.
  - SC2068 (error): Double quote array expansions to avoid
    re-splitting elements.
2023-12-28 20:32:12 +02:00
Hendrik Brummermann
800f76b881 build neutralinojs client using ant 2023-12-28 08:08:55 +01:00
Hendrik Brummermann
dcddf34a6d build nativehelper using ant 2023-12-28 07:44:17 +01:00
Hendrik Brummermann
6d11bc137a code cleanup 2023-12-28 00:17:07 +01:00
Hendrik Brummermann
59965a5862 renamed extension to nativehelper 2023-12-28 00:14:41 +01:00
Hendrik Brummermann
a852143f5f handle native authentication failure 2023-12-28 00:14:41 +01:00
Hendrik Brummermann
35326426f9 implemented steam authentication 2023-12-28 00:14:41 +01:00
Hendrik Brummermann
71a47e1b99 configure neutralino 2023-12-28 00:14:41 +01:00
Hendrik Brummermann
957943e66c clean up tutorial 2023-12-28 00:14:41 +01:00
Hendrik Brummermann
82ae0bb8d0 updated Neutralino to version 4.15.0 2023-12-28 00:14:41 +01:00
Hendrik Brummermann
c349a5514f gitignore binaries 2023-12-28 00:14:41 +01:00
Hendrik Brummermann
c9b0e3f9fc initial checkin 2023-12-28 00:14:41 +01:00
Hendrik Brummermann
d5ff9a2ad6 updated all dependencies of nativehelper 2023-12-28 00:00:52 +01:00
Hendrik Brummermann
55c18d7f69
Merge pull request #623 from arianne/dependabot/cargo/app/nativehelper/rustix-0.36.17
Bump rustix from 0.36.11 to 0.36.17 in /app/nativehelper
2023-12-27 23:34:13 +01:00
Hendrik Brummermann
11f084ab26
Merge pull request #622 from arianne/dependabot/cargo/app/nativehelper/openssl-0.10.62
Bump openssl from 0.10.48 to 0.10.62 in /app/nativehelper
2023-12-27 23:33:43 +01:00
dependabot[bot]
afb8eb9a6c
Bump openssl from 0.10.48 to 0.10.62 in /app/nativehelper
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.48 to 0.10.62.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.48...openssl-v0.10.62)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-27 22:32:54 +00:00
Hendrik Brummermann
ea112df39d
Merge pull request #621 from arianne/dependabot/cargo/app/nativehelper/websocket-0.26.5
Bump websocket from 0.24.0 to 0.26.5 in /app/nativehelper
2023-12-27 23:32:18 +01:00
dependabot[bot]
1c6c0ef3dd
Bump rustix from 0.36.11 to 0.36.17 in /app/nativehelper
Some checks failed
Java CI / build (push) Has been cancelled
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.36.11 to 0.36.17.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.36.11...v0.36.17)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-27 22:10:48 +00:00
dependabot[bot]
d35fc13319
Bump websocket from 0.24.0 to 0.26.5 in /app/nativehelper
Some checks failed
Java CI / build (push) Has been cancelled
Bumps [websocket](https://github.com/websockets-rs/rust-websocket) from 0.24.0 to 0.26.5.
- [Release notes](https://github.com/websockets-rs/rust-websocket/releases)
- [Commits](https://github.com/websockets-rs/rust-websocket/compare/v0.24.0...v0.26.5)

---
updated-dependencies:
- dependency-name: websocket
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-27 22:10:31 +00:00
Hendrik Brummermann
11dc67501d renamed to nativehelper 2023-12-27 23:07:23 +01:00
Hendrik Brummermann
64c62dd5d3 handle steam unavailable 2023-12-27 23:07:23 +01:00
Hendrik Brummermann
6e2aa3ef6d wait until authentication is requested 2023-12-27 23:07:23 +01:00
Hendrik Brummermann
e20eb62396 removed delay 2023-12-27 23:07:23 +01:00
Hendrik Brummermann
e4251b4f93 communication with browser process 2023-12-27 23:07:23 +01:00
Hendrik Brummermann
50f9e81e20 parse command line arguments 2023-12-27 23:07:23 +01:00
Hendrik Brummermann
223e4107d4 simple example to dump an auth ticket to stdout 2023-12-27 23:07:23 +01:00
Hendrik Brummermann
8da9e033b1 initial project 2023-12-27 23:07:23 +01:00
Jordan Irwin
db46339f24
Android: Add Gradle task to download & build Marauroa from source 2023-12-26 03:21:56 -08:00
Jordan Irwin
3000c0806b
Android: Link to marauroa.jar from android/deps/ if available 2023-12-26 01:40:52 -08:00
Jordan Irwin
e6956afc29
Kill Gradle daemon process after Android build 2023-12-26 00:38:43 -08:00
Jordan Irwin
5a299e6011
Android: Use keystore.properties file if available for signing apk 2023-12-26 00:16:18 -08:00
Jordan Irwin
c814d02378
Android: Remove experimental touch overriding 2023-12-25 17:17:47 -08:00
Jordan Irwin
0594a4dec4
Reduce allocated memory for gradle process 2023-12-25 17:17:11 -08:00
Jordan Irwin
2d5183ae41
Android: Remove warning upon connecting to stendhalgame.org
Web client now shows warning when connecting to main server with test client.
2023-12-25 16:51:02 -08:00
Jordan Irwin
88730f1eac
Increment version 2023-12-25 16:49:35 -08:00
Hendrik Brummermann
3eea0f3380 fixed Plinks text on question completion 2023-12-25 00:29:19 +01:00
Hendrik Brummermann
7b3067b1e7 fixed naming convention 2023-12-25 00:23:54 +01:00
Hendrik Brummermann
5de15bfe07 avoid creation of "{{...}}"-subclass for initialisation 2023-12-25 00:17:03 +01:00
Hendrik Brummermann
2e83de7745 code cleanup 2023-12-25 00:07:39 +01:00
Jordan Irwin
b66d968718
Add "challenge" to known chat options 2023-12-22 23:54:17 -08:00
Jordan Irwin
3a4b6545b6
Make Alrak understand both singular & plural forms of "kobolds" & "supplies" 2023-12-22 23:52:12 -08:00
Jordan Irwin
a412a98bd2
Lighten sickle sprite 2023-12-22 23:31:38 -08:00
Jordan Irwin
fa5b5fa1fc
Fix typo 2023-12-22 23:23:48 -08:00
Jordan Irwin
6cd58d0723
Android: Remove on-screen joystick/d-pad support
Now built into web client.
2023-12-22 00:20:42 -08:00
Jordan Irwin
68a0d718fc
Highlight travel log tabs when selected 2023-12-21 23:54:21 -08:00
Jordan Irwin
cacaa03a8e
Send chat options event whenever NPC becomes idle 2023-12-21 21:02:08 -08:00
Jordan Irwin
8a6fa93b8e
Register producer activities with chat options 2023-12-21 20:46:15 -08:00
Jordan Irwin
fff4f0e967
Slightly improved wave emoji 2023-12-21 19:46:51 -08:00
Jordan Irwin
757556fb24
Thumbs up/down & wave emojis 2023-12-21 19:35:28 -08:00
Jordan Irwin
48600ea20e
Remember executed chat options in chat history 2023-12-21 18:47:38 -08:00
Jordan Irwin
5bd46ff2bf
Add chat options ending with ellipis to chat input instead of sending event 2023-12-21 18:43:12 -08:00
Jordan Irwin
a2d12434a6
Add ChatInputComponent to singletons 2023-12-21 18:42:18 -08:00
Jordan Irwin
8dbb7717d2
Add "heal" to ChatOptionsEvent.SORT_INDEX 2023-12-21 18:25:22 -08:00
Jordan Irwin
64b4897e17
Add "complete" to known chat options 2023-12-21 18:24:48 -08:00
Jordan Irwin
ed414e879d
Prevent dialog window title bar placement outside browser page
https://github.com/arianne/stendhal/issues/602
2023-12-21 15:34:31 -08:00
Jordan Irwin
29435f46d7
Disable browser double-tap zoom
Interferes with dpad & double-tap items.
2023-12-21 15:12:55 -08:00
Jordan Irwin
21c529a8fd
Make Monogenes respond to both "building" & "buildings" 2023-12-21 15:00:44 -08:00
Jordan Irwin
b06c812138
Disable click indicator option in settings dialog 2023-12-17 22:22:50 -08:00
4452 changed files with 133759 additions and 116041 deletions

View file

@ -25,5 +25,5 @@
<classpathentry kind="lib" path="libs/jakarta.annotation-api-2.1.1.jar"/>
<classpathentry exported="true" kind="lib" path="libs/tomcat-embed-core-10.1.13.jar"/>
<classpathentry kind="lib" path="libs/tomcat-embed-websocket-10.1.13.jar"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>

62
.github/workflows/android-build.yml vendored Normal file
View file

@ -0,0 +1,62 @@
name: Android Build Test
on:
push:
paths:
- 'app/android/**'
pull_request:
paths:
- 'app/android/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- id: job_info
uses: daleyjem/gh-job-id@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
job_name: 'build'
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set Up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Validate Gradle Wrapper .jar
run: |
cd app/android/gradle/wrapper
curl --location --output gradle-wrapper.jar.sha256 \
https://services.gradle.org/distributions/gradle-7.5.1-wrapper.jar.sha256
echo " gradle-wrapper.jar" >> gradle-wrapper.jar.sha256
sha256sum --check gradle-wrapper.jar.sha256
- name: Build APKs with Ant
uses: cedx/setup-ant@v6
with:
version: '1.10'
- run: ant -noinput -buildfile build.xml android -Dgradle.params="assembleDebug assembleRelease"
- name: Failure Report
uses: sarisia/actions-status-discord@v1
if: failure()
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_DEVELOPMENT }}
with:
title: 'Android Build Failed'
description: '${{ steps.job_info.outputs.html_url }}'
nodetail: true
- uses: sarisia/actions-status-discord@v1
if: failure()
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_DEVLOG }}
with:
title: 'Android Build Failed'
description: '${{ steps.job_info.outputs.html_url }}'
nodetail: true

View file

@ -29,15 +29,15 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
#- name: Autobuild
# uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@ -46,9 +46,7 @@ jobs:
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- run: ant -noinput -f build.xml clean compile
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3

View file

@ -39,7 +39,7 @@ jobs:
- name: Build APKs
run: >
ant -noinput -buildfile build.xml dist_android_client
-Dgradle.params="--no-daemon -Pandroid.ver=${{ steps.ver.outputs.value }} assembleDebug assemblePrerelease"
-Dgradle.params="-Pandroid.ver=${{ steps.ver.outputs.value }} assembleDebug assembleRelease"
- name: Publish
uses: softprops/action-gh-release@v1

3
.gitignore vendored
View file

@ -40,7 +40,6 @@ javadocs
statserver_stats.xml
/*.ks
build_client_data
/bin
.byecycle
build_server_xmlconf
*.umlproject
@ -49,3 +48,5 @@ build_server_xmlconf
/map.map
/hs_err_*.log
/node_modules/
/log/
/build-archive/

View file

@ -20,4 +20,15 @@
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
<filteredResources>
<filter>
<id>1771748271774</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>

View file

@ -20,19 +20,38 @@ So what are you waiting for?! A whole new world awaits...
## How to play
[![Play now](https://arianne-project.org/images/playbutton.png)](https://stendhalgame.org/account/mycharacters.html) &nbsp; &nbsp; &nbsp; &nbsp;
### Web Browser
[![Play now](https://arianne-project.org/images/playbutton.png)](https://stendhalgame.org/account/mycharacters.html)
Play in any web browser for desktop or mobile with JavaScript support. Click on the "play now"
button to create or log in to your account.
### Mobile
Play using the [progressive web app](https://en.wikipedia.org/wiki/Progressive_web_app). Just visit
[stendhalgame.org](https://stendhalgame.org/) in your mobile browser and click "install" when prompted.
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" height="75">](https://f-droid.org/packages/org.stendhalgame.client/)
Play on your Android device using the dedicated app. You can get it from the
[F-Droid App Store](https://f-droid.org/) or download it from [stendhalgame.org](https://stendhalgame.org/download.html).
### Classic Desktop
[![Download](https://stendhalgame.org/images/downloadbutton.png)](https://arianne-project.org/download/stendhal.zip)
You need Java which you can download from [https://www.java.com](https://www.java.com/en/download) on Microsoft Windows. Java is included in most Linux distributions. Both Oracle Java and OpenJDK are supported.
Play using the classic desktop client. You will need Java which you can download from
[java.com](https://www.java.com/en/download) on Microsoft Windows. Java is included in
most Linux distributions. Both Oracle Java and OpenJDK are supported.
Please download Stendhal from [https://stendhalgame.org](https://stendhalgame.org)<br>
You can double click on stendhal-starter.jar and the client will run.<br>
If you prefer to run from command line, then just execute this command
in the stendhal folder:
Please download Stendhal from [stendhalgame.org](https://stendhalgame.org/download.html).<br>
You can double click on `stendhal-starter.jar` and the client will run.<br>
If you prefer to run from command line, then just execute this command in the stendhal folder:
`java -jar stendhal-starter.jar`
There is a [manual](https://stendhalgame.org/wiki/Stendhal_Manual), and there is Help from the client menu icons in the upper right hand side of the game screen.
There is a [manual](https://stendhalgame.org/wiki/Stendhal_Manual), and there is Help from the client menu icons in the upper right hand side of the game screen.
## Development environment
@ -44,13 +63,18 @@ There is a [manual](https://stendhalgame.org/wiki/Stendhal_Manual), and there i
## Legal
The server and java client are free software; you can redistribute it and/or modify it under the terms of the **GNU General Public License** 2 or later as published by the Free Software Foundation.
The web client is free software; you can redistribute it and/or modify it under the terms of the **GNU Affero General Public License** 3 or later as published by the Free Software Foundation.
Stendhal is free software. You can redistribute it and/or modify under the following terms:
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [LICENSE.txt](LICENSE.txt) file for more details.
- The **server**, **java client**, and **Android client**: *GNU General Public License* 2 or later as published by the Free Software Foundation
- The **web client** and **native client**: *GNU Affero General Public License* 3 or later as published by the Free Software Foundation with the definition of "System libraries" being extended to include authentication providers and software distribution platforms.
- The **nativehelper** extensions: *GNU Lesser General Public License* 3 or later as published by the Free Software Foundation
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[LICENSE.txt](LICENSE.txt) and [src/js/LICENSE.html](src/js/LICENSE.html) file for more details.
Stendhal(c) is copyright of Miguel Angel Blanch Lardin, 2005-2008, arianne_rpg at users dot sourceforge dot net and others<br>
Stendhal(c) is copyright of the Arianne Project, 2006-2023, arianne-general at lists dot sourceforge dot net
Stendhal(c) is copyright of the Arianne Project, 2006-2026, arianne-general at lists dot sourceforge dot net
Please have a look at the list of [contributors](https://github.com/arianne/stendhal/blob/master/doc/contributors.md#contributors).
Please have a look at the list of [contributors](doc/contributors.md#contributors).

View file

@ -1,13 +0,0 @@
TODO:
- show input preview when typing
- scale page to fit inside view
- create activity for about information
- add credits to about information
- switch to Log4j for logging (maybe)
- use center of d-pad for setting position
- d-pads need to be different sizes for different resolutions
- either use unique PNGs or convert to scalable SVGs
BUILD TODO:
- script to download Android SDK

View file

@ -1,79 +0,0 @@
plugins {
id 'com.android.application'
}
android {
compileSdk 32
def buildDate = new Date().format("yyyyMMdd")
def appVer
if (project.hasProperty("android.ver") && project["android.ver"]) {
appVer = project["android.ver"]
} else {
appVer = "${buildDate}"
}
if (project.hasProperty("android.rev") && project["android.rev"]) {
appVer += "-" + project["android.rev"]
}
def outputName = "stendhal-webview-${appVer}"
defaultConfig {
applicationId "org.arianne.stendhal.client"
minSdk 21
targetSdk 32
versionCode 1
versionName "${appVer}"
setProperty("archivesBaseName", "${outputName}")
setProperty("buildDir", "${projectDir}/../../build/build_android_client")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
targetSdkVersion 32
minSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
prerelease {
versionNameSuffix "-pre"
signingConfig signingConfigs.debug
}
debug {
applicationIdSuffix ".debug"
versionNameSuffix "-debug"
}
}
buildTypes.all { type ->
if (!type.name.equals("debug")) {
sourceSets[type.name].java { srcDirs "src/shared/java/" }
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
compileSdkVersion 32
buildToolsVersion '32.0.0'
lintOptions {
abortOnError false
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.4.0'
//testImplementation 'junit:junit:4.+'
//androidTestImplementation 'androidx.test.ext:junit:1.1.2'
//androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation files('../../libs/marauroa.jar')
}

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.arianne.stendhal.client">
<application android:usesCleartextTraffic="true">
</application>
</manifest>

View file

@ -1,157 +0,0 @@
/***************************************************************************
* Copyright © 2022 - Arianne *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package org.arianne.stendhal.client;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.util.Log;
import androidx.appcompat.app.AppCompatActivity;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* A class to output debugging information to logcat file.
*/
public class DebugLog {
private static File logsDir;
private static AppCompatActivity mainActivity;
public static enum DebugLevel {
INFO("INFO"),
WARN("WARN"),
ERROR("ERROR"),
DEBUG("DEBUG");
private final String label;
private DebugLevel(final String label) {
this.label = label;
}
public String getLabel() {
return label;
}
}
private static DebugLog instance;
public static DebugLog get() {
if (instance == null) {
instance = new DebugLog();
}
return instance;
}
public static void init(final File dir, final AppCompatActivity activity) {
logsDir = new File(dir.getPath() + "/logs");
mainActivity = activity;
writeLine("\n // -- debugging initialized -- //", null);
writeLine("logs directory: " + logsDir.getPath());
}
public static void writeLine(final String text) {
writeLine(text, DebugLevel.DEBUG);
}
public static void writeLine(String text, final DebugLevel level) {
if (logsDir == null) {
System.err.println("ERROR: DebugLog not initialized. Call DebugLog.init.");
return;
}
if (!logsDir.exists()) {
logsDir.mkdirs();
}
if (level != null) {
text = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date())
+ ": " + level.label + ": " + text;
}
text = text + "\n";
final String logFile = logsDir.getPath() + "/debug-"
+ new SimpleDateFormat("yyyy.MM.dd").format(new Date()) + ".txt";
BufferedWriter buffer;
try {
buffer = new BufferedWriter(new FileWriter(logFile, true));
buffer.write(text);
if (buffer != null) {
buffer.close();
}
} catch (final IOException e) {
System.err.println("ERROR: " + e.getMessage());
}
}
public static void info(final String text) {
Log.i("DebugLog", text);
writeLine(text, DebugLevel.INFO);
}
public static void warn(final String text) {
Log.w("DebugLog", text);
writeLine(text, DebugLevel.WARN);
}
public static void error(final String text) {
Log.e("DebugLog", text);
writeLine(text, DebugLevel.ERROR);
}
public static void debug(final String text) {
Log.d("DebugLog", text);
writeLine(text, DebugLevel.DEBUG);
}
public static void notify(final String message) {
notify(message, DebugLevel.DEBUG);
}
public static void notify(final String message, DebugLevel level) {
if (mainActivity == null) {
System.err.println("ERROR: DebugLog not initialized. Call DebugLog.init.");
return;
}
if (level == null) {
level = DebugLevel.DEBUG;
}
final AlertDialog.Builder builder = new AlertDialog.Builder(mainActivity);
builder.setTitle(level.label);
builder.setMessage(message);
builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
public void onClick(final DialogInterface dialog, final int id) {
dialog.cancel();
}
});
builder.create().show();
}
public static String getLogsDir() {
return logsDir.getPath();
}
}

View file

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.arianne.stendhal.client">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Stendhal.FullScreen">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:exported="true"
android:configChanges="orientation|screenSize|keyboardHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".PreferencesActivity"
android:label="Preferences"
android:exported="true"
android:configChanges="orientation|screenSize|keyboardHidden">
<intent-filter>
<action android:name="preferences" />
</intent-filter>
</activity>
</application>
</manifest>

View file

@ -1,572 +0,0 @@
/***************************************************************************
* Copyright © 2022-2023 - Arianne *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package org.arianne.stendhal.client;
import android.app.AlertDialog;
import android.content.pm.ApplicationInfo;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.util.AttributeSet;
import android.view.inputmethod.BaseInputConnection;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.view.inputmethod.InputConnection;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.webkit.DownloadListener;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageView;
import marauroa.common.Pair;
import org.arianne.stendhal.client.input.DPad;
import org.arianne.stendhal.client.js.JSInterface;
import org.arianne.stendhal.client.sound.MusicPlayer;
public class ClientView extends WebView {
private static ClientView instance;
private ImageView splash;
private final String defaultServer = "https://stendhalgame.org/";
private String clientUrlSuffix = "client";
private boolean testClient = false;
private boolean testServer = false;
private Boolean debugging;
private static PageId currentPage;
// denotes previous touch was remapped to mouse event
private boolean touchOverridden = false;
/**
* Retrieves the static instance.
*/
public static ClientView get() {
return instance;
}
public ClientView(final Context ctx) {
super(ctx);
onInit();
}
public ClientView(final Context ctx, final AttributeSet attrs) {
super(ctx, attrs);
onInit();
}
public ClientView(final Context ctx, final AttributeSet attrs, final int style) {
super(ctx, attrs, style);
onInit();
}
public ClientView(final Context ctx, final AttributeSet attrs, final int style,
final boolean prvtBrowse) {
super(ctx, attrs, style, prvtBrowse);
onInit();
}
private void onInit() {
instance = this;
setBackgroundColor(android.graphics.Color.TRANSPARENT);
final WebSettings viewSettings = getSettings();
viewSettings.setJavaScriptEnabled(true);
viewSettings.setDomStorageEnabled(true);
// keep elements in position in portrait mode
viewSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN);// <-- SINGLE_COLUMN deprecated
viewSettings.setLoadWithOverviewMode(true);
viewSettings.setUseWideViewPort(true);
// disable zoom
viewSettings.setSupportZoom(false);
viewSettings.setBuiltInZoomControls(false);
viewSettings.setDisplayZoomControls(false);
// allow autoplay of music
viewSettings.setMediaPlaybackRequiresUserGesture(false);
if (debugEnabled()) {
// make WebView debuggable for debug builds
setWebContentsDebuggingEnabled(true);
}
initWebViewClient();
initTouchHandler();
initJSInterface();
initDownloadHandler();
}
private void initWebViewClient() {
// XXX: not sure setting WebChromClient is doing anything, was recommended to
// fix touchmove events not registering
setWebChromeClient(new WebChromeClient());
setWebViewClient(new WebViewClient() {
/* handle changing URLs */
@Override
public boolean shouldOverrideUrlLoading(final WebView view, final String url) {
if (!isInternalUrl(url)) {
// open external links in default browser/app
// FIXME: should we ask for confirmation?
MainActivity.get().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
return true;
}
view.loadUrl(checkClientUrl(url));
return false;
}
@Override
public void onPageStarted(final WebView view, final String url, final Bitmap favicon) {
DebugLog.debug("loading URL: " + url);
MusicPlayer.stopMusic();
super.onPageStarted(view, url, favicon);
}
@Override
public void onPageFinished(final WebView view, final String url) {
super.onPageFinished(view, url);
if (isClientUrl(url)) {
currentPage = PageId.WEBCLIENT;
} else if (url.equals("") || url.equals("about:blank")) {
currentPage = PageId.TITLE;
if (PreferencesActivity.getBoolean("title_music", true)) {
playTitleMusic();
}
} else {
currentPage = PageId.OTHER;
}
Menu.get().updateButtons();
// only show d-pad on client screen
final DPad pad = DPad.getCurrentPad();
if (pad != null && PreferencesActivity.getBoolean("show_dpad", false)) {
if (isGameActive()) {
pad.show();
} else {
pad.hide();
}
}
DebugLog.debug("page id: " + currentPage);
}
});
}
private void initTouchHandler() {
setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(final View view, final MotionEvent event) {
if (touchOverridden) {
// reset touch event state
touchOverridden = false;
return false;
}
final MotionEvent.PointerProperties[] props = {new MotionEvent.PointerProperties()};
event.getPointerProperties(0, props[0]);
if (isGameActive() && PreferencesActivity.getBoolean("map_touches", false)
&& (props[0].toolType == MotionEvent.TOOL_TYPE_FINGER
|| props[0].toolType == MotionEvent.TOOL_TYPE_STYLUS)) {
Integer action = event.getAction();
/*
switch (action) {
case MotionEvent.ACTION_DOWN:
action = MotionEvent.ACTION_BUTTON_PRESS;
break;
case MotionEvent.ACTION_UP:
action = MotionEvent.ACTION_BUTTON_RELEASE;
break;
}
*/
DebugLog.debug("mapping touch to mouse event");
props[0].toolType = MotionEvent.TOOL_TYPE_MOUSE;
final MotionEvent.PointerCoords[] coords = {new MotionEvent.PointerCoords()};
event.getPointerCoords(0, coords[0]);
touchOverridden = true;
view.dispatchTouchEvent(MotionEvent.obtain(event.getDownTime(),
event.getEventTime(), event.getAction(), event.getPointerCount(), props,
coords, event.getMetaState(), MotionEvent.BUTTON_PRIMARY,
event.getXPrecision(), event.getYPrecision(), event.getDeviceId(),
event.getEdgeFlags(), event.getSource(), event.getFlags()));
return true; // consume old event
}
return false;
}
});
}
@Override
public InputConnection onCreateInputConnection(final EditorInfo outAttrs) {
// allows capturing soft keyboard events
return new BaseInputConnection(this, false);
}
@Override
public boolean dispatchKeyEvent(final KeyEvent event) {
final boolean ret = super.dispatchKeyEvent(event);
// hide keyboard when "enter" pressed
if (isGameActive() && event.getAction() == KeyEvent.ACTION_UP
&& event.getKeyCode() == KeyEvent.KEYCODE_ENTER) {
((InputMethodManager) MainActivity.get()
.getSystemService(Context.INPUT_METHOD_SERVICE))
.hideSoftInputFromWindow(this.getWindowToken(), 0);
}
return ret;
}
private void initJSInterface() {
addJavascriptInterface(JSInterface.get(), "jsi");
}
/**
* Handles downloading screenshot created by web client.
*/
private void initDownloadHandler() {
setDownloadListener(new DownloadListener() {
@Override
public void onDownloadStart(final String url, final String userAgent,
final String contentDisposition, final String mimetype,
final long contentLength) {
final Pair<Boolean, String> res = new DownloadHandler().download(url, mimetype);
if (res.first()) {
final String msg = "Downloaded file: " + res.second();
DebugLog.debug(msg);
Notifier.toast(msg);
} else {
final String msg = res.second();
DebugLog.error(msg);
Notifier.toast("ERROR: " + msg);
}
}
});
}
public String getSelectedClient() {
if (ClientView.onTitleScreen()) {
return "none";
}
return testClient ? "test" : "main";
}
public String getSelectedServer() {
if (ClientView.onTitleScreen()) {
return "none";
}
return testServer ? "test" : "main";
}
private void reset() {
testClient = false;
testServer = false;
clientUrlSuffix = "client";
}
/**
* Shows initial title screen.
*/
public void loadTitleScreen() {
reset();
setSplashResource(R.drawable.splash);
loadUrl("about:blank");
Menu.get().show();
}
/**
* Attempts to connect to client host.
*/
public void loadLogin() {
if (debugEnabled() && PreferencesActivity.getString("client_url").trim().equals("")) {
// debug builds support choosing between main & test client/server
selectClient();
} else {
onSelectServer();
}
}
/**
* Sets the background image.
*
* @param resId
* Resource ID.
*/
private void setSplashResource(final int resId) {
if (splash == null) {
splash = (ImageView) MainActivity.get().findViewById(R.id.splash);
splash.setBackgroundColor(android.graphics.Color.TRANSPARENT);
}
splash.setImageResource(resId);
}
/**
* Opens a message dialog for user to choose between main & test clients.
*/
private void selectClient() {
final AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.get());
builder.setMessage("Select client");
builder.setPositiveButton("Main", new DialogInterface.OnClickListener() {
public void onClick(final DialogInterface dialog, final int id) {
testClient = false;
clientUrlSuffix = "client";
// skip server confirmation as only test client has this option
onSelectServer();
dialog.cancel();
}
});
builder.setNegativeButton("Test", new DialogInterface.OnClickListener() {
public void onClick(final DialogInterface dialog, final int id) {
testClient = true;
clientUrlSuffix = "testclient";
selectServer();
dialog.cancel();
}
});
builder.create().show();
}
/**
* Opens a message dialog for user to choose between main & test servers.
*/
private void selectServer() {
final AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.get());
builder.setMessage("Select server");
builder.setPositiveButton("Main", new DialogInterface.OnClickListener() {
public void onClick(final DialogInterface dialog, final int id) {
testServer = false;
dialog.cancel();
onSelectServer();
}
});
builder.setNegativeButton("Test", new DialogInterface.OnClickListener() {
public void onClick(final DialogInterface dialog, final int id) {
testServer = true;
dialog.cancel();
onSelectServer();
}
});
builder.create().show();
}
private void onSelectServer() {
// remove splash image
setSplashResource(android.R.color.transparent);
final String custom_page = checkCustomServer();
if (custom_page != null) {
DebugLog.debug("Connecing to custom page: " + custom_page);
loadUrl(custom_page);
} else {
// initial page
loadUrl(defaultServer + "account/mycharacters.html");
if (testServer) {
DebugLog.debug("Connecting to test server");
} else {
DebugLog.debug("Connecting to main server");
Notifier.showMessage("CAUTION: This software is in early development and not recommended"
+ " for use on the main server. Proceed with caution.", false);
}
}
currentPage = PageId.OTHER;
// hide menu after exiting title screen
Menu.get().hide();
}
private String checkCustomServer() {
final String cs = PreferencesActivity.getString("client_url", "").trim();
if (cs.equals("")) {
return null;
}
return cs;
}
/**
* Checks if a URL is a link to one of the web clients.
*
* @param url
* URL to be checked.
* @return
* <code>true</code> if url links to "client" or "testclient".
*/
private boolean isClientUrl(final String url) {
final String custom_client = PreferencesActivity.getString("client_url").trim();
if (!custom_client.equals("")) {
return url.contains(custom_client);
}
return url.contains("stendhalgame.org/client/")
|| url.contains("stendhalgame.org/testclient/");
}
/**
* Formats client URL for currently selected server.
*
* @param url
* URL to be checked.
* @return
* URL to be loaded.
*/
private String checkClientUrl(String url) {
if (isClientUrl(url)) {
String replaceSuffix = "/testclient/";
if (testClient) {
replaceSuffix = "/client/";
}
// ensure website directs to configured client
url = url.replace(replaceSuffix, "/" + clientUrlSuffix + "/");
url = formatCharName(url);
if (testClient && !testServer) {
// connect test client to main server
url += "&server=main";
}
}
return url;
}
/**
* Extracts character name from URL fragment identifier & converts to query string.
*/
private String formatCharName(String url) {
final int idx = url.indexOf("#");
if (idx > -1) {
url = url.substring(0, idx) + "?char=" + url.substring(idx+1);
}
return url;
}
/**
* Checks if requested URL is whitelisted to be opened within WebView client.
*
* @param url
* URL to be checked.
* @return
* <code>true</code> if URL is under domain stendhalgame.org or localhost.
*/
private boolean isInternalUrl(final String url) {
final String domain = getDomain(url);
final String cs = checkCustomServer();
if (cs != null) {
return domain.startsWith(getDomain(cs));
} else {
return domain.startsWith("stendhalgame.org") || domain.startsWith("localhost");
}
}
private String getDomain(final String url) {
return url.replaceAll("^https://", "").replaceAll("^http://", "")
.replaceAll("^www\\.", "");
}
public static boolean onTitleScreen() {
return currentPage == PageId.TITLE;
}
public static boolean isGameActive() {
return currentPage == PageId.WEBCLIENT;
}
public static PageId getCurrentPageId() {
return currentPage;
}
public static void playTitleMusic(String musicId) {
if (musicId == null) {
musicId = PreferencesActivity.getString("song_list");
}
int id = R.raw.title_01;
switch (musicId) {
case "title_02":
id = R.raw.title_02;
break;
case "title_03":
id = R.raw.title_03;
break;
case "title_04":
id = R.raw.title_04;
break;
case "title_05":
id = R.raw.title_05;
break;
}
DebugLog.debug("playing music: " + musicId);
MusicPlayer.playMusic(id, true);
}
public static void playTitleMusic() {
playTitleMusic(null);
}
/**
* Checks if this is a debug build.
*
* @return
* <code>true</code> if debug flag set.
*/
public boolean debugEnabled() {
if (debugging != null) {
return debugging;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
debugging = (MainActivity.get().getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
} else {
debugging = false;
}
return debugging;
}
}

View file

@ -1,105 +0,0 @@
/***************************************************************************
* Copyright © 2022 - Arianne *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package org.arianne.stendhal.client;
import android.net.Uri;
import android.os.Environment;
import android.util.Base64;
import java.io.File;
import java.io.FileOutputStream;
import marauroa.common.Pair;
/**
* The main purpose of this class is to handle downloading screenshots
* created by the web client page.
*/
public class DownloadHandler {
public Pair<Boolean, String> download(final String url, final String mimetype) {
final Pair<Boolean, String> res = new Pair<Boolean, String>(false, null);
final Uri uri = Uri.parse(url);
final String scheme = uri.getScheme();
final String storageState = Environment.getExternalStorageState();
if (!ClientView.get().isGameActive()) {
res.setSecond("downloading from this page not supported");
} else if (!"data".equals(scheme)) {
res.setSecond("download type \"" + scheme + "\" not supported");
} else if (!"image/png".equals(mimetype) || !url.startsWith("data:image/png;base64,")) {
res.setSecond("mimetype not supported: " + mimetype);
} else if (!Environment.MEDIA_MOUNTED.equals(storageState)) {
res.setSecond("storage not available for writing (state: " + storageState + ")");
} else {
final File targetDir = new File(Environment.getExternalStorageDirectory()
+ "/Pictures/Screenshots");
// TODO: format output name using YYYYMMDD_HH.MM.SS.MS
final String targetName = "stendhal_" + System.currentTimeMillis() + ".png";
DebugLog.debug("Saving screenshot: " + targetDir.getPath()
+ "/" + targetName + " (" + mimetype + ")");
String msg;
String stacktrace = null;
try {
if (!targetDir.exists()) {
targetDir.mkdirs();
}
final byte[] data = Base64.decode(url.split("base64,")[1], Base64.DEFAULT);
final FileOutputStream fos = new FileOutputStream(new File(targetDir, targetName));
fos.write(data);
fos.close();
res.setFirst(true);
msg = "saved screenshot to " + targetDir.getPath() + "/" + targetName;
} catch (final java.lang.NoClassDefFoundError e) {
msg = "an error occurred while decoding data (see debug log for more info)";
stacktrace = stackTraceToString(e);
} catch (java.io.IOException e) {
msg = "an error occurred while attempting to write file (see debug log for more info)";
stacktrace = stackTraceToString(e);
}
res.setSecond(msg);
if (stacktrace != null) {
DebugLog.error(stacktrace.toString());
}
}
return res;
}
/**
* Converts an exception stacktrace to string.
*
* @param e
* The error with stacktrace information.
* @return
* String formatted stacktrace.
*/
private String stackTraceToString(final Throwable e) {
final StringBuilder sb = new StringBuilder();
sb.append(e.toString());
for (final StackTraceElement ste: e.getStackTrace()) {
if (sb.length() > 0) {
sb.append("\n");
}
sb.append(ste.toString());
}
return sb.toString();
}
}

View file

@ -1,161 +0,0 @@
/***************************************************************************
* Copyright © 2022-2023 - Arianne *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package org.arianne.stendhal.client;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import org.arianne.stendhal.client.input.DPad;
import org.arianne.stendhal.client.input.DPadArrows;
import org.arianne.stendhal.client.input.DPadJoy;
public class MainActivity extends AppCompatActivity {
private static MainActivity instance;
private ConstraintLayout layout;
private ClientView client;
private Menu menu;
public static MainActivity get() {
return instance;
}
@Override
protected void onCreate(final Bundle savedInstanceState) {
try {
super.onCreate(savedInstanceState);
instance = this;
// initialize debug logging mechanism
DebugLog.init(getExternalFilesDir(null), this);
setContentView(R.layout.activity_main);
layout = (ConstraintLayout) findViewById(R.id.content);
menu = new Menu(this);
client = (ClientView) findViewById(R.id.clientWebView);
// initialize d-pads
// TODO: remove on-screen joystick/dpad support after 1.45 release as it is now built
// into the web client
final DPad arrowPad = DPadArrows.get();
final DPad joyPad = DPadJoy.get();
if (PreferencesActivity.getBoolean("dpad_joy", true)) {
DPad.setCurrentPad(joyPad);
} else {
DPad.setCurrentPad(arrowPad);
}
layout.addView(arrowPad.getLayout());
layout.addView(joyPad.getLayout());
client.loadTitleScreen();
} catch (final Exception e) {
e.printStackTrace();
DebugLog.error(e.toString());
DebugLog.error("// -- //");
for (final StackTraceElement ste: e.getStackTrace()) {
DebugLog.error(ste.toString());
}
DebugLog.error("// -- //");
Notifier.showPrompt(
"An unhandled exception has occurred: " + e.getMessage()
+ "\n\nYou can report this error at: https://stendhalgame.org/development/bug.html",
new Notifier.Action() {
protected void onCall() {
finish();
}
});
}
}
@Override
public void onBackPressed() {
menu.toggleVisibility();
}
/**
* Attempts to connect to client host.
*/
public void loadLogin() {
client.loadLogin();
}
/**
* Opens a dialog confirm exiting activity.
*/
public void onRequestQuit() {
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("Quit Stendhal?");
builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
public void onClick(final DialogInterface dialog, final int id) {
finish();
android.os.Process.killProcess(android.os.Process.myPid());
}
});
builder.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void onClick(final DialogInterface dialog, final int id) {
dialog.cancel();
}
});
final AlertDialog confirmQuit = builder.create();
confirmQuit.show();
}
@Override
protected void onResume() {
super.onResume();
DPadArrows.get().onRefreshView();
DPadJoy.get().onRefreshView();
}
/**
* Updates direction pad position when screen orientation changes.
*/
@Override
public void onConfigurationChanged(final Configuration config) {
super.onConfigurationChanged(config);
DPadArrows.get().onRefreshView();
DPadJoy.get().onRefreshView();
}
@Override
public void finish() {
DebugLog.debug(MainActivity.class.getName() + ".finish() called");
super.finish();
}
@Override
protected void onDestroy() {
DebugLog.debug(MainActivity.class.getName() + ".onDestroy() called");
super.onDestroy();
}
public void showSettings() {
startActivity(new Intent(MainActivity.this, PreferencesActivity.class));
}
}

View file

@ -1,62 +0,0 @@
/***************************************************************************
* Copyright © 2022 - Arianne *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package org.arianne.stendhal.client.input;
import android.view.View;
import androidx.constraintlayout.widget.ConstraintLayout;
import marauroa.common.Pair;
public abstract class DPad {
public static enum Dir {
NONE,
LEFT,
RIGHT,
UP,
DOWN;
}
private static DPad currentPad = null;
public abstract ConstraintLayout getLayout();
public abstract void setVisibility(final int vis);
public abstract boolean isVisible();
public void show() {
setVisibility(View.VISIBLE);
}
public void hide() {
setVisibility(View.GONE);
}
public abstract void setPosition(final int x, final int y);
public abstract Pair<Integer, Integer> getPosition();
public abstract Pair<Integer, Integer> getSize();
public abstract void onRefreshView();
public static void setCurrentPad(final DPad pad) {
currentPad = pad;
}
public static DPad getCurrentPad() {
return currentPad;
}
}

View file

@ -1,253 +0,0 @@
/***************************************************************************
* Copyright © 2022 - Arianne *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package org.arianne.stendhal.client.input;
import android.content.Context;
import android.graphics.Point;
import android.view.Display;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ImageView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.ConstraintLayout.LayoutParams;
import java.util.LinkedList;
import java.util.List;
import marauroa.common.Pair;
import org.arianne.stendhal.client.DebugLog;
import org.arianne.stendhal.client.MainActivity;
import org.arianne.stendhal.client.PreferencesActivity;
import org.arianne.stendhal.client.R;
/**
* A directional pad on the screen.
*
* TODO: Option to use joystick style d-pad. Currently setting "dpad_joy"
* is disabled in preferences manager.
*/
public class DPadArrows extends DPad {
private static DPadArrows instance;
private static Context ctx;
private final List<ArrowView> arrows;
private final ConstraintLayout layout;
public static DPadArrows get() {
if (instance == null) {
instance = new DPadArrows();
}
return instance;
}
private DPadArrows() {
ctx = (Context) MainActivity.get();
arrows = new LinkedList<>();
layout = new ConstraintLayout(ctx);
layout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
final ArrowView arrow_l = new ArrowView(ctx, Dir.LEFT);
final ArrowView arrow_r = new ArrowView(ctx, Dir.RIGHT);
final ArrowView arrow_u = new ArrowView(ctx, Dir.UP);
final ArrowView arrow_d = new ArrowView(ctx, Dir.DOWN);
arrows.add(arrow_l);
arrows.add(arrow_r);
arrows.add(arrow_u);
arrows.add(arrow_d);
for (final ArrowView av: arrows) {
layout.addView(av);
}
// hidden by default
hide();
}
public ConstraintLayout getLayout() {
return layout;
}
public void setVisibility(final int vis) {
for (final ArrowView av: arrows) {
av.setVisibility(vis);
}
}
public boolean isVisible() {
for (final ArrowView av: arrows) {
if (av.getVisibility() != View.VISIBLE) {
return false;
}
}
return true;
}
public void setPosition(final int x, final int y) {
ArrowView av = arrows.get(0);
av.setX(x);
av.setY(y + 60);
av = arrows.get(1);
av.setX(x + 150);
av.setY(y + 60);
av = arrows.get(2);
av.setX(x + 60);
av.setY(y);
av = arrows.get(3);
av.setX(x + 60);
av.setY(y + 150);
}
private int getX() {
return (int) arrows.get(0).getX();
}
private int getY() {
return (int) arrows.get(2).getY();
}
public Pair<Integer, Integer> getPosition() {
return new Pair<Integer, Integer>(getX(), getY());
}
private int getWidth() {
final ArrowView aRight = arrows.get(1);
final int absX = ((int) aRight.getX()) + aRight.getWidth();
return absX - getX();
}
private int getHeight() {
final ArrowView aDown = arrows.get(3);
final int absY = ((int) aDown.getY()) + aDown.getHeight();
return absY - getY();
}
public Pair<Integer, Integer> getSize() {
return new Pair<Integer, Integer>(getWidth(), getHeight());
}
public void onRefreshView() {
final Point size = new Point();
final Display disp = MainActivity.get().getWindowManager().getDefaultDisplay();
disp.getSize(size);
final PreferencesActivity prefs = PreferencesActivity.get();
final int x = prefs.getInt("dpad_offset_x", 100);
final int y = size.y - prefs.getInt("dpad_offset_y", 300);
setPosition(x, y);
if (isVisible()) {
DebugLog.debug("DPadArrows: pos (" + getX() + "," + getY() + "), size ("
+ getWidth() + "," + getHeight() + ")");
DebugLog.debug("DPadArrows: left arrow: x (" + arrows.get(0).getX() + "), width ("
+ arrows.get(0).getWidth() + ")");
DebugLog.debug("DPadArrows: down arrow: y (" + arrows.get(3).getY() + "), height ("
+ arrows.get(3).getHeight() + ")");
}
}
private static class ArrowView extends ImageView {
private final Dir dir;
private final int id;
private final int id_active;
private boolean keyDown = false;
public ArrowView(final Context ctx, final Dir dir) {
super(ctx);
this.dir = dir;
switch (dir) {
case LEFT:
id = R.drawable.dpad_left;
id_active = R.drawable.dpad_left_active;
break;
case RIGHT:
id = R.drawable.dpad_right;
id_active = R.drawable.dpad_right_active;
break;
case UP:
id = R.drawable.dpad_up;
id_active = R.drawable.dpad_up_active;
break;
default:
id = R.drawable.dpad_down;
id_active = R.drawable.dpad_down_active;
break;
}
setBackgroundColor(android.graphics.Color.TRANSPARENT);
setImageResource(id);
setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(final View view, final MotionEvent event) {
final int action = event.getAction();
Integer newAction = null;
Integer keyCode = null;
if (action == MotionEvent.ACTION_DOWN && !keyDown) {
setImageResource(id_active);
newAction = KeyEvent.ACTION_DOWN;
keyDown = true;
} else if (action == MotionEvent.ACTION_UP && keyDown) {
setImageResource(id);
newAction = KeyEvent.ACTION_UP;
keyDown = false;
}
if (newAction != null) {
switch (dir) {
case LEFT:
keyCode = KeyEvent.KEYCODE_DPAD_LEFT;
break;
case RIGHT:
keyCode = KeyEvent.KEYCODE_DPAD_RIGHT;
break;
case UP:
keyCode = KeyEvent.KEYCODE_DPAD_UP;
break;
case DOWN:
keyCode = KeyEvent.KEYCODE_DPAD_DOWN;
break;
}
MainActivity.get().dispatchKeyEvent(new KeyEvent(newAction, keyCode));
return true; // consume event
}
return false;
}
});
}
}
}

View file

@ -1,332 +0,0 @@
/***************************************************************************
* Copyright © 2022 - Arianne *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package org.arianne.stendhal.client.input;
import android.content.Context;
import android.graphics.Point;
import android.view.Display;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.ConstraintLayout.LayoutParams;
import java.util.ArrayList;
import java.util.List;
import marauroa.common.Pair;
import org.arianne.stendhal.client.DebugLog;
import org.arianne.stendhal.client.MainActivity;
import org.arianne.stendhal.client.PreferencesActivity;
import org.arianne.stendhal.client.R;
public class DPadJoy extends DPad {
private static DPadJoy instance;
private static Context ctx;
private static ConstraintLayout layout;
private static OuterButton outerButton;
private static int sensitivity;
public static DPadJoy get() {
if (instance == null) {
instance = new DPadJoy();
}
return instance;
}
private DPadJoy() {
ctx = (Context) MainActivity.get();
layout = new ConstraintLayout(ctx);
layout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
outerButton = new OuterButton(ctx);
outerButton.addToLayout();
setSensitivity(PreferencesActivity.getInt("joypad_sensitivity", 25));
// hidden by default
hide();
}
public ConstraintLayout getLayout() {
return layout;
}
public void setVisibility(final int vis) {
outerButton.setVisibility(vis);
}
public boolean isVisible() {
return outerButton.isVisible();
}
public void setPosition(final int x, final int y) {
outerButton.setPosition(x, y);
}
private int getX() {
return (int) outerButton.getX();
}
private int getY() {
return (int) outerButton.getY();
}
public Pair<Integer, Integer> getPosition() {
return new Pair<Integer, Integer>(getX(), getY());
}
private int getWidth() {
return outerButton.getWidth();
}
private int getHeight() {
return outerButton.getHeight();
}
public Pair<Integer, Integer> getSize() {
return new Pair<Integer, Integer>(getWidth(), getHeight());
}
public void setSensitivity(final int value) {
sensitivity = value;
}
public void onRefreshView() {
final Point size = new Point();
final Display disp = MainActivity.get().getWindowManager().getDefaultDisplay();
disp.getSize(size);
final PreferencesActivity prefs = PreferencesActivity.get();
final int x = prefs.getInt("dpad_offset_x", 100);
final int y = size.y - prefs.getInt("dpad_offset_y", 300);
setPosition(x, y);
if (isVisible()) {
DebugLog.debug("DPadJoy: pos (" + getX() + "," + getY() + "), size ("
+ getWidth() + "," + getHeight() + ")");
}
}
private static class OuterButton extends JoyPadButton {
private final InnerButton innerButton;
private DPad.Dir currentDir = DPad.Dir.NONE;
private boolean keyDown = false;
private final List<Integer> pressedKeys;
public OuterButton(final Context ctx) {
super(ctx);
pressedKeys = new ArrayList<>();
setBackgroundColor(android.graphics.Color.TRANSPARENT);
setImageResource(R.drawable.joystick_outer);
innerButton = new InnerButton(ctx);
innerButton.setBackgroundColor(android.graphics.Color.TRANSPARENT);
innerButton.setImageResource(R.drawable.joystick_inner);
setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(final View view, final MotionEvent event) {
final int action = event.getAction();
DebugLog.debug("joypad action: " + action);
if (action == MotionEvent.ACTION_DOWN && !keyDown) {
keyDown = true;
innerButton.setImageResource(R.drawable.joystick_inner_active);
innerButton.setRelativeX(event.getX());
innerButton.setRelativeY(event.getY());
final DPad.Dir newDir = getTouchDirection();
if (newDir != currentDir) {
currentDir = newDir;
onDirectionChange(KeyEvent.ACTION_DOWN);
}
} else if (action == MotionEvent.ACTION_UP && keyDown) {
keyDown = false;
innerButton.setImageResource(R.drawable.joystick_inner);
innerButton.centerOn((JoyPadButton) view);
clearPresses();
currentDir = DPad.Dir.NONE;
} else if (action == MotionEvent.ACTION_MOVE && keyDown) {
innerButton.setRelativeX(event.getX());
innerButton.setRelativeY(event.getY());
final DPad.Dir newDir = getTouchDirection();
if (newDir != currentDir) {
currentDir = newDir;
onDirectionChange(KeyEvent.ACTION_DOWN);
}
}
return true;
}
});
}
public void addToLayout() {
layout.addView(this);
layout.addView(innerButton);
// FIXME: inner button not centering at startup
innerButton.centerOn(this);
}
@Override
public void setVisibility(final int vis) {
innerButton.setVisibility(vis);
super.setVisibility(vis);
}
public boolean isVisible() {
return getVisibility() == View.VISIBLE
&& innerButton.getVisibility() == View.VISIBLE;
}
public void setPosition(final int x, final int y) {
setX(x);
setY(y);
innerButton.centerOn(this);
}
/**
* Determines pressed direction based on inner button position
* relative to outer button position.
*/
private DPad.Dir getTouchDirection() {
final float outerX = getCenterX();
final float outerY = getCenterY();
final float innerX = innerButton.getCenterX();
final float innerY = innerButton.getCenterY();
final float offsetX = outerX - innerX;
final float offsetY = outerY - innerY;
final int absX = (int) Math.abs(offsetX);
final int absY = (int) Math.abs(offsetY);
if (absX < sensitivity && absY < sensitivity) {
return DPad.Dir.NONE;
}
// horizontal directions take precedence if they are the same as vertical
if (absX >= absY) {
if (innerX < outerX) {
return DPad.Dir.LEFT;
} else if (innerX > outerX) {
return DPad.Dir.RIGHT;
}
} else {
if (innerY < outerY) {
return DPad.Dir.UP;
} else if (innerY > outerY) {
return DPad.Dir.DOWN;
}
}
return DPad.Dir.NONE;
}
private void clearPresses() {
for (final int key: pressedKeys) {
MainActivity.get().dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, key));
}
}
/**
* Sends a direction key press event to client.
*/
private void onDirectionChange(final int action) {
Integer keyCode = null;
switch (currentDir) {
case LEFT:
keyCode = KeyEvent.KEYCODE_DPAD_LEFT;
break;
case RIGHT:
keyCode = KeyEvent.KEYCODE_DPAD_RIGHT;
break;
case UP:
keyCode = KeyEvent.KEYCODE_DPAD_UP;
break;
case DOWN:
keyCode = KeyEvent.KEYCODE_DPAD_DOWN;
break;
}
if (keyCode != null) {
// clear pressed keys before dispatching new key press
clearPresses();
if (action == KeyEvent.ACTION_DOWN) {
MainActivity.get().dispatchKeyEvent(new KeyEvent(action, keyCode));
pressedKeys.add(keyCode);
}
}
}
}
private static class InnerButton extends JoyPadButton {
public InnerButton(final Context ctx) {
super(ctx);
}
/**
* Sets X coordinate relative to OuterButton.
*/
public void setRelativeX(float x) {
x = x + outerButton.getX();
final float maxL = outerButton.getX();
final float maxR = maxL + outerButton.getWidth();
// don't move outside bounds of outer button
if (x >= maxL && x <= maxR) {
// use circle center
setX(x - (getWidth() / 2));
}
}
/**
* Sets Y coordinate relative to OuterButton.
*/
public void setRelativeY(float y) {
y = y + outerButton.getY();
final float maxT = outerButton.getY();
final float maxB = maxT + outerButton.getHeight();
// don't move outside bounds of outer button
if (y >= maxT && y <= maxB) {
// use circle center
setY(y - (getHeight() / 2));
}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

View file

@ -1,98 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="org.arianne.stendhal.client.StendhalWebView">
<ImageView
android:id="@+id/splash"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
/>
<org.arianne.stendhal.client.ClientView
android:id="@+id/clientWebView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<Toolbar
android:id="@+id/menu_main"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#80ffffff"
android:logo="@mipmap/ic_launcher_round"
android:title="Menu"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right">
<Button
android:id="@+id/btn_connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Connect"
android:background="#00000000"
/>
<Button
android:id="@+id/btn_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Title"
android:background="#00000000"
/>
<Button
android:id="@+id/btn_reload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Reload"
android:background="#00000000"
/>
<Button
android:id="@+id/btn_settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Settings"
android:background="#00000000"
/>
<Button
android:id="@+id/btn_about"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="About"
android:background="#00000000"
/>
<Button
android:id="@+id/btn_quit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Quit"
android:background="#00000000"
/>
</LinearLayout>
</Toolbar>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/preferences"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="org.arianne.stendhal.client.PreferencesActivity">
<FrameLayout
android:id="@+id/preferencesFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="titleMusic">
<item>Treasure Hunter</item>
<item>Woodland Fantasy</item>
<item>Land of Fearless</item>
<item>Medieval: Rejoicing</item>
<item>Medieval: The Old Tower Inn</item>
</string-array>
<string-array name="titleMusicId">
<item>title_01</item>
<item>title_02</item>
<item>title_03</item>
<item>title_04</item>
<item>title_05</item>
</string-array>
</resources>

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Stendhal</string>
</resources>

View file

@ -1,107 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="General">
<EditTextPreference
android:key="client_url"
android:inputType="text"
android:maxLines="1"
android:title="Client URL"
android:summary="Custom URL pointing to web client."
android:selectAllOnFocus="true"
/>
</PreferenceCategory>
<PreferenceCategory android:title="Input">
<CheckBoxPreference
android:key="show_dpad"
android:defaultValue="false"
android:title="Show D-Pad"
android:summary="Show on-screen directional pad."
/>
<CheckBoxPreference
android:key="dpad_joy"
android:defaultValue="true"
android:title="Joystick Style D-Pad (experimental)"
android:summary="Use a joystick style directional pad."
android:dependency="show_dpad"
/>
<EditTextPreference
android:key="joypad_sensitivity"
android:inputType="numberDecimal"
android:digits="0123456789"
android:defaultValue="25"
android:title="Joypad Sensitivity"
android:summary="Threshold, in pixels, at which joypad will dispatch move event (lower = more sensitive)."
android:dependency="dpad_joy"
android:selectAllOnFocus="true"
/>
<EditTextPreference
android:key="dpad_offset_x"
android:inputType="numberDecimal"
android:digits="0123456789"
android:defaultValue="100"
android:title="D-Pad Offset X"
android:summary="Horizontal offset of directional pad (from left)."
android:dependency="show_dpad"
android:selectAllOnFocus="true"
/>
<EditTextPreference
android:key="dpad_offset_y"
android:inputType="numberDecimal"
android:digits="0123456789"
android:defaultValue="300"
android:title="D-Pad Offset Y"
android:summary="Vertical offset of directional pad (from bottom)."
android:dependency="show_dpad"
android:selectAllOnFocus="true"
/>
<CheckBoxPreference
android:key="map_touches"
android:defaultValue="false"
android:title="Remap Touches (experimental)"
android:summary="Map touches to mouse click events."
/>
</PreferenceCategory>
<PreferenceCategory android:title="Audio">
<CheckBoxPreference
android:key="title_music"
android:defaultValue="true"
android:title="Title Music"
android:summary="Play title screen music."
/>
<ListPreference
android:key="song_list"
android:dependency="title_music"
android:title="Songs"
android:entries="@array/titleMusic"
android:entryValues="@array/titleMusicId"
/>
</PreferenceCategory>
<PreferenceCategory android:title="Meta">
<Preference
android:key="reset"
android:title="Restore Defaults"
android:summary="Restore all preferences default values."
/>
</PreferenceCategory>
</PreferenceScreen>

View file

@ -1,83 +0,0 @@
/***************************************************************************
* Copyright © 2022 - Arianne *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package org.arianne.stendhal.client;
import java.io.File;
import androidx.appcompat.app.AppCompatActivity;
/**
* Dummy class for release builds.
*/
public class DebugLog {
private static File logsDir;
public static enum DebugLevel {
INFO,
WARN,
ERROR,
DEBUG
}
private static DebugLog instance;
public static DebugLog get() {
if (instance == null) {
instance = new DebugLog();
}
return instance;
}
public static void init(final File dir, final AppCompatActivity activity) {
logsDir = new File(dir.getPath() + "/logs");
}
public static void writeLine(final String text) {
// do nothing
}
public static void writeLine(final String text, final DebugLevel level) {
// do nothing
}
public static void info(final String text) {
// do nothing
}
public static void warn(final String text) {
// do nothing
}
public static void error(final String text) {
// do nothing
}
public static void debug(final String text) {
// do nothing
}
public static void notify(final String message) {
// do nothing
}
public static void notify(final String message, final DebugLevel level) {
// do nothing
}
public static String getLogsDir() {
return logsDir.getPath();
}
}

185
android/gradlew vendored
View file

@ -1,185 +0,0 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"

1
app/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/godot/

View file

@ -8,3 +8,4 @@
.externalNativeBuild
.cxx
local.properties
/deps/

7
app/android/TODO.txt Normal file
View file

@ -0,0 +1,7 @@
TODO:
- create activity for about information
- add credits to about information
- switch to Log4j for logging (maybe)
- write debugging logs to sub-directory in user's home instead of ~/Android/data/org.stendhalgame.client
- replace title_03 (Land of Fearless), title_04 (Rejoicing), & title_05 (The Old Tower Inn) music with non-looping versions or fix loops

View file

@ -5,7 +5,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.1.1"
classpath 'com.android.tools.build:gradle:7.4.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

View file

@ -0,0 +1,149 @@
plugins {
id 'com.android.application'
}
android {
namespace "org.stendhalgame.client"
compileSdk 32
defaultConfig {
applicationId namespace
minSdk 21
targetSdk 32
versionCode 1049005
versionName "1.49.5"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
targetSdkVersion 32
minSdkVersion 21
}
// F-Droid doesn't allow encrypted DependencyInfoBlock in APK
dependenciesInfo {
// disables dependency metadata when building APKs
includeInApk = false
// disables dependency metadata when building Android App Bundles
includeInBundle = false
}
// build output
project.setProperty("archivesBaseName", "${namespace}-${defaultConfig.versionName}")
project.setProperty("buildDir", "${projectDir}/../../../build/build_android_client")
/* A keystore.properties file can be placed in the root Android project directory and must
* include the following values:
* storeFile=<path-to-keystore-file>
* storePassword=<store-password>
* keyPassword=<key-password>
* keyAlias=<key-alias>
* The `storeFile` path value must use double backslashes (\\) on Windows.
*/
def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
// denotes whether a signing key is found/configured
def unsigned = true;
// property to force use of ~/.android/debug.keystore signing key & generate if not found
def generateDebugKey = project.properties["generate-debug-key"] != null;
signingConfigs {
main {
if (keystorePropertiesFile.exists()) {
// use key configured in keystore.properties file
storeFile file(keystoreProperties["storeFile"])
storePassword keystoreProperties["storePassword"]
keyPassword keystoreProperties["keyPassword"]
keyAlias keystoreProperties["keyAlias"]
unsigned = false;
} else if (signingConfigs.debug.storeFile.exists()) {
// use debug key
initWith signingConfigs.debug
unsigned = false;
}
}
if (generateDebugKey && signingConfigs.main != signingConfigs.debug) {
// force using debug key
main {
initWith signingConfigs.debug
}
unsigned = false;
}
}
if (!unsigned && !generateDebugKey && !signingConfigs.main.storeFile.exists()) {
throw new Error("Signing key not found: " + signingConfigs.main.storeFile);
}
buildTypes {
debug {
applicationIdSuffix ".debug"
versionNameSuffix "-debug"
// prevent automatic generation of ~/.android/debug.keystore
signingConfig null
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
if (generateDebugKey) {
// force using debug key & generate if not found
debug.signingConfig signingConfigs.debug
release.signingConfig signingConfigs.debug
} else if (!unsigned) {
// apply configured signing key to builds
debug.signingConfig signingConfigs.main
release.signingConfig signingConfigs.main
}
}
buildTypes.all { type ->
if (!type.name.equals("debug")) {
sourceSets[type.name].java { srcDirs "src/shared/java/" }
}
}
applicationVariants.all { variant ->
variant.outputs.all {
def buildRoot = "../../../../"
if (variant.name.equals("release")) {
// exclude "-release" suffix
outputFileName = outputFileName.replaceAll("(-release)(?!.*-release)", "")
}
// output to <source_root>/build
outputFileName = new File("${buildRoot}", "${outputFileName}")
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
compileSdkVersion 32
buildToolsVersion '32.0.0'
lintOptions {
abortOnError false
}
// print some build info for debugging
println("Package: " + namespace)
println("Application ID: " + defaultConfig.applicationId)
println("Version: " + defaultConfig.versionCode)
println("Output basename: " + archivesBaseName)
println("Signing key: " + (unsigned ? "unsigned" : signingConfigs.main.storeFile))
println("Build directory: " + project.buildDir)
}
dependencies {
implementation "androidx.appcompat:appcompat:1.4.1"
implementation "com.google.android.material:material:1.4.0"
implementation "androidx.preference:preference-ktx:1.2.0"
//testImplementation 'junit:junit:4.+'
//androidTestImplementation 'androidx.test.ext:junit:1.1.2'
//androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- allow client url http://localhost:xxxx via Chrome forwarding to a local server -->
<application android:usesCleartextTraffic="true">
</application>
</manifest>

View file

@ -0,0 +1,277 @@
/***************************************************************************
* Copyright © 2022-2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package org.stendhalgame.client;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.util.Log;
/**
* A class to output debugging information to logcat file.
*/
public class Logger {
/** Attribute denoting state of initialization. */
private static boolean initialized = false;
/** Logs directory. */
private static File logsDir;
/** Singleton instance. */
private static Logger instance;
/**
* Retrieves singleton instance.
*/
public static Logger get() {
if (Logger.instance == null) {
Logger.instance = new Logger();
}
return Logger.instance;
}
/**
* Hidden singleton constructor.
*/
private Logger() {
// do nothing
}
/**
* Initializes logs directory.
*/
public static void init(final File dir) {
if (Logger.initialized) {
Logger.warn(true, "tried to re-initialize logger");
return;
}
Logger.initialized = true;
logsDir = new File(dir.getPath() + "/logs");
writeLine("\n // -- debugging initialized -- //", null);
writeLine("logs directory: " + logsDir.getPath());
}
/**
* Writes a line of text to log file.
*
* @param text
* Text to be written.
*/
public static void writeLine(final String text) {
writeLine(text, LogLevel.DEBUG);
}
/**
* Writes a line of text to log file.
*
* @param text
* Text to be written.
* @param level
* Logging verbosity level.
*/
public static void writeLine(String text, final LogLevel level) {
if (logsDir == null) {
System.err.println("ERROR: Logger not initialized. Call Logger.init.");
return;
}
if (!logsDir.exists()) {
logsDir.mkdirs();
}
if (level != null) {
text = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date())
+ ": " + level.label + ": " + text;
}
text = text + "\n";
final String logFile = logsDir.getPath() + "/debug-"
+ new SimpleDateFormat("yyyy.MM.dd").format(new Date()) + ".txt";
BufferedWriter buffer;
try {
buffer = new BufferedWriter(new FileWriter(logFile, true));
buffer.write(text);
if (buffer != null) {
buffer.close();
}
} catch (final IOException e) {
System.err.println("ERROR: " + e.getMessage());
}
}
/**
* Writes a line of text to log file at `LogLevel.INFO` verbosity.
*
* @param text
* Text to be written.
*/
public static void info(final String text) {
Log.i("Logger", text);
writeLine(text, LogLevel.INFO);
}
/**
* Writes a line of text to log file at `LogLevel.INFO` verbosity.
*
* @param notify
* If `true` a toast notification is displayed to user.
* @param text
* Text to be written.
*/
public static void info(final boolean notify, final String text) {
Logger.info(text);
if (notify) {
Logger.notify(text, LogLevel.INFO);
}
}
/**
* Writes a line of text to log file at `LogLevel.WARN` verbosity.
*
* @param text
* Text to be written.
*/
public static void warn(final String text) {
Log.w("Logger", text);
writeLine(text, LogLevel.WARN);
}
/**
* Writes a line of text to log file at `LogLevel.WARN` verbosity.
*
* @param notify
* If `true` a toast notification is displayed to user.
* @param text
* Text to be written.
*/
public static void warn(final boolean notify, final String text) {
Logger.warn(text);
if (notify) {
Logger.notify(text, LogLevel.WARN);
}
}
/**
* Writes a line of text to log file at `LogLevel.ERROR` verbosity.
*
* @param text
* Text to be written.
*/
public static void error(final String text) {
Log.e("Logger", text);
writeLine(text, LogLevel.ERROR);
}
/**
* Writes a line of text to log file at `LogLevel.ERROR` verbosity.
*
* @param notify
* If `true` a toast notification is displayed to user.
* @param text
* Text to be written.
*/
public static void error(final boolean notify, final String text) {
Logger.error(text);
if (notify) {
Logger.notify(text, LogLevel.ERROR);
}
}
/**
* Writes a line of text to log file at `LogLevel.DEBUG` verbosity.
*
* @param text
* Text to be written.
*/
public static void debug(final String text) {
Log.d("Logger", text);
writeLine(text, LogLevel.DEBUG);
}
/**
* Writes a line of text to log file at `LogLevel.DEBUG` verbosity.
*
* @param notify
* If `true` a toast notification is displayed to user.
* @param text
* Text to be written.
*/
public static void debug(final boolean notify, final String text) {
Logger.debug(text);
if (notify) {
Logger.notify(text, LogLevel.DEBUG);
}
}
/**
* Displays a toast notification to user.
*
* @param text
* Text to display in notification.
*/
public static void notify(final String text) {
notify(text, LogLevel.INFO);
}
/**
* Displays a toast notification to user.
*
* Does not output to log file.
*
* @param text
* Text to display in notification.
* @param level
* Logging verbosity level.
*/
public static void notify(final String text, LogLevel level) {
if (!Logger.initialized) {
System.err.println("ERROR: Logger not initialized. Call Logger.init.");
return;
}
if (level == null) {
level = LogLevel.INFO;
}
final AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.get());
builder.setTitle(level.label);
builder.setMessage(text);
builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int id) {
dialog.cancel();
}
});
builder.create().show();
}
/**
* Retrieves logs directory.
*
* @return
* Directory path to outpu logs.
*/
public static String getLogsDir() {
return logsDir.getPath();
}
}

View file

@ -3,5 +3,7 @@
<resources>
<string name="app_name">Stendhal (debug)</string>
<string name="intent_url_scheme">stendhaldebug8gps5y99pu</string>
<string name="build_type">debug</string>
</resources>

View file

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Stendhal.FullScreen">
<activity
android:name=".MainActivity"
android:exported="true"
android:configChanges="orientation|screenSize|keyboardHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".PreferencesActivity"
android:label="Preferences"
android:exported="true"
android:configChanges="orientation|screenSize|keyboardHidden">
<intent-filter>
<action android:name="preferences" />
</intent-filter>
</activity>
<activity
android:name=".OpenAppByUrl"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="@string/intent_url_scheme"
android:host="callback" />
</intent-filter>
</activity>
</application>
</manifest>

View file

Before

Width:  |  Height:  |  Size: 505 KiB

After

Width:  |  Height:  |  Size: 505 KiB

Before After
Before After

View file

@ -0,0 +1,41 @@
/***************************************************************************
* Copyright © 2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package org.stendhalgame.client;
/**
* App configuration information.
*/
class AppInfo {
/**
* Retrieves configured build type string.
*/
public static String getBuildType() {
return MainActivity.get().getResources().getString(R.string.build_type);
}
/**
* Retrieves configured build version string.
*/
public static String getBuildVersion() {
return MainActivity.get().getResources().getString(R.string.build_version);
}
/**
* Retrieves configured intent URL scheme string.
*/
public static String getIntentUrlScheme() {
return MainActivity.get().getResources().getString(R.string.intent_url_scheme);
}
}

View file

@ -0,0 +1,603 @@
/***************************************************************************
* Copyright © 2022-2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package org.stendhalgame.client;
import java.util.Random;
import android.app.AlertDialog;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.webkit.DownloadListener;
import android.webkit.WebChromeClient;
import android.webkit.WebResourceRequest;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
/**
* Interface to handle web content.
*/
public class ClientView extends WebView {
/** Client URL path. */
private String clientUrlSuffix = "client";
/** Determines type of client to connect to. */
private boolean testClient = false;
/** Determines type of server to connect to. */
private boolean testServer = false;
private Boolean debugging;
/** ID of page currently loaded. */
private PageId currentPage;
/** ID of page previously loaded. */
private PageId previousPage;
private String stateId = "";
private String seed = "";
/**
* Creates a new view.
*
* @param ctx
* Activity Context to access application assets.
*/
public ClientView(final Context ctx) {
super(ctx);
onInit();
}
/**
* Creates a new view.
*
* @param ctx
* Activity Context to access application assets.
* @param attrs
* AttributeSet passed to parent (may be `null`).
*/
public ClientView(final Context ctx, final AttributeSet attrs) {
super(ctx, attrs);
onInit();
}
/**
* Creates a new view.
*
* @param ctx
* Activity Context to access application assets.
* @param attrs
* AttributeSet passed to parent (may be `null`).
* @param style
* Attribute in the current theme that contains a reference to a style resource that supplies
* default values for the view (can be 0 to not look for defaults).
*/
public ClientView(final Context ctx, final AttributeSet attrs, final int style) {
super(ctx, attrs, style);
onInit();
}
/**
* Initializes client WebView interface.
*/
private void onInit() {
setActive(false); // main activity manages initial visibility
setBackgroundColor(Color.TRANSPARENT);
// expand to size of parent constraints
setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));
final WebSettings viewSettings = getSettings();
viewSettings.setJavaScriptEnabled(true);
viewSettings.setDomStorageEnabled(true);
// keep elements in position in portrait mode
viewSettings.setLoadWithOverviewMode(true);
viewSettings.setUseWideViewPort(true);
// zoom controls
viewSettings.setSupportZoom(true);
viewSettings.setBuiltInZoomControls(true);
viewSettings.setDisplayZoomControls(false);
// allow autoplay of music
viewSettings.setMediaPlaybackRequiresUserGesture(false);
if (debugEnabled()) {
// make WebView debuggable for debug builds
setWebContentsDebuggingEnabled(true);
}
initWebViewClient();
initDownloadHandler();
}
/**
* Sets active state of this client view.
*
* @param active
* If `true` shows this client view, otherwise hides it.
*/
public void setActive(final boolean active) {
if (active) {
setVisibility(ClientView.VISIBLE);
return;
}
setVisibility(ClientView.GONE);
}
/**
* Checks active state of client view.
*
* @return
* `true` is this view is visible.
*/
public boolean isActive() {
return getVisibility() == ClientView.VISIBLE;
}
/**
* Initializes method overrides to handle page loading.
*/
private void initWebViewClient() {
// XXX: not sure setting WebChromClient is doing anything, was recommended to
// fix touchmove events not registering
setWebChromeClient(new WebChromeClient());
setWebViewClient(new WebViewClient() {
/**
* Handles pages loaded indirectly.
*
* @param view
* The default WebView instance handling the request.
* @param request
* Web request including the URL to be loaded.
* @return
* `true` to abort default loading.
*/
@Override
public boolean shouldOverrideUrlLoading(final WebView view, final WebResourceRequest request) {
Uri uri = request.getUrl();
final Uri.Builder builder = uri.buildUpon();
if (UrlHelper.isLoginUri(uri)) {
builder.appendQueryParameter("build", AppInfo.getBuildType());
builder.appendQueryParameter("version", AppInfo.getBuildVersion());
builder.appendQueryParameter("state", stateId);
builder.appendQueryParameter("seed", seed);
}
uri = builder.build();
if (!UrlHelper.isInternalUri(uri)) {
// open external links in default browser/app
// FIXME: should we ask for confirmation?
try {
MainActivity.get().startActivity(new Intent(Intent.ACTION_VIEW, uri));
} catch (final ActivityNotFoundException e) {
Notifier.toast("No app found to open this link");
}
return true;
}
view.loadUrl(UrlHelper.checkClientUrl(uri.toString()));
return true;
}
/**
* Called before a URL is loaded.
*
* @param view
* WebView instance handling page contents.
* @param url
* HTTP string of target page.
* @param favicon
* Favicon bitmap image.
*/
@Override
public void onPageStarted(final WebView view, final String url, final Bitmap favicon) {
MusicPlayer.stopMusic();
super.onPageStarted(view, url, favicon);
}
/**
* Called after a URL is loaded.
*
* @param view
* WebView instance handling page contents.
* @param url
* HTTP string of target page.
*/
@Override
public void onPageFinished(final WebView view, final String url) {
super.onPageFinished(view, url);
if (UrlHelper.isClientUrl(url)) {
setPage(PageId.WEBCLIENT);
} else if (url.equals("") || url.equals("about:blank")) {
setPage(PageId.TITLE);
if (PreferencesActivity.getBoolean("title_music", true)) {
MusicPlayer.playTitleMusic();
}
} else {
setPage(PageId.OTHER);
}
Menu.get().updateButtons();
Logger.debug("page id: " + currentPage);
}
});
}
/**
* deprecated?
*/
@Override
public boolean dispatchKeyEvent(final KeyEvent event) {
final boolean ret = super.dispatchKeyEvent(event);
// hide keyboard when "enter" pressed
if (isGameActive() && event.getAction() == KeyEvent.ACTION_UP
&& event.getKeyCode() == KeyEvent.KEYCODE_ENTER) {
((InputMethodManager) MainActivity.get()
.getSystemService(Context.INPUT_METHOD_SERVICE))
.hideSoftInputFromWindow(this.getWindowToken(), 0);
}
return ret;
}
/**
* Initializes interface for handling screenshots.
*/
private void initDownloadHandler() {
setDownloadListener(new DownloadListener() {
/**
* Handles downloading screenshot created by web client.
*
* TODO: get filename to pass to `DownloadHandler.download` from "download" property of
* anchor
*
* @param url
* Content URL to the screenshot image.
* @param userAgent
* User agent used for download.
* @param contentDisposition
* Content-disposition HTTP header, if present.
* @param mimetype
* Content type reported by server (web client creates PNG image).
* @param contentLength
* File size reported by server.
*/
@Override
public void onDownloadStart(final String url, final String userAgent,
final String contentDisposition, final String mimetype, final long contentLength) {
final DownloadHandler handler = new DownloadHandler();
handler.download(url, mimetype);
if (handler.getResult()) {
final String msg = "Downloaded file: " + handler.getMessage();
Logger.debug(msg);
Notifier.toast(msg);
} else {
final String msg = handler.getMessage();
Logger.error(msg);
Notifier.toast("ERROR: " + msg);
}
}
});
}
/**
* Verifies intent state & parses & loads target URL.
*
* @param intent
* Called login intent with state verification.
*/
public void checkLoginIntent(final Intent intent) {
final Uri intentUri = intent.getData();
final String url = intentUri.getQueryParameter("url");
final String loginseed = intentUri.getQueryParameter("loginseed");
final String intentStateId = intentUri.getQueryParameter("state");
if (stateId == null || intentStateId == null || url == null || "".equals(stateId) || !stateId.equals(intentStateId)) {
final String err = "There was an error verifying login";
Logger.error(err + " (\"" + stateId + "\" == \"" + intentStateId + "\")");
Notifier.showMessage(err);
if (currentPage == null || PageId.TITLE.equals(previousPage)) {
// reload title
loadTitleScreen();
}
return;
}
String completeUrl = url + "&loginseed=" + loginseed + seed;
loadUrl(UrlHelper.checkClientUrl(completeUrl));
}
/**
* Determines if URL to load is test web client.
*/
public boolean isTestClient() {
return testClient;
}
/**
* Determines if connection is to test server.
*/
public boolean isTestServer() {
return testServer;
}
/**
* Retrieves a string representing the selected client.
*
* @return
* One of "main", "test", or "none".
*/
public String getSelectedClient() {
if (onTitleScreen()) {
return "none";
}
return testClient ? "test" : "main";
}
/**
* Retrieves a string representing the selected server.
*
* @return
* One of "main", "test", or "none".
*/
public String getSelectedServer() {
if (onTitleScreen()) {
return "none";
}
return testServer ? "test" : "main";
}
/**
* Resets selected client & server values to default.
*/
private void reset() {
testClient = false;
testServer = false;
clientUrlSuffix = "client";
stateId = "";
seed = "";
}
/**
* Retrieves client type string.
*
* @return
* Either "client" or "testclient".
*/
public String getClientUrlSuffix() {
return clientUrlSuffix;
}
/**
* Generates a random string for identifying state.
*/
private String generateRandomString() {
// ensure state is reset before generating
String result = "";
// useable characters
String charList = "0123456789";
for (char c = 'A'; c <= 'Z'; c++) {
charList += c;
}
for (char c = 'a'; c <= 'z'; c++) {
charList += c;
}
// generate random state
final Random rand = new Random();
final int ccount = charList.length();
for (int idx = 0; idx <= 20 ; idx++) {
result += charList.charAt(rand.nextInt(ccount));
}
return result;
}
/**
* Opens location in client WebView.
*
* @param url
* URL to load.
*/
@Override
public void loadUrl(final String url) {
Logger.debug("Loading URL: " + url);
super.loadUrl(url);
}
/**
* Shows initial title screen.
*/
public void loadTitleScreen() {
reset();
setPage(PageId.TITLE);
SplashUtil.get().setVisible(true);
loadUrl("about:blank");
Menu.get().show();
}
/**
* Attempts to connect to client host.
*
* FIXME: rename as it may cause confusion in regards to loading page "account/login.html"
*/
public void loadLogin() {
if (debugEnabled() && PreferencesActivity.getString("client_url").trim().equals("")) {
// debug builds support choosing between main & test client/server
selectClient();
} else {
onSelectServer();
}
}
/**
* Opens a message dialog for user to choose between main & test clients.
*/
private void selectClient() {
final AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
builder.setMessage("Select client");
builder.setPositiveButton("Main", new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int id) {
testClient = false;
clientUrlSuffix = "client";
// skip server confirmation as only test client has this option
onSelectServer();
dialog.cancel();
}
});
builder.setNegativeButton("Test", new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int id) {
testClient = true;
clientUrlSuffix = "testclient";
selectServer();
dialog.cancel();
}
});
builder.create().show();
}
/**
* Opens a message dialog for user to choose between main & test servers.
*/
private void selectServer() {
final AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
builder.setMessage("Select server");
builder.setPositiveButton("Main", new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int id) {
testServer = false;
dialog.cancel();
onSelectServer();
}
});
builder.setNegativeButton("Test", new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int id) {
testServer = true;
dialog.cancel();
onSelectServer();
}
});
builder.create().show();
}
/**
* Connects to server & loads initial page.
*/
private void onSelectServer() {
// create a unique state
stateId = generateRandomString();
seed = generateRandomString();
// hide splash image
SplashUtil.get().setVisible(false);
final String initialPage = UrlHelper.getInitialPageUrl();
Logger.debug("Loading initial page: " + initialPage);
loadUrl(initialPage);
setPage(PageId.OTHER);
// hide menu after exiting title screen
Menu.get().hide();
}
/**
* Checks if user has specified a URL pointing to a custom server/client.
*
* @return
* Server address specified in preferences or `null`.
*/
public String checkCustomServer() {
final String cs = PreferencesActivity.getString("client_url", "").trim();
if (cs.equals("")) {
return null;
}
return cs;
}
/**
* Checks if title page is currently loaded.
*
* @return
* `true` if current page matches `PageId.TITLE`.
*/
public boolean onTitleScreen() {
return currentPage == PageId.TITLE;
}
/**
* Checks if web client page is currently loaded.
*
* @return
* `true` if current page matches `PageId.WEBCLIENT`.
*/
public boolean isGameActive() {
return currentPage == PageId.WEBCLIENT;
}
/**
* Retrieves ID of current page.
*
* @return
* Current `PageId`.
*/
public PageId getCurrentPageId() {
return currentPage;
}
/**
* Sets current page ID.
*
* @param newPage
* Page ID to be used.
*/
private void setPage(final PageId newPage) {
previousPage = currentPage;
currentPage = newPage;
if (previousPage == null) {
previousPage = currentPage;
}
}
/**
* Checks if this is a debug build.
*
* @return
* `true` if debug flag set.
*/
public boolean debugEnabled() {
if (debugging != null) {
return debugging;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
debugging = (MainActivity.get().getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
} else {
debugging = false;
}
return debugging;
}
}

View file

@ -0,0 +1,228 @@
/***************************************************************************
* Copyright © 2022-2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package org.stendhalgame.client;
import java.io.File;
import java.io.FileOutputStream;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.Date;
import android.net.Uri;
import android.os.Environment;
import android.util.Base64;
/**
* The main purpose of this class is to handle downloading screenshots
* created by the web client page.
*/
public class DownloadHandler {
private static enum DownloadType {
IMAGE_PNG("image/png"),
TEXT_PLAIN("text/plain"),
UNSUPPORTED(null);
private String value;
private DownloadType(final String value) {
this.value = value;
}
public static DownloadType fromString(final String value) {
for (final DownloadType v: DownloadType.values()) {
if (v.value != null && v.value.equals(value)) {
return v;
}
}
return DownloadType.UNSUPPORTED;
}
}
private boolean result = false;
private String message = null;
/**
* Checks for a supported MIME type.
*
* @param url
* File or data URL.
* @param mimetype
* Detected MIME type.
* @return
* Download type or unsupported.
*/
private DownloadType checkMimeType(final String url, final String mimetype) {
final DownloadType dtype = DownloadType.fromString(mimetype);
if (DownloadType.UNSUPPORTED.equals(dtype) && url.startsWith("data:image/png;base64,")) {
return DownloadType.IMAGE_PNG;
}
return dtype;
}
/**
* Writes file data to device storage.
*
* @param dir
* Directory where new file is to be created.
* @param basename
* Filename of new file.
* @param data
* File contents to be written to storage.
*/
private void downloadInternal(final File dir, final String basename, final byte[] data) {
String stacktrace = null;
try {
if (!dir.exists()) {
dir.mkdirs();
}
final FileOutputStream fos = new FileOutputStream(new File(dir, basename));
fos.write(data);
fos.close();
this.result = true;
} catch (final java.lang.NoClassDefFoundError e) {
this.message = "an error occurred while decoding data (see debug log for more info)";
stacktrace = stackTraceToString(e);
} catch (java.io.IOException e) {
this.message = "an error occurred while attempting to write file (see debug log for more info)";
stacktrace = stackTraceToString(e);
}
if (stacktrace != null) {
Logger.error(stacktrace.toString());
}
}
/**
* Writes file data to device storage.
*
* @param url
* A data URL.
* @param mimetype
* Detected MIME type.
* @param targetName
* Filename for new file.
*/
public void download(final String url, final String mimetype, String targetName) {
final Uri uri = Uri.parse(url);
final String scheme = uri.getScheme();
final String storageState = Environment.getExternalStorageState();
final DownloadType dtype = checkMimeType(url, mimetype);
if (!MainActivity.get().getActiveClientView().isGameActive()) {
this.message = "downloading from this page not supported";
} else if (!"data".equals(scheme)) {
// only data URL supported
this.message = "download type \"" + scheme + "\" not supported";
} else if (DownloadType.UNSUPPORTED.equals(dtype)) {
this.message = "mimetype not supported: " + mimetype;
} else if (!Environment.MEDIA_MOUNTED.equals(storageState)) {
this.message = "storage not available for writing (state: " + storageState + ")";
} else if (DownloadType.IMAGE_PNG.equals(dtype)) {
final File targetDir = new File(Environment.getExternalStorageDirectory()
+ "/Pictures/Screenshots");
if (targetName == null) {
// default filename
targetName = "stendhal_" + new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss").format(new Date())
+ ".png";
}
Logger.debug("Saving screenshot: " + targetDir.getPath()
+ "/" + targetName + " (" + mimetype + ")");
final byte[] data = Base64.decode(url.split("base64,")[1], Base64.DEFAULT);
downloadInternal(targetDir, targetName, data);
if (this.result) {
this.message = "saved screenshot to " + targetDir.getPath() + "/" + targetName;
}
} else if (DownloadType.TEXT_PLAIN.equals(dtype)) {
// `Environment.DIRECTORY_DOWNLOADS` fails on newer Android versions
//final File targetDir = new File(Environment.DIRECTORY_DOWNLOADS);
final File targetDir = new File(Environment.getExternalStorageDirectory() + "/Download");
if (targetName == null) {
// default filename
targetName = "stendhal_" + new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss").format(new Date())
+ ".txt";
}
Logger.debug("Saving file: " + targetDir.getPath()
+ "/" + targetName + " (" + mimetype + ")");
final String[] parts = url.split(",");
byte[] data;
if (parts[0].endsWith(";base64")) {
data = Base64.decode(parts[1], Base64.DEFAULT);
} else {
try {
data = URLDecoder.decode(parts[1], StandardCharsets.UTF_8.name())
.getBytes(StandardCharsets.UTF_8);
} catch (final java.io.UnsupportedEncodingException e) {
this.message = "an error occurred while attempting to decode data URL (see debug log for more info)";
Logger.error(stackTraceToString(e));
return;
}
}
downloadInternal(targetDir, targetName, data);
if (this.result) {
this.message = "file saved to " + targetDir.getPath() + "/" + targetName;
}
} else {
this.message = "an unknown error occurred";
}
}
/**
* Writes file data to device storage.
*
* @param url
* A data URL.
* @param mimetype
* Detected MIME type.
*/
public void download(final String url, final String mimetype) {
download(url, mimetype, null);
}
public boolean getResult() {
return result;
}
public String getMessage() {
return message;
}
/**
* Converts an exception stacktrace to string.
*
* @param e
* The error with stacktrace information.
* @return
* String formatted stacktrace.
*/
private String stackTraceToString(final Throwable e) {
final StringBuilder sb = new StringBuilder();
sb.append(e.toString());
for (final StackTraceElement ste: e.getStackTrace()) {
if (sb.length() > 0) {
sb.append("\n");
}
sb.append(ste.toString());
}
return sb.toString();
}
}

View file

@ -1,5 +1,5 @@
/***************************************************************************
* Copyright © 2022 - Arianne *
* Copyright © 2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
@ -9,29 +9,31 @@
* (at your option) any later version. *
* *
***************************************************************************/
package org.arianne.stendhal.client.js;
import android.webkit.JavascriptInterface;
package org.stendhalgame.client;
/**
* Logger verbosity levels.
*/
public enum LogLevel {
public class JSInterface {
// available verbosity levels
INFO("INFO"),
WARN("WARN"),
ERROR("ERROR"),
DEBUG("DEBUG");
/** Singleton instance. */
private static JSInterface instance;
/** String identifier. */
public final String label;
/**
* Retrieves the singleton instance.
* Creates a new logging verbosity level.
*
* @param label
* String identifier.
*/
public static JSInterface get() {
if (instance == null) {
instance = new JSInterface();
}
return instance;
}
private JSInterface() {
// singleton
private LogLevel(final String label) {
this.label = label;
}
}

View file

@ -0,0 +1,282 @@
/***************************************************************************
* Copyright © 2022-2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package org.stendhalgame.client;
import java.util.LinkedList;
import java.util.List;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.ViewGroup;
import androidx.appcompat.app.AppCompatActivity;
/**
* Main app activity.
*/
public class MainActivity extends AppCompatActivity {
/** Menu instance. */
private Menu menu;
/** Active clients. **/
private ViewGroup clientList;
/** Static activity instance. */
private static MainActivity instance;
/**
* Retrieves activity instance.
*
* NOTE: This may not be necessary if Android has built-in methods to retrieve current activity.
*/
public static MainActivity get() {
return MainActivity.instance;
}
/**
* Called when main activity is created.
*/
@Override
protected void onCreate(final Bundle savedInstanceState) {
try {
super.onCreate(savedInstanceState);
// FIXME: may be considered unsafe as this is not technically a singleton
MainActivity.instance = this;
// initialize debug logging mechanism
Logger.init(getExternalFilesDir(null));
setContentView(R.layout.activity_main);
clientList = findViewById(R.id.clientList);
createClientView();
// NOTE: client view instance must be created before initializing menu
menu = Menu.get();
updateOrientation();
} catch (final Exception e) {
// TODO: add option to save to file or copy to clipboard the error
e.printStackTrace();
Logger.error(e.toString());
Logger.error("// -- //");
final StringBuilder sb = new StringBuilder();
for (final StackTraceElement ste: e.getStackTrace()) {
final String traceLine = ste.toString();
if (sb.length() > 0) {
sb.append("\n");
}
sb.append(traceLine);
Logger.error(traceLine);
}
Logger.error("// -- //");
Notifier.showPrompt(
"An unhandled exception has occurred: \"" + e.getMessage() + "\""
+ "\n\nYou can report this error at: https://stendhalgame.org/development/bug.html"
+ "\n\nStack trace:\n" + sb.toString(),
new Notifier.Action() {
@Override
protected void onCall() {
finish();
}
});
}
}
/**
* Handles toggling menu when the system "back" button is pressed.
*/
@Override
public void onBackPressed() {
menu.toggleVisibility();
}
/**
* Creates view to host a client instance.
*/
private void createClientView() {
final ClientView clientView = new ClientView(this);
setActiveClientView(clientView);
clientList.addView(clientView);
clientView.loadTitleScreen();
// show splash when a new view is created
SplashUtil.get().setVisible(true);
}
/**
* Sets client view to be shown and hides all others.
*
* @param clientView
* The `ClientView` instance to be visible.
*/
private void setActiveClientView(final ClientView clientView) {
for (int idx = 0; idx < clientList.getChildCount(); idx++) {
((ClientView) clientList.getChildAt(idx)).setActive(false);
}
clientView.setActive(true);
}
/**
* Sets client view to be shown and hides all others.
*
* @param clientIndex
* The index of `ClientView` instance to be visible.
*/
private void setActiveClientView(final int clientIndex) {
if (clientIndex < 0 || clientIndex >= clientList.getChildCount()) {
Logger.error(true, "Tried to access invalid client index: " + clientIndex);
return;
}
setActiveClientView((ClientView) clientList.getChildAt(clientIndex));
}
/**
* Retrieves active client view.
*
* @return
* `ClientView` instance that is visible.
*/
public ClientView getActiveClientView() {
for (int idx = 0; idx < clientList.getChildCount(); idx++) {
final ClientView clientView = (ClientView) clientList.getChildAt(idx);
if (clientView.isActive()) {
return clientView;
}
}
// default to first client view
return (ClientView) clientList.getChildAt(0);
}
/**
* Retrieves list of available client views.
*
* @return
* List containing all created `ClientView` instances.
*/
public List<ClientView> getClientViewList() {
final List<ClientView> available = new LinkedList<>();
for (int idx = 0; idx < clientList.getChildCount(); idx++) {
available.add((ClientView) clientList.getChildAt(idx));
}
return available;
}
/**
* Attempts to connect to client host.
*/
public void loadLogin() {
getActiveClientView().loadLogin();
}
/**
* Retrieves app orientation.
*
* @return
* One of `Configuration.ORIENTATION_PORTRAIT` (1), `Configuration.ORIENTATION_LANDSCAPE` (2),
* or `Configuration.ORIENTATION_UNDEFINED` (0).
*/
public int getOrientation() {
return getResources().getConfiguration().orientation;
}
/**
* Sets screen orientation to user setting or locks in landscape or portrait.
*/
public void updateOrientation() {
final String value = PreferencesActivity.getString("orientation");
int orient = ActivityInfo.SCREEN_ORIENTATION_USER;
switch (value) {
case "landscape":
orient = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
break;
case "portrait":
orient = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
break;
}
// set orientation for main & sub activities
setRequestedOrientation(orient);
final PreferencesActivity preferencesActivity = PreferencesActivity.get();
if (preferencesActivity != null) {
preferencesActivity.setRequestedOrientation(orient);
}
}
/**
* Opens a dialog to confirm exiting activity.
*/
public void onRequestQuit() {
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("Quit Stendhal?");
builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int id) {
finish();
android.os.Process.killProcess(android.os.Process.myPid());
}
});
builder.setNegativeButton("No", new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int id) {
dialog.cancel();
}
});
final AlertDialog confirmQuit = builder.create();
confirmQuit.show();
}
//~ @Override
//~ protected void onResume() {
//~ super.onResume();
//~ }
/**
* Listens for changes to orientation.
*/
@Override
public void onConfigurationChanged(final Configuration config) {
super.onConfigurationChanged(config);
final ClientView clientView = getActiveClientView();
if (clientView != null && PageId.TITLE.equals(clientView.getCurrentPageId())) {
SplashUtil.get().update();
}
}
/**
* Called when main activity ends.
*/
@Override
public void finish() {
Logger.debug(MainActivity.class.getName() + ".finish() called");
super.finish();
}
/**
* Called when main activity is destroyed.
*/
@Override
protected void onDestroy() {
Logger.debug(MainActivity.class.getName() + ".onDestroy() called");
super.onDestroy();
}
/**
* Creates preferences activity.
*/
public void showSettings() {
startActivity(new Intent(this, PreferencesActivity.class));
}
}

View file

@ -1,5 +1,5 @@
/***************************************************************************
* Copyright © 2022-2023 - Arianne *
* Copyright © 2022-2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
@ -9,40 +9,45 @@
* (at your option) any later version. *
* *
***************************************************************************/
package org.arianne.stendhal.client;
package org.stendhalgame.client;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.Button;
import android.widget.Toolbar;
/**
* Main menu for navigation & configuration.
*/
public class Menu {
private static Menu instance;
private final Context ctx;
/** Toolbar representing menu. */
private final Toolbar nav;
private Button btn_connect;
private Button btn_title;
private Button btn_reload;
/** Singleton instance. */
private static Menu instance;
/**
* Retrieves menu singleton instance.
*/
public static Menu get() {
if (Menu.instance == null) {
Menu.instance = new Menu();
}
return instance;
}
public Menu(final Context ctx) {
instance = this;
this.ctx = ctx;
nav = (Toolbar) ((Activity) ctx).findViewById(R.id.menu_main);
/**
* Hidden singleton constructor.
*/
private Menu() {
nav = (Toolbar) MainActivity.get().findViewById(R.id.menu_main);
nav.setTag(nav.getVisibility());
nav.getViewTreeObserver().addOnGlobalLayoutListener(
new ViewTreeObserver.OnGlobalLayoutListener() {
@ -53,20 +58,30 @@ public class Menu {
}
}
});
initButtonHandlers();
DebugLog.debug("menu initialized");
Logger.debug("menu initialized");
}
/**
* Retrieves the menu toolbar.
*/
public Toolbar getInternal() {
return nav;
}
/**
* Shows or hides menu.
*
* @param vType
* Visibility type. One of `View.VISIBLE`, `View.INVISIBLE`, or `View.GONE`.
*/
public void setVisibility(final int vType) {
nav.setVisibility(vType);
}
/**
* Toggles visible state of menu.
*/
public void toggleVisibility() {
if (nav.getVisibility() == View.GONE) {
nav.setVisibility(View.VISIBLE);
@ -75,16 +90,25 @@ public class Menu {
}
}
/**
* Sets menu visibility to visible.
*/
public void show() {
nav.setVisibility(View.VISIBLE);
}
/**
* Sets menu visibility to hidden.
*/
public void hide() {
nav.setVisibility(View.GONE);
}
/**
* Refreshes displayed menu buttons.
*/
public void updateButtons() {
final PageId page = ClientView.getCurrentPageId();
final PageId page = MainActivity.get().getActiveClientView().getCurrentPageId();
btn_connect.setVisibility(View.GONE);
btn_title.setVisibility(View.GONE);
@ -102,10 +126,11 @@ public class Menu {
* Sets actions when buttons are pressed.
*/
private void initButtonHandlers() {
final MainActivity activity = (MainActivity) ctx;
final MainActivity activity = MainActivity.get();
btn_connect = (Button) activity.findViewById(R.id.btn_connect);
btn_connect.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(final View v) {
activity.loadLogin();
}
@ -113,17 +138,20 @@ public class Menu {
btn_title = (Button) activity.findViewById(R.id.btn_title);
btn_title.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(final View v) {
nav.setVisibility(View.GONE);
Notifier.showPrompt("Return to title screen?",
new Notifier.Action() {
@Override
protected void onCall() {
ClientView.get().loadTitleScreen();
MainActivity.get().getActiveClientView().loadTitleScreen();
updateButtons();
}
},
new Notifier.Action() {
@Override
protected void onCall() {/* do nothing */}
}
);
@ -132,6 +160,7 @@ public class Menu {
btn_reload = (Button) activity.findViewById(R.id.btn_reload);
btn_reload.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(final View v) {
nav.setVisibility(View.GONE);
@ -139,7 +168,7 @@ public class Menu {
new Notifier.Action() {
@Override
protected void onCall() {
ClientView.get().reload();
MainActivity.get().getActiveClientView().reload();
}
},
new Notifier.Action() {
@ -153,43 +182,57 @@ public class Menu {
final Button btn_settings = (Button) activity.findViewById(R.id.btn_settings);
btn_settings.setOnClickListener(new ClickListener() {
@Override
public void onClick(final View v) {
super.onClick(v);
((MainActivity) ctx).showSettings();
activity.showSettings();
}
});
/*
final Button btn_about = (Button) activity.findViewById(R.id.btn_about);
btn_about.setOnClickListener(new ClickListener() {
@Override
public void onClick(final View v) {
super.onClick(v);
// TODO: create proper about activity
String server_ver = "unavailable";
if (!(ClientView.getCurrentPageId() == PageId.WEBCLIENT)) {
server_ver = "not connected";
final ClientView client = MainActivity.get().getCurrentView();
final AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.get());
final String buildType = AppInfo.getBuildType();
String msg = "Android client version: " + AppInfo.getBuildVersion();
if (!"prod".equals(buildType)) {
msg += "\nAndroid client build: " + AppInfo.getBuildType();
}
// FIXME: how to find server version if connected?
final ClientView client = ClientView.get();
final AlertDialog.Builder builder = new AlertDialog.Builder((Activity) ctx);
String msg = "WebView client version: " + BuildConfig.VERSION_NAME;
if (client.debugEnabled()) {
msg += "\nSelected client: " + client.getSelectedClient()
+ "\nSelected server: " + client.getSelectedServer();
msg += "\nClient type: " + client.getSelectedClient()
+ "\nServer type: " + client.getSelectedServer()
+ "\nLogs directory: " + Logger.getLogsDir();
}
msg += "\nServer version: " + server_ver
+ "\n\nTitle Music:"
+ "\n- \"Treasure Hunter\": Tad Miller (TAD)"
+ "\n- \"Woodland Fantasy\": Matthew Pablo http://www.matthewpablo.com/"
+ "\n- \"Land of Fearless\": Alexandr Zhelanov https://soundcloud.com/alexandr-zhelanov"
+ "\n- \"Medieval: Rejoicing\": RandomMind"
+ "\n- \"Medieval: The Old Tower Inn\": RandomMind";
msg += "\n\nTitle Music:"
+ "\n\n- Treasure Hunter"
+ "\n by Tad Miller (TAD)"
+ "\n - opengameart.org/node/127124"
+ "\n\n- Woodland Fantasy"
+ "\n by Matthew Pablo"
+ "\n - matthewpablo.com"
+ "\n - opengameart.org/node/31929"
+ "\n\n- Land of Fearless"
+ "\n by Alexandr Zhelanov"
+ "\n - soundcloud.com/alexandr-zhelanov"
+ "\n - opengameart.org/node/79931"
+ "\n\n- Rejoicing"
+ "\n by RandomMind"
+ "\n - opengameart.org/node/100213"
+ "\n\n- The Old Tower Inn"
+ "\n by RandomMind"
+ "\n - opengameart.org/node/87510";
builder.setMessage(msg);
builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int id) {
dialog.cancel();
}
@ -198,9 +241,11 @@ public class Menu {
builder.create().show();
}
});
*/
final Button btn_quit = (Button) activity.findViewById(R.id.btn_quit);
btn_quit.setOnClickListener(new ClickListener() {
@Override
public void onClick(final View v) {
super.onClick(v);
activity.onRequestQuit();
@ -210,9 +255,13 @@ public class Menu {
updateButtons();
}
/**
* Listener to handle menu button presses.
*/
private class ClickListener implements View.OnClickListener {
@Override
public void onClick(final View v) {
if (!ClientView.onTitleScreen()) {
if (!MainActivity.get().getActiveClientView().onTitleScreen()) {
nav.setVisibility(View.GONE);
}
}

View file

@ -1,5 +1,5 @@
/***************************************************************************
* Copyright © 2022 - Arianne *
* Copyright © 2022-2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
@ -9,17 +9,14 @@
* (at your option) any later version. *
* *
***************************************************************************/
package org.arianne.stendhal.client.sound;
package org.stendhalgame.client;
import java.io.IOException;
import android.content.Context;
import android.media.MediaPlayer;
import android.net.Uri;
import java.io.IOException;
import org.arianne.stendhal.client.DebugLog;
import org.arianne.stendhal.client.MainActivity;
public class MusicPlayer {
@ -28,22 +25,24 @@ public class MusicPlayer {
public static void playMusic(final Context ctx, final int id, final boolean loop) {
if (isPlaying()) {
DebugLog.debug("freeing up MusicPlayer instance to play new song");
Logger.debug("freeing up MusicPlayer instance to play new song");
stopMusic();
}
DebugLog.debug("starting music (loop: " + loop + ")");
Logger.debug("starting music (loop: " + loop + ")");
mplayer = new MediaPlayer();
mplayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(final MediaPlayer mp) {
DebugLog.debug("starting music");
Logger.debug("starting music");
// FIXME: not working
//mplayer.setLooping(loop);
mplayer.start();
}
});
mplayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(final MediaPlayer mp) {
// free up resources & reset player to null
stopMusic();
@ -59,7 +58,7 @@ public class MusicPlayer {
mplayer.setDataSource(ctx, parseResourceUri(id));
mplayer.prepareAsync();
} catch (final IOException e) {
DebugLog.error("failed to load resource " + id + ":\n" + e.getStackTrace());
Logger.error("failed to load resource " + id + ":\n" + e.getStackTrace());
}
}
@ -67,10 +66,46 @@ public class MusicPlayer {
playMusic(MainActivity.get(), id, loop);
}
/**
* Plays selected music.
*
* @param musicId
* String identifier of music to play or `null` to play music configured in preferences.
*/
public static void playTitleMusic(String musicId) {
if (musicId == null) {
musicId = PreferencesActivity.getString("song_list");
}
int id = R.raw.title_01;
switch (musicId) {
case "title_02":
id = R.raw.title_02;
break;
case "title_03":
id = R.raw.title_03;
break;
case "title_04":
id = R.raw.title_04;
break;
case "title_05":
id = R.raw.title_05;
break;
}
Logger.debug("playing music: " + musicId);
MusicPlayer.playMusic(id, true);
}
/**
* Plays music configured in preferences.
*/
public static void playTitleMusic() {
playTitleMusic(null);
}
public static void stopMusic() {
if (mplayer != null) {
if (mplayer.isPlaying()) {
DebugLog.debug("stopping music");
Logger.debug("stopping music");
mplayer.stop();
}
mplayer.release();

View file

@ -1,5 +1,5 @@
/***************************************************************************
* Copyright © 2022-2023 - Arianne *
* Copyright © 2022-2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
@ -9,7 +9,7 @@
* (at your option) any later version. *
* *
***************************************************************************/
package org.arianne.stendhal.client;
package org.stendhalgame.client;
import android.app.AlertDialog;
import android.content.Context;
@ -53,6 +53,7 @@ public class Notifier {
builder.setTitle(title);
}
builder.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int id) {
dialog.cancel();
}
@ -92,6 +93,7 @@ public class Notifier {
}
builder.setPositiveButton(labelY, new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int id) {
dialog.cancel();
@ -111,6 +113,7 @@ public class Notifier {
}
builder.setNegativeButton(labelN, new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int id) {
dialog.cancel();
@ -131,6 +134,7 @@ public class Notifier {
}
builder.setNeutralButton(labelO, new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int id) {
dialog.cancel();

View file

@ -0,0 +1,32 @@
/***************************************************************************
* Copyright © 2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package org.stendhalgame.client;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
public class OpenAppByUrl extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = getIntent();
// String action = intent.getAction();
Uri data = intent.getData();
Logger.debug("URL: " + data);
MainActivity.get().getActiveClientView().checkLoginIntent(intent);
finish();
}
}

View file

@ -1,5 +1,5 @@
/***************************************************************************
* Copyright © 2022 - Arianne *
* Copyright © 2022-2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
@ -9,7 +9,7 @@
* (at your option) any later version. *
* *
***************************************************************************/
package org.arianne.stendhal.client;
package org.stendhalgame.client;
public enum PageId {

View file

@ -1,5 +1,5 @@
/***************************************************************************
* Copyright © 2022-2023 - Arianne *
* Copyright © 2022-2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
@ -9,38 +9,47 @@
* (at your option) any later version. *
* *
***************************************************************************/
package org.arianne.stendhal.client;
package org.stendhalgame.client;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
import androidx.appcompat.app.AppCompatActivity;
import org.arianne.stendhal.client.input.DPad;
import org.arianne.stendhal.client.input.DPadArrows;
import org.arianne.stendhal.client.input.DPadJoy;
import org.arianne.stendhal.client.sound.MusicPlayer;
import androidx.preference.CheckBoxPreference;
import androidx.preference.ListPreference;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragmentCompat;
import androidx.preference.PreferenceManager;
/**
* Interface for configuring app preferences.
*/
public class PreferencesActivity extends AppCompatActivity {
/** Preferences activity instance. */
private static PreferencesActivity instance;
/**
* Retrieves preferences activity instance.
*/
public static PreferencesActivity get() {
return instance;
}
/**
* Called when the activity is created.
*/
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// FIXME: may be considered unsafe as this is not technically a singleton
instance = this;
// use same orientation as main activity
setRequestedOrientation(MainActivity.get().getRequestedOrientation());
setContentView(R.layout.activity_preferences);
if (findViewById(R.id.preferencesFrame) != null) {
@ -48,8 +57,8 @@ public class PreferencesActivity extends AppCompatActivity {
return;
}
getFragmentManager().beginTransaction().add(R.id.preferencesFrame,
new PFragment()).commit();
getSupportFragmentManager().beginTransaction().add(R.id.preferencesFrame,
new PFragment()).commit();
}
}
@ -119,63 +128,62 @@ public class PreferencesActivity extends AppCompatActivity {
// SharedPreferences.getInt is returning string
final Object obj = getSharedPreferences().getString(key, String.valueOf(defVal));
if (obj instanceof String) {
DebugLog.debug("PreferencesActivity.getInt: casting string return value to integer");
Logger.debug("PreferencesActivity.getInt: casting string return value to integer");
return Integer.parseInt((String) obj);
} else {
DebugLog.debug("PreferencesActivity.getInt return value is integer");
Logger.debug("PreferencesActivity.getInt return value is integer");
return (Integer) obj;
}
} catch (final NumberFormatException e) {
final String errMsg = "An error occurred: " + e.getMessage();
DebugLog.error(errMsg + "\n" + e.getStackTrace());
Notifier.showError(errMsg + "\n\nSee " + DebugLog.getLogsDir()
Logger.error(errMsg + "\n" + e.getStackTrace());
Notifier.showError(errMsg + "\n\nSee " + Logger.getLogsDir()
+ " for more information.");
}
return null;
}
@Override
public void finish() {
DebugLog.debug(PreferencesActivity.class.getName() + ".finish() called");
Logger.debug(PreferencesActivity.class.getName() + ".finish() called");
super.finish();
}
@Override
protected void onDestroy() {
DebugLog.debug(PreferencesActivity.class.getName() + ".onDestroy() called");
Logger.debug(PreferencesActivity.class.getName() + ".onDestroy() called");
super.onDestroy();
}
public static class PFragment extends PreferenceFragment
public static class PFragment extends PreferenceFragmentCompat
implements OnSharedPreferenceChangeListener {
@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
public void onCreatePreferences(final Bundle savedInstanceState, final String rootKey) {
addPreferencesFromResource(R.xml.preferences);
initListeners();
}
private void initListeners() {
final PreferenceManager pm = getPreferenceManager();
// FIXME: should update playing music
final Preference reset = pm.findPreference("reset");
if (reset != null) {
reset.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(final Preference pref) {
Notifier.showPrompt(getActivity(), "Restore prefrences defaults?",
new Notifier.Action() {
@Override
protected void onCall() {
DebugLog.debug("restoring preferences default values");
Logger.debug("restoring preferences default values");
restoreDefaults();
}
},
new Notifier.Action() {
@Override
protected void onCall() {
// do nothing
}
@ -185,19 +193,20 @@ public class PreferencesActivity extends AppCompatActivity {
}
});
} else {
DebugLog.warn("preference \"reset\" not found");
Logger.warn("preference \"reset\" not found");
}
final CheckBoxPreference title_music = (CheckBoxPreference) pm.findPreference("title_music");
if (title_music != null) {
title_music.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(final Preference pref, final Object obj) {
// set music state as soon as preference is changed
if (ClientView.onTitleScreen()) {
if (MainActivity.get().getActiveClientView().onTitleScreen()) {
if (!((Boolean) obj)) {
MusicPlayer.stopMusic();
} else if (!MusicPlayer.isPlaying()) {
ClientView.playTitleMusic();
MusicPlayer.playTitleMusic();
}
}
@ -217,13 +226,14 @@ public class PreferencesActivity extends AppCompatActivity {
}
song_list.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(final Preference pref, final Object obj) {
// set music state as soon as preference is changed
if (ClientView.onTitleScreen()) {
DebugLog.debug("changing title music preference: " + (String) obj);
if (MainActivity.get().getActiveClientView().onTitleScreen()) {
Logger.debug("changing title music preference: " + (String) obj);
if (title_music.isChecked()) {
ClientView.playTitleMusic((String) obj);
MusicPlayer.playTitleMusic((String) obj);
}
}
@ -231,6 +241,35 @@ public class PreferencesActivity extends AppCompatActivity {
}
});
}
final Preference clear_cache = pm.findPreference("clear_cache");
if (clear_cache != null) {
clear_cache.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(final Preference pref) {
Notifier.showPrompt(getActivity(), "Delete cached data?",
new Notifier.Action() {
@Override
protected void onCall() {
Logger.debug("clearing cache");
for (final ClientView clientView: MainActivity.get().getClientViewList()) {
clientView.clearCache(true);
}
}
},
new Notifier.Action() {
@Override
protected void onCall() {
// do nothing
}
});
return true;
}
});
} else {
Logger.warn("preference \"clear_cache\" not found");
}
}
private void restoreDefaults() {
@ -246,25 +285,9 @@ public class PreferencesActivity extends AppCompatActivity {
@Override
public void onSharedPreferenceChanged(final SharedPreferences sp, final String key) {
if (key.equals("show_dpad") || key.equals("dpad_joy")) {
// reset all d-pads states to hidden
DPadArrows.get().hide();
DPadJoy.get().hide();
if (getBoolean("dpad_joy", true)) {
DPad.setCurrentPad(DPadJoy.get());
} else {
DPad.setCurrentPad(DPadArrows.get());
}
// restore visible state
final DPad currentPad = DPad.getCurrentPad();
if (currentPad != null && ClientView.isGameActive() && getBoolean("show_dpad", false)) {
currentPad.show();
currentPad.onRefreshView();
}
} else if (key.equals("joypad_sensitivity")) {
DPadJoy.get().setSensitivity(getInt("joypad_sensitivity", 25));
if ("orientation".equals(key)) {
Logger.debug("orientation set to \"" + PreferencesActivity.getString(key) + "\"");
MainActivity.get().updateOrientation();
}
}

View file

@ -0,0 +1,90 @@
/***************************************************************************
* Copyright © 2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package org.stendhalgame.client;
import android.content.res.Configuration;
import android.widget.ImageView;
public class SplashUtil {
/** Image used as title page background. */
private final ImageView splash;
/** Singleton instance. */
private static SplashUtil instance;
/**
* Retrieves singleton instance.
*/
public static SplashUtil get() {
if (SplashUtil.instance == null) {
SplashUtil.instance = new SplashUtil();
}
return SplashUtil.instance;
}
/**
* Hidden singleton constructor.
*/
private SplashUtil() {
splash = (ImageView) MainActivity.get().findViewById(R.id.splash);
setVisible(false);
}
/**
* Sets the background splash image.
*
* @param resId
* Resource ID.
* @param bgColor
* Coloring to fill behind splash image.
*/
private void setImage(final int resId, final int bgColor) {
splash.setBackgroundColor(bgColor);
splash.setImageResource(resId);
}
/**
* Sets splash image dependent on device orientation.
*/
public void update() {
if (!isVisible()) {
return;
}
int resId = R.drawable.splash;
if (MainActivity.get().getOrientation() == Configuration.ORIENTATION_PORTRAIT) {
resId = R.drawable.splash_portrait;
}
// light blue background color
setImage(resId, 0xff6c9ed1);
}
/**
* Shows or hides background splash image.
*
* @param visible
* `true` if image should visible, `false` if not.
*/
public void setVisible(final boolean visible) {
splash.setVisibility(visible ? ImageView.VISIBLE : ImageView.GONE);
update();
}
/**
* Checks if splash is visible.
*/
public boolean isVisible() {
return ImageView.VISIBLE == splash.getVisibility();
}
}

View file

@ -0,0 +1,280 @@
/***************************************************************************
* Copyright © 2024 - Faiumoni e. V. *
***************************************************************************
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
package org.stendhalgame.client;
import android.net.Uri;
class UrlHelper {
private static final String defaultServer = "https://stendhalgame.org/";
private UrlHelper() {
// static methods only
}
/**
* Creates a URI from a string HTTP URL.
*
* @return
* `android.net.Uri`.
*/
public static Uri toUri(String url) {
if (!url.startsWith("https://") && !url.startsWith("http://") && !url.startsWith("about:")) {
// Uri.getHost returns `null` if localhost not prefixed with protocol
url = "http://" + url;
}
return Uri.parse(url);
}
/**
* Retrieves the HTTP URL of the default server (stendhalgame.org).
*
* @return
* String URL.
*/
public static String getDefaultServer() {
return UrlHelper.defaultServer;
}
/**
* Retrieves the URI of the default server (stendhalgame.org).
*
* @return
* `android.net.Uri` of default server.
*/
public static Uri getDefaultServerUri() {
return UrlHelper.toUri(UrlHelper.defaultServer);
}
/**
* Retrieves the default host.
*
* @return
* Host portion of the default URI.
*/
public static String getDefaultHost() {
return UrlHelper.getDefaultServerUri().getHost();
}
/**
* Removes protocol & "www" prefixes from a URL.
*
* FIXME: rename to "trimProtocol"
*
* @return
* Trimmed URL string.
*/
public static String stripHost(final String url) {
if (url == null) {
return "";
}
return url.replaceAll("^https://", "").replaceAll("^http://", "")
.replaceAll("^www\\.", "");
}
/**
* Extracts character name from URL fragment identifier & converts to query string.
*
* Deprecated. Should use `UrlHelper.formatCharName(Uri, Uri.Builder).
*
* @param url
* HTTP string to be formatted.
* @return
* Formatted URL.
*/
@Deprecated
public static String formatCharName(String url) {
final int idx = url.indexOf("#");
if (idx > -1) {
url = url.substring(0, idx) + "?char=" + url.substring(idx+1);
}
return url;
}
/**
* Converts URL fragment identifier to character name query string parameter.
*
* @param uri
* URI being checked for fragment identifier.
* @param builder
* URI builder to update.
*/
public static void formatCharName(final Uri uri, final Uri.Builder builder) {
final String name = uri.getFragment();
if (name != null) {
builder.appendQueryParameter("char", name);
}
}
/**
* Formats client URL for currently selected server.
*
* @param url
* URL to be checked.
* @return
* URL to be loaded.
*/
public static String checkClientUrl(String url) {
final Uri uri = UrlHelper.toUri(url);
final Uri.Builder builder = uri.buildUpon();
if (UrlHelper.isClientUrl(url)) {
final ClientView client = MainActivity.get().getActiveClientView();
final boolean testClient = client.isTestClient();
String replaceSuffix = "/testclient/";
if (testClient) {
replaceSuffix = "/client/";
}
// ensure website directs to configured client
builder.path(uri.getPath().replace(replaceSuffix, "/" + client.getClientUrlSuffix() + "/"));
UrlHelper.formatCharName(uri, builder);
if (testClient && !client.isTestServer() && uri.getQueryParameter("server") == null) {
// connect test client to main server
builder.appendQueryParameter("server", "main");
}
}
return builder.toString();
}
/**
* Checks if a URL is a link to one of the web clients.
*
* @param url
* HTTP URL to be checked.
* @return
* `true` if `url` links to "client" or "testclient".
*/
public static boolean isClientUrl(final String url) {
final String custom_client = PreferencesActivity.getString("client_url").trim();
if (!custom_client.equals("")) {
return url.contains(custom_client);
}
final String defaultHost = UrlHelper.stripHost(UrlHelper.getDefaultServerUri().getHost());
return url.contains(defaultHost + "/client/") || url.contains(defaultHost + "/testclient/");
}
/**
* Retrieves client URL.
*
* @return
* Client URL string.
*/
public static String getClientUrl() {
final String custom_client = PreferencesActivity.getString("client_url").trim();
if (!custom_client.equals("")) {
return custom_client;
}
return UrlHelper.defaultServer + "client/stendhal.html";
}
/**
* Retrieves URL string for initial page to be loaded from server.
*
* If custom client URL is used then client URL is returned.
*
* @return
* HTTP URL string.
*/
public static String getInitialPageUrl() {
final String custom_client = PreferencesActivity.getString("client_url").trim();
if (!custom_client.equals("")) {
return custom_client;
}
return UrlHelper.defaultServer + "account/mycharacters.html";
}
/**
* Checks if requested URL is whitelisted to be opened within WebView client.
*
* @param uri
* `android.net.Uri` to be checked.
* @return
* `true` if URI is under default domain (stendhalgame.org) or localhost.
*/
public static boolean isInternalUri(final Uri uri) {
if (UrlHelper.isLoginUri(uri)) {
// open login page in external browser
return false;
}
final String defaultHost = UrlHelper.stripHost(UrlHelper.getDefaultHost());
final String host = UrlHelper.stripHost(uri.getHost());
if (defaultHost.equals(host)) {
// allow pages from stendhalgame.org
return true;
}
final String cs = MainActivity.get().getActiveClientView().checkCustomServer();
if (cs != null) {
return UrlHelper.stripHost(cs).equals(host);
}
return "localhost".equals(host);
}
/**
* Checks if requested URL is whitelisted to be opened within WebView client.
*
* @param url
* HTTP URL string to be checked.
* @return
* `true` if URL is under default domain (stendhalgame.org) or localhost.
*/
public static boolean isInternal(final String url) {
return UrlHelper.isInternalUri(UrlHelper.toUri(url));
}
/**
* Checks if a URI matches the intent URL scheme.
*
* @param uri
* URI to be check.
* @return
* `true` if URI's host is the intent scheme.
*/
public static boolean isIntentUri(final Uri uri) {
return AppInfo.getIntentUrlScheme().equals(UrlHelper.stripHost(uri.getHost()));
}
/**
* Checks if a URL matches the intent URL scheme.
*
* @param url
* HTTP URL string to be check.
* @return
* `true` if URI's host is the intent scheme.
*/
public static boolean isIntentUrl(final String url) {
return UrlHelper.isIntentUri(UrlHelper.toUri(url));
}
/**
* Checks if a URI represents a login page.
*
* @param uri
* Page URI to check.
* @return
* `true` if URI path equals "/account/login.html" or `id` parameter of query string equals
* "content/account/login".
*/
public static boolean isLoginUri(final Uri uri) {
if ("/account/login.html".equals(uri.getPath())) {
return true;
}
if (!uri.isHierarchical()) {
return false;
}
final String id = uri.getQueryParameter("id");
if (id == null) {
return false;
}
return "content/account/login".equals(id);
}
}

View file

@ -0,0 +1 @@
https://sourceforge.net/projects/arianne/support

View file

@ -0,0 +1 @@
https://stendhalgame.org/

View file

@ -0,0 +1 @@
en-US

View file

@ -0,0 +1,9 @@
Stendhal has a huge and rich world. You can explore cities, forest, mountains, plains and dungeons.
You can fight monsters and become a hero.
You will meet a wide variety of characters. Many will give you tasks and quests for valuable
experience. You may be asked to help protect land, feed the hungry, heal the sick, make someone
happy, solve a puzzle or simply lend a hand.
So what are you waiting for? A whole new world awaits... And if you like, get the source code, and
add your own ideas!

View file

@ -0,0 +1 @@
Ein Multiplayer-Adventure mit klassischer 2D-Grafik

View file

@ -0,0 +1,9 @@
Stendhal has a huge and rich world. You can explore cities, forest, mountains, plains and dungeons.
You can fight monsters and become a hero.
You will meet a wide variety of characters. Many will give you tasks and quests for valuable
experience. You may be asked to help protect land, feed the hungry, heal the sick, make someone
happy, solve a puzzle or simply lend a hand.
So what are you waiting for? A whole new world awaits... And if you like, get the source code, and
add your own ideas!

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 KiB

View file

@ -0,0 +1 @@
A multiplayer adventure with classic 2D graphics

View file

@ -0,0 +1 @@
Stendhal Game

View file

@ -0,0 +1,9 @@
Stendhal tiene un mundo enorme y rico. Puedes explorar ciudades, bosques, montañas, llanos y
mazmorras. Puedes combatir monstruos y llegar a ser un héroe.
Te encontrarás con una amplia variedad de personajes. Muchos te darán tareas y misiones para obtener
experiencia valiosa. Es posible que se te pida proteger terrenos, alimentar a los hambrientos, curar
a los enfermos, hacer feliz a alguien, resolver un rompecabezas, o simplemente echar una mano.
Entonces, ¿a qué estás esperando? Un mundo completamente nuevo te espera... ¡Y si deseas, consigue
el código fuente y añade tus propias ideas!

View file

@ -0,0 +1 @@
Una aventura multijugador con gráficos 2D clásicos

View file

@ -0,0 +1,10 @@
Stendhal a un monde immense et riche. Vous pouvez explorer des villes, des forêts, des montagnes,
des plaines et des donjons. Vous pouvez combattre des monstres et devenir un héros.
Vous rencontrerez une grande variété de personnages. Beaucoup vous donneront des tâches et des
quêtes pour l'expérience précieuse. On vous demandera peut-être d'aider à protéger des terres,
nourrir les affamés, soigner les malades, rendre quelqu'un heureux, résoudre une énigme ou
simplement donner un coup de main.
Alors, qu'attendez-tu? Un tout nouveau monde vous attend... Et si vous le souhaitez, récupérez le
code source et ajoutez vos propres idées!

View file

@ -0,0 +1 @@
Une aventure multijoueur avec des graphismes 2D classiques

View file

@ -0,0 +1,9 @@
Stendhal ha un mondo enorme e ricco. Puoi esplorare città, foreste, montagne, pianure e dungeon.
Puoi combattere mostri e diventare un eroe.
Incontrerai una vasta varietà di personaggi. Molti ti daranno compiti e missioni per preziosa
esperienza. Potresti essere chiesto di aiutare a proteggere terra, nutrire gli affamati, curare i
malati, rendere felice qualcuno, risolvere un puzzle o semplicemente dare una mano.
Allora, cosa stai aspettando? Un mondo completamente nuovo aspetta... E se vuoi, ottieni il codice
sorgente e aggiungi le tue idee!

View file

@ -0,0 +1 @@
Un'avventura multiplayer con la classica grafica 2D

View file

@ -0,0 +1,9 @@
Stendhal to niezwykły, pełen możliwości świat. Odkryjesz w nim miasta, lasy, góry, równiny i lochy.
Stawić możesz czoło potworom oraz stać się bohaterem.
W drodze napotkasz rozmaite postacie. Wielu z nich zleci ci misje, które zapewnią cenne
doświadczenie. Zdarzy się, że będziesz musiał ochraniać ziemie, nakarmić głodnych, pomóc wyleczyć chorych,
uprzyjemnić czyjeś życie, rozwiązać zagadki lub po prostu wesprzeć pomocną dłonią.
A więc na co jeszcze czekasz? Cały nowy świat wyczekuje ciebie... Jeśli chcesz, pobierz kod
źródłowy oraz dodaj własne pomysły!

View file

@ -0,0 +1 @@
Wieloosobowa gra przygodowa z klasyczną grafiką 2D

View file

@ -0,0 +1,9 @@
Stendhal tem um mundo enorme e rico. Podes explorar cidades, florestas, montanhas, planícies e
masmorras. Podes lutar contra monstros e tornar-te um herói.
Vais encontrar uma grande variedade de personagens. Muitos vão dar-te tarefas e missões para
experiência valiosa. Podes ser solicitado(a) a proteger a terra, alimentar os famintos, curar os
doentes, fazer alguém feliz, resolver um quebra-cabeça, ou simplesmente dar uma mão.
Então, do que estás à espera? Um mundo completamente novo aguarda... E se quiseres, obtém o
código-fonte e adiciona as tuas próprias ideias!

View file

@ -0,0 +1 @@
Uma aventura multijogador com gráficos 2D clássicos

View file

@ -0,0 +1,9 @@
Stendhal are o lume imensă și bogată. Poți explora orașe, păduri, munți, câmpii și temnițe. Poți să
lupți cu monștri și să devii erou.
Vei întâlni o gamă largă de personaje. Multe îți vor da sarcini și misiuni în schimbul valoroasei
experiențe. Ți s-ar putea cere să protejezi pământuri, să-i hrănești pe cei flămânzi, să-i vindeci
pe cei bolnavi, să faci pe cineva fericit, să dezlegi un puzzle sau doar să dai o mână de ajutor.
Ce mai aștepți? O întreagă nouă lume te așteaptă... Și dacă vrei, ia codul sursă și adaugă-ți
propriile idei!

View file

@ -0,0 +1 @@
O aventură multijucător cu grafică 2D clasică

View file

@ -0,0 +1,3 @@
PUT RELEASE ANNOUNCEMENT LINES HERE
Please see the complete change log for further details: https://arianne-project.org/game/stendhal.html#changes

View file

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View file

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="org.stendhalgame.client.MainActivity">
<ImageView
android:id="@+id/splash"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitCenter"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clientList"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
</androidx.constraintlayout.widget.ConstraintLayout>
<Toolbar
android:id="@+id/menu_main"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#80ffffff"
android:logo="@mipmap/ic_launcher_round"
android:title="Menu"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right">
<Button
android:id="@+id/btn_connect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Connect"
android:background="#00000000"
/>
<Button
android:id="@+id/btn_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Title"
android:background="#00000000"
/>
<Button
android:id="@+id/btn_reload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Reload"
android:background="#00000000"
/>
<Button
android:id="@+id/btn_settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Settings"
android:background="#00000000"
/>
<!--
<Button
android:id="@+id/btn_about"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="About"
android:background="#00000000"
/>
-->
<Button
android:id="@+id/btn_quit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Quit"
android:background="#00000000"
/>
</LinearLayout>
</Toolbar>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/preferences"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="org.stendhalgame.client.PreferencesActivity">
<FrameLayout
android:id="@+id/preferencesFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Before After
Before After

Some files were not shown because too many files have changed in this diff Show more