Compare commits

...

1229 Commits

Author SHA1 Message Date
Gouvernathor 76ed4fefe1 hotfix 2023-03-08 22:33:42 +01:00
Gouvernathor f73799f4fc Compat and document the changes 2023-03-08 22:32:29 +01:00
Gouvernathor da9691a195 New blit API
If you want the pos to be rounded, blit's old job, you can call integer_blit.
Converting to pure-floats is useless, since nothing checks, so subpixel_blit is made an alias of absolute_blit which uses the good type.
The base behavior is to take elements of pos as style and transform properties do : as positions.
2023-03-08 21:53:49 +01:00
Gouvernathor 2b829dbc07 Seemlessly merge duplicated code 2023-03-08 21:44:20 +01:00
Tom Rothamel 2147242d91 doc: Copyedit documentation for poi, orientation, and {x,y,z}rotate. 2023-03-07 01:26:46 -05:00
kyouryuukunn 3a06f5e7c6 add poi, orientation and x,y,z rotate (#3609) 2023-03-06 22:07:22 -05:00
Gouvernathor 7d000076ed Layeredimage documentation (#4415)
* Add an example of the last advice

* Add an example for auto groups

following feedback

* Integrate info about "poses"

* Fix markup mistake

* Better document Condition and document ConditionGroup
2023-03-06 21:19:58 -05:00
Gouvernathor e0df6d9b0b docgen: Don't get inherited docstrings for subclasses 2023-03-06 02:24:17 -05:00
Tom Rothamel 2a860ca1c4 per-sample: Documentation. 2023-03-06 02:08:35 -05:00
Tom Rothamel d8326fdb36 per-sample: Rename config.fade_music to config.fadeout_audio, and set it.
It's a more accurate name, as the variable isn't limited to music,
but works with all audio.

It's set to 0.016, the duration of one frame, which seems about right
and also minimizes popping sounds when an audio file ends.
2023-03-06 02:08:35 -05:00
Tom Rothamel 8ebeebe7ea per-sample: Enqueue audio immediately, if possible.
This helps ensure that when a short fadeout ends, the next audio
file is available to be played.
2023-03-06 02:08:35 -05:00
Tom Rothamel 328b056410 per-sample: Prevent clicking noises.
There were two causes for these. The first was that if a sound
was queued tight, the fadeout would finish, and both playing and
queued sounds would be removed - meaning nothing would play
until the next time periodic ran. Fadeout now dequeues the
queued sound if the fadeout would finish.

The second was a mistake that looked at the wrong portion of the
stream buffer, with the resulting errors often sounding like
clicks.
2023-03-06 02:08:35 -05:00
Tom Rothamel eb89a9bafb Use a default fadeout of 1ms when stopping or fading music.
This mitigates a high-frequency click that happens when stopping
a sound too fast.

Fixes #3934.
2023-03-06 02:08:35 -05:00
Tom Rothamel a8351b86c2 per-sample: Implement constant power panning.
This uses sine and cosine to keep the power of the sample constant
as it's moved from ear to ear.
2023-03-06 02:08:35 -05:00
Tom Rothamel c78484dfb3 per-sample: Use a slightly different power unit.
This avoids multiplying and dividing.
2023-03-06 02:08:35 -05:00
Tom Rothamel 255fd01f1b per-sample: Implement volumes.
This implements all four volumes that can be applied to a stream -
mixer, relative_volume, secondary_volume, and fade.

The interpolated volumes (secondary and fade) are now interpolated
using power, rather than magnitude, which leads to perceptually
linear interpolation.

There is a bit of a performance enhancement here - instead of
using decibels as our power units, we use a base-2 power unit
that can be calculated faster.
2023-03-06 02:08:35 -05:00
Tom Rothamel ea706a8071 per-sample: Start work on per-sample mixing.
This is a change to audio mixing that will cause all mixing
calculations to be done on a per-sample basis, rather than
trying to perform mixing on blocks of samples at once.

This will fix issues caused by very short fadeouts, and
enable the move to power-based fading.
2023-03-06 02:08:35 -05:00
Gouvernathor ee4d982bd0 doc: fix wrong bullet-list markup
you were right to warn me, Tom
2023-03-05 15:08:20 +01:00
Tom Rothamel 0e3630e602 Make children of a screen reachable.
This ensures that the displayables in a screen are reachable
via rollback.

Fixes #3907.
2023-03-04 19:14:31 -05:00
Tom Rothamel a4a8fa95ee Allow an object to define what's save and what's reachable differently.
This is mostly intended for screens, where displayables might have
to participate in rollback, but aren't saved.
2023-03-04 18:14:52 -05:00
Tom Rothamel 759b17f195 Remove debug print. 2023-03-04 15:03:12 -05:00
Tom Rothamel db123458a3 doc: Make it clearer that define is for constants.
Fixes #4389.
2023-03-04 14:31:53 -05:00
Tom Rothamel 063092875b doc: The translate None changes in previous commit. 2023-03-04 14:28:43 -05:00
Tom Rothamel 7591092518 Deal with translate None statements.
These statements used to be recommended, by they're error prone
and now deprecated, and the replacement (say-with-id) has been
available for a long time.

Now, there are deferred warnings for translate None and for
duplicate ids, as well as some infrastructure for enabling
developer mode in python early blocks.

Fixes #4407. Fixes #4406. Relevant to #4243.
2023-03-04 14:12:58 -05:00
Tom Rothamel 87d598604e pylance: Ignore ecdsa-based type issues. 2023-03-04 12:34:00 -05:00
Tom Rothamel 4f4516f3fc pylance: Ignore a few more type errors. 2023-03-04 10:53:24 -05:00
Tom Rothamel 1f91895624 Filter a spurious message when building for Android.
Per #4413.
2023-03-03 23:41:52 -05:00
Tom Rothamel f019785797 rapt: Remove spurious warning and delay. 2023-03-03 22:50:27 -05:00
Tom Rothamel d2b25deec4 pylance: Type fixes for pressed mouse cursors. 2023-03-02 23:38:36 -05:00
Gouvernathor 0a04eadc55 Doc tweaks - variables in screens, and CDS (#4385)
* doc: explain the different kinds of variables in screens

* doc: tweaks and better explanations in cds

* doc: Add a warning about overriding the default statement

* Clarify that passing None to Return does not work

"must not" could be understood as "doesn't need to", now hopefully it's more clear.
2023-03-02 20:16:24 -05:00
Gouvernathor 91300cdc0e Rewrite the layeredimage page (#4404) 2023-03-02 20:15:24 -05:00
Gouvernathor 151acc6959 Fix docstring for renpy.music.set_pan (#4411)
doc: fic docstring for renpy.music.set_pan
2023-03-02 20:14:12 -05:00
Gouvernathor d598d39520 Remove mentions of ScreenDisplayable from the documentation (#4412)
Remove ScreenDisplayable from the documentation

the returned object should not be implied to be a Displayable nor usable as one
2023-03-02 20:13:58 -05:00
Tom Rothamel bb2b1bc23a Prepend extend-predicted text with {done}.
This hides it from tts, fixes #4410.
2023-03-02 20:12:25 -05:00
Tom Rothamel 6f76c83421 Defer when extend test is applied.
Fixes #4408.
2023-03-01 23:07:37 -05:00
Tom Rothamel bbdff96b49 Predict the extend statment.
This scrys for extend text, and appends it to the text being
shown before layout happens. This then lets the text layout
code take that text into account when determining line breaking
and word placement.

Fixes #3963.
2023-03-01 00:49:24 -05:00
Tom Rothamel c621ec4865 Use the scry system to add extend text that will always be shown.
This is intended to support the solution to #3963.
2023-02-28 22:13:45 -05:00
Tom Rothamel d75a4950cb Avoid stopping a movie channel that doesn't exist.
This is likely due to a movie that was defined in an old version
of the game not existing anymore.

Fixes #4402.
2023-02-27 21:03:22 -05:00
Tom Rothamel 49bdc8819f text: Position text using ints, rather than shorts.
Saving a few bytes isn't worth dealing with overflow issues
that seem to be actually happening.

Fixes #4031.
2023-02-27 01:26:35 -05:00
Tom Rothamel 68e9e02bf8 text: Ensure conversions are in range.
Per #4031.
2023-02-27 00:46:14 -05:00
Tom Rothamel d702a4f62e Add namespace/field support to VariableValue and VariableInputValue.
Fixes #3611.
2023-02-26 19:07:55 -05:00
Tom Rothamel 236d836274 Prevent overflow error.
This can't be absolutely correct, as the underlying problem is
too much text, but should work around the crash caused in #4031.
2023-02-26 18:35:53 -05:00
Tom Rothamel ecf89db683 Avoid resetting the caps and numlock keyboardm modifiers. 2023-02-26 17:28:32 -05:00
Mal Graty 18e54353fe Fix same typo in documented keymap
Pairs with 2ec1e32681.
2023-02-26 16:39:31 +00:00
Tom Rothamel bd8ffe068d Merge pull request #4401 from renpy/doc-monologue-none
Doc and changelog monologue none
2023-02-26 11:35:44 -05:00
Mal Graty 2ec1e32681 Fix typo in new keymap 2023-02-26 16:21:19 +00:00
Gouvernathor 77c342b6ab Changelog rpy-monologue-none 2023-02-26 14:30:52 +01:00
Gouvernathor 69a7b58756 Document rpy-monologue-none 2023-02-26 14:22:45 +01:00
Tom Rothamel 1c9b12c69e Merge pull request #4277 from altskop/new_cursor_types
Support for new cursor types
2023-02-25 19:31:00 -05:00
Tom Rothamel 60bac24065 Merge branch 'master' into new_cursor_types 2023-02-25 19:09:03 -05:00
Tom Rothamel 73a5efcb7c Merge pull request #4398 from lanodan/pep440-version
renpy: Make version PEP440-compatible
2023-02-25 19:05:04 -05:00
Haelwenn (lanodan) Monnier 19cf6b57f6 renpy: Make version PEP440-compatible
Starting with 67.2.0 setuptools enforces PEP440 compliance.
2023-02-25 21:47:14 +01:00
Tom Rothamel 65ee166afb pylance: More type annotations. 2023-02-25 00:24:04 -05:00
Tom Rothamel 3fe4f6ac8f text: Only trigger slow_done when events are available.
Fixes #4392.

This was caused by Text's slow_done callback being triggered when
text was being rendered in the old-side of a transitions. Because
the slow_done callback was running in th new context, the context
was aborting.

This moves running of slow_done into the event handler. Event handling
isn't done on the old-side of transitions, and so the problem does not
trigger.
2023-02-25 00:21:52 -05:00
Tom Rothamel 9be196163c Merge pull request #4313 from renpy/rpy-mononlogue-none
Implement `rpy monologue none`
2023-02-24 22:26:05 -05:00
Tom Rothamel 4574a50590 nw: Delay for both voice and self-voice in self-voice mode.
So that self-voice doesn't cancel voice.
2023-02-23 23:57:16 -05:00
Tom Rothamel a57ac97e10 Rename a Layer's raw_child to untransformed_layer.
That prevents it from interfering with other things being named
raw_child, while still not requiring hasattr and getting rid of
type warnings.

Fixes #4391.
2023-02-23 22:35:44 -05:00
Tom Rothamel 4fb8316903 Revert "pylance: Address more type warnings."
This reverts commit 9f96f132e7.
2023-02-23 22:09:24 -05:00
Tom Rothamel 0b424a8221 Revert "Hotfix 9f96f13"
This reverts commit 4326981a4d.
2023-02-23 22:08:20 -05:00
Gouvernathor 367f32bd06 Other fix for 9f96f13 and #4391 2023-02-23 23:09:41 +01:00
Tom Rothamel 214833b1ec Merge pull request #4393 from renpy/fix-4391
Hotfix 9f96f13
2023-02-23 16:50:16 -05:00
Gouvernathor 4326981a4d Hotfix 9f96f13 2023-02-23 22:01:36 +01:00
Tom Rothamel 9f96f132e7 pylance: Address more type warnings. 2023-02-23 01:25:21 -05:00
Tom Rothamel 51e89cb7bd pylance: Fix more typing problems.
Especially in webaudio.
2023-02-23 01:05:20 -05:00
Tom Rothamel 8a7fc84f96 pylance: Eliminate type errors.
These changes aren't expected to change the behavior of Ren'Py.
2023-02-23 00:29:29 -05:00
Tom Rothamel 0165b94e0e Merge pull request #4386 from shawna-p/master
Fix inertial viewport dragging
2023-02-22 22:41:13 -05:00
Tom Rothamel f1190f7187 persistent: Fix issue that became obvious in the last review. 2023-02-22 22:22:35 -05:00
Tom Rothamel 7cc434691a Merge pull request #4388 from renpy/simplen-persistent
Simplify and quicken code in persistent.py
2023-02-22 22:17:51 -05:00
Tom Rothamel d54c29e2b7 Ensure that both the screen name and tag are available to renpy.showing.
And that the information is properly maintained.

Per #4384.
2023-02-22 22:09:00 -05:00
Tom Rothamel 17c9c6f62c Make {nw} wait for self-voicing to complete.
Per #4387, and trying to make sure that the self-voicing text
completes before advance happens.
2023-02-22 20:59:55 -05:00
Gouvernathor 2e8c59b94a Simplify and quicken code in persistent.py 2023-02-23 01:52:03 +01:00
shawna-p f968c5016b Fix inertial viewport dragging 2023-02-22 14:06:28 -05:00
Tom Rothamel b3406bc9ae oversample: Try to ensure divisions are exact.
Which means we can always do a blit rather than a subpixel blit,
even if bounds are computed.
2023-02-21 23:46:45 -05:00
Tom Rothamel 5a0ca315bf Merge pull request #4083 from renpy/fix-oversample-offset
Fix subsurface offset when oversampling
2023-02-21 23:00:52 -05:00
Tom Rothamel 57a1a9ece6 Merge pull request #4357 from renpy/mipmap-transitions
Document mipmap specifically in transition parameters
2023-02-21 22:55:05 -05:00
Tom Rothamel 85a21e93e3 Merge pull request #4382 from renpy/clear-all-focuses
Enable ClearFocus and renpy.clear_capture_focus to clear all focuses at once
2023-02-21 18:09:21 -05:00
Gouvernathor a559f10792 Enable ClearFocus and renpy.clear_capture_focus to clear all 2023-02-21 18:40:46 +01:00
Tom Rothamel 4e4dc33843 Merge pull request #4359 from Tey/video-warning-fix
Only show warning message when playing a video
2023-02-21 01:34:31 -05:00
Tom Rothamel 51985b8633 doc: Fix the types of xsize and ysize.
Fixes #4373.
2023-02-21 01:32:24 -05:00
Tom Rothamel a0f4ed2ca6 Enable the selected_insensitive state.
And pass insensitive events to transforms.

Fixes #4338.
2023-02-21 01:28:44 -05:00
Tom Rothamel fd3f9102dc Minor changes to #4363.
Use a sentinel value rather than False.
2023-02-20 21:46:33 -05:00
Tom Rothamel 0c03ca25b5 Add a better example of a CTC screen. 2023-02-20 21:34:41 -05:00
Tom Rothamel 1c49408810 Merge pull request #4363 from Kassy2048/audio_wait_web
Wait for audio files to be downloaded before queuing them (web)
2023-02-20 21:14:04 -05:00
Gouvernathor b1cace6a24 doc: fix last 2023-02-21 02:07:18 +01:00
Tom Rothamel f4fd9156c0 Merge pull request #4376 from renpy/config-example
Upgrade example of config variable definition
2023-02-20 20:05:32 -05:00
Tom Rothamel 85f9d77c9d Merge pull request #4379 from renpy/dynamic-kwargs
simplify renpy.dynamic calls
2023-02-20 20:05:05 -05:00
Gouvernathor 6d92653229 simplify renpy.dynamic calls 2023-02-21 00:57:56 +01:00
Gouvernathor e69967fc94 doc: Upgrade example of config variable definition 2023-02-20 19:12:03 +01:00
Tom Rothamel 4fc96ee3ba Resolve bad merge. 2023-02-19 15:13:57 -05:00
Tom Rothamel 646bc8b398 Merge pull request #4369 from renpy/object-init
Fix classes signatures in the documentation (again)
2023-02-19 14:59:06 -05:00
Tom Rothamel a1302ecb3b Merge branch 'master' into object-init 2023-02-19 14:59:00 -05:00
Tom Rothamel ff2302f542 Merge pull request #4368 from renpy/lf
LF everywhere
2023-02-19 14:58:09 -05:00
Tom Rothamel 2bd1c71fd8 Merge pull request #4370 from renpy/doc-4316
Document #4316
2023-02-19 14:57:24 -05:00
Gouvernathor 9c3957a567 doc: changelog slcontinue and slbreak 2023-02-19 17:49:17 +01:00
Gouvernathor 9df7c047e4 doc: slcontinue and slbreak 2023-02-19 17:46:41 +01:00
Gouvernathor 4a53152c96 doc: fix 3746367 2023-02-19 16:00:45 +01:00
Gouvernathor e9be0244ca back to LF 2023-02-19 15:15:48 +01:00
Gouvernathor ff5bb28fe6 docgen: pop the prepending "self" better
args.replace(tuple(args.parameters.values())[1:]) would have been shorter, but would require two memory copies
this should be equivalent
2023-02-19 15:05:26 +01:00
Gouvernathor 89618e957f docgen: ban object.__init__'s signature 2023-02-19 15:03:34 +01:00
Gouvernathor aa9432948f docgen: simplify the issue with revobj's init 2023-02-19 15:02:58 +01:00
Gouvernathor 34c12fd310 doc: typo 2023-02-19 14:17:22 +01:00
Tom Rothamel b4ce3ccf9b Add directory to renpy.open_file and renpy.loadable. 2023-02-19 01:06:18 -05:00
Tom Rothamel a433009de8 Merge pull request #4360 from qTich/typo-images-prefix
fix: typo in common
2023-02-18 23:33:27 -05:00
Tom Rothamel b87b673e0f doc: Better documentation as to how ctc="fixed" works. 2023-02-18 20:32:59 -05:00
Tom Rothamel eff081741a Fix the default modal value for renpy.pause. 2023-02-18 20:22:48 -05:00
Tom Rothamel 6667c50ce4 doc: Deprioritize FLAC in the movie audio codec list. 2023-02-18 20:22:25 -05:00
Tom Rothamel 3ff388c5ed Doc: The addition of AV1. 2023-02-18 19:19:00 -05:00
Tom Rothamel b0ded80c22 doc: Fix improperly documented args. 2023-02-18 18:49:27 -05:00
Tom Rothamel c97c4871a6 Some compatibility for the keymap changes.
Fixes #4362 by preventing problems in released games, and documenting
this in the log.
2023-02-18 01:09:08 -05:00
Tom Rothamel 8c179a88a4 Check for changed language when rolling back.
Fixes #4351.

This also cleares the roll-forward log if the language has changed,
to stop roll-forwards into lines that haven't been shown.
2023-02-17 16:58:01 -05:00
Kassy 384b70a301 Wait for voice file to be downloaded before queuing it
If prediction failed, it is still worth it to play the voice file
late than not at all.
2023-02-17 20:23:02 +01:00
Kassy ba903152a0 Wait for audio file to be downloaded before queuing it
Fix #4113
2023-02-17 20:20:58 +01:00
Tom Rothamel 8668e3c986 Fix NVL-mode paged roll-forward.
By keeping all the roll-forward info, even past the first
checkpoint.

Per #4352.
2023-02-17 00:41:12 -05:00
Tom Rothamel 7039ec5d34 rt: When selecting the project, select int the launcher. 2023-02-16 23:35:14 -05:00
Tom Rothamel 02c1e46cbb launcher: Add a command to select the project. 2023-02-16 23:02:09 -05:00
Tichq d1a91a85e4 fix: 3a9db89382 2023-02-17 01:40:49 +03:00
Gouvernathor 5781e3b4f4 doc: document mipmap as its own thing in transition parameters 2023-02-15 23:36:58 +01:00
Tom Rothamel d6a72cfef3 Use the controller instance_id (not index) to remove controllers.
Fixes #4354.
2023-02-15 02:54:10 -05:00
Tom Rothamel bb791f4a9e Prefer explicity given images to ones found by name.
The thinking is that renpy.show's with argument should always
be the image that is show - it doesn't make sense for a named
image to override it.

Per #4353.
2023-02-15 02:30:22 -05:00
Teyut 2c2d08e5f1 Only show warning message when playing a video 2023-02-15 04:37:34 +01:00
Tom Rothamel 8a55b45cc9 _ren.py: Integrate with navigation.
This is mostly just making sure _ren.py files are considered
to be script files, and not filtered out.

Fixes #3920.
2023-02-14 02:13:20 -05:00
Tom Rothamel 26689f992b Strip BOM from the start of example lines. 2023-02-13 23:59:49 -05:00
Tom Rothamel 80b3e8236e Standardize on LF line endings. 2023-02-13 23:50:51 -05:00
Tom Rothamel a1f631285f Rename text_align to textalign (#4305)
Textalign renaming
2023-02-13 23:48:08 -05:00
Tom Rothamel 3a9db89382 Fix compat. 2023-02-13 23:38:46 -05:00
Teyut deae896fec Cutscene and loop for web (#4324)
* Draw video frames on canvas directly for cutscenes

This replaces the features of "00webvideo.rpy" and adds a way to detect
if autoplay is blocked for Movie() as well (with workarounds).

* Let video loop be handled by the browser

* Check for audio or video playback support

A warning message is shown when audio or video playback is not supported.
Video playback requires OpenGL 2 which should be guaranteed by WebGL v1,
but Ren'Py falls back to OpenGL 1 in some exotic configurations (like a
remote X11 server).

* Remove test condition

* Use wasm to decode audio files when needed without disabling video support

Video channels are marked asap in the webaudio module so it is possible to
know which audio function to call for that channel when audio decoding is not
possible by the browser (i.e., for Safari).

* Add details about video support on Web platform

* Remove useless check
2023-02-13 23:34:38 -05:00
Gouvernathor 70892cdf1d Modernize the inspect module and fix subclasses of RevObject not overriding __init__ (#4348)
* docgen: Modernize signature-reading

Our object's __init__ has a bogus (*args, **kwargs) signature which is actually (), subclasses not overriding it should get a () documented sig
The inspect.getargspec and inspect.formatargspec functions are deprecated in favor of inspect.signature

* Better fix for classes not redefining __init__

Probably faster at execution (although who cares) and does not rely on undocumented identity check
2023-02-13 23:32:06 -05:00
Tom Rothamel b6d51b7b0b Search for audio in audio, fonts in fonts/
And images in images/

Fixes #2077.
2023-02-13 22:31:22 -05:00
Galo223344 b3611b04cd Include an example of a proper usage of time_warp in the docs of ImageDissolve (#4326)
Include an example of a proper usage of time_warp in ImageDissolve

Even though time_warp is mentioned three times in the transition classes document, it's never shown how to actually use it. Since the idea of using the _warper module is not intuitive, and it's mentioned only once at the beginning of the section, I thought it would be best to at least include it in one of the examples.
2023-02-13 19:11:43 -05:00
Gouvernathor beebbf86af Doc misc (tweaks and fixes) (#4349)
* document Function's arguments the usual way

* document that Style's fields are write-only

* rephrase beginning of styles

* Warn about not using default

* typo: misdefined var
2023-02-13 19:11:28 -05:00
Tom Rothamel 9ac23face8 The current screen shouldn't be a HIDE or OLD screen.
There are various actions and values that access displayables
in the current screen. Some of these might be run (for example,
BarValue.get_adjustment()) in a hiding or old(-state-of-transition)
screen.

Almost certainly, those values and actions want the displayables
that are present in the original screen, not the copy, and so
the value is redirected.

Fixes #3998.
2023-02-12 15:59:08 -05:00
Gouvernathor 4e416ffebb Lint orphan translations (#4314) 2023-02-12 01:29:51 -05:00
Tom Rothamel 3e6afe04bb rapt: Update Android documentation to match the latest changes. 2023-02-12 01:27:50 -05:00
Tom Rothamel c96aac25c4 rapt: Update the launcher to match recent changes.
* Key generation is now per-process, and is a different step
  from installing the SDK.
* .android.json is now android.json.
2023-02-12 01:12:39 -05:00
Tom Rothamel 4d6bd0e14e steam: Do not initialize if the dlls do not exist.
Fixes #4344.
2023-02-11 13:29:40 -05:00
Tom Rothamel f7b6001771 py3: Fix old-style backtick repr.
Turns `expr` into repr(expr).
2023-02-11 03:05:14 -05:00
Tom Rothamel 06aff37241 py3: Fix old-style raises.
Transforms a raise of Type, expression into Type(expression).
2023-02-11 02:51:56 -05:00
Tom Rothamel d14bb49be1 When predicting an image for immediate use, push it to the GPU.
This mostly affects the case where Ren'Py is skipping, and hence
the images aren't likely to be loaded onto the GPU, and the idle
frame handler is unlikely to be triggered.

When this happens, prediction doesn't - but images will still be
predicted for immediate use. However, the surfaces were not being
loaded onto the GPU until use.

By immediately loading onto the GPU, the surfaces can be immediately
evicted from CPU memory, reducing the maximum amount of CPU memory
in use.
2023-02-11 00:30:22 -05:00
Tom Rothamel 738e4b30ec Limit how often the presplash is drawn.
Limiting the presplash to being drawn at 24fps speeds up loading
by 4 seconds (halving it) in a game with ~3000 .rpyc files.

Fixes #3962.
2023-02-10 21:21:56 -05:00
Tom Rothamel 7fd8f66145 Ensure there is always a context during rollback.
Fixes #4337.
2023-02-10 00:38:34 -05:00
Tom Rothamel 3ef37f8adf Use a dedicated keymap entry for exiting the console. 2023-02-09 22:10:54 -05:00
Moshibit a168f4be32 doc: Fix typo (#4340) 2023-02-09 15:48:00 -05:00
Tom Rothamel 242431b0b0 Fix the analysis of imagemaps. 2023-02-09 00:08:38 -05:00
Tom Rothamel 9a06311d97 sl2: Analyze for loops with break/continue for constness.
When a for loop has a break or continue in it, it may not
complete all of its executions. The result of that is that
variables that are updated in the loop are no longer constant
in the screen.

This has break and continue mark the loop as non-constant, and
then the loop re-analyzed to mark the variables in it as
non-constant.
2023-02-08 22:09:21 -05:00
Tom Rothamel d89abb44f1 Remove unneeded case that was causing a problem.
Fixes #4334.
2023-02-07 22:27:56 -05:00
Mal Graty f5dd816d1f Allow slow text to be used in screens while TTS is active (#4333)
text: Allow slow mode use while TTS is active

This relaxes the restriction on using slow text in screens while
self-voicing is enabled. As typical say dialogue is handled by Character
it is unaffected by this change.
2023-02-06 22:26:27 -05:00
Tichq 89f17d3aeb fix: missed iteration arg in SLIf.keywords (#4332) 2023-02-06 20:40:03 -05:00
Tom Rothamel 5cb1b0de72 doc: Fix generation. 2023-02-06 09:37:48 -05:00
Tom Rothamel 9a1d7f57d3 Better comments for what LOCAL_CONST means. 2023-02-06 01:24:08 -05:00
Tom Rothamel 1e98a7046b Merge commit 'f2d55f96576710b798a1df4046eec123f55c745b' 2023-02-06 01:22:33 -05:00
Gouvernathor f2d55f9657 doc: typo 2023-02-06 06:02:39 +01:00
Tom Rothamel e0b051cf56 sl2: Add prefer_screen_to_id.
This controls whether properties supplied through the screen
override those supplied through the displayable identifier.

Per #4319.
2023-02-05 23:32:41 -05:00
Gouvernathor 0419548455 doc: add attribute_function parameter to layim language 2023-02-06 05:31:33 +01:00
Tom Rothamel 03d37d24dc sl2: Do not predict branches of for loops that can never be taken.
The previous approach of predicting all branches was incorrect when
a constant branch was taken, as it could lead a locally const variable
to be given a different value, which prevented further optimizations
from working.

Fixes #4163.
2023-02-05 23:06:40 -05:00
altskop a2fdb61f70 Move pressed_ logic to get_mouse_name 2023-02-05 19:32:22 -06:00
altskop 8d6345e04a Resolve merge conflict 2023-02-05 15:43:29 -06:00
altskop 93f8cb30b7 Resolve merge conflict 2023-02-05 15:41:34 -06:00
altskop 94522d104b Remove mousebuttondown in cursor styles and switch to "pressed_" prefix instead. 2023-02-05 15:34:58 -06:00
Gouvernathor 9f1dbf208c Add renpy.is_pixel_opaque (#4315)
* Add renpy.is_pixel_opaque

* Change the signature
2023-02-05 12:31:59 -05:00
Gouvernathor fd86992a0e Make the alt character accept kwargs (#4321)
Make the alt character pass kwargs through
2023-02-05 12:31:37 -05:00
Tom Rothamel d2cb7c82b8 sl2: Improve error handling.
This is mostly intended to provide a better error message if
continue or break is out of place.
2023-02-05 12:08:48 -05:00
Gouvernathor 6052b3ec2c Add break and continue to the screen language for loop (#4316) 2023-02-05 10:55:54 -05:00
Tom Rothamel 2a6fa817de sync: Add buttons to the gui.
This should make it possible to generate a new game that
supports Ren'Py Sync.
2023-02-04 22:14:42 -05:00
Tom Rothamel 28e8203527 Fix an issue that was preventing the gui project from being run. 2023-02-04 22:14:42 -05:00
Gouvernathor 6ec246eaee doc: Changelog (#4322) 2023-02-04 14:22:49 -05:00
Asriel Senna 0e39a75e10 doc: fix typos 2023-02-04 19:42:55 +01:00
Asriel Senna 1a69e9af1b doc: update following #4318 2023-02-04 07:59:47 +01:00
Tom Rothamel 513099ef0f emscripten: Disable audio_when_unfocused and audio_when_minimized.
Fixes #4289.
2023-02-04 01:51:28 -05:00
Gouvernathor d8d5c2889a Oversampling for image manipulators (#4318)
* im.Data, and im.ZipFileImage aren't subject to oversampling, as they aren't "im transforms" - taking an im and returning another
* Composite takes several im parameters, so computing the oversampling of the whole is not trivial. I chose only to support all the images having the same oversampling factor - which is better than nothing, for obsolete functions
* Alphamask already had the constrant of the two images having the same size, they now also must have the same oversampling - seems fair enough to me. If you try it, it will most likely glitch, but that's only if and because Fix subsurface offset when oversampling #4083 is not merged
* All others have been converted.
2023-02-04 01:44:31 -05:00
Asriel Senna 0c076bf365 doc typos and fixes 2023-02-04 05:25:37 +01:00
Gouvernathor a12f7e96f7 Fix french translations 2023-02-03 17:25:18 +01:00
Tom Rothamel 8eff33f250 pyright: Fix some typing issues. 2023-02-03 01:05:57 -05:00
Tom Rothamel 12d337252e gl2: Fix off-by-one errors. 2023-02-03 00:58:55 -05:00
Tom Rothamel 5951976050 Remove unneeded line. 2023-02-03 00:30:00 -05:00
Tom Rothamel cda2f03dc1 Add the delay parameter to the Scroll action.
This lets a scroll button delay/animate scrolling.

Fixes #3747.
2023-02-03 00:26:21 -05:00
Tom Rothamel 5f05df1721 Fixes/improvements to animated adjustments.
* Round the animation target, not the final position.
* Fix math when computing position.
2023-02-03 00:24:47 -05:00
Tom Rothamel 62eadebbee Generate stylesets.pxi stably.
This prevents it from being recompiled each time Ren'Py is run.
2023-02-02 23:59:52 -05:00
Tom Rothamel 6dd9afb0ab Adapt to setuptools. 2023-02-02 23:59:52 -05:00
Asriel Senna 9e0e85bc86 implement rpy monologue none 2023-02-03 05:49:35 +01:00
Gouvernathor 36f41e3d22 doc: fix typo in example 2023-02-03 05:13:33 +01:00
Tom Rothamel 6d9b593555 Replace adjustment intertia with a more generic animation system.
This is to make it easier to animate scroll actions.
2023-02-02 22:31:49 -05:00
Tom Rothamel 28cea14a7f Enable draggable for the tutorial list of choices.
Mostly to test touch scrolling and inertia.
2023-02-02 22:31:49 -05:00
Gouvernathor a45f7c71e3 Add config.font_name_map
This is a variable that maps a short font name to a longer font name, allowing font tags (and other places fonts are used) to be shorter when required.
2023-02-02 20:53:07 -05:00
Gouvernathor eff49c8e43 Check conflicting properties in SL and ATL (#3821) 2023-02-02 20:49:18 -05:00
Gouvernathor 053428b945 Make spacing relative in grids (and vpgrids) (#3850)
Fixes #3840.

---------

Co-authored-by: Tom Rothamel <pytom@bishoujo.us>
2023-02-02 20:47:06 -05:00
Mal Graty 22a1e0525b move: Transformed-layer specific Move transition (#4268)
This alters how the Move transition deals with layers that have been
wrapped in a transform by the "show layer" statement.

Previously raw layers were hung on the layers_root widget, so that the
Move transition could unwrap them when needed. Unfortunately this meant
that it was only possible to do this unwrapping if it was the
layers_root widget being transitioned, rather than individual layers.

The change is to instead hang the raw layer on its transformation
directly, allowing it to be accessed both in the case of transitioning
the layers_root widget and also transitioning a layer in isolation. It
also makes the concept of raw_layers on the root widget redundant, and
so they have been cleaned up.
2023-02-02 20:42:32 -05:00
Gouvernathor 79aedc830c Upgrade the fixed rollback documentation to strip obsolete functions (#4288) 2023-02-02 20:41:34 -05:00
Gouvernathor 1c84857191 Fix recent director regression (#4311)
* Patch check_image_attributes

The last change to now-line 147 require `negative` and the elements of `l` to be the same type,
which they are not because the elements of `l` are not of constant type:
when added by line 134 they're lists, but when added by line 139 they're tuples.
This converts them always to lists - the memory-heavier but safer option.

* Convert all to tuples

* Simplify the code
2023-02-02 20:28:10 -05:00
Tom Rothamel ebc1ed7ab6 Merge pull request #4310 from renpy/better-director-enable
Better director toggle variable
2023-02-02 20:26:27 -05:00
Gouvernathor 8a3b69347a better director opt-out
Replaced a variable meant to change but placed in a constant store, with a query on a variable in the general store.
2023-02-02 16:55:01 +01:00
Tom Rothamel 9b82eaf228 Fix the documentation of config.gamedir and renpy.open_file. 2023-02-02 09:57:43 -05:00
Tom Rothamel 33c86d3b93 Revert "Normalize gamedir to slashes"
This reverts commit c7c7733be3.
2023-02-02 09:37:16 -05:00
Gouvernathor c7c7733be3 Normalize gamedir to slashes 2023-02-02 15:15:50 +01:00
Tom Rothamel 3d7b15c521 Only collapse runs of whitespace consisting of space and \n.
\r doesn't exist in Ren'Py, and if the user picks another kind of
whitespace, it's best to preserve it.

Fixes #4275, closes #4299.
2023-02-02 00:50:26 -05:00
Tom Rothamel 3918cd3e93 Merge pull request #4279 from Tey/webvideo
Add Movie() support for web
2023-02-02 00:42:34 -05:00
Tom Rothamel f42b11ce6b Merge pull request #4301 from renpy/doc-style
Update the Style page
2023-02-01 23:48:07 -05:00
Tom Rothamel e8c11080a5 Merge pull request #4304 from renpy/doc-currying-callbacks
Add an example of currying a character callback
2023-02-01 23:47:32 -05:00
Asriel Senna 194cacf7f2 Update internal use of text_align 2023-02-02 05:37:47 +01:00
Asriel Senna a0dba5ca1d Update good practices in the doc and the tutorial 2023-02-02 05:34:07 +01:00
Asriel Senna 6c89fcb29d Update and compat gui.text_properties 2023-02-02 05:25:23 +01:00
Asriel Senna ad2e80f900 change the documentation from text_align to textalign 2023-02-02 05:24:19 +01:00
Asriel Senna be95fa7412 Enable textalign in screen language 2023-02-02 05:02:38 +01:00
Gouvernathor 7094d87843 doc: add an example of currying a character callback 2023-02-02 04:07:29 +01:00
Moshibit 9e02cf20f4 Update Spanish translation (#4302)
* Update common.rpy

* Update developer.rpy
2023-02-01 18:43:33 +01:00
Gouvernathor d284791ffb doc: minor tweaks and typos on the lifecycle page 2023-02-01 12:24:29 +01:00
Gouvernathor 8637d74c3a doc: some further edits 2023-02-01 12:22:29 +01:00
Gouvernathor 69701070b6 doc: Update styles documentation
Various rephrasings, added links, comparisons with modern renpy statements, remove duplicate entry for the style inspector, and so on.
2023-02-01 11:43:33 +01:00
Gouvernathor 76b8962bc5 Fix last
Weirdly enough defaultdict.pop raises an error if the key doesn't exist
2023-02-01 08:44:09 +01:00
Gouvernathor 2f19f4d3e9 Check that the deferred errors are correct when releasing them 2023-02-01 08:29:12 +01:00
Tom Rothamel 17e1cf0a67 Merge pull request #4296 from renpy/disable-empty-slkeywords
Disable empty keywords in screen parsing
2023-02-01 01:43:50 -05:00
Tom Rothamel 49e531fabb Merge pull request #4295 from renpy/tts-sub
Use presumably faster builtin methods
2023-02-01 01:43:28 -05:00
Tom Rothamel 1bd7bc6d53 Add Lexer.deferred_error, and support for deferred errors.
A deferred error is a parse error that might or might not manifest,
based on configuration variables that need to be set early, but can
be in any file.

These errors are stored in .rpyc files, and might become real parse
errors, or might be discarded.

This is intended to address #4284.
2023-02-01 01:37:45 -05:00
Gouvernathor ed19b3c333 Update french translations 2023-01-31 19:32:17 +01:00
Gouvernathor fb251c362d Error-out on emply screen language keyword 2023-01-31 17:59:04 +01:00
Gouvernathor 3e0a84ee8c doc: fix typos and escape 2023-01-31 15:20:54 +01:00
Gouvernathor db419875b0 Use presumably faster builtin methods 2023-01-31 15:14:58 +01:00
Tom Rothamel a474006d40 Add config.tts_substitutions.
This allows words to be replaced with their pronuncations, for
the purpose of self-voicing.
2023-01-31 00:27:16 -05:00
Gouvernathor d764a100a6 doc: reference typo 2023-01-31 04:44:46 +01:00
Gouvernathor bc2f9c866b doc: forgotten code block 2023-01-31 04:42:07 +01:00
Tom Rothamel a49bd0133c Fix crash on Android 12.
It looks like there were two things happening at once. One might have
been caused by aggressive power saving after onPause returns, and
seems to have been fixed by renpy-build@e73258924e907fe613ea6f243ab4a6bcae561632 .

The second was a crash in renpy.audio.audio.pause_all, that is probably
caused by the Audio Focus system on Android 12 starving the audio
thread, leading to things locking up.

This change pauses the audio without acquiring any locks, and was
stable after tens of pause-resume cycles on my Pixel 7.

Addresses #4286.
2023-01-29 22:55:10 -05:00
Tey 97f67f3cb8 Do not warn if playback is stopped before movie is ready 2023-01-30 03:41:09 +01:00
Tey bec8d214d3 Disable debug output by default 2023-01-30 03:17:15 +01:00
Teyut 7cd3ed824f Merge branch 'renpy:master' into webvideo 2023-01-30 02:35:48 +01:00
Tom Rothamel 7fd6fda193 Fix regression. 2023-01-29 14:58:37 -05:00
Tom Rothamel 0c0b824be6 sync: Finish changing to taking the url. 2023-01-29 14:22:08 -05:00
Tom Rothamel 261e4f9926 py3: Build using setuptools. 2023-01-29 14:15:46 -05:00
Tom Rothamel 221815a3ad Remove the embedded libfribidi.
It's now fine to use the system fribidi, so we use that. This
also upgrades the interface to use Python unicode functions that
are no longer deprecated.
2023-01-29 13:24:07 -05:00
Tom Rothamel 33e740e4ad Fix various warnings produced by GCC or clang. 2023-01-29 13:10:40 -05:00
Tom Rothamel b64c4c0904 Fix warnings emitted during compilation. 2023-01-29 10:43:08 -05:00
Tom Rothamel e00dd6a491 Fix use of undefined behavior with matrixes.
* Use of a zero-length array in the middle of the structure is non-portable,
  so replace it with a pointer.

* Apparently, M_PI is non-portable, so replace it with the constant.
2023-01-29 10:24:40 -05:00
Tey 2a6bfb8878 Add support for movies with mask on web 2023-01-29 04:23:04 +01:00
Tey 90b29854a9 Add "renpy.alpha_mask" shader that sets transparency of a texture using another texture 2023-01-29 04:20:29 +01:00
Tey 9358dbc613 Make cached_texture public so GL2Draw.render_to_texture() can actually use it 2023-01-29 04:18:53 +01:00
Tom Rothamel ea4e9bc144 sync: Fix wording. 2023-01-28 21:38:42 -05:00
Tom Rothamel 280ea1e0e4 Document the sync server protocol. 2023-01-28 21:34:34 -05:00
Tom Rothamel d5a7b257dc Include a hash of save_directory with the upload.
It may be necessary to cut off an API client, so this will allow that.
2023-01-28 21:28:23 -05:00
Tom Rothamel 84238fcca5 sync: Include the save_directory with the sync ids.
This should add a little to the entropy involved.
2023-01-28 21:01:18 -05:00
Tom Rothamel f4990b9f98 Add CurrentScreenName().
This is a screen function that returns the name of the current
screen (ignoring use-es).
2023-01-28 10:28:38 -05:00
Tom Rothamel e0d6230f2f sync: Preserve mtime when unpacking files.
This helps make sure that the right persisten is used, and gets
the save times correct.
2023-01-28 01:50:43 -05:00
Tom Rothamel c0385ce188 sync: Check that as sync belongs to the game being played. 2023-01-28 00:57:19 -05:00
Tom Rothamel e624691fc3 Merge branch 'sync' 2023-01-28 00:21:44 -05:00
Tom Rothamel a173928fe6 token: Allow loading slots where the save token wasn't accepted. 2023-01-28 00:21:05 -05:00
Tom Rothamel 4e06513d07 Update the look of the default sync screens. 2023-01-28 00:19:50 -05:00
Tey a66a521660 Only copy a video frame when a new one is available
This relies on requestVideoFrameCallback() which is available on Chrome and Safari,
but not Firefox.
2023-01-27 23:38:43 +01:00
Tey 7c08938fb9 Copy video frame to WebGL texture to improve performances
Video with alpha masks are not supported yet.
2023-01-27 23:36:59 +01:00
Tey c51c5e0e7d Add a way to generate an empty GLTexture and retrieve its name
This is required for the web platform so the browser copy video frames to it from JS.
2023-01-27 23:32:06 +01:00
Tom Rothamel ca649f95ec sync: Various improvements.
* Allow the sync id to be typed in lower-case.
* Set the correct init.
* Do not depend on the system-wide confirm screen.
* Use gui._scale rather than gui.scale.
2023-01-27 02:48:47 -05:00
Tom Rothamel 247b5d33cd Merge branch 'master' into sync 2023-01-27 01:22:10 -05:00
Tom Rothamel c9bdd74a5c Allow save files without signatures to be loaded. 2023-01-27 01:08:30 -05:00
Tom Rothamel 86be00ff75 Fix issues with maxing focus.
The new max focus was not stored, causing problems. If maxing a focus
happens when a displayable is grabbed, the grab is broken.

Fixes #4092, resolves #4108.
2023-01-26 21:03:01 -05:00
Tey eadff6ee94 Add more debug outputs and a switch to disable them 2023-01-25 21:31:13 +01:00
Gouvernathor 687e1f190d doc: typo 2023-01-25 21:09:15 +01:00
Tom Rothamel d0f293d799 Include libhydrogen in renpy.encryption.
This fixes a linking problem with the python 2 renpyweb, and doesn't
hurt anything else.
2023-01-25 11:20:25 -05:00
Tom Rothamel 32ee3ed517 Include libhydrogen in renpy.encryption.
This fixes a linking problem with the python 2 renpyweb, and doesn't
hurt anything else.
2023-01-25 11:03:28 -05:00
Tom Rothamel 84d12e2a93 sync: Add sync system.
This allows the user to upload their game data to a Ren'Py-run
server, and download it onto a new device.
2023-01-25 00:16:32 -05:00
Tom Rothamel e52ba082bb Fix typo in Setup. 2023-01-25 00:14:15 -05:00
Tom Rothamel b3dd01d50a sync: Add libhydrogen and renpy.encryption.
This is a much lighter set of libraries that will allow
authenticated encryption.
2023-01-24 22:44:52 -05:00
altskop 23122310ae Support for new cursor types
Added support for "mousebuttondown" and "button" states for mouse cursors. Additionally, updated the documentation.
2023-01-24 12:42:49 -06:00
Tom Rothamel 74027bef5d doc: Changelog and more.
This is the result of auditing the history to find items that
didn't get changelogged. There are still a number of big items
that need to be added.
2023-01-24 02:11:18 -05:00
Tom Rothamel aa6cedcc87 Adjust how history_current_dialogue works, enable by default.
Having do_done happen before do_display seemed like it could
cause problems, so put the dialogue onto the history_list, pop
it, and put it back on again in do_done.
2023-01-23 23:59:38 -05:00
Tom Rothamel 2a1ecfd497 sync: Save location improvements.
* It's now possible to specify a list of additional save locations
  that files can be saved to.
* A new method that gets a path to a save or persisten file.
2023-01-23 23:28:54 -05:00
Tom Rothamel fc561141d4 Reinitialize save locations. (And clean up log_clock.) 2023-01-23 23:28:54 -05:00
Tom Rothamel e4c7faf8de Merge pull request #4028 from Noriverwater/4018
Allow adding the current dialogue to history screen
2023-01-23 23:28:46 -05:00
Tey c06da680ed Fix scrolling bars appearing when prompt/error message shows up 2023-01-23 18:13:53 +01:00
Tey 70ef636572 Handle cutscene video load error and show message for web 2023-01-23 18:13:21 +01:00
Tey 3029937cf6 Implement video file rendering for web
Video files are rendered by the browser using a HTML video element. The video
output is drawn to a canvas periodically and the canvas content is copied to
a MEMFS file for Renpy to process it. The file format is TGA to reduce the
CPU load as much as possible (HTML canvas only support exporting data as JPG
or PNG natively).
2023-01-23 05:37:18 +01:00
Tey bba9e06d31 Forward video specific call to JS 2023-01-23 05:29:28 +01:00
Tey 417dd54e49 Handle URL scheme for video files on web 2023-01-23 05:27:21 +01:00
Tey 87fd6ea4f3 Use URL scheme for video files on web 2023-01-23 05:24:47 +01:00
Tey 35cdc01c27 Add video files to remote files list to process them differently 2023-01-23 05:23:52 +01:00
Tom Rothamel a4b1172883 Rename to voice_after_game_menu.
Per comment in #4019.
2023-01-20 23:10:13 -05:00
Tom Rothamel 3c8a31cff2 Add the voice after menu preference.
This allows the voice to continue being played after the user
enters the menu.

Fixes #4019.
2023-01-20 22:04:21 -05:00
Tom Rothamel 780fe50050 Include all commits in version calculations. 2023-01-19 22:27:23 -05:00
Tom Rothamel 094bf6edb5 py: Remove a del that didn't do much.
But did cause problems running under Python 2.
2023-01-19 21:20:39 -05:00
Tom Rothamel ae9d6d2ea3 Merge Layer displayable and detached layers (#4239)
This allows one to create layers that are not part of the normal layer stack, but instead are accessed through a Layer displayable.
2023-01-19 01:26:02 -05:00
Gouvernathor 78d423b9e9 typos
yay for reachability analysis
2023-01-18 19:16:18 +01:00
Tom Rothamel 926f9190be Merge pull request #3929 from renpy/lint-reachability-1
Add lint reachability analysis
2023-01-18 02:18:48 -05:00
Tom Rothamel cecc13498a Release the grab when losing focus while changing context.
Fixes #4172
2023-01-17 22:36:42 -05:00
Tom Rothamel 1051e3f2dc Merge pull request #4252 from renpy/fix-4194
Apply transforms to displayables the proper way
2023-01-17 22:05:44 -05:00
Mal Graty b5bb26fa52 layerdisp: First pass at documentation 2023-01-17 23:41:32 +00:00
Mal Graty 58efd993dd layerdisp: Add config.detached_layers 2023-01-17 23:41:23 +00:00
Mal Graty ddff0df466 layerdisp: Call visit_all callback on self first
The Layer displayable has its child injected using visit_all. That makes
the default behaviour of calling the callback on children first
unhelpful, as it descends the tree before the child is replaced. This
change flips that order for the Layer displayable, calling the callback
first on self (allowing the child be updated) before descending into the
new child.
2023-01-17 23:41:23 +00:00
Mal Graty fbbe9b138b layerdisp: Make Layer displayble public 2023-01-17 23:41:23 +00:00
Mal Graty 2ade8e0449 layerdisp: Capture detached layer transitions
Only care about layers being displayed, either directly or via a Layer
displayable.
2023-01-17 23:41:23 +00:00
Mal Graty 929aedd082 layerdisp: Inject layers into displayables
Reuse the tree traversal done to support per_interact to find Layer
displayables in the tree and replace their contents before calling
per_interact as normal.
2023-01-17 23:41:23 +00:00
Mal Graty f06cac8537 layerdisp: New layer displayable
Uses the clipping keyword argument via properties to avoid making it
usable as a positional argument, and to prevent the creation of a new
style. Additionally the AdjustTimes init is skipped as there's no
benefit to initialising either the times or the child before add is
called by interact_core.
2023-01-17 23:41:23 +00:00
Mal Graty 3b08646baa layerdisp: Compute the layers to process just once 2023-01-17 23:41:23 +00:00
Tom Rothamel b3558d0725 Clear the focus when entering a new context.
It will clear anyway, but doing so explicitly like this makes
sure to run all the unfocused handlers before the context is
entered.

Fixes #4255.
2023-01-16 21:55:05 -05:00
Mal Graty 6387e44694 Fix more suspected typos in MoveTranslation 2023-01-16 08:26:12 +01:00
Gouvernathor 498b0966be Fix probable typo in MoveTransition 2023-01-16 08:25:49 +01:00
Tom Rothamel 6fb620c12a Use a different log message for a second video rejection. 2023-01-16 02:14:46 -05:00
Tom Rothamel da7d90ea41 Merge pull request #4145 from GlacierLab/webvideo
web: auto mute video for autoplay
2023-01-16 02:12:36 -05:00
Tom Rothamel 5893414f21 Only notify for a QuickSave that succeeds.
Fixes #4236. Closes #4238.
2023-01-16 02:04:27 -05:00
Tom Rothamel 3e571d04d2 Allow side to expand to fit its child on render.
This deals with the case where the the insets caused by the
side displayable might cause the center displayab;e to grow in
one dimension. (For example, Text that has an inset on the right
may be bigger vertically than if there was no inset.)

When this happens, the space allocated to the center displayable
will be allowed to expand until everything fits.

Fixes #4253.
2023-01-16 01:28:10 -05:00
Tom Rothamel d2c385a713 Merge pull request #4225 from mal/fix-self-voicing-screen
Restore self-voicing notification callback
2023-01-15 22:18:14 -05:00
Tom Rothamel 9a821eca85 Merge pull request #4250 from renpy/doc-variables
Variables documentation
2023-01-15 22:17:52 -05:00
Tom Rothamel 40472632a9 Merge pull request #4229 from renpy/fix-init-doc
Ban object's __init__ docstring from our documentation
2023-01-15 22:17:15 -05:00
Tom Rothamel 89c07909ef Merge pull request #4251 from renpy/doc-translation-id
Remove wrong example and move things around
2023-01-15 22:16:47 -05:00
Tom Rothamel a55ca53310 Merge pull request #3423 from uyjulian/use_rwops
loader: use RWops object from pygame_sdl2
2023-01-15 20:12:48 -05:00
Gouvernathor fb44010b7f Apply transforms to displayables the proper way 2023-01-15 19:31:47 +01:00
Asriel Senna 6ea0a43e47 doc: remove wrong example and move things around 2023-01-15 18:54:53 +01:00
Asriel Senna 5161728f5e doc: clarify arguments taken by callbacks 2023-01-15 18:27:30 +01:00
Asriel Senna e7bb3967f2 doc: various fixes, tweaks and cross-references 2023-01-15 18:26:45 +01:00
Asriel Senna 637af5a21e doc: secure the signature of renpy.display_menu 2023-01-15 18:22:51 +01:00
ねゆんせ 82dd8ffe95 ren_py: Removed extra quotation mark from example (#4247) 2023-01-15 17:19:13 +01:00
Tom Rothamel 9f24f22206 Replace heapq_merge with sort. 2023-01-14 22:15:09 -05:00
Tom Rothamel 5d069f1589 Merge pull request #3961 from Booplicate/include_module
Add `renpy.include_module`
2023-01-14 21:35:43 -05:00
Tom Rothamel 77692f7a7f Merge pull request #4201 from Moshibit/revert-1-Moshibit-patch-1
Update Spanish translation
2023-01-14 21:20:51 -05:00
Tom Rothamel 0bfa9a022b Merge pull request #4246 from altskop/3dstage.rst.layers
[docs] Elaborate on layer specification in camera statement description
2023-01-14 21:20:13 -05:00
altskop f98221a54f Elaborate on layers in camera statement description 2023-01-14 19:14:58 -06:00
Tom Rothamel b830143788 web: Add AVIF and SVG to formats that are thumbnailed. 2023-01-14 12:37:57 -05:00
Tom Rothamel c404490bd2 Merge pull request #4144 from renpy/actions-as-functions
Classify actions as functions
2023-01-14 01:14:42 -05:00
Tom Rothamel 591c440647 Merge pull request #4226 from renpy/doc-mung
Document name-munging more visually and add warning for f-strings incompatibility
2023-01-14 01:14:08 -05:00
Tom Rothamel a95e59bd7c Merge pull request #4227 from renpy/fix-documented-signatures
Document more function signatures as keyword-only.
2023-01-14 01:13:07 -05:00
Tom Rothamel 458bbe3ba4 Merge pull request #4224 from renpy/show-sig
Document some renpy.show arguments as keyword-only.
2023-01-14 01:12:19 -05:00
Tom Rothamel a40856fdad Merge pull request #4217 from renpy/config-examples
Avoid undocumented config variables in examples
2023-01-14 01:11:30 -05:00
Tom Rothamel adfe4fc712 Merge pull request #4231 from renpy/fix-config.help
Fix and document config.help
2023-01-14 01:09:47 -05:00
Tom Rothamel 1ba031b1c5 Merge branch 'master' into fix-config.help 2023-01-14 01:09:40 -05:00
Tom Rothamel 77236946d0 Document how None and Button sensitive/selected interact.
Which is to say, that None means "take the default", like it does
in other places.

Fixed #4235.
2023-01-13 23:48:37 -05:00
Tom Rothamel f49a7d293a Allow an on "show" to end an interaction.
Fixes #4234.
2023-01-13 23:34:27 -05:00
Tom Rothamel 268de01790 Delete steam_appid.txt when the game does not set it.
This prevents steam_appid.txt from activating steam for legacy
games.

Fixes #4244.
2023-01-13 22:40:25 -05:00
Tom Rothamel beeed03b54 web: Hide exec-ed commands from the store. 2023-01-13 22:30:47 -05:00
Tom Rothamel 8784250be9 Automatically oversample SVGs.
SVGs will be automatically rendered at the drawable resolution,
and then oversampled to reduce them to the appropriate virtual
size. The result is something very similar to the way text is
rendered always sharp.

Fixed #1641.
2023-01-13 01:40:49 -05:00
Tom Rothamel 4f972a5c39 Allow SVG images to be loaded at alternate sizes.
And document the requirement for SDL_image 2.6.
2023-01-11 23:45:46 -05:00
Tom Rothamel 561dcdbe74 Diagnose unsupported formats when loading images.
Based on #3906.

Co-Authored-By: Taeyeon Mori <taeyeon@oro.sodimm.me>
2023-01-11 21:48:36 -05:00
Tom Rothamel 8906015895 Reload .avif and .svg files when they change.
Co-Authored-By: Taeyeon Mori <taeyeon@oro.sodimm.me>
2023-01-11 20:18:38 -05:00
Tom Rothamel 5d6d660e0b Update the image extensions list to include avif and svg. 2023-01-11 01:01:38 -05:00
Gouvernathor 758b5e2f38 whitespace 2023-01-10 21:48:25 +01:00
Gouvernathor 198fc93532 doc: minor corrections
3 configs missing a link, one misordered in the general page, and one inexistent used in an example
2023-01-08 17:19:57 +01:00
Gouvernathor f82f7d82d5 docgen: classify Actions and Values by inheritance check 2023-01-08 17:01:14 +01:00
Gouvernathor 0558efe5d9 Merge branch 'master' of https://github.com/renpy/renpy 2023-01-08 05:40:04 +01:00
Gouvernathor 7b1ea17a91 typos and whitespace 2023-01-08 05:39:57 +01:00
Gouvernathor 99514a9341 doc: document config.help's use as Help's default value
Also fixes Help's doc which was inaccurate - config.help_screen is a fallback, not an override.
2023-01-08 03:30:33 +01:00
Gouvernathor 457ba21aba Remove config.help's first "help on config" implementation 2023-01-08 03:27:35 +01:00
Tom Rothamel 570cbb8b5b Error out early when trying to run live2d on the web platform. 2023-01-07 21:05:32 -05:00
Gouvernathor 665e5760d8 docgen: ban object's __init__ docstring
In py3, an object's method inherits the object's method's docstring.
We don't want that one to pass as one written by us and which should be included in our documentation.
2023-01-08 02:33:30 +01:00
Tom Rothamel 1cb7d09b97 Update the copyright to 2023. 2023-01-07 19:21:14 -05:00
Tom Rothamel 8cb0fd0670 py3: Update copyright script to work with Python 3. 2023-01-07 19:20:59 -05:00
Gouvernathor 922798185c fix typos, remove obsolete information 2023-01-07 23:40:20 +01:00
Gouvernathor 2bd84d93b8 doc: use stars and a slash to secure signatures
Also, the `alpha` parameter, which was documented as "ignored", was removed from transition classes' signatures.
2023-01-07 23:38:26 +01:00
Gouvernathor b2ce4fa349 doc: Warn about name-munging and f-strings
until and unless #4084 gets resolved
2023-01-07 23:00:55 +01:00
Mal Graty 978126612f tts: Restore self-voicing notification callback 2023-01-07 10:34:10 +00:00
Tom Rothamel 1e4298ed61 Remover circuitpython from vscode settings. 2023-01-06 22:26:59 -05:00
Tom Rothamel 6b227619e9 pyright: Fix warning. 2023-01-06 22:26:59 -05:00
Gouvernathor 2a6bda3a3d doc: Improve and secure renpy.show's signature 2023-01-06 18:46:31 +01:00
Tom Rothamel 0628b3c1ae Merge pull request #4222 from renpy/py2-test
Use the regular way of testing py's version
2023-01-06 00:05:18 -05:00
Tom Rothamel 801cee5db1 Fix the encoding when loading bmfonts. 2023-01-05 23:34:05 -05:00
Tom Rothamel ca1c0f94f5 Fix a crash caused by Preferences changing without changing its length. 2023-01-05 21:43:35 -05:00
Gouvernathor c356f177d4 Use the regular way of testing py's version 2023-01-06 03:23:56 +01:00
Gouvernathor 0a434367b3 doc: opt to documenting config.gamedir 2023-01-06 02:55:58 +01:00
Tom Rothamel 250bb26b16 Merge pull request #4212 from renpy/wrong-include
Include functions intended to be documented
2023-01-05 20:49:02 -05:00
Tom Rothamel 3a1b3e75d3 Merge pull request #4213 from renpy/config.language
Unmixup config.language and config.default_language
2023-01-05 20:48:42 -05:00
Tom Rothamel 6f6e40e066 Merge pull request #4215 from renpy/config.console
Add a formal doc entry for config.console
2023-01-05 20:48:28 -05:00
Tom Rothamel eb7ca2d684 Merge pull request #4214 from renpy/config.editor
Undocument config.editor and document Shift+E
2023-01-05 20:42:42 -05:00
Tom Rothamel d376f8cc30 Merge pull request #4216 from renpy/config.perspective
Add an entry for config.perspective
2023-01-05 20:39:45 -05:00
Tom Rothamel 9b051a0918 Merge pull request #4218 from renpy/config.pad_bindings
Add a entry for config.pad_bindings
2023-01-05 20:37:45 -05:00
Tom Rothamel fadff3ae4c Merge pull request #4221 from mal/sticky-layers-redux
Sticky layer tweaks
2023-01-05 20:37:19 -05:00
Tom Rothamel 4f6951e911 Merge pull request #4220 from mal/filmstip-gl2
Update anim.Filmstrip to take advantage of gl2
2023-01-05 19:22:25 -05:00
Mal Graty 8cd3d4553d sticky: Document feature 2023-01-05 23:48:39 +00:00
Mal Graty 0d558d2670 sticky: Parity in clean up between hide and clear
This change ensures that tags are only unstuck when being removed from
the layer to which they were stuck. As they could only have been stuck
to a sticky layer in the first place, there is no need to check if the
layer is sticky.
2023-01-05 23:08:48 +00:00
Mal Graty 7350cd81fd anim: Update Filmstrip to take advantage of gl2
This change results in much better prediction of the source image,
considerably speeding up prediction and loading while reducing I/O.
Previously it would attempt to load the source image for each frame.
2023-01-05 10:10:14 +00:00
Gouvernathor c540df7fd1 doc: add a entry for config.pad_bindings 2023-01-05 07:30:03 +01:00
Gouvernathor 7d17c94251 doc: use the better function (given context) 2023-01-05 07:29:08 +01:00
Gouvernathor 2a18f54179 doc: avoid undocumented configs in examples 2023-01-05 07:22:12 +01:00
Gouvernathor 3b910c8227 doc: Add an entry for config.perspective 2023-01-05 07:02:17 +01:00
Gouvernathor 7b2a55e0a4 doc: Add an entry for config.console 2023-01-05 06:53:33 +01:00
Tom Rothamel 51fcf958e8 doc: New preferences. 2023-01-05 00:49:09 -05:00
Gouvernathor 053d0bc158 doc: Undocument config.editor and document Shift+E 2023-01-05 06:39:06 +01:00
Tom Rothamel 73300ccc27 Rename preferences.pwa_preload to .web_cache_preload.
This matches the name used in Preferences, which will make the
documentation easier to write.
2023-01-05 00:24:09 -05:00
Tom Rothamel 37b000f36c Add a preference that controls if the game plays audio when unfocused.
Defaulting to off, because I personally like keeping the game running
when doing something else. (And because this would ruin the usefulness
of music rooms.)

Fixes #3777.
2023-01-05 00:20:03 -05:00
Gouvernathor 93d3163b01 doc: unmixup config.language and config.default_language 2023-01-05 06:11:23 +01:00
Tom Rothamel 260913703b audio: Reference count pause_all. 2023-01-05 00:09:33 -05:00
Gouvernathor 879c32e538 doc: Fix typo preventing functions from being included 2023-01-05 04:42:23 +01:00
Tom Rothamel c4ff37826a Preserve volumes when muted.
Fixes #3975.
2023-01-04 22:39:38 -05:00
Tom Rothamel 3e14e1f25e Merge pull request #3991 from renpy/fix-3966
Remove bogus onlayer parsing on scene statements
2023-01-04 22:10:47 -05:00
Tom Rothamel 68e2cfb420 Explicity document that it is not required to close text tags.
This has been the behavior of Ren'Py, outside of lint, for quite some
time, and the usability improvements likely make up for the chance
that some errors will pass unnoticed.

Fixes #3926.
2023-01-04 00:45:53 -05:00
Tom Rothamel e531f7561a Add config.after_default_callbacks. 2023-01-04 00:04:09 -05:00
Tom Rothamel 96ff02dff8 Allow creator-defined statements to execute at default-statement time.
Fixes #4041.
2023-01-03 23:12:53 -05:00
Gouvernathor aa7a197771 doc: tweaks to last
Move a warning section that seemed out of place
Fix references to functions (the mistake predates my PR)
2023-01-04 03:26:29 +01:00
Gouvernathor c8e22d8c7f Document new clauses for show screen and other statements (#3601)
* doc: typos and references to new clauses

* doc: new parameters to show screen and hide screen

* revert accidental revert

* doc: document new clauses for call screen

and bring nopredict in line with the others

* doc: fix wrong example

Co-authored-by : Booplicate
2023-01-03 20:51:59 -05:00
Tom Rothamel 5de6385165 Merge pull request #3595 from Booplicate/new_screen_clauses
New screen clauses
2023-01-03 20:50:59 -05:00
ねゆんせ 9b6df453bc doc: fixed double h (#4209) 2023-01-03 18:16:27 +01:00
Asriel Senna b23ecf3603 Fix previous, allow all previously unglitched statements 2023-01-03 15:21:40 +01:00
Gouvernathor d7d53a06b9 Fix wrong config variable name (#4205)
doc: fix wrong config variable name
2023-01-02 21:30:58 -05:00
Gouvernathor bae6672f36 Remove remaining gl2 references (#4206)
doc: Remove remaining gl2 references
2023-01-02 21:30:29 -05:00
Mal Graty 0e0e91495f Sticky layer implementation (#4202)
* Group layer definitions in config.py

* sticky: Initial sticky layer implementation

* sticky: Add sticky argument to renpy.add_layer

* sticky: Compat with older versions without sticky

* sticky: Document config.sticky_layers

* sticky: Use list for config var instead of set

Usability trade off at Tom's request.
2023-01-02 21:30:10 -05:00
Tom Rothamel 329e0f49de Consider pauses in text tags when computing auto-forward time.
Fixes #3958.
2023-01-02 21:29:08 -05:00
Gouvernathor 97d1fd059d doc: remove deleted page from the index
following #4170
2023-01-02 18:07:09 +01:00
Gouvernathor 55858f9f6d doc: fix method syntax and linebreaks 2023-01-02 18:06:08 +01:00
Gouvernathor 1b8269d746 doc: protect unsafe character
it was creating a link for some reason
2023-01-02 18:05:37 +01:00
Moshibit f02ca4c042 Revert "Fix typo" 2023-01-02 07:45:34 -06:00
Moshibit f3e19bd772 Merge pull request #1 from Moshibit/Moshibit-patch-1
Fix typo
2023-01-02 07:37:48 -06:00
Moshibit 76be237d8b Fix typo
config.history_list_length does not exist but config.history_length does.
2023-01-02 07:33:23 -06:00
Moshibit 64dd878b6b Merge branch 'renpy:master' into master 2023-01-02 07:24:45 -06:00
Gouvernathor b1b8b03f12 Persistent improvements and fixes (#4197)
* Update persistent.py

Add the __contains__ syntax
Add the _keys method
Include __ keys in _clear's behavior, and use the new _keys method to avoid code duplication

* Document the new behaviors and explain the __ fields

* Add link anchor

* Undo _keys, turn `in` into _hasattr, document this

* better document __-starting fields' limitations

* doc: Move _hasattr and word things better

* typo
2023-01-02 00:02:41 -05:00
Tom Rothamel d5a816c4fe Allow negating attributes in the interactive director.
This makes the interactive director more useful in cases where
layeredimages are involved.

Fixes #2605.

Co-Authored-By: JackkelDragon <37125112+JackkelDragon@users.noreply.github.com>
2023-01-01 13:46:10 -05:00
Moshibit bef4a6f99e Update common.rpy 2023-01-01 09:04:14 -06:00
Moshibit 72f3513022 Update launcher.rpy 2023-01-01 09:01:12 -06:00
Tom Rothamel 47b82bb2d4 Persistent devtoool.
This makes it possible to visualize the persistent data.
2023-01-01 09:56:05 -05:00
Tom Rothamel 362b22bd4d Merge pull request #4192 from renpy/overlay_functions
Undocument config.overlay_functions
2023-01-01 09:36:27 -05:00
Tom Rothamel 6226a8a78b Viewport inertia.
This is based on the implementation in iOS, as described at
https://ariya.io/2011/10/flick-list-with-its-momentum-scrolling-and-deceleration .

When the user releases their finger from the viewport while it's moving,
inertia will keep the viewport scrolling until either the user begins to
scroll again, or it comes to a natural stop.
2023-01-01 02:09:41 -05:00
Mal Graty e3d443acc3 Reduce duplication in new persistent viewer
By having it reuse the existing variable viewer screen with minor
alterations. Also alters an internal name to better reflect its use.
2022-12-31 22:58:10 +00:00
Gouvernathor 034ebf7d54 Comment-out unused lines 2022-12-31 22:57:31 +00:00
Gouvernathor c54034c7e0 Add persistent menu in developer tools 2022-12-31 22:57:31 +00:00
Gouvernathor 09eb77b56e doc: fix typos and add link 2022-12-31 15:17:44 +01:00
Tom Rothamel be5ad751cf launcher: Choose a language by clicking on it.
I had some feedback that clicking and then clicking on the text-button
was confusing, and it confused me late last night - so move to a single
click model.
2022-12-31 09:03:20 -05:00
Tom Rothamel 2b85a7f1eb token: Ecdsa is now a dependency for Ren'Py. 2022-12-31 08:40:15 -05:00
Tom Rothamel 708c7a52a1 Add config.save_token_keys.
This lets a game developer pre-seed the list of verification keys,
and ship 'blessed' save-games or persistent files that the user's
game will load without asking for verification.
2022-12-31 01:08:48 -05:00
Tom Rothamel b42b24be75 token: Make the tokens keys and signatures.
By making the tokens ECDSA keys, it's possible to include a signature
of the log or persistent data in each file. By doing this, it becomes
impossible to simply transfer a token from one save file to another,
allowing it to prove that the data was generated by someone who knew
the public key.
2022-12-30 23:32:43 -05:00
Tom Rothamel 5a124d6d45 token: Be more explicit about why this is important. 2022-12-30 09:35:46 -05:00
Gouvernathor 98328bd6b9 doc: remove config.overlay_functions 2022-12-30 14:38:55 +01:00
Tom Rothamel a494d160c4 Merge pull request #4191 from renpy/update-config
Futureproof list and dict config variables, and better nomenclature for callable configs
2022-12-30 08:32:42 -05:00
Gouvernathor 91e3fc15c7 doc : futureproof list and dict config variables 2022-12-30 12:40:26 +01:00
Tom Rothamel 2b719a5b86 doc: Save token security. 2022-12-30 01:07:18 -05:00
Tom Rothamel 9ce786d578 token: Confirm loading a save with a different token.
And offer to add the token to the player's current
computer.
2022-12-29 23:24:09 -05:00
Tom Rothamel 994f358ca8 token: Include the save token in a save. 2022-12-29 21:42:16 -05:00
Tom Rothamel cfd17c616c token: Include the save token in persistent data, and check it for validity. 2022-12-29 21:23:24 -05:00
Tom Rothamel 4826741846 token: Use path_to_saves to find the token.
And change the order a bit, so the token is available the first
time persistent is loaded.
2022-12-29 20:30:37 -05:00
Tom Rothamel 258beb1b38 savetoken: Generate save tokens and upgrade games to include them.
Save tokens will be used to warn the user if they're loading a
game that wasn't created on the current computer.
2022-12-29 19:38:58 -05:00
Tom Rothamel c0de244fd9 Do not generate relative imports for renpy.common. 2022-12-29 19:38:38 -05:00
Tom Rothamel a39cb7c8f6 Do not delete os from the store.
It was added, deleted, then added again. This fixes a regression
caused by 9366678fef, which removed
the re-import.
2022-12-29 10:39:55 -05:00
Tom Rothamel f1462bd1e1 Update keywords. 2022-12-29 10:14:31 -05:00
Tom Rothamel c7c713c6de Merge pull request #3946 from renpy/xycenter-style
Add the xycenter proxy style property
2022-12-28 18:19:04 -05:00
Tom Rothamel b9d1660377 text: Do not allow invisible hyperlinks to gain focus.
Fixes #3941.
2022-12-28 18:15:32 -05:00
Tom Rothamel 9366678fef afm, self-voicing: Allow self-voicing and afm to be active simultaneously.
The compromise is that when self-voicing is active, afm will only occur
when the dialogue is focused - it will not occur when another button is
focused.
2022-12-28 17:16:48 -05:00
Tom Rothamel c105989111 web: Remove unneeded disclaimer. 2022-12-28 17:16:48 -05:00
Gouvernathor a4d0b79de4 Complete Text docstring 2022-12-28 21:12:09 +01:00
Tom Rothamel 6e910343e1 Merge pull request #4185 from renpy/clarify-speaking_attribute
doc: fix and clarify confix.speaking_attribute
2022-12-28 08:56:48 -05:00
Tom Rothamel d33317fdb8 Allow Text to take a list of tokens instead of a string.
This helps the implementation of custom text tags that would be
implemented as a displayable containing a Text. Fixes #4102.
2022-12-28 02:05:54 -05:00
Tom Rothamel e020f225f8 Fix regression in how Text("") was rendered.
7d31bed4f6 introduced an issue that
changed how the empty string renders. This restores the longstanding
behavior.
2022-12-28 01:32:53 -05:00
Tom Rothamel a727c0edec Limit the maximum size of a console log result by characters.
Fixes #4031.
2022-12-28 01:16:38 -05:00
Tom Rothamel 546b903660 Fix bad keybinding. 2022-12-28 00:51:06 -05:00
Tom Rothamel 39193405ed Do not include node in LineLog.
This should prevent crashes in the case where a LineLog gets
serialized. Fixes #3871.
2022-12-28 00:17:39 -05:00
Tom Rothamel 351c97bf09 Access __main__ as renpy.__main__.
This allows Ren'Py to be imported separately.
2022-12-27 18:53:28 -05:00
Tom Rothamel b903fc7fb1 Update the keymap.
This takes advantage of any, removes unicode keys that duplicate
key-stroke keys, and makes the keypad useful.

Fixed #4030
2022-12-27 00:28:42 -05:00
Tom Rothamel 067a8b4831 Add the any prefix to covere repeat and no-repeat. 2022-12-26 22:13:19 -05:00
Gouvernathor f766375dd6 doc: fix and clarify speaking_attribute 2022-12-26 16:45:31 +01:00
Gouvernathor 4b56f275f4 typo for parser error messages 2022-12-26 12:43:23 +01:00
Tom Rothamel 6067437ea2 Improve numeric keypad keysyms.
Two changes in this one. The first is to add a quartet of new
modifiers (caps/nocaps, num/nonum) to reflect if capslock or
numlock are turned on.

The second is to create a new type of keysym, beggining with KP,
that expands out to the key with our without the numlock modifier.

Starts work on #4030.
2022-12-26 00:03:05 -05:00
Tom Rothamel 6517d35727 Add the top and bottom layers.
Thes are meant for interface and key handlers, respectivelyy, that
should not be affected by transitions.

Fixes #4818.
2022-12-25 14:25:16 -05:00
Tom Rothamel 7a6f0d6082 Merge pull request #4107 from valery-iwanofu/place_method_patch
Update place method of render
2022-12-25 00:21:15 -05:00
Tom Rothamel d38c505ec8 Merge pull request #4170 from MintiClinti/obsolete-docs
removed obsolete documentation
2022-12-25 00:19:07 -05:00
Tom Rothamel b74c14d93a Merge pull request #4141 from renpy/noblock-better-error
Add colon warning in the noblock lexer error
2022-12-24 22:29:41 -05:00
Tom Rothamel 3cb327ff8d Revert part of the last change.
The part that would prevent reporting an overfull vpgrid.
2022-12-24 22:12:07 -05:00
Tom Rothamel a8f4d149da Allow grids to be underfull.
There are some good reasons for allowing undefull grids (like a
gallery with variable number of images), and not a ton of reasons
not to allow these grids. So this changes the default.
2022-12-24 16:23:32 -05:00
Tom Rothamel 3753cfa417 Merge pull request #4154 from mal/refactor-underfull
Optimize allow_underfull for non-developer mode
2022-12-24 15:45:37 -05:00
Tom Rothamel 1b6ef60a37 doc: config.web_input. 2022-12-24 01:22:45 -05:00
Tom Rothamel 58ed0461f9 web input: Filter tags, implement allow, exclude, mask.
This is fairly simple, with the real meat of this renpy/renpy-build@6f1bdd1 .
2022-12-24 01:01:09 -05:00
Tom Rothamel 93ffeb8c32 Remove debugging. 2022-12-23 02:13:38 -05:00
Tom Rothamel 1feed24f14 webinput: Initial implementation.
This uses a browser's input element to handle renpy.input, on
Python 3.
2022-12-23 01:50:06 -05:00
Tom Rothamel 72a2b88af9 Add a displayable that waits for a Javascript value. 2022-12-22 01:45:09 -05:00
Tom Rothamel ed21a6b21c doc: Wrap the sidebar captions.
Fixes #4175.
2022-12-21 00:53:05 -05:00
Clinton Nguyen 27dbdab522 removed obsolete documentation 2022-12-19 23:57:21 -08:00
Tom Rothamel ecd1fc2803 web3: Deal with webgl context loss.
Specifically by not trying to draw when the context is gone, and
then resetting the display when it comes back.
2022-12-20 01:53:17 -05:00
Gouvernathor a59b0442f9 doc: add precision and fix typo 2022-12-20 00:20:20 +01:00
Tom Rothamel 3c2b35576e web: Process the JS command queue regularly.
This moves the JS command queue processing into the 20hz periodic
event handler. Moving it out of the idle frame handing makes sure
that the command queue runs even if the the idle frame code is
being starved by frequent events or animations.

The js command overhead was measured, and seems to be less than
the browser's cock precision.
2022-12-18 18:47:57 -05:00
Tom Rothamel 40f24c0196 web: Add caching to the webservr. 2022-12-18 09:12:50 -05:00
Tom Rothamel 6bd9819f7f web3: Include all files in the preload files list.
This makes updating the preload cache a bit easier.
2022-12-18 02:50:49 -05:00
Tom Rothamel 477ec726b2 pwa preload: Only preload if the preference is set. 2022-12-18 02:17:38 -05:00
Tom Rothamel 5c56d9c374 web3 pwa: Use smooth scaling to generate the PWA icon set. 2022-12-18 02:11:10 -05:00
Tom Rothamel 717fdd96c8 web3 pwa: Preload files into the the web browser cache.
This adds a new preference that controls if the game is loaded into
the browser cache or not, and implements that preference.
2022-12-18 01:47:23 -05:00
Tom Rothamel d004dfe2bf web: Add the ExecJS action.
This is an action that allows Ren'Py to run Javascript. It'll be
used with the PWA Cache preferences, but might as well make it a
public API.
2022-12-18 00:59:10 -05:00
Tom Rothamel 0e4ff5622e web3 pwa: Various improvements.
* Generate pwa_catalog.json in a way that matches how renpy-pre.js
  uses it.
* Directly update manifest.jso, rather than using search and replace
  to do it.
2022-12-18 00:50:19 -05:00
Tom Rothamel 2249c10d37 web3 pwa: Avoid versioning the cache.
Now that the service worker handles refreshing the cache,
we don't need to version it like this.
2022-12-17 23:51:54 -05:00
Tom Rothamel ac08209e36 Merge pull request #4152 from Vadim-Karpenko/master
web: Generate catalog of all media content for caching in PWA
2022-12-17 19:46:38 -05:00
Tom Rothamel c8b4cf9433 py2: Fix encoding issue that kept Ren'Py from running. 2022-12-16 23:21:14 -05:00
Tom Rothamel 3da93f7abd doc: Fix example of accessing mActivity. 2022-12-16 23:21:14 -05:00
Vadim Karpenko 4a8d9b6b54 Merge branch 'master' into master 2022-12-16 14:24:34 +02:00
Vadim Karpenko d0382be839 Generate MD5 hashes for core files 2022-12-16 09:13:08 +02:00
Tom Rothamel e2c1758667 Merge pull request #4160 from renpy/better-4133
Emscripten module availability
2022-12-16 00:47:40 -05:00
Tom Rothamel e2f3a6bb2b ruby: Doc and compat lenticular bracket ruby. 2022-12-16 00:43:15 -05:00
Tom Rothamel 30a3174c88 web3: Restore compatibility with Ren'Py 7 saves. 2022-12-16 00:17:55 -05:00
琴梨梨 43a08784f7 make prompt as fallback 2022-12-16 14:34:42 +10:00
Tom Rothamel 7d31bed4f6 text: Optimize tokenizing text without tags or newlines. 2022-12-15 23:06:14 -05:00
Tom Rothamel e510cb1ccc lenticular ruby: Implement.
This is a feature where one can write 【東京|とうきょう】 and have
it mean the same thing as {rb}東京{/rb}{rt}とうきょう{/rt}.

Per #4146.
2022-12-15 23:00:00 -05:00
Gouvernathor c7503f13ac doc: emscripten module availability 2022-12-16 03:47:16 +01:00
Andy_kl aec68a96a4 Fix emscripten Import and Export saves functionality 2022-12-16 05:25:29 +04:00
Tom Rothamel 53d293fe12 Merge pull request #4157 from mal/web-video-fix
webvideo: Fix small JS issues with sources
2022-12-15 19:45:56 -05:00
Mal Graty e5558f0527 webvideo: Fix small JS issues with sources 2022-12-15 16:34:33 +00:00
Vadim Karpenko 047937a57d Flip key and value for md5 hash 2022-12-15 17:10:18 +02:00
Vadim Karpenko 452e9ead75 Remove types 2022-12-15 17:06:20 +02:00
Gouvernathor ae74819174 Avoid duplicate extension calculations
A possibly safer way would be to use os.path.splitext, but it would only change anything if the file has no extension - the current implementation could yield an incorrect result, and splitext would return an empty string.
2022-12-15 13:59:41 +01:00
Vadim Karpenko cf0d2c28ec Generate MD5 hashes 2022-12-15 13:40:51 +02:00
Tom Rothamel abeebfa81c web3: Limit pwa to Ren'Py 8, rename the pwa icon. 2022-12-14 20:27:25 -05:00
Tom Rothamel 62e9a7c50c webvideo: Include the mime types with the video and alternative.
This helps the browser choose what to play.
2022-12-14 20:24:42 -05:00
Mal Graty a7c029cd1e Optimize allow_underfull for non-developer mode 2022-12-13 23:36:44 +00:00
Tom Rothamel 7d11c06cbe doc: Allow underfull. 2022-12-13 10:38:08 -05:00
Vadim Karpenko 115f249b75 Update docs of the function 2022-12-13 14:18:33 +02:00
Tom Rothamel c40bae3a5e Avoid appending build-in to package paths with built-in modules. 2022-12-13 00:23:56 -05:00
Vadim Karpenko 197af9d3e4 Remove sort keys 2022-12-13 07:20:44 +02:00
Vadim Karpenko 5e758a3b09 web: Generate catalog of all files for PWA caching 2022-12-13 07:18:50 +02:00
Tom Rothamel 1edeae716a doc: Add credit. 2022-12-12 22:10:46 -05:00
Tom Rothamel 461c5e823c Merge pull request #4151 from xareyli/launcher-ukrainian-typo
Update Ukrainian translation
2022-12-12 20:11:27 -05:00
xareyli 79ef560c06 Update Ukrainian translation 2022-12-12 22:43:20 +03:00
Tom Rothamel 2de0ec9bee Add Thai C90 font support to Ren'Py.
This is an encoding used with Thai fonts that contain precomposed
glyphs in the private use area.

Taken from https://gitlab.com/sahabandha/renpy-thai-font-adjuster ,
per #3864.
2022-12-11 23:44:07 -05:00
Tom Rothamel bd5f682196 Merge pull request #4150 from mal/console-dedupe
console: Only save command if not the same as last
2022-12-11 09:42:48 -05:00
Tom Rothamel 8ec6bb15fe pylance: Remove vars() related warnings.
The warnings seem to come from using vars() to mean object.__dict__,
so replace it with the latter.
2022-12-11 01:26:12 -05:00
Tom Rothamel acdd4ff468 Allow mouse keysyms to take modifiers.
Fixes #4122.
2022-12-10 22:01:06 -05:00
Tom Rothamel 305dd3636b launcher: When a launch fails, log it to the console. 2022-12-09 21:39:54 -05:00
Mal Graty fdd46102f4 console: Only save command if not the same as last 2022-12-10 01:46:27 +00:00
NattyanTV 80b0b2a792 Fix japanese translation case (#4148)
`Ren'PY` -> `Ren'Py`
2022-12-09 18:38:01 +01:00
Tom Rothamel 73f824ab1c py2: Remove use of f-string. 2022-12-09 09:21:58 -05:00
Gouvernathor 556e014e3a fix spaces in docstrings 2022-12-09 12:40:07 +01:00
琴梨梨 91e27ff475 web: auto mute video for autoplay 2022-12-09 16:38:51 +10:00
Gouvernathor 7cafef382b Add colon warning in the noblock lexer error 2022-12-09 01:22:02 +01:00
Tom Rothamel 4b16eebe57 Merge pull request #4126 from Vadim-Karpenko/master
web: Generate PWA icons and prepare files
2022-12-08 18:29:11 -05:00
Vadim Karpenko 3158cc8fba Set the preferred orientation from screen size 2022-12-07 19:04:01 +02:00
Vadim Karpenko 39dfe02350 Replace default project names with actual ones 2022-12-07 18:56:37 +02:00
Vadim Karpenko 385060334e Generate maskable icons, change compression 2022-12-07 09:30:03 +02:00
Tom Rothamel 59a4e6cb0b py311: Ensure python_strict exists.
This fixes an error where it's used in lexer.py, but doesn't exist
on Python 3.
2022-12-06 20:57:29 -05:00
Tom Rothamel d3bc7650fe steam: Rate-limit calls to BOverlayNeedsPresent
Fixes #3978, which is likely caused by a bug in this function on the
Steam Deck.
2022-12-05 01:22:00 -05:00
Tom Rothamel 7a7c4ec7e4 Merge pull request #4131 from renpy/duplicate-thumbnail-vars
Avoid re-defining two config variables
2022-12-04 21:59:26 -05:00
Tom Rothamel 9a68ea37f1 Merge pull request #4132 from renpy/autosphinx-knows-methods
Tag the callables properly when generating sphinx from docstrings
2022-12-04 21:59:09 -05:00
Tom Rothamel 58052bdb46 doc: More work on the dark theme. 2022-12-04 21:44:48 -05:00
Gouvernathor f4da18de2d doc-generation: tag the callables properly 2022-12-04 23:40:17 +01:00
Tom Rothamel 89fcde4dc3 doc: Fix color of pre in dark mode. 2022-12-04 17:34:58 -05:00
Gouvernathor f3d43f110c doc: avoid re-defining two config variables 2022-12-04 22:59:32 +01:00
Gouvernathor 8cdf2b45ee fix typo too 2022-12-04 22:43:35 +01:00
Gouvernathor 25ab46acd3 fix typo 2022-12-04 21:31:50 +01:00
Tom Rothamel 53df5499ea Link the various preplashes together. 2022-12-04 15:25:06 -05:00
Tom Rothamel df48f4d525 Merge pull request #4127 from renpy/web-doc
Web and presplash doc tweaks
2022-12-04 15:16:24 -05:00
Tom Rothamel 495d3bd66c Merge pull request #4128 from renpy/renpy.show-examples
Add doc examples for renpy.show
2022-12-04 15:15:17 -05:00
Tom Rothamel 2ce437871a Stop packaging atom and jedit.
Atom is an extension. Jedit is only available if it's already
present on the system.
2022-12-04 00:35:38 -05:00
Tom Rothamel 216ed01bee doc: Dark mode.
For the emo among you.
2022-12-04 00:35:38 -05:00
Gouvernathor 6f12af24d9 doc: Fix markup issue with code block in function's docstring
The block code inside the arg's block was causing an issue in the rendering of the HTML (for some reason).
The `::` was turned into a `.. code-block:: none` because as it's not proper ren'py syntax, it was issuing a warning about it when building - now it knows there's no proper syntax to expect there.
2022-12-04 01:15:46 +01:00
Tom Rothamel bcac0ed1a8 Merge pull request #4129 from renpy/new-doc-index
Upgrade toctrees for the new doc theme
2022-12-03 18:51:46 -05:00
Gouvernathor 9dc576fd30 orphan-out thequestion_nvl 2022-12-04 00:50:33 +01:00
Gouvernathor 0534264d1b orphan-out thequestion 2022-12-04 00:49:59 +01:00
Gouvernathor 9fc04f1fa4 Upgrade toctrees for the new doc theme 2022-12-04 00:31:53 +01:00
Tom Rothamel 41bba0cb14 doc: Remove over-copying from Patreon. 2022-12-03 09:42:08 -05:00
Gouvernathor 3746367531 doc: add examples for renpy.show 2022-12-03 14:58:28 +01:00
Gouvernathor e1a844a8af Update splashscreen_presplash.rst 2022-12-03 14:38:47 +01:00
Gouvernathor adf22f984e doc: Remove thanks and tweak presplash 2022-12-03 13:48:35 +01:00
Vadim Karpenko 0527380c7b web: Generate PWA icons 2022-12-03 13:11:42 +02:00
Tom Rothamel f793cec5d8 doc: Undocument config.gl2.
It's the primary renderer at this point, and games should not
disable it.
2022-12-03 02:36:36 -05:00
Tom Rothamel ab818456b0 Merge pull request #2934 from Gouvernathor/patch-2
[7.5+] Remove obsolete gl2 references
2022-12-03 02:32:46 -05:00
Tom Rothamel ca2e59e0a9 doc: Build with renpy3 from now on. 2022-12-03 02:28:30 -05:00
Tom Rothamel 923ff6442f doc: Fix rendering of variables. 2022-12-03 02:16:01 -05:00
Tom Rothamel 57e3331d81 doc: More work to make the documentation look good with the RTD theme. 2022-12-03 02:07:00 -05:00
Tom Rothamel cc69d17254 doc: Switch to using sphinx_rtd_theme. 2022-12-03 01:15:11 -05:00
Tom Rothamel 7326afc126 web, doc: Actually check in the web docs. 2022-12-02 18:14:09 -05:00
Tom Rothamel a4876166e4 Make DLC translatable. 2022-12-02 18:13:45 -05:00
Tom Rothamel 6df0957a4a Merge pull request #4121 from Neyunse/master
Differentiate DLC from other types of packages (Build)
2022-12-02 18:10:39 -05:00
Tom Rothamel 74da96c073 doc, android: Add a line about the version of android that is supported.
Fixes #4124.
2022-12-01 22:54:08 -05:00
Tom Rothamel b670f13108 web, docs: Merge web documentation.
Thanks to the Patreon sponsors.
2022-12-01 00:40:43 -05:00
Tom Rothamel c1999ebace web: Zip the game up. 2022-12-01 00:40:43 -05:00
Tom Rothamel 061b57c9ce Merge pull request #4123 from Vadim-Karpenko/master
web: fix to_unlink changes size during iteration error
2022-11-30 20:41:04 -05:00
Vadim Karpenko 5dfcada8ac Move current time out of the to_unlink loop
Improve the performance of the loop by avoiding calling for the current time on every step of the iteration. A few milliseconds won't make any difference and could be neglectable.
2022-11-30 16:15:36 +02:00
Vadim Karpenko 64b0b0bb84 Remove redundant accesses to the to_unlink 2022-11-30 16:05:17 +02:00
Vadim Karpenko b5928b26ed fix to_unlink changes size during iteration error 2022-11-30 08:26:24 +02:00
Tom Rothamel 9b1a20e049 web: Actually check in 00webvideo.rpy. 2022-11-29 22:38:16 -05:00
Tom Rothamel 099f0ffa6f web3: Merge webvideo playback in.
From the June 2022 Patreon article. Thanks, sponsors!
2022-11-29 22:05:59 -05:00
ねゆんせ 8b59103258 added: Differentiating DLC from other types of packages 2022-11-29 22:35:18 -03:00
Andy_kl 95f048272f live2d: Update lib install destination.
Fix mac destination. Remove Windows x32.
2022-11-29 18:25:20 +04:00
Tom Rothamel 24ed86da48 web3: Send wasm files with the wasm type.
This allows for a streaming compile and faster start, and also
prevents an error from being reported.
2022-11-28 00:32:19 -05:00
Tom Rothamel fafb45bbce bubble: Remove test code that snuck in. 2022-11-27 14:49:53 -05:00
Tom Rothamel ad90228ce1 web3: Handle the game title and presplash image. 2022-11-27 01:32:39 -05:00
Tom Rothamel f90a9b56cc web3: Unlock web3 in the launcher.
This makes it possible to use the launcher to make a web3 game.
2022-11-27 00:11:47 -05:00
Tom Rothamel a9a6bc8cf4 Merge pull request #4111 from Moshibit/master
Update Spanish translation
2022-11-25 23:08:42 -05:00
Tom Rothamel d87e8a3b9b web3: Select between web2 and web3 on distribute. 2022-11-25 00:20:19 -05:00
Tom Rothamel f1a6fec980 Only incluede bytecode-<ver>.rpyb for the current Python. 2022-11-24 21:34:43 -05:00
Tom Rothamel 2319e889c6 Include bubble.png in the Ren'PY build.
Fixes #4112.
2022-11-24 10:36:58 -05:00
Tom Rothamel 63caa1d436 Merge pull request #4101 from renpy/lint-blurb
Add a lint blurb to the launcher's splash
2022-11-24 09:39:35 -05:00
Gouvernathor 09b562836a Update blurb 2022-11-24 13:45:54 +01:00
Moshibit 1979fd0b61 Update options.rpy 2022-11-24 06:42:06 -06:00
valery-iwanofu 4b1e1fba88 Update cdd.rst
Added doc for Displayable.place() and updated doc for Render.place()
2022-11-24 13:16:31 +07:00
Tom Rothamel bf125a8795 Merge pull request #4090 from renpy/fix-4077
Fix star-import of substores
2022-11-23 22:33:23 -05:00
Tom Rothamel 444c885785 Merge pull request #4104 from Ayowel/fix/extension_sys_path
Add path cleanup when reloading extensions and extension __file__ context
2022-11-23 22:31:00 -05:00
Tom Rothamel 8af6ec55f1 Merge pull request #4110 from renpy/exports-questions
Fix some mistakes in exports.py
2022-11-23 22:28:56 -05:00
Gouvernathor 9f5df79973 Fix :other: 2022-11-24 00:09:32 +01:00
Gouvernathor b870c5b0dd Update exports.py 2022-11-23 21:33:58 +01:00
Tom Rothamel 21b507dc71 web3: Report progress loading the game script. 2022-11-22 23:22:42 -05:00
valery-iwanofu 4afce1d144 Update place method of render
Method Render.place() now returns d.place() result
2022-11-22 23:26:32 +07:00
Ayowel 185171c5f5 Add path cleanup when reloading extensions and extension __file__ context 2022-11-22 12:37:09 +01:00
Tom Rothamel 94218416d2 Include the python version in the bytecode cache.
This is mostly to support the web version, but it also means
that there won't be fights when Ren'Py 7 and Ren'Py 8 run the
same game.
2022-11-21 23:24:29 -05:00
Tom Rothamel 5ab5ae6e68 web3: Add functions that can be called to zip and unzip savefiles. 2022-11-21 01:23:34 -05:00
Gouvernathor ac663e2f1c Add a lint blurb 2022-11-18 22:27:02 +01:00
Gouvernathor f7ee13724e Use round to have accurate integral offset 2022-11-17 04:25:45 +01:00
Tom Rothamel d7e6438f8f Merge pull request #4081 from renpy/fix-4080
Fix #4080
2022-11-16 20:21:38 -05:00
Tom Rothamel 0a6e9fb1f0 Merge pull request #4097 from renpy/translate-voice-doc
Add examples of multi-language voicing
2022-11-16 20:21:15 -05:00
Tom Rothamel bb53cdb68a Merge pull request #4093 from Ayowel/fix/extension-load-order
Make extension load order reliable
2022-11-16 20:20:47 -05:00
Gouvernathor 8fc417b5e9 doc: clarify that break and continue don't exist in SLFor 2022-11-16 22:19:47 +01:00
Gouvernathor 679184ce79 Update voice.rst 2022-11-14 22:26:45 +01:00
Gouvernathor 4403a0c63c Add ref anchor 2022-11-14 22:22:48 +01:00
Gouvernathor e902707960 Update voice.rst 2022-11-14 22:21:52 +01:00
Ayowel 681cad1a44 Make extension load order reliable 2022-11-12 15:55:06 +01:00
Gouvernathor cf6d2559ec fix translation 2022-11-11 22:24:35 +01:00
Gouvernathor d0067052a8 Fix wrong encoding leading to star-import malfunctions 2022-11-11 14:59:55 +01:00
Tom Rothamel c7ce911edc Merge pull request #4087 from llyama/queue-sound-fadein
Queue sound can now use fadein
2022-11-10 18:19:09 -05:00
llyama ef7c7f1b35 Fixed missing quotes 2022-11-10 17:56:16 +00:00
llyama b839a1e080 Queue sound can now use fadein
Fixes renpy/renpy#4086
2022-11-10 17:26:25 +00:00
Moshibit 3280d36230 Spanish translation update (#4085)
* Update common.rpy

* Update developer.rpy

* Update screens.rpy
2022-11-09 21:12:21 +01:00
Gouvernathor 68a36dae39 Add french translations 2022-11-08 18:57:22 +01:00
Gouvernathor bbb6587495 fix typos in the standard screens.rpy 2022-11-08 18:56:28 +01:00
Gouvernathor 511288f86d Fix typo 2022-11-08 18:44:09 +01:00
Gouvernathor 89342fc956 Fix subsurface offset when oversampling 2022-11-08 16:17:22 +01:00
Gouvernathor f98476e8cf Fix quoting and update sentence translation 2022-11-08 11:46:18 +01:00
Gouvernathor b0cee97f26 Remove the "expansion files" reference 2022-11-08 11:44:05 +01:00
Tom Rothamel 78d839b94a Merge pull request #4075 from renpy/regchandoc
Reserve spaces in register_channel's names
2022-11-08 00:25:21 -05:00
Gouvernathor 75aea66d16 Translate the changed string
Translation source is here https://support.google.com/googleplay/android-developer/answer/186113?hl=fr
2022-11-08 02:16:46 +01:00
Gouvernathor fa63ace6a7 Change the location of the android license key in the Play console 2022-11-08 02:13:18 +01:00
Tom Rothamel 5520142001 web3: Fix webaudio to run under Python 3. 2022-11-07 01:07:41 -05:00
Tom Rothamel ccb075ea53 py311: Fix end_lineno and end_col_offset locations.
These were being set, but being set incorrectly, which violates
the invariant (enforced by Python 3.11) that the end location
must be after the starting location.

This enforces that the end of each node is after it's start,
and after the end of each of the node's children.
2022-11-07 00:18:59 -05:00
Tom Rothamel 6a2d2632ce web3: Do not create threads on renpy.emscripten.
Unlike web2, where we stubbed out the threading module that wasn't
being compiled, on web3 we use the Python threading module and simply
don't create threads. This is because the locking exists, and so
doesn't need to be stubbed - just the thread starts.
2022-11-06 11:47:00 -05:00
Gouvernathor 57d67b78c8 doc: advise the use of valid identifiers
uses a link to the official python doc
2022-11-05 23:29:28 +01:00
Gouvernathor 2aa3e9b6e1 doc: reserve spaces in register_channel 2022-11-05 23:18:37 +01:00
Gouvernathor ce206baa88 doc: fix nested markup
You can't have a ref/link within bold or italics, aka nested markups, see 55b00d4 and https://stackoverflow.com/questions/72773716/
2022-11-05 22:34:18 +01:00
Tom Rothamel fb63d447f0 Add a link from the changelog to the incompatible changes page. 2022-11-05 00:09:54 -04:00
Tom Rothamel 19d4a18315 Merge pull request #4061 from renpy/3994-format-typo
Pylint - Fix wrong formatting in exception raising
2022-11-04 23:58:28 -04:00
Tom Rothamel 31ab083352 Merge pull request #4072 from Elckarow/patch-2
use `zorder 0` for the gl test
2022-11-04 23:58:14 -04:00
Elckarow 8bee5d2a77 use zorder 0 2022-11-04 21:41:50 +01:00
Tom Rothamel 4385af9f75 Merge pull request #4063 from DinakiS/translate_fix
Fix: alternate translation
2022-11-02 23:02:48 -04:00
Tom Rothamel c01dfa32c3 doc: Make it clear that dynamic and context_dynamic take variables. 2022-11-01 21:13:41 -04:00
Tom Rothamel cf7df895a1 Move to notarytool to sign on mac. 2022-11-01 20:02:53 -04:00
Tom Rothamel fb00ffadc4 Merge pull request #4066 from renpy/new-sphinx
Various issues in the doc
2022-11-01 20:01:16 -04:00
Gouvernathor a61f28b0de doc: yet another forgotten label (for the lifecycle page) 2022-11-01 18:53:10 +01:00
Gouvernathor f5ae0db8bd doc: add other missing internal label targets 2022-11-01 18:41:31 +01:00
Gouvernathor 12ba529632 doc: fix dubious internal reference 2022-11-01 18:40:58 +01:00
Gouvernathor bcee7753e6 doc: do not declare the same variable twice
The other is in store_variables.rst .
2022-11-01 18:32:05 +01:00
Gouvernathor 2b913ae540 doc: typos 2022-11-01 18:31:17 +01:00
Gouvernathor a1e4a44069 doc: add missing internal label target 2022-11-01 18:31:08 +01:00
Gouvernathor b36a574f3c doc: use the anonymous inline syntax for hyperlinks 2022-11-01 18:30:49 +01:00
Gouvernathor 15910d0954 Merge remote-tracking branch 'origin/maint-8.0' into new-sphinx 2022-11-01 18:24:26 +01:00
Gouvernathor 5894a59d5c doc: typo 2022-11-01 16:46:21 +01:00
Tom Rothamel 1d9b6414aa bubble: Allow the speech bubble editor to persist through rollback.
Previously, rollbacks (like ones caused by the SBE) would hide the
screen.
2022-10-31 21:02:59 -04:00
Tom Rothamel f476b87a5d mac: Set CFBundleIdentifier when distributing Ren'Py. 2022-10-31 20:14:12 -04:00
Tom Rothamel 8f18cde853 py2: Fix more issues generating json files. 2022-10-31 03:21:17 -04:00
Tom Rothamel 6cf589429d Remove the (long empty) autobuild script. 2022-10-31 02:28:21 -04:00
Tom Rothamel 743bae43c3 py2: Fix creating the rapt/renios hash files. 2022-10-31 02:27:41 -04:00
Tom Rothamel 509f16865a Fix copilot-injected error.
An incorrect import was added.
2022-10-31 02:01:41 -04:00
Tom Rothamel 72815a4915 py3: Avoid compiling renpy.compat.dictviews.
This module won't work on 3.11, but won't be imported there
anyway, so there is no reason to import it.
2022-10-30 20:40:40 -04:00
Tom Rothamel b4a76f1e61 bubble: Check in the default bubble image. 2022-10-30 01:39:22 -04:00
Tom Rothamel d02b5c5fdb Allow the console's help command to be called during doc generation. 2022-10-30 01:34:14 -04:00
DinakiS 9bffa67c7f Fix: alternate translation 2022-10-29 17:24:53 +03:00
Tom Rothamel ec8093f8dc pyright: Fix all current issues. 2022-10-28 18:25:04 -04:00
Gouvernathor a71df01691 Fix wrong formatting in exception raising (7edb69b) 2022-10-28 13:43:48 +02:00
Tom Rothamel 77460ec62f Fix or removed unused variables.
Fixes #4044.
2022-10-27 22:49:54 -04:00
Gouvernathor 7467eb8934 Repeal part of #4050 (hotfix)
The function is actually called inside renpy.compat, so importing sys after importing renpy.compat is already too late.
It could be considered to use `global sys;import sys` in the function, or to import sys just before or after defining the function, but I'd rather keep things the way they were.
2022-10-27 15:22:57 +02:00
Tom Rothamel e5cb5868a7 Merge pull request #4047 from renpy/3994-slots
Pylint - Remove overriden slot name
2022-10-26 21:35:33 -04:00
Tom Rothamel e908bed1e2 Merge pull request #4052 from renpy/3994-bare-except
Fix bare except statements
2022-10-26 21:03:51 -04:00
Tom Rothamel 8da53babbf Merge pull request #4045 from renpy/3994-listcomp
Pylint - Remove useless list comprehensions
2022-10-26 21:03:17 -04:00
Tom Rothamel a0208228bd Merge pull request #4046 from renpy/3994-builtin-literals
Pylint - Use literals instead of builtin types constructors
2022-10-26 21:02:55 -04:00
Tom Rothamel 9516d35b0c Merge pull request #4048 from renpy/3994-with
Pylint - Use the with statements
2022-10-26 21:02:09 -04:00
Tom Rothamel e06925e208 Merge pull request #4049 from renpy/3994-shadow
Pylint - Avoid shadowing the function parameter
2022-10-26 21:01:41 -04:00
Tom Rothamel 0e2dce0976 Merge pull request #4050 from renpy/3994-reimports
Pylint - Avoid unnecessary reimports
2022-10-26 21:01:20 -04:00
Tom Rothamel 2729df6eca Merge pull request #4051 from renpy/3994-unused
Pylint - Flag or remove unused variables
2022-10-26 21:01:01 -04:00
Tom Rothamel 630f673d28 Merge pull request #4053 from renpy/3994-global
Pylint - Remove useless global statements
2022-10-26 21:00:34 -04:00
Tom Rothamel 03bf21141d Merge pull request #4054 from renpy/3994-dict-iter
Pylint - Optimize dict iteration
2022-10-26 20:59:50 -04:00
Tom Rothamel 59898271d0 Merge pull request #4055 from renpy/3944-useless-statements
Pylint - Remove useless statements
2022-10-26 20:59:23 -04:00
Gouvernathor 788ebab40c Fix some french translations 2022-10-26 23:30:12 +02:00
Asriel Senna 5dbc2c1da3 Remove useless statements (8e188cc) 2022-10-26 19:44:36 +02:00
Asriel Senna 257c95e2b2 Optimize dict iteration (9b884d3) 2022-10-26 19:41:20 +02:00
Gouvernathor 402d04d054 Remove useless global statements 2022-10-26 19:38:17 +02:00
Gouvernathor ab6023371c fix bare except statements 2022-10-26 19:33:21 +02:00
Asriel Senna e64242c9a2 Remove unused as e clauses from raise statements 2022-10-26 16:52:48 +02:00
Asriel Senna a8bf2e0246 Mark unused variables from tuple unpackings 2022-10-26 16:52:12 +02:00
Asriel Senna 82fb38560e Avoid unnecessary reimports (2904149) 2022-10-26 16:40:51 +02:00
Asriel Senna 25edfa0542 Avoid shadowing the function parameter (73c8575)
`layer` is passed as parameter, and this loop generates a `layer` 
variable
2022-10-26 16:36:58 +02:00
Asriel Senna f8864d8b90 Use the with statements (58a2950) 2022-10-26 16:31:56 +02:00
Asriel Senna 001ce8acd0 Remove overriden slot name
wastes memory and may break in a future version of python, see point 6 
of this : 
https://docs.python.org/3/reference/datamodel.html#notes-on-using-slots
2022-10-26 16:27:09 +02:00
Asriel Senna 13cf71b2ea Use literals instead of builtin types constructors 2022-10-26 16:23:04 +02:00
Asriel Senna ea95338e69 Remove useless list comprehensions (1d08817) 2022-10-26 16:15:24 +02:00
Tom Rothamel 57721bacb2 Merge pull request #4039 from pazkero/patch-1
Fix bugs on steam.get_session_ticket
2022-10-24 17:17:20 -04:00
Jesusaves 4269d45411 Fix bugs on steam.get_session_ticket
Without these changes imposed by Python3.9, calling get_session_ticket() raises two exceptions.
2022-10-24 14:51:19 -03:00
Tom Rothamel 65e03993dc Only set compresslevel on Python 2. 2022-10-21 21:25:42 -04:00
Noriverwater cb35c75d9c Merge branch 'master' into 4018 2022-10-21 19:20:14 +08:00
Tom Rothamel 01cef5d7df cds: Document that init and execute_init don't play well together.
Fixes #4032.
2022-10-20 23:36:33 -04:00
Tom Rothamel 0f8576f18b Custom statement execute_init now respect init priority.
When looking into #4032, I noticed it didn't.
2022-10-20 23:22:23 -04:00
Noriverwater fbb80afbeb Merge branch 'master' into 4018 2022-10-20 19:31:16 +08:00
Tom Rothamel 92c7691789 Add config.physical_width and config.physical_height.
These are variables that let the creator set the default size
of the game window separately from config.screen_width and
config.screen_height.
2022-10-19 01:50:58 -04:00
Noriverwater 6116646094 Doc:config.history_current_dialogue 2022-10-18 21:50:28 +08:00
Noriverwater 8edaa7cf50 Add config.history_current_dialogue 2022-10-18 21:47:08 +08:00
Noriverwater eccf8a560d Add configuration variables to implement it 2022-10-18 21:42:31 +08:00
Tom Rothamel 8157c5d8c5 Standardize variable naming. 2022-10-18 01:34:44 -04:00
Tom Rothamel 7675251049 Merge pull request #4027 from qTich/fix/persistent-MP
fix & changes: bypassing exception on `MP.save`, some functions, docs for `MP`
2022-10-18 01:33:02 -04:00
Tichq 7a3322740d changes for _MultiPersistent
-- review for naming of variables;
-- add field for `MP`: `_name`, `_save_on_quit`;
-- functions:
-- -- `save_MP` as `save_on_quit_MP` with check on  `_save_on_quit`
-- -- `save_MP` called for every `MP` instances;
-- -- `get_MP` returns `MP` instance` if has already been created before;
-- add some docs.
2022-10-17 22:29:47 +03:00
Tichq 61393dbb0e fix: bypassing exception on try save MP 2022-10-17 22:27:55 +03:00
Tom Rothamel a8896e3d1b oversample: Doc. 2022-10-17 01:06:44 -04:00
Tom Rothamel 7ae59e8ad2 oversample: Make image auto-defining aware of @oversample. 2022-10-16 22:43:20 -04:00
Tom Rothamel 7d20837ee6 oversample: Automatically oversample based on the image filename. 2022-10-16 22:12:10 -04:00
Tom Rothamel d4326ee4a7 Add image oversampling.
This allows an image to be interpreted as a smaller image for the
purpose of layout. For example, a 2048x2048 image with 2x oversampling
will be considered as a 1024x1024 image for layout purposes.

But if the window is scaled up, then the additional detail will be
there.
2022-10-16 00:43:55 -04:00
Tom Rothamel 4e69fcb3ec Merge pull request #3983 from methanoliver/master
Documenting the pitfall of animated shaders.
2022-10-15 10:06:18 -04:00
Tom Rothamel 10b057285c Merge pull request #4022 from qTich/fix/shutil-copyfile
fix: bypassing an exception when trying to copy a save file.
2022-10-14 23:42:15 -04:00
Tom Rothamel b7c2f240a1 bubble: Add the speech bubble editor to the developer menu. 2022-10-14 21:54:50 -04:00
Tichq 0832600b45 fix: bypassing an exception when trying to copy a save file. 2022-10-14 14:25:44 +03:00
Tom Rothamel 2ed24851ad Merge pull request #4017 from renpy/platform-presplash
Document platform-specific presplash images
2022-10-14 00:03:32 -04:00
Tom Rothamel 48a54c7c2a bubble: Copy the bubble image over as part of game generation. 2022-10-13 01:04:32 -04:00
Tom Rothamel 21072e5722 bubble: Add bubble styles and screens to the default project. 2022-10-13 00:23:51 -04:00
Tom Rothamel dfeb401352 bubble: Substantial rewrite.
Previously, properties were configured one at a time. This didn't
allow realistic customizations, which often require groups of properties
to be customized together, so bubble has been rewritten to allow this.
2022-10-12 01:49:27 -04:00
Gouvernathor c4626cbde6 Add android-presplash anchor 2022-10-11 11:03:49 +02:00
Gouvernathor e53f40ab07 Add the web presplash and a ref to the android presplash 2022-10-11 11:02:49 +02:00
Tom Rothamel bfc28665c1 rapt: Include the native symbols in the build directory.
Fixes #3806.
2022-10-11 00:54:44 -04:00
Tom Rothamel 2a8a9fc3a2 Merge pull request #4013 from JeremyRand/gcc
Fix RENPY_DEPS_INSTALL docs for armhf, ppc64, and ppc64le
2022-10-10 19:31:18 -04:00
Tom Rothamel ee18060e25 Add the show_cancels_hide transform property.
This controls if showing a displayable or screen with the same
tag or name cancels a hide transition.
2022-10-09 23:39:29 -04:00
Tom Rothamel 11e72ba9f4 bubble: Avoid showing the narrator window when a bubble is up.
When window auto is true, this will hide the narrator window when
bubbles appear.

This also changes the priority of say-condition-false and say-centered
so the former takes priority, which is more likely correct.
2022-10-08 23:22:40 -04:00
Jeremy Rand 5c3f39b1ff Fix RENPY_DEPS_INSTALL docs for armhf, ppc64, and ppc64le
The correct triplets for various arches are:

x86_64-linux-gnu
arm-linux-gnueabihf
powerpc64-linux-gnu
powerpc64le-linux-gnu

The uname-based instructions produced the following:

x86_64-linux-gnu (correct)
armv7l-linux-gnu (wrong)
ppc64-linux-gnu (wrong)
ppc64le-linux-gnu (wrong)

gcc produces the correct results for all four.  I suspect this will also
fix non-GNU triplets such as musl, but didn't test those.
2022-10-08 14:06:37 +00:00
Tom Rothamel 778ae30bcd bubble: Allow any property to be given an area.
This might make things more flexible, as the area can be supplied to
the screen through a show_ property instead of window_area, if
the creator wants.
2022-10-08 01:06:11 -04:00
Tom Rothamel 7cc7de4199 bubble: More implementation.
* Cycling through the non-area properties.
* Right-click to remove a property.
* Check that ptoperty contents can be saved.
2022-10-08 00:31:23 -04:00
Tom Rothamel 99ea82e20c bubble: Implement window area editing. 2022-10-07 22:55:23 -04:00
Tom Rothamel 1f7c5184af bubble: WIP
* Use the on_show method to set character properties for a speech
  bubble.
* Work on the _bubble_editor screen, which allows a property to be
  selected for editing.
2022-10-07 22:16:17 -04:00
Tom Rothamel 784d978a0d doc: Document that Ren'Py might use all_character_callbacks. 2022-10-07 00:15:21 -04:00
Tom Rothamel 174f784c28 bubble: Allow Character.on_show and Character.on_predict to take extra properties.
These add to the properties that would normally be
suppled by the Character itself, allowing BubbleCharacter
to customize how the screen is displayed.
2022-10-06 23:24:30 -04:00
Tom Rothamel 2df014314a Add RENPY_MAX_TEXTURE_SIZE environment variable.
To make it easier to test issues that only manifest with particular
texture sizes.
2022-10-05 23:48:34 -04:00
Tom Rothamel 4e5739abe1 Merge pull request #4011 from Elckarow/patch-1
fix drag drop screen example
2022-10-05 22:50:37 -04:00
Elckarow 59c2e84aac fix example 2022-10-05 14:10:05 +02:00
Tom Rothamel cb2d32ec4e bubble: Check in WIP speech bubble project.
This currently can generate default values, and propagate them
all the way to dialogue.
2022-10-05 00:30:15 -04:00
Tom Rothamel c73bbff581 Merge pull request #4003 from Andykl/modules-in-tl
Fix wrong .rpymc loading.
2022-10-04 21:08:15 -04:00
Tom Rothamel 3a764acea5 Merge pull request #4008 from Andykl/fix-4007
Fix change_language during menu-with-say.
2022-10-04 00:02:48 -04:00
Andy_kl d2fbf45f71 Fix change_language during menu-with-say. 2022-10-04 05:50:30 +04:00
Tom Rothamel 02531cb4da Merge pull request #4006 from Chrisclone/master
Added help <expr> for existing commands
2022-10-03 19:44:07 -04:00
Chrisclone 0d403f6f9a Added help <expr> for existing commands 2022-10-02 21:01:57 -04:00
Tom Rothamel 791cfdcd5f Remove code left in by mistake. 2022-10-02 16:14:24 -04:00
Tom Rothamel 6ef863793e Rename config.label_callback to config.label_callbacks. 2022-10-01 16:32:47 -04:00
Tom Rothamel 7f9ac2494e Make config.label_callback a list. 2022-10-01 16:27:05 -04:00
Tom Rothamel 8f241763c1 Fix text of syntax errors in a python block.
By offsetting the line number, and retreiving the text from the source.
2022-10-01 15:45:50 -04:00
Tom Rothamel d1aef49c5d Remove obsolete portions of developer.rpym. 2022-10-01 02:00:15 -04:00
Tom Rothamel ac9821b439 Use a single list of image extensions.
For the images directory and the image location picker.
2022-10-01 01:55:31 -04:00
Tom Rothamel d6c7f73dba Rewrite the image location picker in terms of areapicker.
Areapicker is very similar to the custom ilp displayable, so it
makes sense to focus on areapicker and remove the old displayable.
2022-10-01 01:52:45 -04:00
Tom Rothamel f3bfc91311 doc: Update the list of extensions that are automatically defined in the images direcotry.
The .jxl extension is here so I won't forget to change this again
when JXL support lands.

Fixes #4004.
2022-10-01 01:52:45 -04:00
Mal Graty 097da86793 Restore missing at_list assignment
It went walkabout in 6338a144f7.
2022-09-30 21:37:23 +01:00
Tom Rothamel ce8f33d671 areapicker: Include the position callback.
This will allow the image location picker to be rewritten in
terms of areapicker.
2022-09-29 23:06:48 -04:00
Andy_kl d38bc47030 Fix wrong .rpymc loading.
This fixes behavior of renpy.load_module if it exists both
in game and tl directory.
2022-09-30 02:44:20 +04:00
Tom Rothamel 0d876b0367 Add the AreaPicker displayable.
This is a displayable that allows the user (generally the creator)
to pick a rectangular area on the screen. The intended use of this
is to support placing balloon dialogue onto the screen, though
other uses might be possible.
2022-09-28 21:04:29 -04:00
Tom Rothamel 1883815cc5 Various edits to the lifecycle documentation. 2022-09-27 21:55:14 -04:00
Tom Rothamel 2518998099 Document and add a warning to the new console help function. 2022-09-27 21:30:14 -04:00
Tom Rothamel ebe79d1c92 Merge pull request #3995 from renpy/lifecycle
Lifecycle doc page
2022-09-27 21:29:03 -04:00
Tom Rothamel 78a122a24b Merge pull request #3996 from renpy/substore-doc
More documentation for named stores
2022-09-27 21:23:39 -04:00
Gouvernathor ec6f83731e Add renpy.clear_attributes (#3938) 2022-09-27 21:22:36 -04:00
Gouvernathor 6338a144f7 Use easy.to_list and easy.to_tuple (#3948)
This adds two new functions, renpy.easy.to_list and renpy.easy.to_tuple, that convert objects to lists or tuples as required.

Co-authored-by: Mal Graty <mal.graty@googlemail.com>
2022-09-27 21:18:46 -04:00
Tom Rothamel 0b056f1615 Merge pull request #3890 from Andykl/console-help
Add help <expr> into console commands.
2022-09-26 22:13:15 -04:00
Tom Rothamel 1e908ee265 Merge pull request #3998 from renpy/revertable-random-rv
Make random choices and sample methods return revertable lists instead of _list
2022-09-26 22:11:51 -04:00
Gouvernathor e78f5655ef Account for py2 2022-09-26 23:00:53 +02:00
Gouvernathor aa6c2acdff Make random methods return revertable lists instead of _list
works better with the wrapper included
2022-09-26 19:40:18 +02:00
Gouvernathor 4750d5cb15 typo 2022-09-26 14:09:56 +02:00
Tom Rothamel f1fa93e068 jsondb: Prevent JSONDBs from participating in rollback. 2022-09-25 20:52:07 -04:00
Gouvernathor ea474c9705 Add python early and more example 2022-09-25 19:15:12 +02:00
Gouvernathor 021fd6ca32 Add more documentation for named stores 2022-09-25 18:44:50 +02:00
Tom Rothamel 131491e8ac jsondb: Rewrite to have the API reflect the two-level structure.
There are use cases (like multiple dialogue) where it makes sense
to have two levels of information in play.
2022-09-25 01:23:08 -04:00
Tom Rothamel 91ecbb8719 pyright: Triage and fix or ignore type issues in new vscode. 2022-09-24 00:03:35 -04:00
Asriel Senna 1dd0af0aca Tweak explanations 2022-09-24 04:46:06 +02:00
Tom Rothamel c72865e791 Fix type issue using matrixtransform
Fixes #3980 by converting callable TransformMatrix objects into
real Matrix objects.
2022-09-23 22:25:08 -04:00
Asriel Senna 4570ab6023 Add a lifecycle doc page 2022-09-24 04:03:35 +02:00
Tom Rothamel 31e2d8b49b Merge pull request #3984 from renpy/drain-other
Move some functions from the "Others" page to more specific places in the doc
2022-09-23 20:19:33 -04:00
Gouvernathor fccda46404 Remove bogus onlayer parsing on scene statements
The layer variable was never used, c77a11382d contained that mistake all along
2022-09-23 22:53:10 +02:00
Gouvernathor 677d3493d4 typos 2022-09-23 10:45:00 +02:00
Tom Rothamel 9572d20bcb JSONDB improvements.
* Document.
* Allow `key` to be "dialogue"
* Add the `default` argument.
* Run at low init level.
2022-09-22 23:07:39 -04:00
Tom Rothamel 53a28e0cba Add the renpy.get_translation_identifier function.
Which does what it says on the tin.
2022-09-22 23:07:39 -04:00
Gouvernathor 5400aa5db3 doc: remove obsolete reference to jEdit 2022-09-22 00:44:10 +02:00
Adam Trzypolski f55c9f792d Correct syntax. 2022-09-22 01:12:46 +03:00
Tom Rothamel 24dadde724 Add the JSONDB.
This is the intial creation of a new construct for in-game, non-script
programming. For example, a system for displaying dialogue in popup
bubbles could use a JSONDB with the correct key to choose popup
bubble location.
2022-09-21 13:15:55 -04:00
Tom Rothamel 9ee5d24d4b Merge pull request #3985 from renpy/layers-doc
Advise renpy.add_layer instead of config.layers
2022-09-20 21:41:28 -04:00
Gouvernathor d8a56af3da doc: fix CDS example
The error message needs to be reported as an error, otherwise it's pointless.
2022-09-21 02:43:54 +02:00
Gouvernathor f5c7f79db7 doc: remove reference to obsolete framework
per #3987
until/unless the framework is upgraded to more recent standards of renpy code
2022-09-20 12:26:21 +02:00
Tom Rothamel ed831f5e6c Add config.scene_callbacks.
This is a list of functions that are called when the scene statement is
run or renpy.scene is called.
2022-09-19 09:16:08 -04:00
Gouvernathor b7d2220198 doc: tweak layers documentation 2022-09-19 13:06:11 +02:00
Gouvernathor 3b1a612502 Move add_layer from other to displaying_images 2022-09-19 12:56:12 +02:00
Gouvernathor 1c2865b1f5 Move call/invoke_in_new_context in the Contexts group 2022-09-19 12:44:21 +02:00
Gouvernathor da1d3c47b6 Move jump_in_new_context to the Contexts group 2022-09-19 12:41:53 +02:00
Adam Trzypolski c1b6d2de4d Incorporate suggestions. 2022-09-19 13:39:55 +03:00
Gouvernathor b9b34c9bae Move the Contexts group to label
More explanation about what a context is could be a good addition to this part.
2022-09-19 12:30:52 +02:00
Gouvernathor 5bd61be8a6 Move the Contexts group to label (1/2) 2022-09-19 12:30:50 +02:00
Gouvernathor e24ac8c25f Move context_dynamix to the context group 2022-09-19 12:18:34 +02:00
Gouvernathor cbb204cf37 Move substitute from other to text 2022-09-19 12:10:25 +02:00
Gouvernathor 5c3998f7ac Move flush_cache_file from other to displaying_images 2022-09-19 12:00:16 +02:00
Gouvernathor e8e20936e0 Move dynamic from other to label, clarify it, and avoid shadowing 2022-09-19 11:55:32 +02:00
Gouvernathor 8a369831dc Move clear_keympa_cache from other to keymap 2022-09-19 11:31:13 +02:00
Gouvernathor bdc3f51807 Include keymap-related function(s) in the keymap page 2022-09-19 11:29:08 +02:00
Gouvernathor 00cf228d4e Move call_stack_depth from other to label 2022-09-19 11:24:44 +02:00
Gouvernathor 588dac2776 Move get_adjustment from other to screen_python 2022-09-19 11:21:51 +02:00
Asriel Senna e732cf1db3 Update some launcher translations
Some languages wer untouched, as I don't know what part of the sentence 
to remove.
2022-09-19 11:17:01 +02:00
Gouvernathor 27475ae7f8 doc: clarify that language_tailor has nothing to do with Character 2022-09-19 10:52:27 +02:00
Gouvernathor 5775310ea8 Move pop_call from other to label 2022-09-19 10:31:06 +02:00
Gouvernathor b27deb794f doc: update obsolete description 2022-09-19 10:27:42 +02:00
Gouvernathor c57f3ae4cd doc: improve local labels documentation 2022-09-18 21:46:58 +02:00
Adam Trzypolski ca98796799 Documenting the pitfall of animated shaders. 2022-09-18 20:34:53 +03:00
Tom Rothamel 8c6903b552 mac: Use mac-universal programs and libraries.
This allows us to run natively on M1 and M2 Macs.
2022-09-18 00:59:02 -04:00
Tom Rothamel 12f0318b5c doc: Update keywords.py. 2022-09-18 00:57:54 -04:00
Gouvernathor 86b8b208ef doc: reminder for the values of tooltip 2022-09-15 19:02:35 +02:00
Tom Rothamel f3535a6456 Merge branch 'maint-8.0' 2022-09-15 01:37:34 -04:00
Tom Rothamel 49e42c56b3 Merge pull request #3974 from renpy/more-li-doc
More layeredimage documentation
2022-09-15 01:36:45 -04:00
Gouvernathor 6994aa94d0 doc: anchor the ref 2022-09-13 11:56:09 +02:00
Gouvernathor 3036fbd107 Attempt to explain the if_ clauses and tweak explanations 2022-09-13 11:54:22 +02:00
Tom Rothamel 711979985e doc: Document the changes to Viewport. 2022-09-12 21:23:52 -04:00
Tom Rothamel 9b2e6eee39 Merge pull request #3949 from via-my/master
Fix sticky draggable viewport
2022-09-12 21:13:28 -04:00
Gouvernathor f4d184eb41 doc: case(s) when the menu is skipped 2022-09-12 00:39:58 +02:00
Tom Rothamel 889394c7f3 web: Use the correct mime type for mp3 audio.
Fixes #3969.
2022-09-11 14:43:09 -04:00
Tom Rothamel 8d3cd5bb85 doc: Improve config.always_shown_screens. 2022-09-11 14:38:58 -04:00
Totally a booplicate 3b0b01f5f0 add sanity check
in case somebody loads an empty module
2022-09-09 18:39:40 +03:00
Gouvernathor f0aba80b81 doc: reference minimum_presplash_time in presplash 2022-09-09 12:44:17 +02:00
Totally a booplicate 3b7bd5c4b8 remove decorated sort
As of Python 2.3 the sorting algo is guaranteed to be stable and decorate-sort-undecorate approach is not needed anymore
2022-09-09 10:01:08 +03:00
Totally a booplicate 54934084cb remove debug print 2022-09-09 09:57:51 +03:00
Totally a booplicate 4174161a66 also sort load_string nodes 2022-09-09 09:49:13 +03:00
Totally a booplicate bb9bd717c4 implement include_module 2022-09-09 09:48:02 +03:00
Tom Rothamel 814b4abddd Merge branch 'maint-8.0' 2022-09-09 02:11:44 -04:00
Tom Rothamel 23e313d5e0 doc: Changelog. 2022-09-08 22:18:18 -04:00
Gouvernathor 9335935c05 Allows the launcher to performrepair updates 2022-09-08 22:05:48 -04:00
Tom Rothamel 9b1f65b824 Merge pull request #3954 from renpy/allow-repair-updates
Allows the launcher to perform repair updates
2022-09-08 22:05:17 -04:00
Totally a booplicate c7666a4ee0 sort AST before running them 2022-09-08 22:04:19 -04:00
Tom Rothamel b1c5e51b86 Merge pull request #3956 from renpy/more-li-doc
More Layeredimage documentation
2022-09-08 22:03:54 -04:00
Tom Rothamel 15f7626ed2 Merge pull request #3959 from Booplicate/fix_load_module
Fix `renpy.load_module` not respecting init order
2022-09-08 22:01:31 -04:00
Tom Rothamel d8fd60c76f Fix translations. 2022-09-08 22:00:36 -04:00
Tom Rothamel 0944f09a1f Integrate the new Ukrainian translations. 2022-09-08 22:00:05 -04:00
Tom Rothamel 6d1075f03d Add Ukrainian translation of the launcher.
Authored by @smq_denya on Twitter.
2022-09-08 21:46:34 -04:00
Tom Rothamel d912b27723 Add Ukrainian translation of The Question.
Authored by @smq_denya on Twitter.
2022-09-08 21:33:26 -04:00
Tom Rothamel aae939286a Update the Ukrainian translation.
Authored by @smq_denya on Twitter.
2022-09-08 21:02:49 -04:00
Totally a booplicate 8ff3aa697c sort AST before running them 2022-09-09 03:22:00 +03:00
Gouvernathor 2c04b71cc2 More Layeredimage documentation 2022-09-08 12:14:06 +02:00
Tom Rothamel f9d1070da7 Merge branch 'maint-8.0' 2022-09-07 23:49:02 -04:00
Tom Rothamel 5046d3bbf4 doc: Update changelog and sponsors. 2022-09-07 23:27:57 -04:00
Tom Rothamel b9afd575f6 Check in .vscode/settings.json.
Set to hide compiled files.
2022-09-07 09:17:34 -04:00
Tom Rothamel ea963c581c Merge branch 'maint-8.0' 2022-09-07 09:14:23 -04:00
midgethetree 81597000a4 Improve lint for say attributes
Applies config.adjust_attributes to say attributes when linting, so lint won't report errors for say statements which work in-game.
2022-09-07 09:14:12 -04:00
Tom Rothamel 2867d4b347 Merge pull request #3901 from midgethetree/fix-lint-say-attributes
Improve lint for say attributes
2022-09-07 09:11:07 -04:00
Gouvernathor 8c95ed33a5 Allows the launcher to performrepair updates 2022-09-07 13:56:19 +02:00
Tom Rothamel 03bd609d52 doc: Changelog. 2022-09-06 22:11:17 -04:00
LaUwUrence f1ed9d0b18 Additional zero check for renpy_blur (#3951)
* Fix sticky draggable viewport

Forget the initial drag position if the visible dragging was not started and the player unpressed LMB.

* Make it possible to use either bool or variant

* Remove the gap

Removes the gap that was noticeable if `config.viewport_drag_radius` was set to a large value.

* Additional zero check

Do not let the image disappear if the final image weight is zero.

* Removed wrong changes
2022-09-06 22:02:40 -04:00
LaUwUrence 1daceab8ee Additional zero check for renpy_blur (#3951)
* Fix sticky draggable viewport

Forget the initial drag position if the visible dragging was not started and the player unpressed LMB.

* Make it possible to use either bool or variant

* Remove the gap

Removes the gap that was noticeable if `config.viewport_drag_radius` was set to a large value.

* Additional zero check

Do not let the image disappear if the final image weight is zero.

* Removed wrong changes
2022-09-06 21:48:17 -04:00
LaUwUrence 89a569da5a Remove the gap
Removes the gap that was noticeable if `config.viewport_drag_radius` was set to a large value.
2022-09-06 02:31:44 +04:00
LaUwUrence ae823ccb10 Make it possible to use either bool or variant 2022-09-06 02:16:46 +04:00
LaUwUrence c8a25fb409 Fix sticky draggable viewport
Forget the initial drag position if the visible dragging was not started and the player unpressed LMB.
2022-09-06 02:01:56 +04:00
Tom Rothamel 44f50623e7 doc: Changelog {size=*2.0}, etc. 2022-09-05 14:25:42 -04:00
Tom Rothamel 01dba2a574 doc: Reorder the changelog after merging. 2022-09-05 14:21:43 -04:00
Tom Rothamel 5524796509 Merge pull request #3922 from methanoliver/methanoliver-size-patch
Allow multipliers in {size=<value>}
2022-09-05 14:06:11 -04:00
Tom Rothamel 280555ea44 Merge pull request #3923 from renpy/lint-dev-auto
Advise setting config.developer to "auto" in lint
2022-09-05 14:05:21 -04:00
Tom Rothamel 063a9406e9 Merge pull request #3930 from renpy/function-doc
Expand get_ordered_image_attributes doc
2022-09-05 14:04:58 -04:00
Tom Rothamel b64ba23863 Merge branch 'maint-8.0' 2022-09-05 13:32:49 -04:00
Tom Rothamel 9eecf4fec3 distribute: Use version_only.
This runs after things are fully generated, and will include
the nightly 'n' if appropriate.
2022-09-05 13:31:59 -04:00
Tom Rothamel a465b313bc Merge branch 'maint-8.0' 2022-09-05 11:40:28 -04:00
Tom Rothamel c11051f6a8 distribute: Fix the option name. 2022-09-05 11:35:20 -04:00
Tom Rothamel e9448ccf87 distribute: Add an option for appending the version number.
This is intended to support versioned nightly builds.
2022-09-05 11:26:57 -04:00
Tom Rothamel 8eeb921ef3 Merge branch 'maint-8.0' 2022-09-05 10:37:51 -04:00
Gouvernathor 466ba3741c Document xycenter as a style property 2022-09-05 14:34:45 +02:00
Gouvernathor fa6f3d523e Add xycenter to the list of position style properties 2022-09-05 14:27:45 +02:00
Gouvernathor 9069749c44 Add the xycenter synthetic style prop 2022-09-05 14:26:16 +02:00
Tom Rothamel 698b50fd7d doc: Update changelog. 2022-09-04 22:45:42 -04:00
Tom Rothamel 92ae3fe576 Jump to the deferred translate identifier if the translate changes.
This will re-run, and hence re-translate, say statements that have
interact=False, most notably the Say statement that precedes a
menu statement.

This could cause problems if there is a non-idempotent statement
between the say statement and the interaction, like:

    e "This will show dialogue when the screen is shown." interact False

    $ variable += 1

    call screen myscreen

That should be rare enough that a warning will suffice.
2022-09-04 21:47:46 -04:00
Tom Rothamel 78391bf68f Clear the deferred_translate_identifier when the interaction end.
This makes it available for the full interaction, including any
restart due to change_language.
2022-09-04 21:38:19 -04:00
Tom Rothamel 04a69c0d64 Remove debug print. 2022-09-04 17:27:04 -04:00
Tom Rothamel e9d0574f88 Merge branch 'maint-8.0' 2022-09-04 00:55:53 -04:00
Tom Rothamel 7d4610d13d New behavior regarding modal, pause, and timers.
By default, timers trigger even if uderneath a modal screen
- a screen timer is intended primarily to display data, and not
by default, as a means of control. (For example, the default
notify screen uses a timer to hide itself without game effect.)

Pauses, by default, respect modal screens, as pause is part of
the main game's control flow.

Both timers and pauses take a modal property, which overrides
if a modal screen is respected or not.

Fixes #3935.
2022-09-04 00:42:48 -04:00
Tom Rothamel 1fa440feaa Allow files descriptors backing logs to be unflushable.
Fixes #3963.
2022-09-03 20:27:23 -04:00
Gouvernathor c29da607f6 doc: improve and fix say-with-attributes examples 2022-09-03 14:51:15 +02:00
Gouvernathor a36a6cccf0 doc: multipersistent init -> define 2022-09-03 12:19:36 +02:00
Andy_kl 7f45cf4ee8 Fix typo in UserStatement.replace_next 2022-09-03 02:02:00 +04:00
Gouvernathor 1d330d222c truncate when there are too many unreachable lines 2022-09-02 23:46:56 +02:00
Tom Rothamel 75669c545a ffmedia: Do not stop decoding when sending packets hits EOF.
Only stop decoding when there are no more frames to be decoded, or a
real error.

Fixes #3927.
2022-09-02 00:48:00 -04:00
Gouvernathor b3f08bdfeb Expand get_ordered_image_attributes doc 2022-09-02 01:17:30 +02:00
Tom Rothamel c29e7a0e85 Merge branch 'maint-8.0' 2022-09-01 02:20:13 -04:00
Tom Rothamel 8c5f6f22dc Fix credits. 2022-09-01 02:19:45 -04:00
Tom Rothamel 22e58c9a4e Merge branch 'maint-8.0' 2022-09-01 02:19:33 -04:00
Gouvernathor 4640b135a1 Add reachability analysis 2022-09-01 01:32:32 +02:00
Tom Rothamel 0d04423ca9 Fix credits. 2022-08-31 19:18:47 -04:00
Gouvernathor ad5d6d503a doc: end (ish) unfinished sentence 2022-08-31 23:02:05 +02:00
Tom Rothamel af0d90d23c Merge branch 'maint-8.0' 2022-08-30 23:55:41 -04:00
Tom Rothamel 183d18e4fd doc: Update credits. 2022-08-30 21:25:50 -04:00
Tom Rothamel 7cda9a03d9 doc: Changelog Security page, update sponsors. 2022-08-30 21:16:12 -04:00
Gouvernathor d84d6fb387 dic: fox typo 2022-08-31 02:38:46 +02:00
Gouvernathor 43132e9045 doc: make the example easier to understand 2022-08-31 00:11:58 +02:00
Gouvernathor 6d820a5e74 Update lint.py 2022-08-30 13:55:13 +02:00
Adam Trzypolski 1df764065e Document {size=*<float>} 2022-08-30 11:39:03 +03:00
Adam Trzypolski 8836b924d7 Allow multipliers in {size=<value>}
Sometimes, your tag doesn't know what size it will be, but `+`/`-` is not enough. Allowing a multiplier is a two line change.

```
"{size=*2}This is double size{/size} and this is {size=*0.5}half size{/size}"
```
2022-08-30 11:19:25 +03:00
Tom Rothamel 84ad8d4d91 Changelog for 8.0.3/7.5.3. 2022-08-29 22:05:09 -04:00
Tom Rothamel 19a182c7be Update the Ukrainian translation.
This is by twitter user @smq_denya.
2022-08-29 22:02:07 -04:00
Tom Rothamel 9e7d46e5d1 Fix typing problems in Matrix.__eq__.
Fixes #3895.
2022-08-29 19:12:18 -04:00
Gouvernathor 7d5ab8adc0 Use eq and ne for Matrix comparisons 2022-08-29 19:11:59 -04:00
Gouvernathor f003cfdea6 Add py2 support 2022-08-29 19:10:33 -04:00
Gouvernathor 46c0336375 Mark (lambda) arguments as not loaded from context 2022-08-29 19:10:17 -04:00
Tom Rothamel df71854921 Let the creator decide if modal blocks pauses. 2022-08-29 01:14:25 -04:00
Tom Rothamel f11e087838 Error out if a gui preference doesn't have a default.
Catches the mistake in #3909.
2022-08-28 23:39:39 -04:00
Tom Rothamel 233db814ea Document that outlines only work as part of a displayable.
Fixes #3917.
2022-08-28 19:21:03 -04:00
Tichq 43682e0be3 fix: issue-3912 2022-08-28 19:04:32 -04:00
Andykl f2fd54744b Merge pull request #3915 from qTich/fix/issue-3912
Strip parsed arugment default expression.
So it does not appear with \n when the last argument in the multiline parameters does not have a trailing comma.
2022-08-29 00:58:16 +04:00
Tichq e2909848ec fix: issue-3912 2022-08-28 23:14:01 +03:00
Tom Rothamel a2e2f8ba55 Allow quotes inside of triple strings.
Per #3913.

Co-authored-by: Dan Hess <phxntxm1@gmail.com>
2022-08-27 22:26:31 -04:00
Tom Rothamel 841e736cf9 Improvements to viewport dragging.
The biggest change here is that there is a new _draggable field on
Displayable. If True, the displable itself might be draggable, and
so a Viewport won't steal the focus of it.

There are also several changes that make sure the viewport gets and
releases drags as appropriate.

Finally, draggability only enables when the displayable is actually
scrollable in at least on axis.

Fixes #3910.
2022-08-27 22:00:42 -04:00
Tom Rothamel 832560d8dc Merge branch 'maint-8.0' 2022-08-27 00:35:40 -04:00
Tom Rothamel 32e7ca8fd7 Bump versions to 8.0.3/7.5.3. 2022-08-27 00:34:13 -04:00
Tom Rothamel c23466d98d Merge branch 'maint-8.0' 2022-08-27 00:32:38 -04:00
Gouvernathor 9572cd7f0a Update config.version documentation in GUI 2022-08-27 03:50:21 +02:00
Tom Rothamel a89a158b2f Add security documentation. 2022-08-26 20:53:20 -04:00
Tom Rothamel 511cdc1227 Document the fields of version_tuple. 2022-08-26 00:03:51 -04:00
Tom Rothamel fbcb9a102e Allow viewport drag to override child focus.
Now, when a a touch moves by a certain number of pixels when a
button inside a viewport is focused, focus and grab are shifted
onto the viewport, which then can be scrolled.

This also changes several things about how viewports process
events - now, if an event can be handled by the viewport, the
viewport takes precendence.
2022-08-25 23:48:28 -04:00
Tom Rothamel 2214c67706 Allow a displayable to force itself to be focused.
This disables the grab, and then changes the focus. This is mainly
intended for used by Viewport and VPGrid to override child focus
when being scrolled.
2022-08-25 23:48:28 -04:00
Tom Rothamel 207e0b791d Merge pull request #3883 from GiovanH/namedtuple
Use a NamedTuple for version_tuple (for #3755)
2022-08-25 21:11:41 -04:00
Gio 090c3d246c VersionTuple naming 2022-08-25 20:02:43 -05:00
Tom Rothamel d111e24a7b Add a keysym property to dismiss.
Fixes #3903.
2022-08-25 01:52:06 -04:00
Tom Rothamel 2ffe5007c1 Abort if too many interaction restarts occur without progress.
In this case, progress consists of either terminating the current
interaction, processing input, or waiting without processing input.

Fixes #3627.
2022-08-24 22:44:49 -04:00
midgethetree 3fb99d39b3 Improve lint for say attributes
Applies config.adjust_attributes to say attributes when linting, so lint won't report errors for say statements which work in-game.
2022-08-24 00:05:20 -04:00
Tom Rothamel a09c879f8d Update README.rst for Python 3 and Ubuntu 22.04.
Also, help sphinx run in more places.
2022-08-23 23:38:40 -04:00
Gouvernathor 6bf6975e1d doc: correct wrong preference 2022-08-24 03:50:47 +02:00
Gouvernathor 929f4c2468 doc typo and rephrase 2022-08-24 02:00:43 +02:00
Gouvernathor 6ef2571f17 doc: fix example 2022-08-24 01:48:59 +02:00
Gouvernathor 82a6fbbe6d doc: move example, add warning 2022-08-23 13:50:13 +02:00
Tom Rothamel 3028fe28a3 Fix typing problems in Matrix.__eq__.
Fixes #3895.
2022-08-23 01:13:22 -04:00
Tom Rothamel 6b81f958fd translation: Avoid automatically generating an identifier that already exists.
Fixes #3894.
2022-08-22 21:11:52 -04:00
Tom Rothamel 14f535cea8 Ensure the interface starts before displaying an error message. 2022-08-22 01:15:57 -04:00
Tom Rothamel e7f186e12a Merge pull request #3892 from renpy/fix-lambda-in-comp
Fix the ast magic applied on comprehensions when containing lambdas
2022-08-21 22:09:24 -04:00
Gouvernathor 2a90f82f3a Add py2 support 2022-08-22 03:08:16 +02:00
Gouvernathor c54780e088 Mark (lambda) arguments as not loaded from context 2022-08-22 02:41:26 +02:00
Andy_kl 97eb86d6d9 Add help <expr> into console commands. 2022-08-22 04:16:46 +04:00
Gouvernathor 60ad4487ac doc: fix typo 2022-08-22 02:06:54 +02:00
Tom Rothamel 9f6e618ee4 sl2: Do not copy a non-const created slfor list or iterator. 2022-08-21 17:02:31 -04:00
Gouvernathor 236cc0b59f doc: simplify call_screen 2022-08-21 20:11:15 +02:00
Gouvernathor 387cb05892 doc: hide **kwargs for load_module
That's intil/unless it gets documented
2022-08-21 19:47:25 +02:00
valery-iwanofu fb5db21898 Fix jnius example code 2022-08-21 12:04:49 +02:00
Tom Rothamel c91b8f1031 py3, sl2: Copy the value for is iterating over into a list.
This allows it to be iterated multiple times, even if the value
is an iterator. This in turn, allows range, enumerate, and zip to
be marked as pure, and hence potentially treated as constant in
a screen.
2022-08-21 00:28:00 -04:00
Tom Rothamel 6b390c0191 py3: Audit pure builtin functons on Python 3.
Previously, Python 3 builtins weren't included, so this replaces
the functions with a curated list.
2022-08-20 22:17:05 -04:00
Tom Rothamel 087fb97c0b ren_py: Remove debug raise. 2022-08-20 21:51:11 -04:00
Tom Rothamel 5322748f51 ren_py: Rewrite get_line_text to return the transformed text. 2022-08-20 21:48:29 -04:00
Tom Rothamel 156166b3dc Merge pull request #3885 from renpy/_ren.py-crlf
Make _ren.py accept windows-ending (CRLF) files
2022-08-20 21:48:16 -04:00
Gouvernathor ae9c90a25e Use splitlines to avoid errors with CRLF
also, used a better enumerated linenumber
2022-08-21 03:44:02 +02:00
Gio 649c4bc725 WIP namedtuple for version info 2022-08-20 17:25:20 -05:00
Tom Rothamel 402d6779e8 ren_py: Remove potentially over-sensitive test, fix linenumber. 2022-08-19 23:45:15 -04:00
Tom Rothamel 29b191ff05 Merge pull request #3881 from renpy/_ren.py
Add a syntax error to _ren.py parsing, and tweak its doc
2022-08-19 23:43:28 -04:00
Gouvernathor 932bf79fbe Revert allowing triple simple quotes 2022-08-20 05:40:11 +02:00
Gouvernathor 703d775e99 Update ren_py.rst 2022-08-20 05:35:06 +02:00
Gouvernathor 588b447ab2 Merge branch 'master' into _ren.py 2022-08-20 05:26:45 +02:00
Tom Rothamel 4f8cca62fe doc: _ren.py files. 2022-08-19 23:23:32 -04:00
Gouvernathor d5546516fd Expand _ren.py syntax 2022-08-19 11:40:45 +02:00
Tom Rothamel 98b44c7a76 _ren.py: Report files with obvious errors. 2022-08-19 01:10:44 -04:00
Tom Rothamel 22d1af00ef _renpy.py: Error out if foo_ren.py and foo.rpy exist in the same game. 2022-08-18 22:47:05 -04:00
Tom Rothamel 81e21925b2 _ren.py: Change the order that _ren.py files are compiled.
With this change, foo_ren.py is compiled at the same time foo.rpy
would be, and both files produce foo.rpyc, with foo_ren.py taking
precendece over foo.rpy if both exist.

The purpose of this is to make it possible to replace a .rpy file
that contains an init python block with a _ren.py file, and have
the .rpyc file be replaced with the file fron the new source.
2022-08-18 22:32:29 -04:00
Gouvernathor 9fe1b7fb46 doc: don't document invisible parameter
We override :args: not to display `value`, so documenting it looks weird.
We could also choose to let the value argument display in the class signature.
2022-08-18 23:16:59 +02:00
Gouvernathor 0efbf3484b Add comments and internal documentation 2022-08-18 21:52:24 +02:00
Gouvernathor 1fdd09aa4f Replace inline if/else with or, and fix comments
It's a bit quicker in the general case, and avoids repetitions.
2022-08-18 16:19:49 +02:00
Gouvernathor b2fa99872a doc: fix typo 2022-08-18 15:56:57 +02:00
Tom Rothamel b29df78420 ren_py: Initial implementation of ren_py to rpy converter. 2022-08-17 21:52:39 -04:00
Gouvernathor 4d9ffbbfff doc: add ref anchors 2022-08-17 17:33:57 +02:00
Gouvernathor 5b8458591d fix 2022-08-17 17:33:02 +02:00
Gouvernathor 19eeb87c9a doc: add internal references 2022-08-17 17:32:31 +02:00
Gouvernathor 9efd8aaf2d doc: Add internal references 2022-08-17 17:15:17 +02:00
Tom Rothamel 53f5d4aa89 Break the lexer off into its own file.
At 3,000+ lines, parser.py was getting a bit unwieldy. This change
breaks off the file processing and lexing portions of the parser
into lexer.py, and leaves parser.py more for the parser trie and
statement definitions.

This will let me add more functionality (the ren.py transfome)
to lexer.py.
2022-08-17 00:40:10 -04:00
Tom Rothamel 72df151885 Merge branch 'maint-8.0' 2022-08-16 21:09:21 -04:00
Tom Rothamel 289ccaf00d Merge pull request #3873 from renpy/fix-3872
fix wrong interpolation example
2022-08-16 21:08:38 -04:00
Gouvernathor 754731e2b9 fix typo 2022-08-16 21:36:33 +02:00
Gouvernathor b6dd3bb5d8 doc: trim and fix wrong example
renpy.atl_warper and the `customwarper duration property value` needs not be showcased outside of the Warpers section
2022-08-16 20:32:02 +02:00
Tom Rothamel e48c9045e7 Merge pull request #3750 from Tey/web_progressive
Optimizations for building Web packages
2022-08-15 18:37:30 -04:00
Tom Rothamel 077a368386 Merge pull request #3866 from renpy/lint-init-priority
Lint out-of-range init priorities
2022-08-15 01:34:18 -04:00
Tom Rothamel 96be374566 Merge pull request #3869 from renpy/new-matrix-equality
Use eq and ne for Matrix comparisons
2022-08-14 21:18:52 -04:00
Tom Rothamel 164fe5fdb0 doc: Changelog. 2022-08-14 10:54:11 -04:00
Tom Rothamel 612eb11ed3 Include an aarch64 version of the game launcher script.
As it was missing before.
2022-08-14 10:47:23 -04:00
Gouvernathor eac73269de Use eq and ne for Matrix comparisons 2022-08-14 16:04:32 +02:00
Tom Rothamel 12e6c4b7e1 ffmedia: Modernize how ffmpeg is used.
The goal of this was to make sure that ffmedia.c compiles without
any warnings under ffmpeg 4.2. This required a series of
related changes.

The first was more changes of how the Packet queue works. The packet
queue is now in charge of allocated and deallocating AVPacket objects
as required, and is the only place where AVPacket objects are created.
This allowed us to get rid of several AVPackets that were allocated
as part of MediaState, and a lot of copying of data to and from these
objects.

This enables and is enabled by a change to fully embrace the new
avcodec_send_packet/avcodec_receive_frame API, and most notably
that avcodec_send_packet is defined to either fully read a packet,
or not read it at all.There was a lot of complexity inherited
from prior APIs that would only partially read packets, which
these changes do away with.
2022-08-14 01:55:10 -04:00
Tom Rothamel 90dee6d775 ffmedia: Replace AVPacketList in PacketQueue functions.
AVPacketList is deprecated, so this replaces it with the amazingly
similar PacketQueueEntry object.
2022-08-13 22:36:18 -04:00
Tom Rothamel 425feb7909 Merge branch 'maint-8.0' 2022-08-13 00:21:42 -04:00
Tom Rothamel 28088c3a0b doc: Changelog. 2022-08-12 23:55:17 -04:00
Tom Rothamel 1e3b96e1c3 steam: Use pointer instead of byref.
It's not clear byref can be used with cast. (It did work, but might
not be documented as working.)
2022-08-12 23:02:06 -04:00
Tom Rothamel 3b5ac939ce Require --real to run add.py.
To remind me to use scripts/add_all.sh during the warring versions
period.
2022-08-12 22:37:41 -04:00
Gouvernathor 6ba03d3fd6 doc: typo 2022-08-13 04:36:41 +02:00
Tom Rothamel a45c39b5ef steam: Fix ctypes and documentation issues.
Fixes #3865
2022-08-12 22:28:15 -04:00
Gouvernathor 45cdda60c3 Check for out-of-range init priorities 2022-08-13 04:26:47 +02:00
Gouvernathor 88a1461755 doc: typo 2022-08-13 03:59:56 +02:00
Gouvernathor f8d93d939f doc: reword 2022-08-13 01:23:44 +02:00
Tom Rothamel 464b5d8c53 Merge branch 'maint-8.0' 2022-08-12 00:55:53 -04:00
Gouvernathor 5b9148aab8 Don't shorten Image's repr 2022-08-12 00:55:44 -04:00
Tom Rothamel 4629de77f9 Merge pull request #3860 from renpy/image-shorten-repr
Don't shorten Image's repr
2022-08-12 00:55:12 -04:00
Tom Rothamel cb785c3fd5 doc: Changelog last. 2022-08-12 00:54:47 -04:00
Tom Rothamel 48b6f77901 Merge branch 'maint-8.0' 2022-08-11 17:50:31 -04:00
Tom Rothamel c4a7ba3ad9 Merge pull request #3858 from Andykl/pretty-repr-fixes
Fixes of console pretty repr
2022-08-11 17:50:03 -04:00
Gouvernathor f33b715177 doc: anchor the ref 2022-08-11 03:49:16 +02:00
Gouvernathor ccd040599e doc: replace nonexistent function name with ref 2022-08-11 03:48:53 +02:00
Gouvernathor 54f1cae1aa Don't shorten Image's repr 2022-08-11 03:39:02 +02:00
Tom Rothamel d07d61d050 Merge branch 'maint-8.0' 2022-08-10 21:26:37 -04:00
Tom Rothamel 7dc6a7c64b Remove some obsolete debug prints. 2022-08-10 21:23:46 -04:00
Tom Rothamel 5bb746b0e6 Make MouseDisplayable reflect default_mouse.
Fixes #3856.
2022-08-10 21:20:33 -04:00
Andy_kl 66c33029e6 Because dicts are ordered in python 3 by default, do not sort them. 2022-08-10 14:30:42 +04:00
Andy_kl 03ff0ef493 Add pretty repr of dict keys, values and items. 2022-08-10 14:30:42 +04:00
Andy_kl b04ecb88f7 Fix strings and bytes representation in python 3. 2022-08-10 14:30:42 +04:00
Tom Rothamel 5f899a6773 Make achievement.Sync() call renpy.restart_interaction()
Fixes #3854.
2022-08-09 23:09:57 -04:00
Tom Rothamel 30db52f617 Merge pull request #3855 from renpy/operator-mul
Use c-boosted mul function instead of python-defined one
2022-08-09 23:04:50 -04:00
Gouvernathor 4ad0f51594 doc: Fix bullet-point lists
also, sort by alphabetic order
2022-08-10 03:51:18 +02:00
Gouvernathor 6891ad6174 Update _shaders.rpym 2022-08-09 11:40:13 +02:00
Tom Rothamel 609e502a4d Add config.autosave_callback.
A callback or list of callbacks that are called after a background
autosave finishes.

Fixes #3851.
2022-08-09 01:00:24 -04:00
Tom Rothamel bb576eec63 Merge branch 'maint-8.0' 2022-08-08 01:06:00 -04:00
Tom Rothamel d84bb6890a doc: Changelog doc changes. 2022-08-08 01:05:33 -04:00
Tom Rothamel 42f7c9f7e1 doc: Changelog. 2022-08-07 22:13:17 -04:00
Tom Rothamel 2417b43439 doc: Sponsors. 2022-08-07 19:04:25 -04:00
Tom Rothamel 037880acf0 Merge branch 'maint-8.0' 2022-08-07 18:44:05 -04:00
Tom Rothamel 6b32511e33 Visit the mask of an AlphaMask, as well as the child.
Fixes #3832.
2022-08-07 18:21:20 -04:00
Tom Rothamel 948fa59434 vscode: Settings. 2022-08-07 18:06:08 -04:00
Tom Rothamel b4d645e380 Avoid saving before the rollback log is created.
Fixes #3847.
2022-08-07 15:38:57 -04:00
Elckarow ef1b55d760 fixed typo 2022-08-06 23:55:32 -04:00
Tom Rothamel b1fdb7be39 Merge pull request #3848 from Elckarow/patch-4
fixed typo
2022-08-06 23:55:09 -04:00
Elckarow c25e5d31f0 fixed typo 2022-08-07 04:09:13 +02:00
Tom Rothamel 257b49ff3a Merge branch 'maint-8.0' 2022-08-06 00:39:24 -04:00
Tom Rothamel 44300d9a8c audio: Adjust the size of a fadein/out step to ensure sample length is nonzero.
This is an interim fix to #3846.
2022-08-06 00:38:38 -04:00
Tom Rothamel f285009182 Make built-in stores constant, document constant stores.
The goal of this is to improve Ren'Py performance by not checking
stores that will not be changed outside of the init phase for
changes before statements.

The icon store is left alone, as it may be going away soon.
2022-08-05 01:38:40 -04:00
Tom Rothamel 5cc4fd64a1 Allow a namespace to declare the _constant variable.
If true, this variable declares the namespace constant. Constant
namespaces are not saved or loaded, and do not participate in
rollback.

In exchange for this, the namespace does not need to be scanned
for changed variables, saving a lot of time if the namespace has
no variables that will change after init.
2022-08-04 02:11:07 -04:00
Tom Rothamel ef1ae9a562 Merge branch 'maint-8.0' 2022-08-04 01:15:44 -04:00
Tom Rothamel a56e0f9451 pydict: Swap the middle element to the end.
To ensure the partiion routine works correctly.
2022-08-04 00:59:49 -04:00
Tom Rothamel 05bdff3c7f Fix bad merge. 2022-08-04 00:21:44 -04:00
Tom Rothamel 20dc7e5eb3 Merge branch 'maint-8.0' 2022-08-04 00:13:46 -04:00
Gouvernathor f0742bc684 extra space 2022-08-03 20:05:49 -04:00
Gouvernathor c63c77b780 doc: tweak the sentence 2022-08-03 20:05:04 -04:00
Gouvernathor 233cff6d0b doc: tweaks to last
Add a label to avoid confusion between the statements (the first happens at init, the second at runtime), and fix wording.
2022-08-03 20:02:11 -04:00
Gouvernathor 06603d294b doc: use the exception role 2022-08-03 20:00:54 -04:00
Gouvernathor bd87dd520a doc: better example 2022-08-03 20:00:44 -04:00
Gouvernathor c3cd5580be doc: better document user-defined warpers 2022-08-03 20:00:37 -04:00
Gouvernathor e586fea5e6 doc: tweak is_selected and is_sensitive
False -> false, and true -> a true value, because no guarantee is given on the type of the returned value
Also, a list of actions is accepted
2022-08-03 20:00:25 -04:00
Gouvernathor 464184cefa doc: rephrase renpy.scry a bit 2022-08-03 20:00:12 -04:00
Tom Rothamel 2a97b50917 Use the middle element when quicksorting store dicts.
This is a big improvement on Python 3, where store dictionaries can
be created in mostly-sorted order, and hence become the worst-case
for quicksort.

Fixes #3812, which is caused by the store.audio namespace becoming
truly huge, and this bad behavior running Ren'Py out of memory.
2022-08-03 19:32:01 -04:00
Tom Rothamel 894a7133c0 Use the middle element when quicksorting store dicts.
This is a big improvement on Python 3, where store dictionaries can
be created in mostly-sorted order, and hence become the worst-case
for quicksort.

Fixes #3812, which is caused by the store.audio namespace becoming
truly huge, and this bad behavior running Ren'Py out of memory.
2022-08-03 19:10:31 -04:00
Gouvernathor bc696a05c4 doc: rephrase renpy.scry a bit 2022-08-03 08:41:53 +02:00
Gouvernathor f49dd5b48e Fix and simplify "List filenames"
- Avoid sorting dirs because it's pointless
- strip config.gamedir once instead of many times
- only strip it when safe (this one is a little bonus)
- do not turn into a bytes in py3 (I don't even know why it was the case in py2, but I left it just in case) (and even in that case, now it does it only once)
2022-08-03 00:31:45 -04:00
Tom Rothamel e302c2ad62 Merge pull request #3827 from renpy/fix-list-filenames-py3
Fix and simplify the "List filenames" dev action
2022-08-03 00:31:12 -04:00
Tom Rothamel c98f1d2b83 Merge pull request #3823 from shawna-p/master
Expand functionality of drag_offscreen
2022-08-03 00:30:44 -04:00
Asriel Senna f6364a64c3 doc: replace :ref: with :doc: wherever possible
This simplifies many cases where a page has a ref identifier distinct 
from its filename, which makes linking harder to understand when writing 
the doc.
Also, it solves a small scrolling problem in such cases.
Some links in changelog and changelog6 were left alone, and some .. _ 
identifiers too, to ensure compatibility.
2022-08-03 00:21:11 -04:00
Tom Rothamel 77cb7334bc Merge pull request #3820 from renpy/doc-doc
Replace :ref: with :doc:
2022-08-03 00:20:19 -04:00
Tom Rothamel 60d25f62aa Merge pull request #3834 from kyouryuukunn/add_doc_about_scry
add doc about scry
2022-08-02 20:10:55 -04:00
Tichq 3a3c79dc7d fix: At the time of import renpy.import_all the pygame module may not be present. 2022-08-02 20:06:15 -04:00
Gouvernathor cb6a944795 doc: improve console commands list generation
Using replace is probably simpler than using split then join.
Also, the markup using a leading whitespace is the quote markup in sphinx, which is a bit ugly. A bullet list renders better, I think.
2022-08-02 20:05:54 -04:00
Tom Rothamel 24215c9383 Merge pull request #3835 from renpy/better-doc-help-commands
Improve the generation and inclusion of the console commands list
2022-08-02 20:03:18 -04:00
Tom Rothamel 7a3c77d119 Merge pull request #3836 from qTich/fix/undefined-pygame
fix: Unavailable `pygame` in `renpy.display.layout`
2022-08-02 20:02:41 -04:00
Tom Rothamel 1c86b51175 Merge branch 'maint-8.0' 2022-08-01 22:52:47 -04:00
kyouryuukunn 71279094e5 [fix doc]lexer.catch_errors() -> catch_error() 2022-08-01 22:16:10 -04:00
Tom Rothamel 09e56040ab py3: Enable from __future__ import annotations.
Fixes #3822.
2022-08-01 21:37:55 -04:00
Tichq 3a1fbb2859 fix: At the time of import renpy.import_all the pygame module may not be present. 2022-08-01 15:43:34 +03:00
Gouvernathor 50fe062e72 doc: improve console commands list generation
Using replace is probably simpler than using split then join.
Also, the markup using a leading whitespace is the quote markup in sphinx, which is a bit ugly. A bullet list renders better, I think.
2022-08-01 06:12:07 +02:00
kyouryuukunn e6e98c6f41 add doc about scry 2022-08-01 12:52:24 +09:00
kyouryuukunn 69dc800a89 [fix doc]lexer.catch_errors() -> catch_error() 2022-08-01 05:43:15 +02:00
Tom Rothamel 54773f0b3c Update .gitignore to ignore *-dists. 2022-07-31 13:24:40 -04:00
Tom Rothamel 54663341b6 Provide compatibility for modal_blocks_pause. 2022-07-31 13:13:15 -04:00
Tom Rothamel bdb655c62e Add a multiple-version compatibility check.
This is intended for the Ren'Py 8/7 mixed period, and allows a
compat test to be True in Ren'Py 8 and False in some Ren'Py 7
versions.
2022-07-31 11:08:38 -04:00
Tom Rothamel 766820a881 Merge branch 'maint-8.0' 2022-07-31 02:02:46 -04:00
Tom Rothamel e113bafd0b Check for a language change before computing transitions.
Preventing a language change from cancelling transitions that have
already been queued up.

Fixes #3830.
2022-07-31 02:00:52 -04:00
Tom Rothamel 08f3fce3d2 Merge branch 'maint-8.0' 2022-07-31 01:33:47 -04:00
Tom Rothamel 04adf358c0 Revert "Back out half of #3790."
This reverts commit a9d9e0973e.

Per #3824.
2022-07-31 01:33:19 -04:00
Gouvernathor 65dcc864d8 Fix conflicting properties (again) 2022-07-31 03:13:58 +02:00
shawna-p ad04219074 Improve documentation and reduce calls to len 2022-07-30 19:13:32 -04:00
Gouvernathor 3fdb9236ae Fix and simplify "List filenames"
- Avoid sorting dirs because it's pointless
- strip config.gamedir once instead of many times
- only strip it when safe (this one is a little bonus)
- do not turn into a bytes in py3 (I don't even know why it was the case in py2, but I left it just in case) (and even in that case, now it does it only once)
2022-07-30 17:04:35 +02:00
Gouvernathor d5177af212 Fix duplicate label errors 2022-07-30 10:57:34 -04:00
Tom Rothamel 4dd723affa doc: Clarify that define's const-ness extends to fields and indexing.
Fixes #3818.
2022-07-30 10:52:51 -04:00
Tom Rothamel 1f1573c0db Merge pull request #3826 from renpy/fix-3825
Fix duplicate label errors
2022-07-30 10:42:07 -04:00
Gouvernathor 3498c5e24c extra space 2022-07-30 16:35:49 +02:00
Gouvernathor a05f3050d4 Fix duplicate label errors 2022-07-30 16:11:57 +02:00
shawna-p 8f297ce5f1 Add option to keep (width, height) drag on screen 2022-07-29 19:59:09 -04:00
shawna-p 728e5e0b88 Expand functionality of drag_offscreen 2022-07-29 19:19:05 -04:00
Tom Rothamel 16b6fe8a62 Merge branch 'maint-8.0' 2022-07-29 01:12:26 -04:00
Asriel Senna 79706e3489 doc: replace :ref: with :doc: wherever possible
This simplifies many cases where a page has a ref identifier distinct 
from its filename, which makes linking harder to understand when writing 
the doc.
Also, it solves a small scrolling problem in such cases.
Some links in changelog and changelog6 were left alone, and some .. _ 
identifiers too, to ensure compatibility.
2022-07-29 05:28:51 +02:00
Tom Rothamel 7291c4594b Immediately restart if inside a reload at a menu.
Fixes #3799, also for the case where we're in a menu.
2022-07-28 21:44:04 -04:00
Gouvernathor 05516c5eff doc: tweak the sentence 2022-07-28 08:34:38 +02:00
Tom Rothamel b91a67e334 gl2: Create an appropriately-sized texture when drawable_resolution is used. 2022-07-28 01:12:19 -04:00
Tom Rothamel f55091310d gl2: Create an appropriately-sized texture when drawable_resolution is used. 2022-07-27 23:27:24 -04:00
Tom Rothamel bfad014ce4 Merge branch 'maint-8.0' 2022-07-27 01:28:06 -04:00
Tom Rothamel e406247ae1 doc: Redocument config.game_main_transition.
Fixes #3808.
2022-07-27 01:12:19 -04:00
Tom Rothamel f7db1fb471 gl2: Trigger a resize response if the drawable size changes. 2022-07-26 23:00:13 -04:00
Tom Rothamel 7b25b2e9b9 Add a script to merge the maintenance branch to master. 2022-07-26 17:37:30 -04:00
Tom Rothamel 1ca3201ddd Avoid using stylized quotes. 2022-07-26 00:34:54 -04:00
Tom Rothamel 5429223c34 Undocument config.main_game_transition and config.game_main_transition.
In favor of config.intra_transition, which Ren'Py has been using since
the switch to screens.

Fixes #3038.
2022-07-26 00:34:54 -04:00
Tom Rothamel ad140a9ae8 doc: Fix various issue with preferences documentation.
Fixes #3809. Fixes #3810.
2022-07-26 00:34:54 -04:00
Tom Rothamel 8b3e05d75e Avoid using stylized quotes. 2022-07-26 00:12:45 -04:00
Tom Rothamel 267f12b166 Undocument config.main_game_transition and config.game_main_transition.
In favor of config.intra_transition, which Ren'Py has been using since
the switch to screens.

Fixes #3038.
2022-07-25 20:50:37 -04:00
Tom Rothamel 5a60e1cebe doc: Fix various issue with preferences documentation.
Fixes #3809. Fixes #3810.
2022-07-25 20:32:01 -04:00
Gouvernathor 7c8e4475c5 doc: fix typo (#3805)
no need to propagate to maint-8.0 as its doc will probably never be regenerated
2022-07-25 15:04:28 +02:00
Tom Rothamel c5fb0cddb4 Merge branch 'maint-8.0' 2022-07-25 00:44:02 -04:00
Tom Rothamel 7ba45c6dc0 iap: Use strings with iOS class names.
Fixes the same problem as 9239e92042,
but for iOS.
2022-07-25 00:33:40 -04:00
Tom Rothamel 3c741ac051 Add renpy.music.pump.
When called, this causes audio to be processed, as it is at the
start of an interaction. This is intended for cases where audio
is played and then stopped with a fadeout, which default to not
playing anything.

Fixes #3805.
2022-07-24 23:12:27 -04:00
midgethetree 5489a74943 Fixed mouse area hovering
Mouseareas are supposed to not hover if the keyboard is being used for focusing, but this was broken by an if/else statement that changed the is_hovered value again without regard to if it had already been set to false because of keyboard focusing. Changing it to elif/else ensures the value of is_hovered is only changed if it hasn't already been set to false because of keyboard focusing.
2022-07-24 22:19:49 -04:00
Tom Rothamel 7e75d7f61c Merge pull request #3804 from midgethetree/fix-mousearea
Fixed mouse area hovering
2022-07-24 22:19:18 -04:00
Tom Rothamel 0305285661 Improvements to default_focus.
* Only use default_focus when the last interaction was not a mouse
  click, mouse movement, or touch. This prevents focus flickering when
  where default_focus occured, the mouse event was immediately processed,
  and the focus changed.

* When a displayable with a greater default_focus appears, switch to
  it.

* When the displayable with the greatest default_focus disappears,
  switch to the new greatest default_focus when nothing else is
  focused. This allows going to the default item in a lower priority
  menu if a higher priority item disappears.

Fixes #3761.
2022-07-24 21:38:25 -04:00
midgethetree d605c8f1af Fixed mouse area hovering
Mouseareas are supposed to not hover if the keyboard is being used for focusing, but this was broken by an if/else statement that changed the is_hovered value again without regard to if it had already been set to false because of keyboard focusing. Changing it to elif/else ensures the value of is_hovered is only changed if it hasn't already been set to false because of keyboard focusing.
2022-07-24 16:26:53 -06:00
Tom Rothamel aa4a8b4bc6 doc: Update keymap documentation. 2022-07-24 16:16:27 -04:00
Tom Rothamel 817ca31d28 Allow command-c and command-v for copy/paste on mac.
Fixes #3791.
2022-07-24 15:20:58 -04:00
Elckarow c1d41e3a78 fixed typo in 'renpy/sl2/slparser.py' 2022-07-24 19:46:38 +02:00
Gouvernathor b120f1d742 Fix the default input screen 2022-07-24 18:11:57 +02:00
Tom Rothamel b8ab9a002e Merge branch 'maint-8.0' 2022-07-24 00:32:43 -04:00
Tom Rothamel 87dee63bf6 Allow Ren'Py to continue even if audio init fails.
This happens even when config.debug_sound is True, as the current
SDL can fail sound init if no audio devices exist.

Fixes #3768.
2022-07-24 00:14:15 -04:00
Tom Rothamel a16b4a54d5 iap: Use a unicode string with autoclass. 2022-07-24 00:14:15 -04:00
Tom Rothamel e5497b423e Back out half of #3790.
Events (other than modal TIMEEVENTS) should not be delivered to
the pausebehavior when it's behind a screen, and since TIMEEVENTS
can be combined with other events, it needs to be possible to
end the pause on any event.
2022-07-24 00:14:15 -04:00
Tom Rothamel ffd88bf2a8 Allow Ren'Py to continue even if audio init fails.
This happens even when config.debug_sound is True, as the current
SDL can fail sound init if no audio devices exist.

Fixes #3768.
2022-07-23 23:29:21 -04:00
Tom Rothamel 9239e92042 iap: Use a unicode string with autoclass. 2022-07-23 23:15:52 -04:00
Tom Rothamel a9d9e0973e Back out half of #3790.
Events (other than modal TIMEEVENTS) should not be delivered to
the pausebehavior when it's behind a screen, and since TIMEEVENTS
can be combined with other events, it needs to be possible to
end the pause on any event.
2022-07-23 22:46:51 -04:00
Gouvernathor 71385f87d9 Allow transforms to be created in stores (#3678)
This commit adds the ability to include a store name when defining a transform, allowing transforms to be define in stores other than the default.
2022-07-23 21:00:25 -04:00
Tom Rothamel bb90368eef Merge branch 'maint-8.0' 2022-07-22 23:19:44 -04:00
Tom Rothamel 119d7b5277 Adjust how autoreload loading and saving works.
This attempts to address #3799, which I'm guessing is caused by
the game being saved when in an error handling context that's
handling a parse error.

What this does is to try to retain the initial save that is created
until the save is loaded successfuly, or alternatively until the
game quits.

By not creating a new save slot for each reload attempt, this
tries to avoid creating a save when Ren'Py is in an unstable
state.
2022-07-22 23:16:58 -04:00
Tom Rothamel 21e0d7949a doc: Fix #3797. 2022-07-22 21:03:01 -04:00
Andykl d4c784bd1a Merge pull request #3798 from qTich/fix/missed-matrix-parent
fix: missed `DictEquality` parent for `SaturationMatrix`
2022-07-22 19:56:37 +04:00
Tichq d88cefbdef fix: missed DictEquality parent for SaturationMatrix 2022-07-22 18:17:14 +03:00
Gouvernathor 775d291fec doc: tweaks to last
Add a label to avoid confusion between the statements (the first happens at init, the second at runtime), and fix wording.
2022-07-22 15:19:29 +02:00
Gouvernathor b9313ff1d9 Merge pull request #3795 from kyouryuukunn/add_ParameterizedText_sample_code
[Doc] add ParameterizedText sample code
2022-07-22 15:15:50 +02:00
kyouryuukunn a3ae45e3f2 add ParameterizedText sample code 2022-07-22 21:10:20 +09:00
Tom Rothamel 9d5951b9ae Merge branch 'maint-8.0' 2022-07-22 00:41:50 -04:00
Tom Rothamel 9e97d55129 Use open() to open a file when scanning for examples.
This fixes a problem where using renpy.file would open script.rpy
when no translation was in effect, but tl/language/script.rpy would
take priority when a translation was in use.

Fixes #3780.
2022-07-22 00:11:54 -04:00
Tom Rothamel 8d435710df Merge pull request #3792 from kyouryuukunn/contribute_{{_in_extract_dialogue
consider {{ in exatract_dialogue
2022-07-21 22:48:13 -04:00
kyouryuukunn 84a3aa0b49 consider {{ in exatract_dialogue 2022-07-22 08:41:05 +09:00
Tom Rothamel 1191c64e0e Merge pull request #3766 from kyouryuukunn/add_combine_option_to_extract
add combine option to extract dialogue
2022-07-21 11:09:53 -04:00
kyouryuukunn 35b6014ea4 remove the combine option 2022-07-20 20:21:38 +09:00
Tichq dc8c19ef51 Fix: filter_text_tags for tts can accept a displayable text tag that cannot be converted to a string. 2022-07-20 02:00:19 -04:00
Tom Rothamel 8435f57a83 Merge pull request #3753 from qTich/fix/tts-filter_text_tags-displayable
Fix: `filter_text_tags` for `tts`.
2022-07-20 01:59:41 -04:00
midgethetree c995538d90 Make modal pause interactions not time out
Timed pause interactions (interactions triggered by renpy.pause with a specified delay) will now not time out when a modal screen is being shown.
2022-07-20 01:52:39 -04:00
midgethetree 086f2f04e1 Make modal saybehavior not autoforward
If a modal screen like the confirm screen is up, autoforwarding will now be paused.
2022-07-20 01:52:39 -04:00
Tom Rothamel 79fcc13a3a Merge pull request #3790 from midgethetree/fix-modal-behavior
Fix modal behavior
2022-07-20 01:52:06 -04:00
Tom Rothamel edad2f4de7 Merge branch 'maint-8.0' 2022-07-20 01:48:17 -04:00
kyouryuukunn caaab9d49c update tutorial japanese 2022-07-20 01:47:59 -04:00
kyouryuukunn a4accb4a68 update Japanese 2022-07-20 01:47:49 -04:00
kyouryuukunn b0174907b3 update Japanese 2022-07-20 01:47:39 -04:00
Tom Rothamel a27d9183d0 Merge branch 'maint-8.0' 2022-07-20 01:46:28 -04:00
Tom Rothamel 7c3092a37f tutorial: Remove the discussion of child_size.
For about 5 years, child_size has been set automatically based on
the scrollbars, so it's no longer necessary to go into it in
detail.

Fixes #3781.
2022-07-20 01:15:05 -04:00
Tom Rothamel f251262c94 Correct movie channels on load.
Fixes #3785.
2022-07-20 00:44:49 -04:00
midgethetree c1a7591040 Make modal pause interactions not time out
Timed pause interactions (interactions triggered by renpy.pause with a specified delay) will now not time out when a modal screen is being shown.
2022-07-19 18:32:06 -06:00
Tom Rothamel 4e59e4c8cc Align __eq__ and __hash__ for actions and color/transform matrixes.
These functions had gotten out of sync, with __eq__ being defined
and __hash__ being ignored. On Python 2, that mean objects that
would compare equal but have a different hash, while on Python 3,
an error would be raised indicating that the object was unhashable.

This resolves this ambiguity by adding __hash__ to classes that
are non-subclassables and have __eq__ defined, and then by removing
__eq__ from the base subclasses, leaving the default equality,
with is object identity.
2022-07-19 20:27:12 -04:00
kyouryuukunn 6e08fd91e9 Merge pull request #3779 from kyouryuukunn/Japanese_translate_220717
Japanese translate 220717
2022-07-19 17:27:17 +09:00
kyouryuukunn 8a32c2fb24 update tutorial japanese 2022-07-19 17:16:38 +09:00
Tom Rothamel 4d19b114f8 Merge branch 'maint-8.0' 2022-07-19 01:12:22 -04:00
Tom Rothamel 95120fe4a6 Add RENPY_NO_STEAM.
A way of disabling Steam initialization, if we want that.

Mostly a way for me to avoid the error I get everytime I start
Ren'Py without Steam running.
2022-07-18 23:32:23 -04:00
Tom Rothamel 40afe170ce Avoid filtering out ruby/furigana text tags.
Fixes #3778.
2022-07-18 23:12:03 -04:00
Tom Rothamel 6abb77bbfb text: Avoid rendering zero-size Null displayables.
Fixes #3774.
2022-07-18 22:58:49 -04:00
Tom Rothamel bad6bca4e6 Revert "Do not render zero-width displayables in text."
This reverts commit 84945d78ae.
2022-07-18 22:04:37 -04:00
Tom Rothamel 075c48324f Merge branch 'maint-8.0' 2022-07-18 02:09:24 -04:00
Tom Rothamel ebf3773e98 Fix vscode. 2022-07-18 02:08:45 -04:00
Tom Rothamel 84945d78ae Do not render zero-width displayables in text.
Fixes #3772.
2022-07-18 02:08:37 -04:00
Tom Rothamel fbf39a76ee Fix vscode. 2022-07-18 02:07:40 -04:00
Tom Rothamel 11ef81ef89 Do not render zero-width displayables in text.
Fixes #3772.
2022-07-18 01:52:10 -04:00
Tom Rothamel 10600fd307 Remove the obsolete udd.rst, now that there's a server redirect. 2022-07-17 13:23:19 -04:00
Gouvernathor d26bc4f048 doc: use the exception role 2022-07-17 13:38:33 +02:00
kyouryuukunn df7be71e9a update Japanese 2022-07-17 17:54:25 +09:00
kyouryuukunn 90a827bcd5 update Japanese 2022-07-17 17:37:49 +09:00
midgethetree 953375d0aa Make modal saybehavior not autoforward
If a modal screen like the confirm screen is up, autoforwarding will now be paused.
2022-07-16 19:49:05 -06:00
Tom Rothamel 53e8d5c28a Merge pull request #3769 from kyouryuukunn/add_warp
add renpy.warp_to_line func
2022-07-16 16:47:01 -04:00
kyouryuukunn 5ffbbc5531 add renpy.warp_to_line func 2022-07-16 19:34:39 +09:00
kyouryuukunn 1b363a7793 doesn't combine [[. 2022-07-16 09:17:01 +09:00
Tom Rothamel 5dd655eb4a Merge pull request #3758 from renpy/document-warp
doc: better document user-defined warpers
2022-07-15 17:51:59 -04:00
kyouryuukunn a618d3db32 add combine option to extract dialogue 2022-07-16 01:26:39 +09:00
Tom Rothamel c97a29aa02 Add the IF ... ELIF ... ELSE statement.
Per #3760, allows conditional compilation. There are a lot of game
stability caveats to this.
2022-07-15 00:42:08 -04:00
Tom Rothamel 331932ecc1 Revert "ren.py: Add the pass: syntax."
This reverts commit e532e9f9c3.

The solution to #3760 will take care of this by providing a
better syntax.
2022-07-14 19:28:22 -04:00
Gouvernathor c6f59b8144 doc: better example 2022-07-14 16:50:15 +02:00
Gouvernathor 52ee233378 doc: better document user-defined warpers 2022-07-14 16:13:27 +02:00
Tom Rothamel fab154eace ren.py: Load _ren.py files as Ren'Py script files.
This allows files ending with _ren.py to contain Ren'Py script,
be loaded, and operate as part of a normal game. The transformation
from Python to Ren'Py script has yet to be implemented.
2022-07-14 10:00:33 -04:00
Tom Rothamel e532e9f9c3 ren.py: Add the pass: syntax.
When followed by as :, pass takes an optional block that it
then ignores.

This is mostly intended for _ren.py files, where it will be used
as a way of ignoring lines of Python that only exist to make
Python type-checkers happy.

The buried lede - a _ren.py file will be a Python file (that can be
analyzed with Python tooling) that is convered internally to a
.rpy file, and then compiled as Ren'Py. At least, that's the plan.
2022-07-14 00:52:23 -04:00
Andy_kl 0b6112fadb Normalize elided filename in scanstrings before searching in properties.
Before that, on Windows the rules for _compat, _layout and most importantly _developer was failed, so some strings was leaked in common.rpy.
2022-07-14 06:23:46 +04:00
Tom Rothamel ce07604bd6 Merge pull request #3675 from kyouryuukunn/modify_default_transition
mofify alpha, zoom type in default and reset transform
2022-07-13 09:58:42 -04:00
Tichq f9f24b6a36 Fix: filter_text_tags for tts can accept a displayable text tag that cannot be converted to a string. 2022-07-13 02:10:56 +03:00
Tom Rothamel fc73078f54 Merge branch 'maint-8.0' 2022-07-12 16:00:15 -04:00
Tom Rothamel 909e61decb Include tinyfiledialogs in the build. 2022-07-12 15:56:32 -04:00
Tom Rothamel e17f4f3598 linvol: Documentation. 2022-07-12 15:47:07 -04:00
Tom Rothamel c6e360caf6 linvol: Add preferences.set_mixer and preferences.get_mixer.
These get and set the mixer in the new interpolated db format.
2022-07-12 15:46:14 -04:00
Tom Rothamel 5abb96d8fc Merge branch 'maint-8.0' 2022-07-12 09:17:40 -04:00
Tom Rothamel e417aef073 doc: Placeholder changelog entry for 7.5.2 / 8.0.2
Designed to prevent merge conflicts.
2022-07-12 09:17:01 -04:00
Tom Rothamel a7ec32c81d linvol: Use db power when calculating db.
This probably doesn't matter as much in practice, but it's the right
calculation for audio.

A more important change is that the default values for mixers are
now specified as a percentage of a mixer bar.
2022-07-12 09:14:53 -04:00
Tom Rothamel 26d7a4ab9b linvol: Mixer bars use decibels.
Using decibels makes the mixers feel right - the 50% point is
perceptually half volume, even if power-wise it's a lot less
than that.
2022-07-12 09:14:53 -04:00
Tom Rothamel f4dda8db33 linvol: Compatibility for linear volume.
Internally, the volumes are stored as linear volumes, being upgraded
the first time a version of Ren'Py that supports linear volumes is
run.

All other places a volume can come into Ren'Py are updated to consider
the new config.quadratic_volume variable, which will square the volume
to get linear volume.
2022-07-12 09:14:53 -04:00
Tom Rothamel 2dfa05fbcb linvol: Move to linear volume.
As opposed to the previous approach, where volume was squared,
which we're now calling quadratic volume.
2022-07-12 09:14:53 -04:00
Tom Rothamel 9063ad413a Add a multiple-version compatibility check.
This is intended for the Ren'Py 8/7 mixed period, and allows a
compat test to be True in Ren'Py 8 and False in some Ren'Py 7
versions.
2022-07-12 09:14:53 -04:00
Teyut 966cce804e Stop copying the files to be downloaded progressively into the initial ZIP archive 2022-07-12 02:25:42 +02:00
Teyut 6ff68089bd Add a generic files filter from Distributor users 2022-07-12 02:18:31 +02:00
Gouvernathor a1004924ce doc: tweak is_selected and is_sensitive
False -> false, and true -> a true value, because no guarantee is given on the type of the returned value
Also, a list of actions is accepted
2022-07-12 00:31:31 +02:00
Tom Rothamel 0a923be2de Merge branch 'maint-8.0' 2022-07-11 00:15:56 -04:00
Tom Rothamel a364e08d3c Force a recompile of textsupport.pyx.
So the changes in textsupport.pxd are effective.
2022-07-11 00:15:08 -04:00
Andy_kl 8f4d70a836 Fix TypeError when comparing float and None. 2022-07-10 22:45:20 +04:00
Tom Rothamel 0b78b48d8d sl1: Remove the ability to parse SL1 screens.
This had been left in to support potential issues in the change
from SL1 to SL2. That wasn't used, and almost certainly isn't
being used anymore, so the parser can be removed.

SL1 screens can still be loaded if they exist in SL1 files,
as this only affects the parser, not the runtime.

Fixes #3430.
2022-07-10 00:01:23 -04:00
Tom Rothamel 83268109c6 Merge branch 'maint-8.0' 2022-07-09 21:42:38 -04:00
Tom Rothamel d8161ea60e py3: Ensure the method_unpickle function exists on Python 3.
It's needed to load saves, per #3745.
2022-07-09 21:41:46 -04:00
Tom Rothamel 055dd39982 Start 8.1.0 and 7.6.0.
These will live on the main branch.
2022-07-09 16:55:25 -04:00
Tom Rothamel dc45fe1a79 Bump versions to 8.0.2 and 7.5.2.
This is for the benefit of the maintenance branch.
2022-07-09 16:50:05 -04:00
Tom Rothamel e0b23d12eb Allow auto-forward to work with multiple.
The changes here store the text objects that are created as part
of a multiple say statement, then pass those into SayBehavior,
which will use them to determine how long the autoforward will
pause for.

Fixes #3744.
2022-07-07 23:23:47 -04:00
Tom Rothamel b1cacddac7 tts: Fix ordering. 2022-07-07 23:23:47 -04:00
Gouvernathor 6af1212a26 docstring fix
only an internal docstring, not captured by sphinx, but it's better for future readings of the code
2022-07-08 00:48:45 +02:00
Tom Rothamel 1f02e72db9 Update the changelog. 2022-07-06 22:35:13 -04:00
Tom Rothamel 8de40ac154 doc: Minor clarification. 2022-07-06 20:05:22 -04:00
Tom Rothamel 246590d6eb Merge pull request #3741 from renpy/doc-self-voicing
Improve Self-voicing documentation
2022-07-06 19:40:08 -04:00
Tom Rothamel 0cc8ab844b Merge pull request #3743 from Tey/web_audio_opt
Re-use audio data to reduce memory and CPU usage (Web)
2022-07-06 19:39:23 -04:00
Teyut 6e882dcbe3 Use const instead of let/var to declare variables whose assignment will not change 2022-07-06 23:42:38 +02:00
Teyut 0402ffe0e2 Re-use the audio data from the playing file when queuing the same file to reduce memory and CPU usage (Web) 2022-07-06 23:41:22 +02:00
Gouvernathor 3fd958c232 doc: add explanations and fix obsolete name for sv 2022-07-06 22:17:17 +02:00
Gouvernathor f308ea3bfb doc: add example 2022-07-06 16:37:58 +02:00
Tom Rothamel 98e98ff57d Play alt text in first-to-last order by default.
Now that visit is defined to iterate first-to-last, this needs
to match it.

Fixes #3739.
2022-07-05 21:26:00 -04:00
Tom Rothamel d6c5281889 Duplicate the mousedisplayable each time the cursor changes.
Fixes #3736.
2022-07-04 22:06:10 -04:00
Gouvernathor 62dddfe1f3 doc: Update the vpgrid section
fixes #3737
2022-07-05 02:36:12 +02:00
Tom Rothamel bbfd64a25c Merge pull request #3735 from renpy/doc-mousedisplayable
Fix the doc for MouseDisplayable
2022-07-04 20:34:50 -04:00
Gouvernathor bd9d586f71 Fix the docstring integration
For some reason the former one didn't work. The FontGroup class was used as an example.
2022-07-05 00:28:54 +02:00
Gouvernathor 73741573ec doc: Fix wrong ATL syntax 2022-07-05 00:22:45 +02:00
Tom Rothamel a58f4c9ad7 Merge pull request #3698 from renpy/fix-3696
Fix CropMove transitions
2022-07-04 11:29:39 -04:00
Tom Rothamel df4bbb5add Merge pull request #3734 from renpy/trace-per-frame
Add _trace_screen to per_frame_screens
2022-07-04 11:27:32 -04:00
Gouvernathor a525764881 Revert the original per_frame_screen to [ ] 2022-07-04 16:02:56 +02:00
Gouvernathor c8653b2a63 Add _trace_screen to per_frame_screens in its file 2022-07-04 16:01:57 +02:00
Tom Rothamel 5949b9e639 doc: Credits and sponsors. 2022-07-04 01:04:09 -04:00
Tom Rothamel ce54f2b44a Fix translations. 2022-07-03 16:08:16 -04:00
Tom Rothamel 30e4790085 ua: Fix spelling of ukranian, minor issues with the translation. 2022-07-03 16:06:40 -04:00
Tom Rothamel fc2d988ddd Add a Ukranian translation of the launcher.
Credit goes to Matias B.
2022-07-03 15:28:18 -04:00
Tom Rothamel 44facb7d33 Make glyph and ruby public.
Fixes #3733.
2022-07-03 11:05:38 -04:00
Gouvernathor fe76a66555 Add _trace_screen to per_frame_screens 2022-07-03 13:48:53 +02:00
Tom Rothamel c4890fdbd5 OldMoveTransition resets its timing to None rather than 0.
Causing zoomin and zoomout to work.

Fixes #3731.
2022-07-02 18:00:52 -04:00
Tom Rothamel 86d4d2e78f Make it clear that Movie can take a list of movies to play.
This also fixes some issues that show up when playing a list of movies.

Fixes #3710.

Closes #3715, which this is based on.
2022-07-01 22:43:39 -04:00
Gouvernathor d6ae3ba92b Merge pull request #3728 from Neyunse/master
[DOC] fixed translation gui.text_font example
2022-07-01 23:34:53 +02:00
Neyunse 9a4f0bd88d [DOC] fixed translation gui.text_font example 2022-07-01 18:30:30 -03:00
Tom Rothamel 07e2dbcaac doc: Spacing fix to last merge. 2022-06-30 22:10:25 -04:00
Tom Rothamel b06e1c0e0d Merge pull request #3709 from Neyunse/master
[DOC] improved translation ID example
2022-06-30 22:09:45 -04:00
Tom Rothamel 513acc0bdc Merge pull request #3716 from mal/mobilebuild-str-type-fix
py3: Update mobilebuild exception logging
2022-06-30 22:09:12 -04:00
Tom Rothamel b92b057a40 Document that extend doesn't work well with language changes.
Fixes #3724.
2022-06-30 22:08:35 -04:00
Gouvernathor 4e859239aa doc: NotImplemented is not an exception
...and NotImplementedError is not even the exception being raised in that case, it's only Exception("Not implemented")
2022-06-30 11:40:54 +02:00
Tom Rothamel d961eec481 doc: Better documentation for Function. 2022-06-30 00:30:59 -04:00
Tom Rothamel fd3e9ce17d py2: Use object identity to compare Function.callable
The reason for this is that in py2, if a == b, then a.append == b.append.
That's not true in py3. This makes py2 slower, but correct.
2022-06-29 22:07:06 -04:00
Tom Rothamel bccc081971 sl2: Finish the renaming of dump to dump_const. 2022-06-29 21:42:34 -04:00
Tom Rothamel 42cbccfafa Fix comment indentation. 2022-06-29 21:42:34 -04:00
Tom Rothamel 866bb6ce45 Use identity, not equality, when comparing Functions for equality.
This fixes a problem where a Function with equal mutable arguments
would compare equal to another similar function, while not
actually performing the same action.
2022-06-29 21:42:34 -04:00
Tom Rothamel 8aa4a2fedb Merge pull request #3708 from renpy/fix-3701
Document the file parsing order as the unicode order of filepaths, not filenames
2022-06-29 20:08:47 -04:00
Tom Rothamel 08c18e1539 Merge pull request #3717 from zedraxlo/patch-1
Fix GetStat & SetStat.
2022-06-29 20:08:07 -04:00
Tom Rothamel 1eb7650e49 Avoid compiling PyExprs that have been rolled back.
Fixes #3719.
2022-06-29 20:02:12 -04:00
Gouvernathor aa9df2c3b6 doc: fix typo and try another markup 2022-06-30 01:19:10 +02:00
zedraxlo 200ce6212f Fix GetStat & SetStat. 2022-06-29 12:18:43 +08:00
Mal Graty 8923309409 py3: Update mobilebuild exception logging
In py3 the print_exc function prints a str, which files opened in binary
mode do not like. Conversely py2 doesn't seem to mind whether the file
is in binary mode or not.

This matches the approach taken in the rest of the file, where various
logs and outputs are also not opened in binary mode any longer.
2022-06-29 04:36:32 +01:00
Andykl f198e4b94e Merge pull request #3713 from Elckarow/patch-2
Fixed typo in doc string.
2022-06-28 16:33:10 +04:00
Elckarow 1e8165e8d9 fixed typo 2022-06-28 14:31:24 +02:00
Andykl 0246043a1e Merge pull request #3712 from Elckarow/patch-1
fixed tiny typo in renpy.easy.lookup_displayable_prefix
2022-06-28 16:27:47 +04:00
Elckarow d0d0bb4408 fixed typo 2022-06-28 14:24:13 +02:00
Tom Rothamel eae1d8c7ec Prevent the updater from creating .old files.
Instead of creating a .old file that can't be deleted, the files
are moved into updater/deleted. That directory can then have a
delete attempted each time Ren'Py starts, and the files are out
of the way.
2022-06-28 02:26:07 -04:00
Tom Rothamel 03cac8dd87 Include parent directories in distribution packages.
Especially the update packages. Fixes a problem where 8.0.0
couldn't be unpacked because the steam dlc didn't include the
package file the steam dlc existed in.
2022-06-27 23:34:20 -04:00
Tom Rothamel 7726613616 Include a "default" type for Render.modal, and use it for dismiss.
This allows a default focus to be modal, which means it will be modal
for the entire screen without the dismiss itself having to take up
any size.

Fixes an issue where displayables behind the dismiss could still get
mouse focus incorrectly, but weren't clickable.
2022-06-27 21:56:59 -04:00
Neyunse 02b9b84cd4 Added an example of a more visual id
This part may be a bit confusing for some, so I added it inside a start label to make it more understandable.
2022-06-27 22:46:23 -03:00
Asriel Senna cbd0080834 doc: unicode order of filepaths, not filenames 2022-06-28 02:34:18 +02:00
Tom Rothamel 97c686557b Bump versions. 2022-06-27 17:52:03 -04:00
Tom Rothamel 00c2c864e5 Merge pull request #3703 from Numerlor/coverage_module_fix
Add missing field to Module node
2022-06-27 17:51:35 -04:00
Gouvernathor 55b00d4652 doc: fix #3685 markup issues
Markup within links and links within markup are not possible in sphinx.
2022-06-27 18:56:38 +02:00
Tom Rothamel 30dd75bb5c Update itch upload script. 2022-06-27 01:46:49 -04:00
Tom Rothamel b4ff61cb52 Include a command to upload to github. 2022-06-26 20:51:07 -04:00
Numerlor ec8f29c5a2 Add missing field to Module node
the field is required for it to compile in python 3.8+
2022-06-27 01:01:19 +02:00
Gouvernathor 545aae7a38 doc: fix ShowTransient and ToggleScreen 2022-06-27 00:06:59 +02:00
Andy_kl d8d2696f45 nearrect: Fix layout_y calculation. 2022-06-26 16:31:16 +04:00
Gouvernathor 6b135cdcb2 Apply the change to PushMove as well 2022-06-26 03:45:22 +02:00
Gouvernathor 164b43f91c translation: fix typo 2022-06-26 03:29:55 +02:00
Gouvernathor 1cf88bf69a Update transition.py 2022-06-26 03:04:51 +02:00
kyouryuukunn 850fa94c3d mofify alpha, zoom type in default and reset transform 2022-06-18 09:13:06 +09:00
Totally a booplicate 133a5a8c76 Improve lint 2022-05-28 22:35:50 +03:00
Totally a booplicate aa08660ca6 Fix regression from 3dd71cc
Prevent `_zorder` from leaking to screens scope
2022-05-28 22:23:42 +03:00
Totally a booplicate 93cce0fcf8 New screen statement clauses
Adds `onlayer`, `zorder`, and `as`
2022-05-28 22:18:32 +03:00
uyjulian 2fa378ca42 loader: use RWops object from pygame_sdl2 2022-04-17 19:15:05 -05:00
Gouvernathor 0092484cdd Merge branch 'master' into patch-2 2022-04-09 04:56:47 +02:00
Gouvernathor 07c9e23c23 Merge branch 'master' into patch-2 2021-12-29 05:37:33 +01:00
Gouvernathor f9fe673c42 Remove obsolete gl2 references 2021-07-10 04:16:29 +02:00
585 changed files with 37038 additions and 29536 deletions
+9 -2
View File
@@ -14,10 +14,12 @@ ehthumbs_vista.db
*.pyc
*.pyo
*.pyi
*.egg-info
# Editor files.
# Editor/tool files.
*~
*.bak
.gdb_history
# Compiled Ren'Py files.
*.rpyc
@@ -64,6 +66,8 @@ cache/
/renios3
/web
/web2
/web3
# Docs.
/sphinx/source/inc
@@ -103,6 +107,9 @@ cache/
steam_appid.txt
/steamapi.py
# Android.
*.keystore
# Type analysis.
/typings
@@ -114,9 +121,9 @@ CubismSdkForNative-4-*.zip
/screenshot*
.android.json
# Old files.
/0old
# Works in progress, throwaway scripts, etc.
/scratch
/*-dists
+9 -4
View File
@@ -13,7 +13,7 @@
"**/renpy/web/**" : true,
},
"files.exclude": {
"0old" : true,
"0old": true,
"**-dists": true,
"**/*.pyc": true,
"**/*.pyo": true,
@@ -37,13 +37,13 @@
"renpy*.exe": true,
"tmp": true,
"web": true,
"**/*.rpa": true,
"**/*.rpymc": true,
"**/cache/": true
},
"python.languageServer": "Pylance",
"python.analysis.typeCheckingMode": "basic",
"python.analysis.extraPaths": [
""
],
"python.analysis.diagnosticMode": "workspace",
"python.linting.pylintEnabled": false,
"python.analysis.diagnosticSeverityOverrides": {
@@ -51,4 +51,9 @@
},
"esbonio.server.enabled": true,
"esbonio.sphinx.confDir": "",
"renpy.excludeCompiledFilesFromWorkspace": true,
"renpy.watchFoldersForChanges": false,
"renpy.warnOnInvalidVariableNames": "Disabled",
"renpy.warnOnInvalidFilenameIssues": "Disabled",
"renpy.warnOnIndentationAndSpacingIssues": "Disabled",
}
+13 -8
View File
@@ -49,29 +49,34 @@ Building the modules requires you have the many dependencies installed on
your system. On Ubuntu and Debian, these dependencies can be installed with
the command::
apt-get install virtualenvwrapper python-dev libavcodec-dev libavformat-dev \
libavresample-dev libswresample-dev libswscale-dev libfreetype6-dev libglew1.6-dev \
libfribidi-dev libsdl2-dev libsdl2-image-dev libsdl2-gfx-dev \
libsdl2-mixer-dev libsdl2-ttf-dev libjpeg-dev
sudo apt install virtualenvwrapper python3-dev libavcodec-dev libavformat-dev \
libswresample-dev libswscale-dev libfreetype6-dev libfribidi-dev libsdl2-dev \
libsdl2-image-dev libsdl2-gfx-dev libsdl2-mixer-dev libsdl2-ttf-dev libjpeg-dev
Ren'Py requires SDL_image 2.6 or greater. If your distribution doesn't include
that version, you'll need to download it from:
https://github.com/libsdl-org/SDL_image/tree/SDL2
We strongly suggest installing the Ren'Py modules into a Python
virtualenv. To create a new virtualenv, open a new terminal and run::
. /usr/share/virtualenvwrapper/virtualenvwrapper.sh
mkvirtualenv renpy
To return to this virtualenv later, run::
. /usr/share/virtualenvwrapper/virtualenvwrapper.sh
workon renpy
After activating the virtualenv, install additional dependencies::
pip install -U cython future six typing pefile requests
pip install -U cython future six typing pefile requests ecdsa
Then, install pygame_sdl2 by running the following commands::
git clone https://www.github.com/renpy/pygame_sdl2
pushd pygame_sdl2
python fix_virtualenv.py $VIRTUAL_ENV
python setup.py install
python setup.py install_headers
popd
@@ -80,7 +85,7 @@ Next, set RENPY_DEPS_INSTALL To a \:-separated (\;-separated on Windows)
list of paths containing the dependencies, and RENPY_CYTHON to the name
of the cython command::
export RENPY_DEPS_INSTALL="/usr:/usr/lib/$(uname -m)-linux-gnu/"
export RENPY_DEPS_INSTALL="/usr:/usr/lib/$(gcc -dumpmachine)/"
export RENPY_CYTHON=cython
Finally, use setup.py in the Ren'Py ``module`` directory to compile and
@@ -93,7 +98,7 @@ install the modules that support Ren'Py::
Ren'Py will be installed into the activated virtualenv. It can then be run
using the command::
python -O renpy.py
python renpy.py
Documentation
+39
View File
@@ -28,9 +28,48 @@ ap.add_argument("--experimental", action="store_true")
ap.add_argument("--no-tag", "-n", action="store_true")
ap.add_argument("--push-tags", action="store_true")
ap.add_argument("--delete-tag")
ap.add_argument("--github", action="store_true")
ap.add_argument("--real", action="store_true")
args = ap.parse_args()
if not args.real:
print("Did you want to use scripts/add_all.sh? If not, give --real.")
sys.exit(1)
if args.github:
subprocess.call([ "git", "push", "--tags" ])
subprocess.call([ "gh", "release", "create", version, "--notes", "See https://www.renpy.org/release/" + short_version, "-t", "Ren'Py {}".format(short_version) ])
dn = "/home/tom/ab/renpy/dl/" + short_version
for fn in os.listdir(dn):
if fn == ".build_cache":
continue
if fn.endswith(".update.gz"):
continue
if fn.endswith(".update.json"):
continue
if fn.startswith("updates.json"):
continue
if fn.endswith(".zsync"):
continue
if fn.endswith(".sums"):
continue
subprocess.call([ "gh", "release", "upload", version, os.path.join(dn, fn) ])
sys.exit(0)
if args.release:
subprocess.check_call([ "/home/tom/ab/renpy/scripts/checksums.py", "/home/tom/ab/renpy/dl/" + short_version ])
+32 -10
View File
@@ -17,13 +17,34 @@ import time
import collections
try:
# reload is built-in in Python 2, in importlib in Python 3
reload # type: ignore
except NameError:
from importlib import reload
except ImportError:
pass
ROOT = os.path.dirname(os.path.abspath(__file__))
def zip_rapt_symbols(destination):
"""
Zips up the rapt symbols.
"""
import zipfile
if PY2:
zf = zipfile.ZipFile(destination + "/android-native-symbols.zip", "w", zipfile.ZIP_DEFLATED)
else:
zf = zipfile.ZipFile(destination + "/android-native-symbols.zip", "w", zipfile.ZIP_DEFLATED, compresslevel=3)
for dn, dirs, files in os.walk("rapt/symbols"):
for fn in dirs + files:
fn = os.path.join(dn, fn)
arcname = os.path.relpath(fn, "rapt/symbols")
zf.write(fn, arcname)
zf.close()
def copy_tutorial_file(src, dest):
"""
Copies a file from src to dst. Lines between "# tutorial-only" and
@@ -72,11 +93,13 @@ def main():
ap.add_argument("--notarized", action="store_true", dest="notarized")
ap.add_argument("--vc-version-only", action="store_true")
ap.add_argument("--link-directories", action="store_true")
ap.add_argument("--append-version", action="store_true")
args = ap.parse_args()
link_directory("rapt")
link_directory("renios")
link_directory("web")
if args.link_directories:
return
@@ -98,7 +121,7 @@ def main():
import renpy
if args.version is None:
args.version = ".".join(str(i) for i in renpy.version_tuple[:-1]) # @UndefinedVariable
args.version = ".".join(str(i) for i in renpy.version_tuple[:-1])
try:
s = subprocess.check_output([ "git", "describe", "--tags", "--dirty", ]).decode("utf-8").strip()
@@ -107,7 +130,7 @@ def main():
commits_per_day = collections.defaultdict(int)
for i in subprocess.check_output([ "git", "log", "-99", "--pretty=%cd", "--date=format:%Y%m%d", "--follow", "HEAD", "--", "." ]).decode("utf-8").split():
for i in subprocess.check_output([ "git", "log", "-99", "--pretty=%cd", "--date=format:%Y%m%d" ]).decode("utf-8").split():
commits_per_day[i[2:]] += 1
if dirty:
@@ -138,6 +161,9 @@ def main():
reload(sys.modules['renpy'])
if args.append_version:
args.version += "-" + renpy.version_only
# Check that the versions match.
full_version = renpy.version_only # @UndefinedVariable
if "-" not in args.version \
@@ -162,11 +188,6 @@ def main():
else:
renpy_sh = "./renpy2.sh"
# Perhaps autobuild.
if "RENPY_BUILD_ALL" in os.environ:
print("Autobuild...")
subprocess.check_call(["scripts/autobuild.sh"])
# Compile all the python files.
compileall.compile_dir("renpy/", ddir="renpy/", force=True, quiet=1)
@@ -197,6 +218,7 @@ def main():
if not os.path.exists(destination):
os.makedirs(destination)
zip_rapt_symbols(destination)
if args.fast:
+18
View File
@@ -0,0 +1,18 @@
{
"start_a170b500": {
"area": [
53,
120,
426,
120
]
},
"start_f41f55d7": {
"area": [
106,
60,
426,
120
]
}
}
+3
View File
@@ -11,6 +11,8 @@ init offset = -2
init python:
gui.init(1280, 720)
## Enable checks for invalid or unstable properties in screens or transforms
define config.check_conflicting_properties = True
################################################################################
@@ -399,6 +401,7 @@ define gui.nvl_thought_xalign = 0.0
define gui.nvl_button_xpos = gui.scale(450)
define gui.nvl_button_xalign = 0.0
## Localization ################################################################
## This controls where a line break is permitted. The default is suitable for
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

+3 -3
View File
@@ -200,9 +200,9 @@ init python:
build.documentation('*.txt')
## A Google Play license key is required to download expansion files and
## perform in-app purchases. It can be found on the "Services & APIs" page
## of the Google Play developer console.
## A Google Play license key is required to perform in-app purchases.
## It can be found in the Google Play developer console,
## under "Monetize" > "Monetization Setup" > "Licensing".
# define build.google_play_key = "..."
+90 -21
View File
@@ -178,7 +178,7 @@ screen input(prompt):
window:
vbox:
xalign gui.dialogue_text_xalign
xanchor gui.dialogue_text_xalign
xpos gui.dialogue_xpos
xsize gui.dialogue_width
ypos gui.dialogue_ypos
@@ -646,27 +646,40 @@ screen file_slots(title):
key "save_delete" action FileDelete(slot)
## Buttons to access other pages.
hbox:
vbox:
style_prefix "page"
xalign 0.5
yalign 1.0
spacing gui.page_spacing
hbox:
xalign 0.5
textbutton _("<") action FilePagePrevious()
spacing gui.page_spacing
if config.has_autosave:
textbutton _("{#auto_page}A") action FilePage("auto")
textbutton _("<") action FilePagePrevious()
if config.has_quicksave:
textbutton _("{#quick_page}Q") action FilePage("quick")
if config.has_autosave:
textbutton _("{#auto_page}A") action FilePage("auto")
## range(1, 10) gives the numbers from 1 to 9.
for page in range(1, 10):
textbutton "[page]" action FilePage(page)
if config.has_quicksave:
textbutton _("{#quick_page}Q") action FilePage("quick")
textbutton _(">") action FilePageNext()
## range(1, 10) gives the numbers from 1 to 9.
for page in range(1, 10):
textbutton "[page]" action FilePage(page)
textbutton _(">") action FilePageNext()
if config.has_sync:
if CurrentScreenName() == "save":
textbutton _("Upload Sync"):
action UploadSync()
xalign 0.5
else:
textbutton _("Download Sync"):
action DownloadSync()
xalign 0.5
style page_label is gui_label
@@ -684,7 +697,7 @@ style page_label:
ypadding gui.scale(3)
style page_label_text:
text_align 0.5
textalign 0.5
layout "subtitle"
hover_color gui.hover_color
@@ -908,7 +921,7 @@ screen history():
## This determines what tags are allowed to be displayed on the history
## screen.
define gui.history_allow_tags = { "alt", "noalt" }
define gui.history_allow_tags = { "alt", "noalt", "rt", "rb", "art" }
style history_window is empty
@@ -932,7 +945,7 @@ style history_name:
style history_name_text:
min_width gui.history_name_width
text_align gui.history_name_xalign
textalign gui.history_name_xalign
style history_text:
xpos gui.history_text_xpos
@@ -940,7 +953,7 @@ style history_text:
xanchor gui.history_text_xalign
xsize gui.history_text_width
min_width gui.history_text_width
text_align gui.history_text_xalign
textalign gui.history_text_xalign
layout ("subtitle" if gui.history_text_xalign else "tex")
style history_label:
@@ -1109,7 +1122,7 @@ style help_label:
style help_label_text:
size gui.text_size
xalign 1.0
text_align 1.0
textalign 1.0
@@ -1171,7 +1184,7 @@ style confirm_frame:
yalign .5
style confirm_prompt_text:
text_align 0.5
textalign 0.5
layout "subtitle"
style confirm_button:
@@ -1365,7 +1378,7 @@ style nvl_label:
yanchor 0.0
xsize gui.nvl_name_width
min_width gui.nvl_name_width
text_align gui.nvl_name_xalign
textalign gui.nvl_name_xalign
style nvl_dialogue:
xpos gui.nvl_text_xpos
@@ -1373,7 +1386,7 @@ style nvl_dialogue:
ypos gui.nvl_text_ypos
xsize gui.nvl_text_width
min_width gui.nvl_text_width
text_align gui.nvl_text_xalign
textalign gui.nvl_text_xalign
layout ("subtitle" if gui.nvl_text_xalign else "tex")
style nvl_thought:
@@ -1382,7 +1395,7 @@ style nvl_thought:
ypos gui.nvl_thought_ypos
xsize gui.nvl_thought_width
min_width gui.nvl_thought_width
text_align gui.nvl_thought_xalign
textalign gui.nvl_thought_xalign
layout ("subtitle" if gui.nvl_text_xalign else "tex")
style nvl_button:
@@ -1394,6 +1407,62 @@ style nvl_button_text:
properties gui.button_text_properties("nvl_button")
## Bubble screen ###############################################################
##
## The Bubble screen is used to display dialogue to the player when using
## speech bubbles. The Bubble screen takes the same parameters as the say
## screen, must create a displayable with the id of "what", and can create
## displayables with the "namebox", "who", and "window" ids.
##
## https://www.renpy.org/doc/html/screen_special.html#bubble
screen bubble(who, what):
style_prefix "bubble"
window:
id "window"
if who is not None:
window:
id "namebox"
style "bubble_namebox"
text who:
id "who"
text what:
id "what"
style bubble_window is empty
style bubble_namebox is empty
style bubble_who is default
style bubble_what is default
style bubble_window:
background Frame("gui/bubble.png", 15, 15, 15, 15)
padding (15, 10)
style bubble_namebox:
background Frame("gui/bubble.png", 15, 15, 15, 15)
pos (-15, -5)
anchor (0.0, 1.0)
padding (15, 10)
style bubble_who:
xalign 0.5
textalign 0.5
color "#000"
style bubble_what:
align (0.5, 0.5)
textalign 0.5
layout "subtitle"
color "#000"
################################################################################
## Mobile Variants
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+32 -30
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -34,19 +34,18 @@ init python:
NO_RAPT_TEXT = _("To build Android packages, please download RAPT, unzip it, and place it into the Ren'Py directory. Then restart the Ren'Py launcher.")
NO_JDK_TEXT = _("A 64-bit/x64 Java 8 Development Kit is required to build Android packages on Windows. The JDK is different from the JRE, so it's possible you have Java without having the JDK.\n\nPlease {a=https://adoptopenjdk.net/?variant=openjdk8&jvmVariant=hotspot}download and install the JDK{/a}, then restart the Ren'Py launcher.")
NO_SDK_TEXT = _("RAPT has been installed, but you'll need to install the Android SDK before you can build Android packages. Choose Install SDK to do this.")
NO_KEY_TEXT = _("RAPT has been installed, but a key hasn't been configured. Please create a new key, or restore android.keystore.")
NO_BUNDLE_KEY_TEXT = _("RAPT has been installed, but a bundle key hasn't been configured. Please create a new key, or restore bundle.keystore.")
NO_KEY_TEXT = _("RAPT has been installed, but a key hasn't been configured. Please generate new keys, or copy android.keystore and bundle.keystore to the base directory.")
NO_CONFIG_TEXT = _("The current project has not been configured. Use \"Configure\" to configure it before building.")
NO_BUNDLE_TEXT = _("Please select if you want a Play Bundle (for Google Play), or a Universal APK (for sideloading and other app stores).")
OK_TEXT = _("Choose \"Build\" to build the current project, or attach an Android device and choose \"Build & Install\" to build and install it on the device.")
PHONE_TEXT = _("Attempts to emulate an Android phone.\n\nTouch input is emulated through the mouse, but only when the button is held down. Escape is mapped to the menu button, and PageUp is mapped to the back button.")
TABLET_TEXT = _("Attempts to emulate an Android tablet.\n\nTouch input is emulated through the mouse, but only when the button is held down. Escape is mapped to the menu button, and PageUp is mapped to the back button.")
OUYA_TEXT = _("Attempts to emulate a televison-based Android console, like the OUYA or Fire TV.\n\nController input is mapped to the arrow keys, Enter is mapped to the select button, Escape is mapped to the menu button, and PageUp is mapped to the back button.")
OUYA_TEXT = _("Attempts to emulate a televison-based Android console.\n\nController input is mapped to the arrow keys, Enter is mapped to the select button, Escape is mapped to the menu button, and PageUp is mapped to the back button.")
INSTALL_SDK_TEXT = _("Downloads and installs the Android SDK and supporting packages. Optionally, generates the keys required to sign the package.")
INSTALL_SDK_TEXT = _("Downloads and installs the Android SDK and supporting packages.")
GENERATE_KEYS_TEXT = _("Generates the keys required to sign the package.")
CONFIGURE_TEXT = _("Configures the package name, version, and other information about this project.")
PLAY_KEYS_TEXT = _("Opens the file containing the Google Play keys in the editor.\n\nThis is only needed if the application is using an expansion APK. Read the documentation for more details.")
BUILD_TEXT = _("Builds the Android package.")
BUILD_AND_INSTALL_TEXT = _("Builds the Android package, and installs it on an Android device connected to your computer.")
BUILD_INSTALL_AND_LAUNCH_TEXT = _("Builds the Android package, installs it on an Android device connected to your computer, then launches the app on your device.")
@@ -62,7 +61,6 @@ init python:
PLAY_BUNDLE_TEXT = _("Builds an Android App Bundle (ABB), intended to be uploaded to Google Play. This can include up to 2GB of data.")
UNIVERSAL_APK_TEXT = _("Builds a Universal APK package, intended for sideloading and stores other than Google Play. This can include up to 2GB of data.")
import subprocess
import re
import os
@@ -94,6 +92,7 @@ init python:
import rapt.install_sdk
import rapt.plat
import rapt.interface
import rapt.keys
rapt.plat.renpy = True
rapt.plat.translate = __
@@ -112,11 +111,12 @@ init python:
return ANDROID_NO_JDK
if not os.path.exists(rapt.plat.adb):
return ANDROID_NO_SDK
if not os.path.exists(rapt.plat.path("project/local.properties")):
if not rapt.keys.keys_exist(project.current.path):
return ANDROID_NO_KEY
if not os.path.exists(rapt.plat.path("project/bundle.properties")):
return ANDROID_NO_BUNDLE_KEY
if not os.path.exists(os.path.join(project.current.path, ".android.json")):
if not any([
os.path.exists(os.path.join(project.current.path, "android.json")),
os.path.exists(os.path.join(project.current.path, ".android.json"))
]):
return ANDROID_NO_CONFIG
if persistent.android_bundle is None:
return ANDROID_NO_BUNDLE
@@ -137,8 +137,6 @@ init python:
return NO_SDK_TEXT
if state == ANDROID_NO_KEY:
return NO_KEY_TEXT
if state == ANDROID_NO_BUNDLE_KEY:
return NO_BUNDLE_KEY_TEXT
if state == ANDROID_NO_CONFIG:
return NO_CONFIG_TEXT
if state == ANDROID_NO_BUNDLE:
@@ -181,31 +179,23 @@ init python:
build = p.dump["build"]
filename = os.path.join(p.path, ".android.json")
with open(filename, "r") as f:
android_json = json.load(f)
old_android_json = dict(android_json)
c = rapt.configure.Configuration(p.path)
if "google_play_key" in build:
android_json["google_play_key"] = build["google_play_key"]
c.google_play_key = build["google_play_key"]
else:
android_json.pop("google_play_key", None)
c.google_play_key = None
if "google_play_salt" in build:
if len(build["google_play_salt"]) != 20:
raise Exception("build.google_play_salt must be exactly 20 bytes long.")
android_json["google_play_salt"] = ", ".join(str(i) for i in build["google_play_salt"])
c.google_play_salt = ", ".join(str(i) for i in build["google_play_salt"])
else:
android_json.pop("google_play_salt", None)
c.google_play_salt = None
if android_json != old_android_json:
with open(filename, "w") as f:
json.dump(android_json, f)
c.save(p.path)
def android_build(p=None, gui=True, bundle=False, install=False, launch=False, destination=None, opendir=False):
@@ -288,7 +278,7 @@ init python:
with interface.nolinks():
rapt.build.build(rapt_interface, dist, bundle=bundle, install=install, launch=launch, finished=finished, permissions=p.dump['build']['android_permissions'])
rapt.build.build(rapt_interface, dist, p.path, bundle=bundle, install=install, launch=launch, finished=finished, permissions=p.dump['build']['android_permissions'])
def android_build_argument(cmd):
@@ -388,12 +378,16 @@ screen android:
frame style "l_indent":
has vbox
textbutton _("Install SDK & Create Keys"):
textbutton _("Install SDK"):
action AndroidIfState(state, ANDROID_NO_SDK, Jump("android_installsdk"))
hovered tt.Action(INSTALL_SDK_TEXT)
textbutton _("Generate Keys"):
action AndroidIfState(state, ANDROID_NO_KEY, Jump("android_keys"))
hovered tt.Action(GENERATE_KEYS_TEXT)
textbutton _("Configure"):
action AndroidIfState(state, ANDROID_NO_CONFIG, Jump("android_configure"))
action AndroidIfState(state, ANDROID_NO_KEY, Jump("android_configure"))
hovered tt.Action(CONFIGURE_TEXT)
add SPACER
@@ -509,6 +503,14 @@ label android_installsdk:
jump android
label android_keys:
python:
rapt.keys.generate_keys(MobileInterface("android"), project.current.path)
jump android
label android_configure:
python:
+11 -3
View File
@@ -1,4 +1,4 @@
# This file contains strings used by RAPT, so the Ren'Py translation framework
# can find them. It's automatically generated by rapt/update_translations.py, and
# hence should not be changed by hand.
@@ -29,12 +29,17 @@ init python hide:
__("{} is a Java keyword, and can't be used as part of a package name.")
__("What is the application's version?\n\nThis should be the human-readable version that you would present to a person. It must contain only numbers and dots.")
__("The version number must contain only numbers and dots.")
__("How much RAM do you want to allocate to Gradle?\n\nThis must be a positive integer number.")
__("The RAM size must contain only numbers.")
__("How much RAM (in GB) do you want to allocate to Gradle?\nThis must be a positive integer number.")
__("The RAM size must contain only numbers and be positive.")
__("How would you like your application to be displayed?")
__("In landscape orientation.")
__("In portrait orientation.")
__("In the user's preferred orientation.")
__("Which app store would you like to support in-app purchasing through?")
__("Google Play.")
__("Amazon App Store.")
__("Both, in one app.")
__("Neither.")
__("Do you want to automatically update the Java source code?")
__("Yes. This is the best choice for most projects.")
__("No. This may require manual updates when Ren'Py or the project configuration changes.")
@@ -53,11 +58,14 @@ init python hide:
__("I was unable to accept the Android licenses.")
__("I was unable to install the required Android packages.")
__("I've finished installing the required Android packages.")
__("It looks like you're ready to start packaging games.")
__("Please enter your name or the name of your organization.")
__("I found an android.keystore file in the rapt directory. Do you want to use this file?")
__("I can create an application signing key for you. This key is required to create Universal APK for sideloading and stores other than Google Play.\n\nDo you want to create a key?")
__("I will create the key in the android.keystore file.\n\nYou need to back this file up. If you lose it, you will not be able to upgrade your application.\n\nYou also need to keep the key safe. If evil people get this file, they could make fake versions of your application, and potentially steal your users' data.\n\nWill you make a backup of android.keystore, and keep it in a safe place?")
__("Could not create android.keystore. Is keytool in your path?")
__("I've finished creating android.keystore. Please back it up, and keep it in a safe place.")
__("I found a bundle.keystore file in the rapt directory. Do you want to use this file?")
__("I can create a bundle signing key for you. This key is required to build an Android App Bundle (AAB) for upload to Google Play.\n\nDo you want to create a key?")
__("I will create the key in the bundle.keystore file.\n\nYou need to back this file up. If you lose it, you will not be able to upgrade your application.\n\nYou also need to keep the key safe. If evil people get this file, they could make fake versions of your application, and potentially steal your users' data.\n\nWill you make a backup of bundle.keystore, and keep it in a safe place?")
__("Could not create bundle.keystore. Is keytool in your path?")
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+70 -15
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -262,6 +262,34 @@ change_renpy_executable()
return rv
def add_missing_directories(self):
"""
Adds to this file list all directories that are needed by other
entries in this file list.
"""
rv = self.copy()
seen = set()
required = set()
for i in self:
seen.add(i.name)
name = i.name
while "/" in name:
name = name.rpartition("/")[0]
required.add(name)
for name in required - seen:
rv.append(File(name, None, True, False))
rv.sort()
return rv
@staticmethod
def merge(l):
"""
@@ -340,13 +368,15 @@ change_renpy_executable()
duplicate is set.
"""
prefix = py("lib/py{major}-mac-universal")
for f in list(self):
if f.name.startswith("lib/python") and (not duplicate):
name = app + "/Contents/Resources/" + f.name
elif f.name.startswith(py("lib/py{major}-mac-x86_64")):
name = app + "/Contents/MacOS/" + f.name[19:]
elif f.name.startswith(prefix):
name = app + "/Contents/MacOS/" + f.name[len(prefix)+1:]
else:
continue
@@ -371,7 +401,10 @@ change_renpy_executable()
for f in sorted(self, key=lambda a : a.name):
f.hash(sha, distributor)
return sha.hexdigest()
if PY2:
return sha.hexdigest().decode("utf-8")
else:
return sha.hexdigest()
def split_by_prefix(self, prefix):
"""
@@ -408,7 +441,7 @@ change_renpy_executable()
This manages the process of building distributions.
"""
def __init__(self, project, destination=None, reporter=None, packages=None, build_update=True, open_directory=False, noarchive=False, packagedest=None, report_success=True, scan=True, macapp=None, force_format=None):
def __init__(self, project, destination=None, reporter=None, packages=None, build_update=True, open_directory=False, noarchive=False, packagedest=None, report_success=True, scan=True, macapp=None, force_format=None, files_filter=None):
"""
Distributes `project`.
@@ -446,6 +479,11 @@ change_renpy_executable()
`force_format`
If given, forces the format of the distribution to be this.
`files_filter`
If given, use this object to decide which files must be included.
The object must contains the `filter(file, variant, format)`
method which must return True is the file must be included.
"""
# A map from a package to a unique update version hash.
@@ -618,6 +656,8 @@ change_renpy_executable()
# The time of the update version.
self.update_version = int(time.time())
self.files_filter = files_filter
for p in build_packages:
formats = p["formats"]
@@ -932,6 +972,7 @@ change_renpy_executable()
CFBundleDisplayName=display_name,
CFBundleExecutable=executable_name,
CFBundleIconFile="icon",
CFBundleIdentifier="com.domain.game",
CFBundleInfoDictionaryVersion="6.0",
CFBundleName=display_name,
CFBundlePackageType="APPL",
@@ -977,13 +1018,13 @@ change_renpy_executable()
linux = 'binary'
linux_i686 = 'binary'
mac = 'binary'
raspi = 'raspi'
raspi = 'linux_arm'
else:
windows = 'windows'
linux = 'linux'
linux_i686 = 'linux_i686'
mac = 'mac'
raspi = 'linux'
raspi = 'linux_arm'
prefix = py("lib/py{major}-")
@@ -1011,11 +1052,20 @@ change_renpy_executable()
armfn,
True)
aarch64fn = os.path.join(config.renpy_base, prefix + "linux-aarch64/renpy")
if os.path.exists(aarch64fn):
self.add_file(
raspi,
prefix + "linux-aarch64/" + self.executable_name,
aarch64fn,
True)
self.add_file(
mac,
prefix + "mac-x86_64/" + self.executable_name,
os.path.join(config.renpy_base, prefix + "mac-x86_64/renpy"),
prefix + "mac-universal/" + self.executable_name,
os.path.join(config.renpy_base, prefix + "mac-universal/renpy"),
True)
def add_mac_files(self):
@@ -1039,7 +1089,7 @@ change_renpy_executable()
self.add_file(filelist,
contents + "/MacOS/" + self.executable_name,
os.path.join(config.renpy_base, py("lib/py{major}-mac-x86_64/renpy")))
os.path.join(config.renpy_base, py("lib/py{major}-mac-universal/renpy")))
custom_fn = os.path.join(self.project.path, "icon.icns")
@@ -1057,7 +1107,7 @@ change_renpy_executable()
if not self.build['renpy']:
self.add_directory(filelist, contents + "/MacOS/lib")
self.add_directory(filelist, contents + py("/MacOS/lib/py{major}-mac-x86_64"))
self.add_directory(filelist, contents + py("/MacOS/lib/py{major}-mac-universal"))
self.add_directory(filelist, contents + py("/Resources/lib/python{major}.{minor}"))
self.file_lists[filelist].mac_lib_transform(self.app, self.build['renpy'])
@@ -1271,13 +1321,13 @@ change_renpy_executable()
def workaround_mac_notarization(self, fl):
"""
This works around mac notarization by compressing the unsigned,
un-notarized, binaries in lib/py3-mac-x86_64.
un-notarized, binaries in lib/py3-mac-universal.
"""
fl = fl.copy()
for f in fl:
if py("/lib/py{major}-mac-x86_64/") in f.name:
if py("/lib/py{major}-mac-universal/") in f.name:
with open(f.path, "rb") as inf:
data = inf.read()
@@ -1311,6 +1361,8 @@ change_renpy_executable()
if self.build.get("exclude_empty_directories", True):
fl = fl.filter_empty()
fl = fl.add_missing_directories()
if macapp:
fl = fl.mac_transform(self.app, self.documentation_patterns)
@@ -1408,7 +1460,7 @@ change_renpy_executable()
if self.include_update and (variant not in [ 'ios', 'android', 'source']) and (not format.startswith("app-")):
with open(update_fn, "w") as f:
with open(update_fn, "wb" if PY2 else "w") as f:
json.dump(update, f, indent=2)
if (not dlc) or (format == "update"):
@@ -1490,6 +1542,9 @@ change_renpy_executable()
if f.directory:
pkg.add_directory(f.name, f.path)
else:
if self.files_filter is not None and not self.files_filter.filter(f, variant, format):
# Ignore file
continue
pkg.add_file(f.name, f.path, f.executable)
self.reporter.progress_done()
@@ -1545,7 +1600,7 @@ change_renpy_executable()
add_variant(p["name"])
fn = renpy.fsencode(os.path.join(self.destination, "updates.json"))
with open(fn, "w") as f:
with open(fn, "wb" if PY2 else "w") as f:
json.dump(index, f, indent=2)
+8 -2
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -222,7 +222,13 @@ screen build_distributions:
for pkg in packages:
if not pkg["hidden"]:
$ description = pkg["description"]
textbutton "[description!q]" action PackageToggle(pkg["name"]) style "l_checkbox"
button:
action PackageToggle(pkg["name"]) style "l_checkbox"
hbox:
spacing 3
text "[description!q]"
if pkg["dlc"]:
text _("(DLC)")
add SPACER
add HALF_SPACER
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+3 -3
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -197,7 +197,7 @@ init 1 python in editor:
1,
_("Atom"),
AD,
dlc,
"extension:atom",
_("Up to 150 MB download required."),
None)
@@ -205,7 +205,7 @@ init 1 python in editor:
fei.append(e)
# jEdit
# jEdit - Only present if it exists on system.
if os.path.exists(os.path.join(config.renpy_base, "jedit")):
fei.append(FancyEditorInfo(
+3 -6
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -216,10 +216,7 @@ screen front_page_project:
textbutton _("Android") action Jump("android")
textbutton _("iOS") action Jump("ios")
textbutton _("Web") + " " + _("(Beta)") action Jump("web"):
if not PY2:
text_color DISABLED
textbutton _("Web") + " " + _("(Beta)") action Jump("web")
textbutton _("Generate Translations") action Jump("translate")
textbutton _("Extract Dialogue") action Jump("extract_dialogue")
@@ -240,7 +237,7 @@ label front_page:
if (not persistent.has_chosen_language) or ("RENPY_CHOOSE_LANGUAGE" in os.environ):
if _preferences.language is None:
if (_preferences.language is None) or ("RENPY_CHOOSE_LANGUAGE" in os.environ):
hide screen bottom_info
call choose_language
show screen bottom_info
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+15 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -404,6 +404,19 @@ class ImageGenerator(object):
self.save(s, "main_menu", overwrite=False)
self.save(s, "game_menu", overwrite=False)
def generate_bubble(self):
import shutil
source = os.path.join(config.renpy_base, "gui", "game", "gui", "bubble.png")
dest = os.path.join(self.prefix, "bubble.png")
if source == dest:
return
shutil.copyfile(source, dest)
def generate_all(self):
self.generate_textbox()
self.generate_choice_button()
@@ -415,6 +428,7 @@ class ImageGenerator(object):
self.generate_notify()
self.generate_menus()
self.generate_icon()
self.generate_bubble()
if __name__ == "__main__":
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+2 -3
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -90,8 +90,7 @@ label install_live2d:
patterns = [
(r".*/Core/dll/linux/x86_64/(libLive2DCubismCore.so)", _prefix + r"linux-x86_64/\1"),
(r".*/Core/dll/windows/x86_64/(Live2DCubismCore.dll)", _prefix + r"windows-x86_64/\1"),
(r".*/Core/dll/windows/x86/(Live2DCubismCore.dll)", _prefix + r"windows-i686/\1"),
(r".*/Core/dll/macos/(libLive2DCubismCore.dylib)", _prefix + r"mac-x86_64/\1"),
(r".*/Core/dll/macos/(libLive2DCubismCore.dylib)", _prefix + r"mac-universal/\1"),
(r".*/Core/dll/experimental/rpi/(libLive2DCubismCore.so)", _prefix + r"linux-armv7l/\1"),
(r".*/Core/dll/android/(armeabi-v7a/libLive2DCubismCore.so)", r"rapt/prototype/renpyandroid/src/main/jniLibs/\1"),
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+1 -1
View File
@@ -1,4 +1,4 @@
# This file imports the extensions API into the default store, and makes it
# also contains the strings used by the extensions API, so the Ren'Py translation
# framework can find them.
+4 -4
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -170,7 +170,7 @@ screen common:
has vbox
text message:
text_align 0.5
textalign 0.5
xalign 0.5
layout "subtitle"
@@ -211,7 +211,7 @@ screen common:
add SPACER
text submessage:
text_align 0.5
textalign 0.5
xalign 0.5
layout "subtitle"
@@ -250,7 +250,7 @@ screen launcher_input:
has vbox
text message:
text_align 0.5
textalign 0.5
xalign 0.5
layout "subtitle"
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+2 -2
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -23,7 +23,7 @@ init python hide:
import os
macapp = os.path.join(config.renpy_base, "renpy.app/Contents/MacOS")
maclib = os.path.join(config.renpy_base, distribute.py("lib/py{major}-mac-x86_64"))
maclib = os.path.join(config.renpy_base, distribute.py("lib/py{major}-mac-universal"))
if os.path.exists(maclib):
+3 -3
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -173,9 +173,9 @@ init -1 python:
self.cmd = cmd
f = open(self.filename, "ab")
f = open(self.filename, "a")
f.write(b"\n\n\n")
f.write("\n\n\n")
if cancel:
cancel_action = self.cancel
+2 -3
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -249,7 +249,7 @@ screen navigation:
if persistent.navigation == "todo":
text _("No TODO comments found.\n\nTo create one, include \"# TODO\" in your script."):
text_align 0.5
textalign 0.5
xalign 0.5
yalign 0.5
@@ -279,4 +279,3 @@ label navigation_loop:
label navigation_refresh:
$ project.current.update_dump(True)
jump navigation_loop
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+15 -28
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -270,22 +270,8 @@ init python:
build.classify_renpy("**/thumbs.db", None)
build.classify_renpy("**/.*", None)
# Atom rules. These have to be very early, since Atom uses names like
# tmp for packages.
build.classify_renpy("atom/", "atom-all")
build.classify_renpy("atom/default-dot-atom/**", "atom-all")
build.classify_renpy("atom/atom-windows/**", "atom-windows")
build.classify_renpy("atom/Atom.app/**", "atom-mac")
build.classify_renpy("atom/atom-linux**", "atom-linux")
try:
with open(os.path.join(config.renpy_base, "atom", "executable.txt")) as f:
for l in f:
build.executable(l.strip())
except Exception:
pass
build.classify_renpy("rapt/**/libLive2DCubismCore.so", None)
build.classify_renpy("rapt/symbols/", None)
build.classify_renpy("rapt/**", "rapt")
build.executable("rapt/prototype/gradlew")
@@ -351,16 +337,25 @@ init python:
build.classify_renpy(pattern + "/**.rpyc", binary)
build.classify_renpy(pattern + "/**.rpymc", binary)
build.classify_renpy(pattern + "/**/" + renpy.script.BYTECODE_FILE, binary)
build.classify_renpy(pattern + "/**/cache/bytecode-311.rpyb", "web")
build.classify_renpy(pattern + "/**/cache/bytecode-*.rpyb", None)
build.classify_renpy(pattern + "/**/cache/*", binary)
build.classify_renpy(pattern + "/**", source)
build.classify_renpy("renpy.py", "binary")
source_and_binary("renpy")
# games.
build.classify_renpy("launcher/game/theme/", None)
build.classify_renpy("gui/game/gui/", None)
build.classify_renpy("gui/game/gui/", "source")
build.classify_renpy("gui/game/gui/bubble.png", "source")
build.classify_renpy("gui/game/gui/*", None)
source_and_binary("launcher", py=False)
source_and_binary("gui", binary=None, py=False)
@@ -399,6 +394,7 @@ init python:
build.classify_renpy("module/pysdlsound/*.py", "source")
build.classify_renpy("module/pysdlsound/*.pyx", "source")
build.classify_renpy("module/fribidi-src/**", "source")
build.classify_renpy("module/tinyfiledialogs/**", "source")
# all-platforms binary.
build.classify_renpy("lib/**/*steam_api*", "steam")
@@ -419,11 +415,6 @@ init python:
build.classify_renpy("lib/", "binary")
# renpy.app is now built from scratch from distribute.rpy.
# jedit rules.
build.classify_renpy("jedit/**", "jedit")
# Packages.
build.packages = [ ]
@@ -432,16 +423,12 @@ init python:
build.package("source", "tar.bz2", "source source_only", update=False)
build.package("steam", "zip", "steam", dlc=True)
build.package("jedit", "zip", "jedit", dlc=True)
build.package("atom-linux", "tar.bz2", "atom-all atom-linux", dlc=True)
build.package("atom-mac", "zip", "atom-all atom-mac", dlc=True)
build.package("atom-windows", "zip", "atom-all atom-windows", dlc=True)
build.package("rapt", "zip", "rapt", dlc=True)
build.package("renios", "zip", "renios", dlc=True)
build.package("web", "zip", "web", dlc=True)
# The identifier for the SDK.
define build.mac_info_plist["CFBundleIdentifier"] = "org.renpy.sdk"
# Enable the special launcher translation mode.
define config.translate_launcher = True
+2 -3
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -31,12 +31,11 @@ init python in distribute:
import sys
import threading
from renpy import six
from zipfile import crc32
# Since the long type doesn't exist on py3, define it here
if six.PY3:
if not PY2:
long = int
zlib.Z_DEFAULT_COMPRESSION = 5
+4 -4
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -343,7 +343,7 @@ screen choose_language():
style "l_label_text"
size 36
text_align .5
textalign .5
layout "subtitle"
add SPACER
@@ -356,7 +356,7 @@ screen choose_language():
for tlid, tlname in tran:
textbutton tlname:
xmaximum (TWOTHIRDS//3)
action SetScreenVariable("chosen_lang", tlid)
action [ SetScreenVariable("chosen_lang", tlid), Language(tlid), project.SelectTutorial(True), Return() ]
hovered SetScreenVariable("local_lang", tlid)
unhovered SetScreenVariable("local_lang", chosen_lang)
style "l_list"
@@ -377,7 +377,7 @@ screen choose_language():
text_style "l_default"
text_size 30
text_text_align .5
text_textalign .5
text_layout "subtitle"
+35 -2
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -48,6 +48,7 @@ init python in project:
_("Press shift+O (the letter) to access the console."),
_("Press shift+D to access the developer menu."),
_("Have you backed up your projects recently?"),
_("Lint checks your game for potential mistakes, and gives you statistics."),
]
class Project(object):
@@ -276,6 +277,8 @@ init python in project:
if wait:
if p.wait():
print("Launch failed. command={!r}, returncode={!r}".format(cmd, p.returncode))
if args and not self.is_writeable():
interface.error(_("Launching the project failed."), _("This may be because the project is not writeable."))
else:
@@ -387,9 +390,18 @@ init python in project:
can be included in the project.
"""
def is_script(fn):
fn = fn.lower()
for i in [ ".rpy", ".rpym", "_ren.py" ]:
if fn.endswith(i):
return True
return False
rv = [ ]
rv.extend(i for i, isdir in util.walk(self.path)
if (not isdir) and (i.endswith(".rpy") or i.endswith(".rpym")) and (not i.startswith("tmp/")) )
if (not isdir) and is_script(i) and (not i.startswith("tmp/")) )
return rv
@@ -833,3 +845,24 @@ init python:
return False
renpy.arguments.register_command("get_projects_directory", get_projects_directory_command)
def set_project_command():
ap = renpy.arguments.ArgumentParser()
ap.add_argument("project", help="The full path to the project to select.")
args = ap.parse_args()
projects = os.path.dirname(os.path.abspath(args.project))
name = os.path.basename(args.project)
persistent.projects_directory = renpy.fsdecode(projects)
project.multipersistent.projects_directory = persistent.projects_directory
persistent.active_project = name
project.multipersistent.save()
renpy.save_persistent()
return False
renpy.arguments.register_command("set_project", set_project_command)
+3 -3
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -402,7 +402,7 @@ style l_alternate is l_default:
style l_alternate_text is l_default:
size size(14)
font light_font()
text_align 1.0
textalign 1.0
style l_small_button is l_button
@@ -488,7 +488,7 @@ style l_info_button is l_button:
xmargin 50
style l_info_button_text is l_button_text:
text_align 0.5
textalign 0.5
layout "subtitle"
# Progress bar.
+10 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -22,6 +22,7 @@
init python:
class FileTail(object):
def __init__(self, filename, lines=8):
@@ -31,6 +32,11 @@ init python:
def update(self):
def filter_text(s):
if "Unknown chunk type '200'" in s:
return False
return True
try:
with open(self.filename) as f:
text = f.read()
@@ -49,6 +55,9 @@ init python:
if "\r" in l:
_head, _sep, l = l.rpartition("\r")
if not filter_text(l):
continue
while l:
newtext.append(l[:100])
l = l[100:]
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+100
View File
@@ -797,3 +797,103 @@ translate french strings:
# renpy/common/00preferences.rpy:535
old "mute main"
new "sourdine générale"
# renpy/common/00speechbubble.rpy:299
old "Speech Bubble Editor"
new "Éditeur de bulles de dialogue"
# renpy/common/00speechbubble.rpy:304
old "(hide)"
new "(masquer)"
# renpy/common/00director.rpy:1748
old "Click to toggle attribute, right click to toggle negative attribute."
new "Clic pour (dés)activer des attributs, clic droit pour (dés)activer les suppressions d'attributs."
# renpy/common/00director.rpy:1771
old "Click to set transform, right click to add to transform list."
new "Clic pour ajouter un transform, clic droit pour ajouter une liste de transforms."
# renpy/common/00preferences.rpy:528
old "audio when unfocused"
new "audio lors de la perte de focus"
# renpy/common/00preferences.rpy:537
old "web cache preload"
new "préchargement du cache web cache"
# renpy/common/00preferences.rpy:552
old "voice after game menu"
new "voix dans le menu de jeu"
# renpy/common/00sync.rpy:58
old "Sync downloaded."
new "Sync téléchargé."
# renpy/common/00sync.rpy:178
old "Could not connect to the Ren'Py Sync server."
new "Échec de la connexion au serveur Ren'Py Sync."
# renpy/common/00sync.rpy:180
old "The Ren'Py Sync server timed out."
new "Le serveur Ren'Py Sync a mis trop de temps à répondre."
# renpy/common/00sync.rpy:182
old "An unknown error occurred while connecting to the Ren'Py Sync server."
new "Une erreur inconnue est arrivée lors de la connexion au serveur Ren'Py Sync."
# renpy/common/00sync.rpy:255
old "The Ren'Py Sync server does not have a copy of this sync. The sync ID may be invalid, or it may have timed out."
new "Le serveur Ren'Py Sync ne reconnaît pas ce code sync. l'ID est peut-être invalide, ou il peut avoir expiré."
# renpy/common/00sync.rpy:397
old "Please enter the sync ID you generated.\nNever enter a sync ID you didn't create yourself."
new "Entrez l'ID sync que vous avez généré.\nN'entrez jamais un ID sync que vous n'avez pas généré vous-même."
# renpy/common/00sync.rpy:416
old "The sync ID is not in the correct format."
new "L'ID sync n'est pas dans un format correct."
# renpy/common/00sync.rpy:436
old "The sync could not be decrypted."
new "Le sync n'a pas pu être déchiffré."
# renpy/common/00sync.rpy:459
old "The sync belongs to a different game."
new "Le sync correspond à un autre jeu."
# renpy/common/00sync.rpy:464
old "The sync contains a file with an invalid name."
new "Le sync contient un fichier ayant un nom invalide."
# renpy/common/00sync.rpy:517
old "This will upload your saves to the {a=https://sync.renpy.org}Ren'Py Sync Server{/a}.\nDo you want to continue?"
new "Vos sauvegardes vont être téléchargées sur le {a=https://sync.renpy.org}serveur Ren'Py Sync{/a}.\nVoulez-vous continuer ?"
# renpy/common/00sync.rpy:546
old "Enter Sync ID"
new "Entrez l'ID Sync"
# renpy/common/00sync.rpy:557
old "This will contact the {a=https://sync.renpy.org}Ren'Py Sync Server{/a}."
new "Ceci va contacter le {a=https://sync.renpy.org}serveur Ren'Py Sync{/a}."
# renpy/common/00sync.rpy:584
old "Sync Success"
new "Sync réussi"
# renpy/common/00sync.rpy:587
old "The Sync ID is:"
new "L'ID Sync est :"
# renpy/common/00sync.rpy:593
old "You can use this ID to download your save on another device.\nThis sync will expire in an hour.\nRen'Py Sync is supported by {a=https://www.renpy.org/sponsors.html}Ren'Py's Sponsors{/a}."
new "Vous pouvez utiliser cet ID pour transférer votre sauvegarde sur un autre appareil.\nCe sync expirera dans une heure.\nRen'Py Sync is soutenu par les {a=https://www.renpy.org/sponsors.html}Sponsors de Ren'Py's{/a}."
# renpy/common/00sync.rpy:619
old "Sync Error"
new "Erreur de Sync"
# renpy/common/00webvideo.rpy:5
old "Touch to play the video."
new "Touchez pour jouer la vidéo."
+12 -4
View File
@@ -14,7 +14,11 @@
# _developer/developer.rpym:47
old "Variable Viewer"
new "Visualisateur de variable"
new "Inspecteur de variables"
# renpy/common/_developer/developer.rpym:51
old "Persistent Viewer"
new "Inspecteur de données persistentes"
# _developer/developer.rpym:49
old "Theme Test"
@@ -124,9 +128,13 @@
old "Ren'Py script disabled."
new "Script Ren'Py désactivé."
# 00console.rpy:398
old "help: show this help"
new "aide : afficher cette aide"
# renpy/common/00console.rpy:781
old "help: show this help\n help <expr>: show signature and documentation of <expr>"
new "help : afficher cette aide\n help <expr>: afficher la signature et la documentation de <expr>"
# renpy/common/00console.rpy:805
old "Help may display undocumented functions. Please check that the function or\nclass you want to use is documented.\n\n"
new "Help peut afficher des fonctions non documentées. Veuillez vérifier que la\nfonction ou classe que vous voulez utiliser est bien documentée.\n\n"
# 00console.rpy:403
old "commands:\n"
+20 -8
View File
@@ -925,7 +925,7 @@
# preferences.rpy:174
old "Show edit file section"
new "Afficher la section d’édition de fichier"
new "Afficher la section d’édition de fichiers"
# preferences.rpy:175
old "Large fonts"
@@ -933,11 +933,11 @@
# preferences.rpy:178
old "Console output"
new "Sortie console"
new "Console de sortie"
# preferences.rpy:199
old "Open launcher project"
new "Ouvrir le projet lanceur"
new "Ouvrir le projet du lanceur"
# preferences.rpy:213
old "Language:"
@@ -997,7 +997,7 @@
# translations.rpy:104
old "The language to work with. This should only contain lower-case ASCII characters and underscores."
new "Le langage avec lequel travailler. Cette valeur ne doit contenir que des caractères ASCII en minuscules et des underscores (tiret bas)."
new "Le langage avec lequel travailler. Cette valeur ne doit contenir que des caractères ASCII en minuscules et des underscores."
# translations.rpy:130
old "Generate empty strings for translations"
@@ -1025,7 +1025,7 @@
# translations.rpy:180
old "Update Default Interface Translations"
new "Met à jour la traduction de l'interface par défaut"
new "Mise à jour de la traduction par défaut de l'interface"
# translations.rpy:200
old "The extract command allows you to extract string translations from an existing project into a temporary file.\n\nThe merge command merges extracted translations into another project."
@@ -1057,7 +1057,7 @@
# translations.rpy:282
old "Updating default interface translations..."
new "Mise à jour en cours de la traduction de linterface par défaut..."
new "Mise à jour de la traduction par défaut de linterface en cours..."
# translations.rpy:306
old "Extract Dialogue: [project.current.name!q]"
@@ -1069,7 +1069,7 @@
# translations.rpy:330
old "Tab-delimited Spreadsheet (dialogue.tab)"
new "Feuille de calcul avec pour séparateur des tabulations (dialogue.tab)"
new "Feuille de calcul avec des tabulations comme séparateur (dialogue.tab)"
# translations.rpy:331
old "Dialogue Text Only (dialogue.txt)"
@@ -1613,7 +1613,7 @@
# game/install.rpy:151
old "Install Steam Support"
new "Installer le upport Steam"
new "Installer le support Steam"
# game/install.rpy:160
old "Before installing Steam support, please make sure you are a {a=https://partner.steamgames.com/}Steam partner{/a}."
@@ -2074,3 +2074,15 @@
# game/preferences.rpy:327
old "{#in language font}Start using Ren'Py in [lang_name]"
new "{font=fonts/Roboto-Light.ttf}Commencez à utiliser Ren'Py en [lang_name]{/font}"
# game/distribute_gui.rpy:231
old "(DLC)"
new "(DLC)"
# game/project.rpy:46
old "Lint checks your game for potential mistakes, and gives you statistics."
new "Lint vérifie votre jeu pour des erreurs communes, et génère des statistiques."
# game/web.rpy:484
old "Creating package..."
new "Création du package..."
+2 -2
View File
@@ -185,8 +185,8 @@
new "## Les fichiers correspondant au format de documentation sont dupliqués pour les compilation sur Mac, c'est pourquoi ils apparaissent deux fois dans larchive zip."
# options.rpy:196
old "## A Google Play license key is required to download expansion files and perform in-app purchases. It can be found on the \"Services & APIs\" page of the Google Play developer console."
new "## Une clé de licence A Google Play est requise pour télécharger les fichiers et permettre les achats dans l'application. Vous pourrez la trouver sur la page « Services & APIs » de la console de développement Google Play."
old "## A Google Play license key is required to perform in-app purchases. It can be found in the Google Play developer console, under \"Monetize\" > \"Monetization Setup\" > \"Licensing\"."
new "## Une clé de licence Google Play est requise pour permettre les achats depuis l'application. Vous pourrez la trouver dans la console de développement Google Play, sous \"Monétiser\" > \"Configuration de la monétisation\" > \"Licences\"."
# options.rpy:203
old "## The username and project name associated with an itch.io project, separated by a slash."
+15 -3
View File
@@ -450,7 +450,7 @@
# screens.rpy:1024
old "Toggles dialogue skipping."
new "Active ou désactives les «sauts des dialogues»."
new "Active ou désactive les «sauts des dialogues»."
# screens.rpy:1027
old "Page Up"
@@ -621,8 +621,8 @@
new "## Les dialogues sont affichés soit dans une vpgrid soit dans une vbox."
# screens.rpy:1314
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True, as it is above."
new "## Si fourni, affiche le menu. Le menu peut safficher de manière incorrecte si config.narrator_menu est initialisé à True, comme cest le cas au-dessus."
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True."
new "## Si fourni, affiche le menu. Le menu peut safficher de manière incorrecte si config.narrator_menu est initialisé à True."
# screens.rpy:1344
old "## This controls the maximum number of NVL-mode entries that can be displayed at once."
@@ -719,3 +719,15 @@
# gui/game/screens.rpy:1049
old "Opens the accessibility menu."
new "Ouvre le menu d'accessibilité."
# gui/game/screens.rpy:1397
old "## Bubble screen"
new "## Screen des bulles"
# gui/game/screens.rpy:1399
old "## The Bubble screen is used to display dialogue to the player when using speech bubbles. The Bubble screen takes the same parameters as the say screen, must create a displayable with the id of \"what\", and can create displayables with the \"namebox\", \"who\", and \"window\" ids."
new "## Le screen des bulles est utilisé pour afficher des dialogues en utilisant des bulles. Ce screen prend les mêmes paramètres que le screen say, doit prévoir un displayable avec l'id \"what\", et peut créer des displayables avec les ids \"namebox\", \"who\", et \"window\"."
# gui/game/screens.rpy:1404
old "## https://www.renpy.org/doc/html/screen_special.html#bubble"
new "## https://www.renpy.org/doc/html/screen_special.html#bubble"
+2 -3
View File
@@ -622,8 +622,8 @@ translate italian strings:
new "## Mostra il dialogo in una vpgrid o in una vbox."
# screens.rpy:1314
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True, as it is above."
new "## Mostra il menu, se fornito. Il menu può apparire distorto se config.narrator_menu è impostato a True, come lo è sopra."
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True."
new "## Mostra il menu, se fornito. Il menu può apparire distorto se config.narrator_menu è impostato a True."
# screens.rpy:1344
old "## This controls the maximum number of NVL-mode entries that can be displayed at once."
@@ -676,4 +676,3 @@ translate italian strings:
# screens.rpy:1079
old "Left Trigger\nLeft Shoulder"
new "Grilletto Sinistro\nLaterale Sinistro"
+1 -1
View File
@@ -669,7 +669,7 @@
# ios.rpy:37
old "Creates an Xcode project corresponding to the current Ren'Py project."
new "現在の Ren'PY プロジェクトに対応する Xcode プロジェクトを作成します。"
new "現在の Ren'Py プロジェクトに対応する Xcode プロジェクトを作成します。"
# ios.rpy:38
old "Updates the Xcode project with the latest game files. This must be done each time the Ren'Py project changes."
+3 -3
View File
@@ -346,15 +346,15 @@ translate japanese strings:
# screens.rpy:752
old "Unseen Text"
new "未読テキスト"
new "未読テキストもスキップ"
# screens.rpy:753
old "After Choices"
new "選択肢後"
new "選択肢後もスキップ継続"
# screens.rpy:754
old "Transitions"
new "トランジション"
new "トランジションをスキップ"
# screens.rpy:756
old "## Additional vboxes of type \"radio_pref\" or \"check_pref\" can be added here, to add additional creator-defined preferences."
+2 -3
View File
@@ -634,8 +634,8 @@ translate piglatin strings:
new "## Isplaysday ialogueday inay eitheray aay pgridvay oray hetay boxvay."
# gui/game/screens.rpy:1307
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True, as it is above."
new "## Isplaysday hetay enumay, ifay ivengay. Hetay enumay aymay ebay isplayedday incorrectlyay ifay onfigcay.arrator_menunay isay etsay otay Ruetay, asay itay isay aboveay."
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True."
new "## Isplaysday hetay enumay, ifay ivengay. Hetay enumay aymay ebay isplayedday incorrectlyay ifay onfigcay.arrator_menunay isay etsay otay Ruetay."
# gui/game/screens.rpy:1337
old "## This controls the maximum number of NVL-mode entries that can be displayed at once."
@@ -652,4 +652,3 @@ translate piglatin strings:
# gui/game/screens.rpy:1424
old "Menu"
new "Enumay"
+1 -1
View File
@@ -654,7 +654,7 @@ translate russian strings:
new "## Показывает диалог или в vpgrid, или в vbox."
# screens.rpy:1316
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True, as it is above."
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True."
new "## Показывает меню, если есть. Меню может показываться некорректно, если config.narrator_menu установлено на True."
# screens.rpy:1346
+112
View File
@@ -777,3 +777,115 @@ translate spanish strings:
# renpy/common/00preferences.rpy:535
old "mute main"
new "silenciar volumen principal"
# renpy/common/00speechbubble.rpy:299
old "Speech Bubble Editor"
new "Editor de globos de diálogo"
# renpy/common/00speechbubble.rpy:304
old "(hide)"
new "(ocultar)"
# renpy/common/00gui.rpy:455
old "This save was created on a different device. Maliciously constructed save files can harm your computer. Do you trust this save's creator and everyone who could have changed the file?"
new "Este archivo se creó en otro dispositivo. Los archivos de guardado maliciosamente creados pueden dañar tu computadora. Confías en el creador de este archivo y en todos los que podrían haberlo modificado?"
# renpy/common/00gui.rpy:456
old "Do you trust the device the save was created on? You should only choose yes if you are the device's sole user."
new "¿Confías en el dispositivo en el que se creó el archivo de guardado? Sólo debes elegir sí si eres el único usuario del dispositivo."
# renpy/common/00preferences.rpy:520
old "web cache preload"
new "precarga de la caché web"
# renpy/common/00webvideo.rpy:5
old "Touch to play the video."
new "Toca aquí para reproducir el video."
# renpy/common/00director.rpy:1748
old "Click to toggle attribute, right click to toggle negative attribute."
new "Clic para cambiar el atributo, Clic derecho para cambiar el atributo a negativo."
# renpy/common/00director.rpy:1771
old "Click to set transform, right click to add to transform list."
new "Clic para establecer la transformación, clic derecho para añadir a la lista de transformaciones."
# renpy/common/00director.rpy:1792
old "Click to set, right click to add to behind list."
new "Clic para fijar, clic derecho para añadir a detrás de la lista."
# renpy/common/00preferences.rpy:528
old "audio when unfocused"
new "audio cuando no está enfocado"
# renpy/common/00preferences.rpy:552
old "voice after game menu"
new "voz después de un menú del juego"
# renpy/common/00sync.rpy:58
old "Sync downloaded."
new "Sincronización descargada"
# renpy/common/00sync.rpy:178
old "Could not connect to the Ren'Py Sync server."
new "No se pudo conectar al servidor Ren'Py Sync."
# renpy/common/00sync.rpy:180
old "The Ren'Py Sync server timed out."
new "Se agotó el tiempo de espera del servidor Ren'Py Sync."
# renpy/common/00sync.rpy:182
old "An unknown error occurred while connecting to the Ren'Py Sync server."
new "Se produjo un error desconocido al conectarse al servidor Ren'Py Sync."
# renpy/common/00sync.rpy:255
old "The Ren'Py Sync server does not have a copy of this sync. The sync ID may be invalid, or it may have timed out."
new "El servidor Ren'Py Sync no tiene una copia de esta sincronización. Es posible que el ID de sincronización no sea válido o que se haya agotado el tiempo de espera."
# renpy/common/00sync.rpy:397
old "Please enter the sync ID you generated.\nNever enter a sync ID you didn't create yourself."
new "Ingresa la ID de sincronización SI que generaste.\nNunca ingreses una ID de sincronización que no creaste."
# renpy/common/00sync.rpy:416
old "The sync ID is not in the correct format."
new "El ID de sincronización no tiene el formato correcto."
# renpy/common/00sync.rpy:436
old "The sync could not be decrypted."
new "No se pudo descifrar la ID de sincronización."
# renpy/common/00sync.rpy:459
old "The sync belongs to a different game."
new "La sincronización pertenece a un juego diferente."
# renpy/common/00sync.rpy:464
old "The sync contains a file with an invalid name."
new "La sincronización contiene un archivo con un nombre no válido."
# renpy/common/00sync.rpy:517
old "This will upload your saves to the {a=https://sync.renpy.org}Ren'Py Sync Server{/a}.\nDo you want to continue?"
new "Esto cargará tus archivos guardados en el {a=https://sync.renpy.org}Servidor Ren'Py Sync{/a}..\n¿Quieres continuar?"
# renpy/common/00sync.rpy:546
old "Enter Sync ID"
new "Ingrese ID de Sync"
# renpy/common/00sync.rpy:557
old "This will contact the {a=https://sync.renpy.org}Ren'Py Sync Server{/a}."
new "Esto contactará con el {a=https://sync.renpy.org}Servidor Ren'Py Sync{/a}."
# renpy/common/00sync.rpy:584
old "Sync Success"
new "Sincronización exitosa"
# renpy/common/00sync.rpy:587
old "The Sync ID is:"
new "El ID de Sync es:"
# renpy/common/00sync.rpy:593
old "You can use this ID to download your save on another device.\nThis sync will expire in an hour.\nRen'Py Sync is supported by {a=https://www.renpy.org/sponsors.html}Ren'Py's Sponsors{/a}."
new "Puede usar esta ID para descargar su guardado en otro dispositivo.\nEsta sincronización caducará en una hora.\RenPy Sync está para {a=https://www.renpy.org/sponsors.html}los patrocinadores de Ren'Py{/a}."
# renpy/common/00sync.rpy:619
old "Sync Error"
new "Error de sincronización"
+12
View File
@@ -211,3 +211,15 @@
# renpy/common/00console.rpy:784
old "stack: print the return stack"
new "stack: imprime la pila de retorno"
# renpy/common/00console.rpy:781
old "help: show this help\n help <expr>: show signature and documentation of <expr>"
new "help: muestra esta ayuda\n help <expr>: muestra la firma y la documentación de <expr>"
# renpy/common/00console.rpy:805
old "Help may display undocumented functions. Please check that the function or\nclass you want to use is documented.\n\n"
new "La ayuda puede mostrar funciones no documentadas. Por favor, compruebe que la función o\nclase que desea utilizar está documentada.\n\n"
# renpy/common/_developer/developer.rpym:51
old "Persistent Viewer"
new "Visor de datos persistentes"
+12
View File
@@ -2060,3 +2060,15 @@ translate spanish strings:
# game/preferences.rpy:327
old "{#in language font}Start using Ren'Py in [lang_name]"
new "{font=fonts/Roboto-Light.ttf}Empieza a usar Ren'Py en [lang_name]{/font}"
# game/distribute_gui.rpy:231
old "(DLC)"
new "(DLC)"
# game/project.rpy:46
old "Lint checks your game for potential mistakes, and gives you statistics."
new "Lint comprueba tu juego en busca de posibles errores y te ofrece estadísticas."
# game/web.rpy:484
old "Creating package..."
new "Creando paquete..."
+4
View File
@@ -204,3 +204,7 @@
old "## These three variables control, among other things, which mixers are shown to the player by default. Setting one of these to False will hide the appropriate mixer."
new "## Estas tres variables controlan, entre otras cosas, qué mezcladores se muestran al reproductor de forma predeterminada. Establecer uno de estos en False ocultará el mezclador apropiado. "
# gui/game/options.rpy:203
old "## A Google Play license key is required to perform in-app purchases. It can be found in the Google Play developer console, under \"Monetize\" > \"Monetization Setup\" > \"Licensing\"."
new "## Se necesita una clave de licencia de Google Play para realizar compras dentro de la aplicación. Se puede encontrar en la consola de desarrollador de Google Play, en \"Monetizar\" > \"Configuración de la monetización\" > \"Licencias\"."
+13 -2
View File
@@ -654,8 +654,8 @@ translate spanish strings:
new "## Presenta el diálogo en una 'vpgrid' o una 'vbox'."
# screens.rpy:1316
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True, as it is above."
new "## Presenta el menú, si lo hay. El menú puede ser presentado incorrectamente si 'config.narrator_menu' está ajustado a 'True', como lo es más arriba."
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True."
new "## Presenta el menú, si lo hay. El menú puede ser presentado incorrectamente si 'config.narrator_menu' está ajustado a 'True'."
# screens.rpy:1346
old "## This controls the maximum number of NVL-mode entries that can be displayed at once."
@@ -680,4 +680,15 @@ translate spanish strings:
# gui/game/screens.rpy:1049
old "Opens the accessibility menu."
new "Abre el menú de accesibilidad."
# gui/game/screens.rpy:1397
old "## Bubble screen"
new "## Pantalla de globos"
# gui/game/screens.rpy:1399
old "## The Bubble screen is used to display dialogue to the player when using speech bubbles. The Bubble screen takes the same parameters as the say screen, must create a displayable with the id of \"what\", and can create displayables with the \"namebox\", \"who\", and \"window\" ids."
new "## La pantalla globos se utiliza para mostrar el diálogo al jugador cuando se utilizan globos de dialogo. La pantalla de globos toma los mismos parámetros que la pantalla say, debe crear un displayable con el id de \"what\", y puede crear displayables con los ids de \"namebox\", \"who\", y \"window\"."
# gui/game/screens.rpy:1404
old "## https://www.renpy.org/doc/html/screen_special.html#bubble"
new "## https://www.renpy.org/doc/html/screen_special.html#bubble"
+921
View File
@@ -0,0 +1,921 @@
translate ukrainian strings:
# 00action_file.rpy:26
old "{#weekday}Monday"
new "{#weekday}Понеділок"
# 00action_file.rpy:26
old "{#weekday}Tuesday"
new "{#weekday}Вівторок"
# 00action_file.rpy:26
old "{#weekday}Wednesday"
new "{#weekday}Середа"
# 00action_file.rpy:26
old "{#weekday}Thursday"
new "{#weekday}Четвер"
# 00action_file.rpy:26
old "{#weekday}Friday"
new "{#weekday}П'ятниця"
# 00action_file.rpy:26
old "{#weekday}Saturday"
new "{#weekday}Субота"
# 00action_file.rpy:26
old "{#weekday}Sunday"
new "{#weekday}Неділя"
# 00action_file.rpy:37
old "{#weekday_short}Mon"
new "{#weekday_short}Пн"
# 00action_file.rpy:37
old "{#weekday_short}Tue"
new "{#weekday_short}Вт"
# 00action_file.rpy:37
old "{#weekday_short}Wed"
new "{#weekday_short}Ср"
# 00action_file.rpy:37
old "{#weekday_short}Thu"
new "{#weekday_short}Чт"
# 00action_file.rpy:37
old "{#weekday_short}Fri"
new "{#weekday_short}Пт"
# 00action_file.rpy:37
old "{#weekday_short}Sat"
new "{#weekday_short}Сб"
# 00action_file.rpy:37
old "{#weekday_short}Sun"
new "{#weekday_short}Нд"
# 00action_file.rpy:47
old "{#month}January"
new "{#month}Січня"
# 00action_file.rpy:47
old "{#month}February"
new "{#month}Лютого"
# 00action_file.rpy:47
old "{#month}March"
new "{#month}Березня"
# 00action_file.rpy:47
old "{#month}April"
new "{#month}Квітня"
# 00action_file.rpy:47
old "{#month}May"
new "{#month}Травня"
# 00action_file.rpy:47
old "{#month}June"
new "{#month}Червня"
# 00action_file.rpy:47
old "{#month}July"
new "{#month}Липня"
# 00action_file.rpy:47
old "{#month}August"
new "{#month}Серпня"
# 00action_file.rpy:47
old "{#month}September"
new "{#month}Вересня"
# 00action_file.rpy:47
old "{#month}October"
new "{#month}Жовтня"
# 00action_file.rpy:47
old "{#month}November"
new "{#month}Листопада"
# 00action_file.rpy:47
old "{#month}December"
new "{#month}Грудня"
# 00action_file.rpy:63
old "{#month_short}Jan"
new "{#month_short}Січ"
# 00action_file.rpy:63
old "{#month_short}Feb"
new "{#month_short}Лют"
# 00action_file.rpy:63
old "{#month_short}Mar"
new "{#month_short}Бер"
# 00action_file.rpy:63
old "{#month_short}Apr"
new "{#month_short}Кві"
# 00action_file.rpy:63
old "{#month_short}May"
new "{#month_short}Тра"
# 00action_file.rpy:63
old "{#month_short}Jun"
new "{#month_short}Чер"
# 00action_file.rpy:63
old "{#month_short}Jul"
new "{#month_short}Лип"
# 00action_file.rpy:63
old "{#month_short}Aug"
new "{#month_short}Сер"
# 00action_file.rpy:63
old "{#month_short}Sep"
new "{#month_short}Вер"
# 00action_file.rpy:63
old "{#month_short}Oct"
new "{#month_short}Жов"
# 00action_file.rpy:63
old "{#month_short}Nov"
new "{#month_short}Лис"
# 00action_file.rpy:63
old "{#month_short}Dec"
new "{#month_short}Гру"
# 00action_file.rpy:240
old "%b %d, %H:%M"
new "%d %b, %H:%M"
# 00action_file.rpy:353
old "Save slot %s: [text]"
new "Слот збереження %s: [text]"
# 00action_file.rpy:434
old "Load slot %s: [text]"
new "Слот завантаження %s: [text]"
# 00action_file.rpy:487
old "Delete slot [text]"
new "Видалити слот [text]"
# 00action_file.rpy:569
old "File page auto"
new "Автозбереження"
# 00action_file.rpy:571
old "File page quick"
new "Швидкі збереження"
# 00action_file.rpy:573
old "File page [text]"
new "Сторінка збережень [text]"
# 00action_file.rpy:763
old "Next file page."
new "Наступна сторінка збережень."
# 00action_file.rpy:827
old "Previous file page."
new "Минула сторінка збережень"
# 00action_file.rpy:888
old "Quick save complete."
new "Швидке збереження завершено."
# 00action_file.rpy:906
old "Quick save."
new "Швидке збереження."
# 00action_file.rpy:925
old "Quick load."
new "Швидке завантаження."
# 00action_other.rpy:355
old "Language [text]"
new "Мова [text]"
# 00director.rpy:708
old "The interactive director is not enabled here."
new "Інтерактивний директор недоступний."
# 00director.rpy:1481
old "⬆"
new "⬆"
# 00director.rpy:1487
old "⬇"
new "⬇"
# 00director.rpy:1551
old "Done"
new "Прийняти"
# 00director.rpy:1561
old "(statement)"
new "(функція)"
# 00director.rpy:1562
old "(tag)"
new "(тег)"
# 00director.rpy:1563
old "(attributes)"
new "(атрибут)"
# 00director.rpy:1564
old "(transform)"
new "(трансформація)"
# 00director.rpy:1589
old "(transition)"
new "(перехід)"
# 00director.rpy:1601
old "(channel)"
new "(канал)"
# 00director.rpy:1602
old "(filename)"
new "(ім'я файла)"
# 00director.rpy:1631
old "Change"
new "Змінити"
# 00director.rpy:1633
old "Add"
new "Додати"
# 00director.rpy:1636
old "Cancel"
new "Скасувати"
# 00director.rpy:1639
old "Remove"
new "Видалити"
# 00director.rpy:1674
old "Statement:"
new "Функції:"
# 00director.rpy:1695
old "Tag:"
new "Теги:"
# 00director.rpy:1711
old "Attributes:"
new "Атрибут:"
# 00director.rpy:1729
old "Transforms:"
new "Трансформації:"
# 00director.rpy:1748
old "Behind:"
new "Позаду:"
# 00director.rpy:1767
old "Transition:"
new "Переходи:"
# 00director.rpy:1785
old "Channel:"
new "Канали:"
# 00director.rpy:1803
old "Audio Filename:"
new "Ім'я файла:"
# 00gui.rpy:370
old "Are you sure?"
new "Ви впевнені?"
# 00gui.rpy:371
old "Are you sure you want to delete this save?"
new "Ви впевнені що хочете видалити це збереження?"
# 00gui.rpy:372
old "Are you sure you want to overwrite your save?"
new "Ви впевнені що хочете перезаписати ваше збереження?"
# 00gui.rpy:373
old "Loading will lose unsaved progress.\nAre you sure you want to do this?"
new "Завантаження гри приведе до втрати незбереженого прогресу.\nВи впевнені що хочете це зробити?"
# 00gui.rpy:374
old "Are you sure you want to quit?"
new "Ви впевнені що бажаєте вийти?"
# 00gui.rpy:375
old "Are you sure you want to return to the main menu?\nThis will lose unsaved progress."
new "Ви впевнені, що хочете повернутися до головного меню?\nЦе призведе до втрати незбереженого прогресу."
# 00gui.rpy:376
old "Are you sure you want to end the replay?"
new "Ви впевнені, що хочете завершити повтор?"
# 00gui.rpy:377
old "Are you sure you want to begin skipping?"
new "Ви впевнені, що бажаєте пропустити?"
# 00gui.rpy:378
old "Are you sure you want to skip to the next choice?"
new "Ви точно хочете пропустити все до наступного вибору?"
# 00gui.rpy:379
old "Are you sure you want to skip unseen dialogue to the next choice?"
new "Ви впевнені, що хочете пропустити непрочитані діалоги до наступного вибору?"
# 00keymap.rpy:258
old "Failed to save screenshot as %s."
new "Провалено спробу зберегти скріншот як %s."
# 00keymap.rpy:270
old "Saved screenshot as %s."
new "Скріншот збережений як %s."
# 00library.rpy:146
old "Self-voicing disabled."
new "Синтезатор мови вимкнено."
# 00library.rpy:147
old "Clipboard voicing enabled. "
new "Озвучення буфера обміну включено."
# 00library.rpy:148
old "Self-voicing enabled. "
new "Синтезатор мови включений."
# 00library.rpy:150
old "bar"
new "Смуга налаштування"
# 00library.rpy:151
old "selected"
new "вибрано"
# 00library.rpy:152
old "viewport"
new "порт перегляду"
# 00library.rpy:153
old "horizontal scroll"
new "горизонтальна смуга прокручування"
# 00library.rpy:154
old "vertical scroll"
new "вертикальна смуга прокручування"
# 00library.rpy:155
old "activate"
new "елемент активовано"
# 00library.rpy:156
old "deactivate"
new "елемент деактивовано"
# 00library.rpy:157
old "increase"
new "більше"
# 00library.rpy:158
old "decrease"
new "менше"
# 00library.rpy:193
old "Skip Mode"
new "Режим Пропуску"
# 00library.rpy:279
old "This program contains free software under a number of licenses, including the MIT License and GNU Lesser General Public License. A complete list of software, including links to full source code, can be found {a=https://www.renpy.org/l/license}here{/a}."
new "Ця програма містить вільне та відкрите програмне забезпечення під кількома ліцензіями, включаючи ліцензію MIT та GNU Lesser General Public. Повний список ліцензій, враховуючи посилання на повний вихідний код, можна знайти {a=https://www.renpy.org/l/license}тут{/a}."
# 00preferences.rpy:207
old "display"
new "режим екрана"
# 00preferences.rpy:219
old "transitions"
new "переходи"
# 00preferences.rpy:228
old "skip transitions"
new "пропустити переходи"
# 00preferences.rpy:230
old "video sprites"
new "відео-спрайти"
# 00preferences.rpy:239
old "show empty window"
new "показувати порожнє вікно діалогу"
# 00preferences.rpy:248
old "text speed"
new "швидкість тексту"
# 00preferences.rpy:256
old "joystick"
new "джойстик"
# 00preferences.rpy:256
old "joystick..."
new "джойстик..."
# 00preferences.rpy:263
old "skip"
new "пропустити"
# 00preferences.rpy:266
old "skip unseen [text]"
new "пропустити весь [text]"
# 00preferences.rpy:271
old "skip unseen text"
new "пропускати весь текст"
# 00preferences.rpy:273
old "begin skipping"
new "почати пропуск"
# 00preferences.rpy:277
old "after choices"
new "після виборів"
# 00preferences.rpy:284
old "skip after choices"
new "пропускати після виборів"
# 00preferences.rpy:286
old "auto-forward time"
new "швидкість авточитання"
# 00preferences.rpy:300
old "auto-forward"
new "авточитання"
# 00preferences.rpy:307
old "Auto forward"
new "Авточитання"
# 00preferences.rpy:310
old "auto-forward after click"
new "продовжувати авточитання після кліку"
# 00preferences.rpy:319
old "automatic move"
new "автоматично пересувати мишу до кнопки" ###
# 00preferences.rpy:328
old "wait for voice"
new "чекати голос"
# 00preferences.rpy:337
old "voice sustain"
new "не зупиняти голос"
# 00preferences.rpy:346
old "self voicing"
new "озвучка через синтезатор мови"
# 00preferences.rpy:355
old "clipboard voicing"
new "синтез мови з буфера обміну"
# 00preferences.rpy:364
old "debug voicing"
new "режим дебагу синтезу мови"
# 00preferences.rpy:373
old "emphasize audio"
new "посилити гучність заздалегідь заданих звукових каналів рахунок приглушення інших каналів"
# 00preferences.rpy:382
old "rollback side"
new "сторона відкату"
# 00preferences.rpy:392
old "gl powersave"
new "налаштування графіки. Економія енергії"
# 00preferences.rpy:398
old "gl framerate"
new "налаштування графіки. Частота кадрів"
# 00preferences.rpy:401
old "gl tearing"
new "налаштування графіки. Розривання кадрів"
# 00preferences.rpy:413
old "music volume"
new "гучність музики"
# 00preferences.rpy:414
old "sound volume"
new "гучність звуків"
# 00preferences.rpy:415
old "voice volume"
new "гучність голосу"
# 00preferences.rpy:416
old "mute music"
new "без музики"
# 00preferences.rpy:417
old "mute sound"
new "без звуків"
# 00preferences.rpy:418
old "mute voice"
new "без голосу"
# 00preferences.rpy:419
old "mute all"
new "режим без звуку"
# 00preferences.rpy:500
old "Clipboard voicing enabled. Press 'shift+C' to disable."
new "Озвучення буфера обміну увімкнено. Натисніть 'shift+C', щоб вимкнути це."
# 00preferences.rpy:502
old "Self-voicing would say \"[renpy.display.tts.last]\". Press 'alt+shift+V' to disable."
new "Синтезатор мови повинен сказати \"[renpy.display.tts.last]\". Натисніть 'alt+shift+V', щоб відключити його."
# 00preferences.rpy:504
old "Self-voicing enabled. Press 'v' to disable."
new "Синтезатор мови включено. Натисніть 'v', щоб вимкнути його."
# _compat\gamemenu.rpym:198
old "Empty Slot."
new "Порожній слот"
# _compat\gamemenu.rpym:355
old "Previous"
new "Назад"
# _compat\gamemenu.rpym:362
old "Next"
new "Далі"
# _compat\preferences.rpym:428
old "Joystick Mapping"
new "Розкладка джойстика"
# _developer\developer.rpym:38
old "Developer Menu"
new "Меню розробника"
# _developer\developer.rpym:43
old "Interactive Director (D)"
new "Інтерактивний Директор (D)"
# _developer\developer.rpym:45
old "Reload Game (Shift+R)"
new "Перезавантажити гру (Shift+R)"
# _developer\developer.rpym:47
old "Console (Shift+O)"
new "Консоль (Shift+O)"
# _developer\developer.rpym:49
old "Variable Viewer"
new "Перегляд змінних"
# _developer\developer.rpym:51
old "Image Location Picker"
new "Інструмент позиціонування на зображеннях"
# _developer\developer.rpym:53
old "Filename List"
new "Список файлів"
# _developer\developer.rpym:57
old "Show Image Load Log (F4)"
new "Показати лог завантаження зображень (F4)"
# _developer\developer.rpym:60
old "Hide Image Load Log (F4)"
new "Скрыть лог загрузки изображений (F4)"
# _developer\developer.rpym:63
old "Image Attributes"
new "Атрибути зображення"
# _developer\developer.rpym:90
old "[name] [attributes] (hidden)"
new "[name] [attributes] (приховано)"
# _developer\developer.rpym:94
old "[name] [attributes]"
new "[name] [attributes]"
# _developer\developer.rpym:137
old "Nothing to inspect."
new "Змінні не задано."
# _developer\developer.rpym:265
old "Return to the developer menu"
new "Повернутися до меню розробника"
# _developer\developer.rpym:425
old "Rectangle: %r"
new "Прямокутник: %r"
# _developer\developer.rpym:430
old "Mouse position: %r"
new "Позиція миші: %r"
# _developer\developer.rpym:435
old "Right-click or escape to quit."
new "Натисніть праву кнопку миші або ESC, щоб вийти."
# _developer\developer.rpym:467
old "Rectangle copied to clipboard."
new "Координати прямокутника скопійовані в буфер обміну."
# _developer\developer.rpym:470
old "Position copied to clipboard."
new "Координати позиції скопійовані у буфер обміну."
# _developer\developer.rpym:489
old "Type to filter: "
new "Поточний фільтр: "
# _developer\developer.rpym:617
old "Textures: [tex_count] ([tex_size_mb:.1f] MB)"
new "Текстур: [tex_count] ([tex_size_mb:.1f] МБ)"
# _developer\developer.rpym:621
old "Image cache: [cache_pct:.1f]% ([cache_size_mb:.1f] MB)"
new "Кеш зображень: [cache_pct:.1f]% ([cache_size_mb:.1f] МБ)"
# _developer\developer.rpym:631
old "✔ "
new "✔ "
# _developer\developer.rpym:634
old "✘ "
new "✘ "
# _developer\developer.rpym:639
old "\n{color=#cfc}✔ predicted image (good){/color}\n{color=#fcc}✘ unpredicted image (bad){/color}\n{color=#fff}Drag to move.{/color}"
new "\n{color=#cfc}✔ передбачене зображення (добре){/color}\n{color=#fcc}✘ раптове зображення (погано){/color}\n{color=#fff}Натисніть, щоб пересунути.{/color}"
# _developer\inspector.rpym:38
old "Displayable Inspector"
new "Диспетчер об'єктів"
# _developer\inspector.rpym:61
old "Size"
new "Розмір"
# _developer\inspector.rpym:65
old "Style"
new "Стиль"
# _developer\inspector.rpym:71
old "Location"
new "Розташування"
# _developer\inspector.rpym:122
old "Inspecting Styles of [displayable_name!q]"
new "Інспектую стилі [displayable_name!q]"
# _developer\inspector.rpym:139
old "displayable:"
new "об'єкт:"
# _developer\inspector.rpym:145
old " (no properties affect the displayable)"
new " (на об'єкт не впливають жодні параметри)"
# _developer\inspector.rpym:147
old " (default properties omitted)"
new " (налаштування за замовчуванням опущено)"
# _developer\inspector.rpym:185
old "<repr() failed>"
new "<repr() провалений>"
# _layout\classic_load_save.rpym:170
old "a"
new "а"
# _layout\classic_load_save.rpym:179
old "q"
new "ш"
# 00iap.rpy:217
old "Contacting App Store\nPlease Wait..."
new "Зв'язуюсь з App Store\nБудь ласка, чекайте..."
# 00updater.rpy:375
old "The Ren'Py Updater is not supported on mobile devices."
new "Ren'Py Updater не підтримується на мобільних пристроях."
# 00updater.rpy:494
old "An error is being simulated."
new "Симулюється помилка."
# 00updater.rpy:678
old "Either this project does not support updating, or the update status file was deleted."
new "Або цей проект не підтримує оновлення, або видалено файл статусу оновлення."
# 00updater.rpy:692
old "This account does not have permission to perform an update."
new "Цей обліковий запис не має права проводити оновлення."
# 00updater.rpy:695
old "This account does not have permission to write the update log."
new "Цей обліковий запис не має права писати лог оновлення."
# 00updater.rpy:722
old "Could not verify update signature."
new "Не можу верифікувати підпис оновлення."
# 00updater.rpy:997
old "The update file was not downloaded."
new "Файл поновлення не був завантажений."
# 00updater.rpy:1015
old "The update file does not have the correct digest - it may have been corrupted."
new "Файл поновлення не містить коректного дайджесту — він може бути пошкоджений."
# 00updater.rpy:1071
old "While unpacking {}, unknown type {}."
new "При розпаковуванні {} виявлено невідомий тип {}."
# 00updater.rpy:1439
old "Updater"
new "Оновлення"
# 00updater.rpy:1450
old "This program is up to date."
new "Ця програма оновлена."
# 00updater.rpy:1452
old "[u.version] is available. Do you want to install it?"
new "[u.version] доступна. Ви бажаєте її встановити?"
# 00updater.rpy:1454
old "Preparing to download the updates."
new "Підготовка до завантаження оновлень."
# 00updater.rpy:1456
old "Downloading the updates."
new "Завантаження оновлень."
# 00updater.rpy:1458
old "Unpacking the updates."
new "Розпакування оновлень."
# 00updater.rpy:1462
old "The updates have been installed. The program will restart."
new "Оновлення встановлено. Програма буде перезапущена."
# 00updater.rpy:1464
old "The updates have been installed."
new "Оновлення було встановлено."
# 00updater.rpy:1466
old "The updates were cancelled."
new "Оновлення було скасовано."
# 00gallery.rpy:585
old "Image [index] of [count] locked."
new "Зображення [index] із [count] заблоковано."
# 00gallery.rpy:605
old "prev"
new "мин"
# 00gallery.rpy:606
old "next"
new "наст"
# 00gallery.rpy:607
old "slideshow"
new "слайд-шоу"
# 00gallery.rpy:608
old "return"
new "повернутися"
# _developer\developer.rpym:154
old "Hide deleted"
new "Сховати видалені"
# _developer\developer.rpym:154
old "Show deleted"
new "Показати видалені"
# 00accessibility.rpy:76
old "Font Override"
new "Перевизначення шрифту"
# 00accessibility.rpy:80
old "Default"
new "За замовчуванням"
# 00accessibility.rpy:84
old "DejaVu Sans"
new "DejaVu Sans"
# 00accessibility.rpy:88
old "Opendyslexic"
new "Opendyslexic"
# 00accessibility.rpy:94
old "Text Size Scaling"
new "Масштабування розміру тексту"
# 00accessibility.rpy:100
old "Reset"
new "Скинути"
# 00accessibility.rpy:105
old "Line Spacing Scaling"
new "Масштабування міжрядкового інтервалу"
# 00accessibility.rpy:117
old "Self-Voicing"
new "Озвучка через синтезатор мовлення"
# 00accessibility.rpy:121
old "Off"
new "Вимкнути"
# 00accessibility.rpy:125
old "Text-to-speech"
new "Перетворення тексту на мовлення"
# 00accessibility.rpy:129
old "Clipboard"
new "З буфера обміну"
# 00preferences.rpy:430
old "font transform"
new "перетворення шрифту"
# 00preferences.rpy:433
old "font size"
new "розмір шрифту"
# 00preferences.rpy:441
old "font line spacing"
new "міжрядковий інтервал"
# renpy/common/00accessibility.rpy:191
old "The options on this menu are intended to improve accessibility. They may not work with all games, and some combinations of options may render the game unplayable. This is not an issue with the game or engine. For the best results when changing fonts, try to keep the text size the same as it originally was."
new "Установки цього меню призначені для збільшення доступності. Вони можуть працювати не з усіма іграми, а деякі комбінації опцій можуть зробити гру, що відображається некоректно. Це не проблема з грою чи движком. Для досягнення найкращих результатів при зміні шрифтів намагайтеся зберігати розмір тексту таким, яким він був спочатку."
# renpy/common/00accessibility.rpy:193
old "Self-Voicing Volume Drop"
new "Зменшення гучності при озвученні через синтезатор мовлення"
# renpy/common/00preferences.rpy:384
old "self voicing volume drop"
new "зменшення гучності при озвученні через синтезатор мовлення"
# renpy/common/00preferences.rpy:464
old "system cursor"
new "системний курсор"
# renpy/common/00accessibility.rpy:180
old "High Contrast Text"
new "Висококонтрастний текст"
# renpy/common/00preferences.rpy:487
old "renderer menu"
new "меню рендерера"
# renpy/common/00preferences.rpy:490
old "accessibility menu"
new "меню спеціальних можливостей"
# renpy/common/00preferences.rpy:493
old "high contrast text"
new "висококонтрастний текст"
# renpy/common/00preferences.rpy:511
old "audio when minimized"
new "звук при згортанні вікна"
# renpy/common/00preferences.rpy:531
old "main volume"
new "загальна гучність"
# renpy/common/00preferences.rpy:535
old "mute main"
new "режим без звуку"
+90
View File
@@ -0,0 +1,90 @@
translate ukrainian strings:
# 00console.rpy:255
old "Press <esc> to exit console. Type help for help.\n"
new "Натисніть <esc>, щоб вийти із консолі. Введіть <help> для допомоги.\n"
# 00console.rpy:259
old "Ren'Py script enabled."
new "Ren'Py script активовано."
# 00console.rpy:261
old "Ren'Py script disabled."
new "Ren'Py script деактивовано."
# 00console.rpy:496
old "help: show this help"
new "help: показує допомогу"
# 00console.rpy:501
old "commands:\n"
new "команди:\n"
# 00console.rpy:511
old " <renpy script statement>: run the statement\n"
new " <оператор renpy script>: запуск оператора\n"
# 00console.rpy:513
old " <python expression or statement>: run the expression or statement"
new " <вираз або оператор python>: запустити вираз або оператор"
# 00console.rpy:521
old "clear: clear the console history"
new "clear: очищення історії консолі"
# 00console.rpy:525
old "exit: exit the console"
new "exit: вихід із консолі"
# 00console.rpy:533
old "load <slot>: loads the game from slot"
new "load <слот>: завантажує гру з вибраного слота"
# 00console.rpy:546
old "save <slot>: saves the game in slot"
new "save <слот>: зберігає гру у вибраний слот"
# 00console.rpy:557
old "reload: reloads the game, refreshing the scripts"
new "reload: перезавантажує гру, оновлює скрипти"
# 00console.rpy:565
old "watch <expression>: watch a python expression"
new "watch <вираз>: спостерігати за виразом python"
# 00console.rpy:591
old "unwatch <expression>: stop watching an expression"
new "unwatch <вираз>: припинити спостерігати за виразом"
# 00console.rpy:622
old "unwatchall: stop watching all expressions"
new "unwatchall: глобальне припинення спостереження"
# 00console.rpy:639
old "jump <label>: jumps to label"
new "jump <мітка>: стрибок на мітку"
# 00console.rpy:685
old "short: Shorten the representation of objects on the console (default)."
new "short: Скорочене представлення об'єктів (repr) у консолі (за замовчуванням)."
# 00console.rpy:690
old "long: Print the full representation of objects on the console."
new "long: Виводити повне уявлення об'єктів (repr) у консолі."
# renpy/common/00console.rpy:814
old "watch <expression>: watch a python expression\n watch short: makes the representation of traced expressions short (default)\n watch long: makes the representation of traced expressions as is"
new "watch <вираз>: спостерігати за виразом python\n watch short: вкорочує відображення виразів, що відстежуються (за замовчуванням)\n watch long: робить відображення відстежуваних виразів як є"
# renpy/common/00console.rpy:925
old "escape: Enables escaping of unicode symbols in unicode strings."
new "escape: Включає екранування Unicode символів у рядках unicode."
# renpy/common/00console.rpy:929
old "unescape: Disables escaping of unicode symbols in unicode strings and print it as is (default)."
new "unescape: Вимикає екранування Unicode символів у рядках unicode та виводить їх як є (за замовчуванням)."
# renpy/common/00console.rpy:784
old "stack: print the return stack"
new "stack: виводить стек повернення (return stack)"
+286
View File
@@ -0,0 +1,286 @@
translate ukrainian strings:
# 00gltest.rpy:70
old "Renderer"
new "Рендер"
# 00gltest.rpy:74
old "Automatically Choose"
new "Вибирати Автоматично"
# 00gltest.rpy:79
old "Force Angle/DirectX Renderer"
new "Примусовий Angle/DirectX"
# 00gltest.rpy:83
old "Force OpenGL Renderer"
new "Примусовий OpenGL"
# 00gltest.rpy:87
old "Force Software Renderer"
new "Примусовий Програмний"
# 00gltest.rpy:93
old "NPOT"
new "NPOT (OpenGL 2+)"
# 00gltest.rpy:97
old "Enable"
new "Активовано"
# 00gltest.rpy:131
old "Powersave"
new "Економія енергії"
# 00gltest.rpy:145
old "Framerate"
new "Частота кадрів"
# 00gltest.rpy:149
old "Screen"
new "Екран"
# 00gltest.rpy:153
old "60"
new "60"
# 00gltest.rpy:157
old "30"
new "30"
# 00gltest.rpy:163
old "Tearing"
new "Розривання кадрів"
# 00gltest.rpy:179
old "Changes will take effect the next time this program is run."
new "Зміни набудуть чинності під час наступного запуску програми."
# 00gltest.rpy:213
old "Performance Warning"
new "Попередження Продуктивності"
# 00gltest.rpy:218
old "This computer is using software rendering."
new "Цей комп'ютер використовує програмний рендеринг."
# 00gltest.rpy:220
old "This computer is not using shaders."
new "Цей комп'ютер не використовує шейдерів."
# 00gltest.rpy:222
old "This computer is displaying graphics slowly."
new "Цей комп'ютер повільно відображає графіку."
# 00gltest.rpy:224
old "This computer has a problem displaying graphics: [problem]."
new "Цей комп'ютер має проблему з відображенням графіки: [problem]"
# 00gltest.rpy:229
old "Its graphics drivers may be out of date or not operating correctly. This can lead to slow or incorrect graphics display. Updating DirectX could fix this problem."
new "Графічні драйвера застаріли чи працюють неправильно. Це може призвести до повільного або неправильного відображення графіки. Оновлення DirectX може вирішити цю проблему."
# 00gltest.rpy:231
old "Its graphics drivers may be out of date or not operating correctly. This can lead to slow or incorrect graphics display."
new "Графічні драйвера застаріли чи працюють неправильно. Це може призвести до повільного або неправильного відображення графіки."
# 00gltest.rpy:236
old "Update DirectX"
new "Оновити DirectX"
# 00gltest.rpy:242
old "Continue, Show this warning again"
new "Продовжити, показати це попередження знову"
# 00gltest.rpy:246
old "Continue, Don't show warning again"
new "Продовжити, не показувати це попередження знову."
# 00gltest.rpy:264
old "Updating DirectX."
new "Оновлення DirectX."
# 00gltest.rpy:268
old "DirectX web setup has been started. It may start minimized in the taskbar. Please follow the prompts to install DirectX."
new "Інсталятор DirectX був запущений. Можливо, що він запустився у згорнутому стані. Будь ласка, дотримуйтесь інструкцій для встановлення DirectX."
# 00gltest.rpy:272
old "{b}Note:{/b} Microsoft's DirectX web setup program will, by default, install the Bing toolbar. If you do not want this toolbar, uncheck the appropriate box."
new "{b}Попередження:{/b} Інсталятор DirectX за замовчуванням намагається встановити панель інструментів Bing. Якщо ви цього не хочете, зніміть відповідну галочку."
# 00gltest.rpy:276
old "When setup finishes, please click below to restart this program."
new "Після завершення інсталяції клацніть, щоб перезапустити програму."
# 00gltest.rpy:278
old "Restart"
new "Перезапустити"
# 00gamepad.rpy:32
old "Select Gamepad to Calibrate"
new "Виберіть Геймпад для калібрування"
# 00gamepad.rpy:35
old "No Gamepads Available"
new "Геймпадів не виявлено"
# 00gamepad.rpy:54
old "Calibrating [name] ([i]/[total])"
new "Калібрую [name] ([i]/[total])"
# 00gamepad.rpy:58
old "Press or move the [control!s] [kind]."
new "Натисніть або посуньте [control!s] [kind]."
# 00gamepad.rpy:66
old "Skip (A)"
new "Пропустити (A)"
# 00gamepad.rpy:69
old "Back (B)"
new "Назад (B)"
# _errorhandling.rpym:529
old "Open"
new "Журнал"
# _errorhandling.rpym:531
old "Opens the traceback.txt file in a text editor."
new "Відкриває файл traceback.txt у текстовому редакторі."
# _errorhandling.rpym:533
old "Copy"
new "Копіювати"
# _errorhandling.rpym:535
old "Copies the traceback.txt file to the clipboard."
new "Копіює файл traceback.txt у буфер обміну."
# _errorhandling.rpym:562
old "An exception has occurred."
new "Виник виняток."
# _errorhandling.rpym:582
old "Rollback"
new "Назад"
# _errorhandling.rpym:584
old "Attempts a roll back to a prior time, allowing you to save or choose a different choice."
new "Намагається повернутися назад, дозволяючи вам зберегтися або прийняти інший вибір."
# _errorhandling.rpym:587
old "Ignore"
new "Ігнорувати"
# _errorhandling.rpym:591
old "Ignores the exception, allowing you to continue."
new "Ігнорує цей виняток, дозволяючи вам продовжити."
# _errorhandling.rpym:593
old "Ignores the exception, allowing you to continue. This often leads to additional errors."
new "Ігнорує цей виняток, дозволяючи вам продовжити. Найчастіше це призводить до додаткових помилок."
# _errorhandling.rpym:597
old "Reload"
new "Перезавантажити"
# _errorhandling.rpym:599
old "Reloads the game from disk, saving and restoring game state if possible."
new "Перезавантажує гру з диска, зберігаючи та відновлюючи її стан, якщо це можливо."
# _errorhandling.rpym:602
old "Console"
new "Консоль"
# _errorhandling.rpym:604
old "Opens a console to allow debugging the problem."
new "Відкриває консоль, що дозволяє налагодити проблему."
# _errorhandling.rpym:614
old "Quits the game."
new "Виходить із гри."
# _errorhandling.rpym:638
old "Parsing the script failed."
new "Опрацювання сценарію завершилося невдало."
# _errorhandling.rpym:664
old "Opens the errors.txt file in a text editor."
new "Відкриває файл errors.txt у текстовому редакторі."
# _errorhandling.rpym:668
old "Copies the errors.txt file to the clipboard."
new "Копіює файл errors.txt у буфер обміну."
# _errorhandling.rpym:542
old "Copy BBCode"
new "Копіювати як BBCode"
# _errorhandling.rpym:544
old "Copies the traceback.txt file to the clipboard as BBcode for forums like https://lemmasoft.renai.us/."
new "Копіює файл traceback.txt у буфер обміну як BBCode для форумів типу https://lemmasoft.renai.us/."
# _errorhandling.rpym:546
old "Copy Markdown"
new "Скопіювати як Markdown"
# _errorhandling.rpym:548
old "Copies the traceback.txt file to the clipboard as Markdown for Discord."
new "Копіює файл traceback.txt у буфер обміну як Markdown для Дискорду."
# _errorhandling.rpym:683
old "Copies the errors.txt file to the clipboard as BBcode for forums like https://lemmasoft.renai.us/."
new "Копіює файл errors.txt у буфер обміну як BBCode для форумів типу https://lemmasoft.renai.us/."
# _errorhandling.rpym:687
old "Copies the errors.txt file to the clipboard as Markdown for Discord."
new "Копіює файл errors.txt у буфер обміну як Markdown для Дискорду."
# renpy/common/00gltest.rpy:100
old "Force GL Renderer"
new "Примусовий рендеринг GL"
# renpy/common/00gltest.rpy:105
old "Force ANGLE Renderer"
new "Примусовий рендеринг ANGLE"
# renpy/common/00gltest.rpy:110
old "Force GLES Renderer"
new "Примусовий рендеринг GLES"
# renpy/common/00gltest.rpy:116
old "Force GL2 Renderer"
new "Примусовий рендеринг GL2"
# renpy/common/00gltest.rpy:121
old "Force ANGLE2 Renderer"
new "Примусовий рендеринг ANGLE2"
# renpy/common/00gltest.rpy:126
old "Force GLES2 Renderer"
new "Примусовий рендеринг GLES2"
# renpy/common/00gltest.rpy:245
old "This game requires use of GL2 that can't be initialised."
new "Ця гра вимагає використання GL2, який не може бути ініціалізований."
# renpy/common/00gltest.rpy:256
old "More details on how to fix this can be found in the {a=[url]}documentation{/a}."
new "Більше інформації про те, як це може бути виправлено, дивіться в {a=[url]}документації{/a}."
# renpy/common/00gltest.rpy:273
old "Change render options"
new "Змінити налаштування рендерингу"
# renpy/common/00gamepad.rpy:58
old "Press or move the '[control!s]' [kind]."
new "Натисніть або посуньте [kind] '[control!s]'"
# renpy/common/00gltest.rpy:136
old "Enable (No Blocklist)"
new "Увімкнути (ігнорувати блоклист)"
# renpy/common/00gltest.rpy:259
old "The {a=edit:1:log.txt}log.txt{/a} file may contain information to help you determine what is wrong with your computer."
new "Файл {a=edit:1:log.txt}log.txt{/a} може містити інформацію, яка допоможе вам визначити, що не так з вашим комп'ютером."
+434
View File
@@ -0,0 +1,434 @@
translate ukrainian strings:
# gui/game/gui.rpy:2
old "## Initialization"
new "## Ініціалізація"
# gui/game/gui.rpy:5
old "## The init offset statement causes the initialization statements in this file to run before init statements in any other file."
new "## Оператор init offset змушує оператори ініціалізації в цьому файлі виконуватися перед операторами init в будь-якому іншому файлі."
# gui/game/gui.rpy:9
old "## Calling gui.init resets the styles to sensible default values, and sets the width and height of the game."
new "## Виклик gui.init скидає стилі до розумних значень за замовчуванням і встановлює ширину та висоту гри."
# gui/game/gui.rpy:17
old "## GUI Configuration Variables"
new "## Змінні конфігурації GUI"
# gui/game/gui.rpy:21
old "## Colors"
new "## Кольори"
# gui/game/gui.rpy:23
old "## The colors of text in the interface."
new "## Кольори тексту в інтерфейсі."
# gui/game/gui.rpy:25
old "## An accent color used throughout the interface to label and highlight text."
new "## Колір акценту, який використовується в інтерфейсі для позначення та виділення тексту."
# gui/game/gui.rpy:29
old "## The color used for a text button when it is neither selected nor hovered."
new "## Колір, який використовується для текстової кнопки, коли вона не вибрана і не наведена."
# gui/game/gui.rpy:32
old "## The small color is used for small text, which needs to be brighter/darker to achieve the same effect."
new "## Дрібний колір використовується для дрібного тексту, який має бути яскравішим/темнішим, щоб досягти того самого ефекту."
# gui/game/gui.rpy:36
old "## The color that is used for buttons and bars that are hovered."
new "## Колір, який використовується для кнопок і смуг, на які наводяться."
# gui/game/gui.rpy:39
old "## The color used for a text button when it is selected but not focused. A button is selected if it is the current screen or preference value."
new "## Колір, який використовується для текстової кнопки, коли вона вибрана, але не в фокусі. Кнопку вибрано, якщо це поточний екран або значення параметра."
# gui/game/gui.rpy:43
old "## The color used for a text button when it cannot be selected."
new "## Колір текстової кнопки, якщо її неможливо вибрати."
# gui/game/gui.rpy:46
old "## Colors used for the portions of bars that are not filled in. These are not used directly, but are used when re-generating bar image files."
new "## Кольори, що використовуються для незаповнених частин стовпчиків. Вони не використовуються безпосередньо, а використовуються під час повторного створення файлів зображень стовпчика."
# gui/game/gui.rpy:51
old "## The colors used for dialogue and menu choice text."
new "## Кольори, які використовуються для тексту діалогу та вибору меню."
# gui/game/gui.rpy:56
old "## Fonts and Font Sizes"
new "## Шрифти та розміри шрифтів"
# gui/game/gui.rpy:58
old "## The font used for in-game text."
new "## Шрифт, який використовується для тексту в грі."
# gui/game/gui.rpy:61
old "## The font used for character names."
new "## Шрифт, який використовується для імен символів."
# gui/game/gui.rpy:64
old "## The font used for out-of-game text."
new "## Шрифт, який використовується для тексту поза грою."
# gui/game/gui.rpy:67
old "## The size of normal dialogue text."
new "## Розмір звичайного тексту діалогу."
# gui/game/gui.rpy:70
old "## The size of character names."
new "## Розмір імен персонажів."
# gui/game/gui.rpy:73
old "## The size of text in the game's user interface."
new "## Розмір тексту в інтерфейсі користувача гри."
# gui/game/gui.rpy:76
old "## The size of labels in the game's user interface."
new "## Розмір міток в інтерфейсі користувача гри."
# gui/game/gui.rpy:79
old "## The size of text on the notify screen."
new "## Розмір тексту на екрані сповіщень."
# gui/game/gui.rpy:82
old "## The size of the game's title."
new "## Розмір назви гри."
# gui/game/gui.rpy:86
old "## Main and Game Menus"
new "## Головне та ігрове меню"
# gui/game/gui.rpy:88
old "## The images used for the main and game menus."
new "## Зображення, які використовуються для головного та ігрового меню."
# gui/game/gui.rpy:93
old "## Dialogue"
new "## Діалог"
# gui/game/gui.rpy:95
old "## These variables control how dialogue is displayed on the screen one line at a time."
new "## Ці змінні керують тим, як діалог відображатиметься на екрані один рядок за раз."
# gui/game/gui.rpy:98
old "## The height of the textbox containing dialogue."
new "## Висота текстового поля, що містить діалог."
# gui/game/gui.rpy:101
old "## The placement of the textbox vertically on the screen. 0.0 is the top, 0.5 is center, and 1.0 is the bottom."
new "## Розташування текстового поля вертикально на екрані. 0,0 – верх, 0,5 – центр, 1,0 низ."
# gui/game/gui.rpy:106
old "## The placement of the speaking character's name, relative to the textbox. These can be a whole number of pixels from the left or top, or 0.5 to center."
new "## Розташування імені персонажа, що говорить, відносно текстового поля. Це може бути ціла кількість пікселів зліва чи зверху або 0,5 до центру."
# gui/game/gui.rpy:111
old "## The horizontal alignment of the character's name. This can be 0.0 for left-aligned, 0.5 for centered, and 1.0 for right-aligned."
new "## Горизонтальне вирівнювання імені персонажа. Це може бути 0,0 для вирівнювання по лівому краю, 0,5 для вирівнювання по центру та 1,0 для вирівнювання по правому краю."
# gui/game/gui.rpy:115
old "## The width, height, and borders of the box containing the character's name, or None to automatically size it."
new "## Ширина, висота та межі поля, що містять ім’я персонажа, або None, щоб автоматично змінити його розмір."
# gui/game/gui.rpy:120
old "## The borders of the box containing the character's name, in left, top, right, bottom order."
new "## Межі поля, що містять ім'я персонажа, у порядку зліва, зверху, справа, знизу."
# gui/game/gui.rpy:124
old "## If True, the background of the namebox will be tiled, if False, the background of the namebox will be scaled."
new "## Якщо True, фон поля імен буде мозаїкою, якщо False, фон вікна імен буде масштабовано."
# gui/game/gui.rpy:129
old "## The placement of dialogue relative to the textbox. These can be a whole number of pixels relative to the left or top side of the textbox, or 0.5 to center."
new "## Розташування діалогу відносно текстового поля. Це може бути ціла кількість пікселів відносно лівого чи верхнього краю текстового поля або 0,5 до центру."
# gui/game/gui.rpy:135
old "## The maximum width of dialogue text, in pixels."
new "## Максимальна ширина тексту діалогу в пікселях."
# gui/game/gui.rpy:138
old "## The horizontal alignment of the dialogue text. This can be 0.0 for left-aligned, 0.5 for centered, and 1.0 for right-aligned."
new "## Горизонтальне вирівнювання тексту діалогу. Це може бути 0,0 для вирівнювання по лівому краю, 0,5 для вирівнювання по центру та 1,0 для вирівнювання по правому краю."
# gui/game/gui.rpy:143
old "## Buttons"
new "## Кнопки"
# gui/game/gui.rpy:145
old "## These variables, along with the image files in gui/button, control aspects of how buttons are displayed."
new "## Ці змінні разом із файлами зображень у gui/button контролюють аспекти відображення кнопок."
# gui/game/gui.rpy:148
old "## The width and height of a button, in pixels. If None, Ren'Py computes a size."
new "## Ширина та висота кнопки в пікселях. Якщо немає, Ren'Py обчислює розмір."
# gui/game/gui.rpy:152
old "## The borders on each side of the button, in left, top, right, bottom order."
new "## Межі з кожного боку кнопки в порядку зліва, зверху, справа та знизу."
# gui/game/gui.rpy:155
old "## If True, the background image will be tiled. If False, the background image will be linearly scaled."
new "## Якщо True, фонове зображення буде мозаїчно. Якщо False, фонове зображення буде лінійно масштабовано."
# gui/game/gui.rpy:159
old "## The font used by the button."
new "## Шрифт, який використовується кнопкою."
# gui/game/gui.rpy:162
old "## The size of the text used by the button."
new "## Розмір тексту, який використовується кнопкою."
# gui/game/gui.rpy:165
old "## The color of button text in various states."
new "## Колір тексту кнопки в різних станах."
# gui/game/gui.rpy:171
old "## The horizontal alignment of the button text. (0.0 is left, 0.5 is center, 1.0 is right)."
new "## Горизонтальне вирівнювання тексту кнопки. (0,0 ліворуч, 0,5 центр, 1,0 праворуч)."
# gui/game/gui.rpy:176
old "## These variables override settings for different kinds of buttons. Please see the gui documentation for the kinds of buttons available, and what each is used for."
new "## Ці змінні перекривають налаштування для різних типів кнопок. Перегляньте документацію gui, щоб дізнатися про типи доступних кнопок і для чого кожна з них використовується."
# gui/game/gui.rpy:180
old "## These customizations are used by the default interface:"
new "## Ці налаштування використовуються стандартним інтерфейсом:"
# gui/game/gui.rpy:195
old "## You can also add your own customizations, by adding properly-named variables. For example, you can uncomment the following line to set the width of a navigation button."
new "## Ви також можете додати власні налаштування, додавши змінні з правильними назвами. Наприклад, ви можете розкоментувати наступний рядок, щоб встановити ширину кнопки навігації."
# gui/game/gui.rpy:202
old "## Choice Buttons"
new "## Кнопки вибору"
# gui/game/gui.rpy:204
old "## Choice buttons are used in the in-game menus."
new "## Кнопки вибору використовуються в ігрових меню."
# gui/game/gui.rpy:218
old "## File Slot Buttons"
new "## Кнопки слотів файлів"
# gui/game/gui.rpy:220
old "## A file slot button is a special kind of button. It contains a thumbnail image, and text describing the contents of the save slot. A save slot uses image files in gui/button, like the other kinds of buttons."
new "## Кнопка слота файлів — це особливий вид кнопки. Він містить ескіз зображення та текст, що описує вміст гнізда збереження. Слот збереження використовує файли зображень у gui/button, як і інші типи кнопок."
# gui/game/gui.rpy:224
old "## The save slot button."
new "## Кнопка збереження слота."
# gui/game/gui.rpy:234
old "## The width and height of thumbnails used by the save slots."
new "## Ці змінні керують розташуванням і відстанню між різними елементами інтерфейсу користувача."
# gui/game/gui.rpy:238
old "## The number of columns and rows in the grid of save slots."
new "## Ширина та висота мініатюр, що використовуються слотами для збереження."
# gui/game/gui.rpy:243
old "## Positioning and Spacing"
new "## Позиціонування та інтервали"
# gui/game/gui.rpy:245
old "## These variables control the positioning and spacing of various user interface elements."
new "## Ці змінні керують розташуванням і відстанню між різними елементами інтерфейсу користувача."
# gui/game/gui.rpy:248
old "## The position of the left side of the navigation buttons, relative to the left side of the screen."
new "## Розташування лівої сторони навігаційних кнопок відносно лівої сторони екрана."
# gui/game/gui.rpy:252
old "## The vertical position of the skip indicator."
new "## Вертикальна позиція індикатора пропуску."
# gui/game/gui.rpy:255
old "## The vertical position of the notify screen."
new "## Вертикальне положення екрана сповіщень."
# gui/game/gui.rpy:258
old "## The spacing between menu choices."
new "## Інтервал між пунктами меню."
# gui/game/gui.rpy:261
old "## Buttons in the navigation section of the main and game menus."
new "## Кнопки в розділі навігації головного та ігрового меню."
# gui/game/gui.rpy:264
old "## Controls the amount of spacing between preferences."
new "## Контролює розмір інтервалу між параметрами."
# gui/game/gui.rpy:267
old "## Controls the amount of spacing between preference buttons."
new "## Контролює відстань між кнопками налаштувань."
# gui/game/gui.rpy:270
old "## The spacing between file page buttons."
new "## Відстань між кнопками сторінки файлу."
# gui/game/gui.rpy:273
old "## The spacing between file slots."
new "## Відстань між слотами файлів."
# gui/game/gui.rpy:276
old "## The position of the main menu text."
new "## Позиція тексту головного меню."
# gui/game/gui.rpy:280
old "## Frames"
new "## Рамки"
# gui/game/gui.rpy:282
old "## These variables control the look of frames that can contain user interface components when an overlay or window is not present."
new "## Ці змінні керують виглядом рамок, що можуть містити компоненти інтерфейсу користувача, коли накладання або вікно відсутні."
# gui/game/gui.rpy:285
old "## Generic frames."
new "## Загальні рамки."
# gui/game/gui.rpy:288
old "## The frame that is used as part of the confirm screen."
new "## Рамка, яка використовується як частина екрана підтвердження."
# gui/game/gui.rpy:291
old "## The frame that is used as part of the skip screen."
new "## Рамка, який використовується як частина екрана пропуску."
# gui/game/gui.rpy:294
old "## The frame that is used as part of the notify screen."
new "## Рамка, яка використовується як частина екрана сповіщень."
# gui/game/gui.rpy:297
old "## Should frame backgrounds be tiled?"
new "## Чи слід фонові рамки розміщувати плиткою?"
# gui/game/gui.rpy:301
old "## Bars, Scrollbars, and Sliders"
new "## Панелі, смуги прокрутки та повзунки"
# gui/game/gui.rpy:303
old "## These control the look and size of bars, scrollbars, and sliders."
new "## Це керує виглядом і розміром смуг, смуг прокрутки та повзунків."
# gui/game/gui.rpy:305
old "## The default GUI only uses sliders and vertical scrollbars. All of the other bars are only used in creator-written screens."
new "## GUI за замовчуванням використовує лише повзунки та вертикальні смуги прокручування. Усі інші смужки використовуються лише на екранах, написаних автором."
# gui/game/gui.rpy:308
old "## The height of horizontal bars, scrollbars, and sliders. The width of vertical bars, scrollbars, and sliders."
new "## Висота горизонтальних смуг, смуг прокрутки та повзунків. Ширина вертикальних смуг, смуг прокручування та повзунків."
# gui/game/gui.rpy:314
old "## True if bar images should be tiled. False if they should be linearly scaled."
new "## True якщо зображення панелей мають бути мозаїками. False, якщо вони повинні бути лінійно масштабовані."
# gui/game/gui.rpy:319
old "## Horizontal borders."
new "## Горизонтальні межі."
# gui/game/gui.rpy:324
old "## Vertical borders."
new "## Вертикальні межі."
# gui/game/gui.rpy:329
old "## What to do with unscrollable scrollbars in the gui. \"hide\" hides them, while None shows them."
new "## Що робити з непрокручуваними смугами прокручування в gui. \"hide\" приховує їх, а «Нічого» показує їх."
# gui/game/gui.rpy:334
old "## History"
new "## Історія"
# gui/game/gui.rpy:336
old "## The history screen displays dialogue that the player has already dismissed."
new "## На екрані історії відображається діалог, який гравець уже закрив."
# gui/game/gui.rpy:338
old "## The number of blocks of dialogue history Ren'Py will keep."
new "## Кількість блоків історії діалогів, яких Ren'Py збереже."
# gui/game/gui.rpy:341
old "## The height of a history screen entry, or None to make the height variable at the cost of performance."
new "## Висота запису на екрані історії або «Нічого», щоб зробити висоту змінною за рахунок продуктивності."
# gui/game/gui.rpy:345
old "## The position, width, and alignment of the label giving the name of the speaking character."
new "## Положення, ширина та вирівнювання мітки, що вказує ім’я персонажа, що говорить."
# gui/game/gui.rpy:352
old "## The position, width, and alignment of the dialogue text."
new "## Позиція, ширина та вирівнювання тексту діалогу."
# gui/game/gui.rpy:359
old "## NVL-Mode"
new "## Режим NVL"
# gui/game/gui.rpy:361
old "## The NVL-mode screen displays the dialogue spoken by NVL-mode characters."
new "## На екрані режиму NVL відображається діалог, який вимовляють персонажі режиму NVL."
# gui/game/gui.rpy:363
old "## The borders of the background of the NVL-mode background window."
new "## Межі фону заднього плану режиму NVL."
# gui/game/gui.rpy:366
old "## The maximum number of NVL-mode entries Ren'Py will display. When more entries than this are to be show, the oldest entry will be removed."
new "## Ren'Py відобразить максимальну кількість записів у режимі NVL. Якщо потрібно показати більше записів, найстаріший запис буде видалено."
# gui/game/gui.rpy:370
old "## The height of an NVL-mode entry. Set this to None to have the entries dynamically adjust height."
new "## Висота запису в режимі NVL. Встановіть значення None, щоб записи динамічно регулювали висоту."
# gui/game/gui.rpy:374
old "## The spacing between NVL-mode entries when gui.nvl_height is None, and between NVL-mode entries and an NVL-mode menu."
new "## Інтервал між записами режиму NVL, коли gui.nvl_height має значення None, і між записами режиму NVL і меню режиму NVL."
# gui/game/gui.rpy:391
old "## The position, width, and alignment of nvl_thought text (the text said by the nvl_narrator character.)"
new "## Положення, ширина та вирівнювання тексту nvl_thought (тексту, який вимовляє персонаж nvl_narrator.)"
# gui/game/gui.rpy:398
old "## The position of nvl menu_buttons."
new "## Позиціонування nvl menu_buttons."
# gui/game/gui.rpy:402
old "## Localization"
new "## Локалізація"
# gui/game/gui.rpy:404
old "## This controls where a line break is permitted. The default is suitable for most languages. A list of available values can be found at https://www.renpy.org/doc/html/style_properties.html#style-property-language"
new "## Це визначає, де дозволений розрив рядка. Стандартне значення підходить для більшості мов. Список доступних значень можна знайти за адресою https://www.renpy.org/doc/html/style_properties.html#style-property-language"
# gui/game/gui.rpy:412
old "## Mobile devices"
new "## Мобільні пристрої"
# gui/game/gui.rpy:417
old "## This increases the size of the quick buttons to make them easier to touch on tablets and phones."
new "## Це збільшує розмір швидких кнопок, щоб їх було легше торкатися на планшетах і телефонах."
# gui/game/gui.rpy:424
old "## This changes the size and spacing of various GUI elements to ensure they are easily visible on phones."
new "## Це змінює розмір і відстань між різними елементами gui, щоб вони були видимими на телефонах."
# gui/game/gui.rpy:429
old "## Font sizes."
new "## Розміри шрифту"
# gui/game/gui.rpy:437
old "## Adjust the location of the textbox."
new "## Налаштунки розташування текстового поля."
# gui/game/gui.rpy:443
old "## Change the size and spacing of various things."
new "## Зміна розміру і відстані між різними речами."
# gui/game/gui.rpy:457
old "## File button layout."
new "## Макет кнопки файлу."
# gui/game/gui.rpy:461
old "## NVL-mode."
new "## NVL-режим."
File diff suppressed because it is too large Load Diff
+199
View File
@@ -0,0 +1,199 @@
translate ukrainian strings:
# gui/game/options.rpy:1
old "## This file contains options that can be changed to customize your game."
new "## Цей файл містить параметри, які можна змінити, щоб налаштувати гру."
# gui/game/options.rpy:4
old "## Lines beginning with two '#' marks are comments, and you shouldn't uncomment them. Lines beginning with a single '#' mark are commented-out code, and you may want to uncomment them when appropriate."
new "## Рядки, що починаються з двох позначок «#», є коментарями, і ви не повинні розкоментувати їх. Рядки, що починаються з одного знака «#», є закоментованим кодом, і ви можете за потреби розкоментувати їх."
# gui/game/options.rpy:10
old "## Basics"
new "## Основи"
# gui/game/options.rpy:12
old "## A human-readable name of the game. This is used to set the default window title, and shows up in the interface and error reports."
new "## Зрозуміла назва гри. Це використовується для встановлення заголовка вікна за замовчуванням і відображається в інтерфейсі та звітах про помилки."
# gui/game/options.rpy:15
old "## The _() surrounding the string marks it as eligible for translation."
new "## _() навколо рядка позначає його як придатний для перекладу."
# gui/game/options.rpy:17
old "Ren'Py 7 Default GUI"
new "Графічний інтерфейс Ren'Py 7 за замовчуванням"
# gui/game/options.rpy:20
old "## Determines if the title given above is shown on the main menu screen. Set this to False to hide the title."
new "## Визначає, чи заголовок, наведений вище, відображається на екрані головного меню. Встановіть значення False, щоб приховати назву."
# gui/game/options.rpy:26
old "## The version of the game."
new "## Версія гри."
# gui/game/options.rpy:31
old "## Text that is placed on the game's about screen. Place the text between the triple-quotes, and leave a blank line between paragraphs."
new "## Текст, який розміщується на екрані інформації про гру. Поставте текст між потрійними лапками, а між абзацами залиште порожній рядок."
# gui/game/options.rpy:38
old "## A short name for the game used for executables and directories in the built distribution. This must be ASCII-only, and must not contain spaces, colons, or semicolons."
new "## Коротка назва гри, яка використовується для виконуваних файлів і каталогів у вбудованому дистрибутиві. Це має бути лише ASCII і не повинно містити пробілів, двокрапки чи крапки з комою."
# gui/game/options.rpy:45
old "## Sounds and music"
new "## Звуки і музика"
# gui/game/options.rpy:47
old "## These three variables control, among other things, which mixers are shown to the player by default. Setting one of these to False will hide the appropriate mixer."
new "## Ці три змінні керують, серед іншого, тим, які міксери відображаються гравцеві за замовчуванням. Встановлення для одного з них значення False приховає відповідний мікшер."
# gui/game/options.rpy:56
old "## To allow the user to play a test sound on the sound or voice channel, uncomment a line below and use it to set a sample sound to play."
new "## Щоб дозволити користувачеві відтворювати тестовий звук на звуковому або голосовому каналі, розкоментуйте рядок нижче та використовуйте його, щоб встановити зразок звуку для відтворення."
# gui/game/options.rpy:63
old "## Uncomment the following line to set an audio file that will be played while the player is at the main menu. This file will continue playing into the game, until it is stopped or another file is played."
new "## Розкоментуйте наступний рядок, щоб налаштувати аудіофайл, який відтворюватиметься, коли плеєр перебуває в головному меню. Цей файл продовжуватиме відтворюватися в грі, доки його не буде зупинено або не буде відтворено інший файл."
# gui/game/options.rpy:70
old "## Transitions"
new "## Переходи"
# gui/game/options.rpy:72
old "## These variables set transitions that are used when certain events occur. Each variable should be set to a transition, or None to indicate that no transition should be used."
new "## Ці змінні встановлюють переходи, які використовуються, коли відбуваються певні події. Кожна змінна має бути встановлена на перехід або None, щоб вказати, що перехід не слід використовувати."
# gui/game/options.rpy:76
old "## Entering or exiting the game menu."
new "## Вхід або вихід з меню гри."
# gui/game/options.rpy:82
old "## Between screens of the game menu."
new "## Між екранами меню гри"
# gui/game/options.rpy:87
old "## A transition that is used after a game has been loaded."
new "## Перехід, що використовується після завантаження гри."
# gui/game/options.rpy:92
old "## Used when entering the main menu after the game has ended."
new "## Використовується під час входу в головне меню після завершення гри."
# gui/game/options.rpy:97
old "## A variable to set the transition used when the game starts does not exist. Instead, use a with statement after showing the initial scene."
new "## Змінна для встановлення переходу, який використовується під час запуску гри, не існує. Замість цього використовуйте оператор with після показу початкової сцени."
# gui/game/options.rpy:102
old "## Window management"
new "## Керування вікнами"
# gui/game/options.rpy:104
old "## This controls when the dialogue window is displayed. If \"show\", it is always displayed. If \"hide\", it is only displayed when dialogue is present. If \"auto\", the window is hidden before scene statements and shown again once dialogue is displayed."
new "## Цей параметр визначає час відображення діалогового вікна. Якщо \"show\", він завжди відображається. Якщо \"hide\", воно відображається лише за наявності діалогу. Якщо \"auto\", вікно буде приховано перед операторами сцени та показано знову, коли відобразиться діалог."
# gui/game/options.rpy:109
old "## After the game has started, this can be changed with the \"window show\", \"window hide\", and \"window auto\" statements."
new "## Після початку гри це можна змінити за допомогою операторів \"window show\", \"window hide\" і \"window auto\"."
# gui/game/options.rpy:115
old "## Transitions used to show and hide the dialogue window"
new "## Переходи, які використовуються для показу та приховування діалогового вікна"
# gui/game/options.rpy:121
old "## Preference defaults"
new "## Параметри за замовчуванням"
# gui/game/options.rpy:123
old "## Controls the default text speed. The default, 0, is infinite, while any other number is the number of characters per second to type out."
new "## Керує швидкістю тексту за замовчуванням. За замовчуванням, 0, є нескінченним, тоді як будь-яке інше число означає кількість символів за секунду, які потрібно ввести."
# gui/game/options.rpy:129
old "## The default auto-forward delay. Larger numbers lead to longer waits, with 0 to 30 being the valid range."
new "## Затримка автоматичного пересилання за замовчуванням. Більші числа призводять до довшого очікування, при цьому допустимим діапазоном є від 0 до 30."
# gui/game/options.rpy:135
old "## Save directory"
new "## Зберегти каталог"
# gui/game/options.rpy:137
old "## Controls the platform-specific place Ren'Py will place the save files for this game. The save files will be placed in:"
new "## Контролює місце, де Ren'Py буде розміщувати файли збереження для цієї гри. Файли збереження будуть розміщені в:"
# gui/game/options.rpy:140
old "## Windows: %APPDATA\\RenPy\\<config.save_directory>"
new "## Windows: %APPDATA\\RenPy\\<config.save_directory>"
# gui/game/options.rpy:142
old "## Macintosh: $HOME/Library/RenPy/<config.save_directory>"
new "## Macintosh: $HOME/Library/RenPy/<config.save_directory>"
# gui/game/options.rpy:144
old "## Linux: $HOME/.renpy/<config.save_directory>"
new "## Linux: $HOME/.renpy/<config.save_directory>"
# gui/game/options.rpy:146
old "## This generally should not be changed, and if it is, should always be a literal string, not an expression."
new "## Як правило, це не слід змінювати, і якщо це так, завжди має бути літеральний рядок, а не вираз."
# gui/game/options.rpy:152
old "## Icon"
new "## Значок"
# gui/game/options.rpy:154
old "## The icon displayed on the taskbar or dock."
new "## Значок, що відображається на панелі завдань або док-станції."
# gui/game/options.rpy:159
old "## Build configuration"
new "## Створити конфігурацію"
# gui/game/options.rpy:161
old "## This section controls how Ren'Py turns your project into distribution files."
new "## Цей розділ керує тим, як Ren'Py перетворює ваш проєкт у файли розповсюдження."
# gui/game/options.rpy:166
old "## The following functions take file patterns. File patterns are case- insensitive, and matched against the path relative to the base directory, with and without a leading /. If multiple patterns match, the first is used."
new "## Наступні функції приймають шаблони файлів. Шаблони файлів не чутливі до регістру та зіставляються зі шляхом відносно основного каталогу, з / без нього на початку. Якщо збігається декілька шаблонів, використовується перший."
# gui/game/options.rpy:171
old "## In a pattern:"
new "## У шаблоні:"
# gui/game/options.rpy:173
old "## / is the directory separator."
new "## / є роздільником каталогу."
# gui/game/options.rpy:175
old "## * matches all characters, except the directory separator."
new "## * відповідає всім символам, крім роздільника каталогу."
# gui/game/options.rpy:177
old "## ** matches all characters, including the directory separator."
new "## ** відповідає всім символам, включаючи роздільник каталогу."
# gui/game/options.rpy:179
old "## For example, \"*.txt\" matches txt files in the base directory, \"game/**.ogg\" matches ogg files in the game directory or any of its subdirectories, and \"**.psd\" matches psd files anywhere in the project."
new "## Наприклад, \"*.txt\" відповідає файлам txt у базовому каталозі, \"game/**.ogg\" відповідає файлам ogg у каталозі гри або будь-якому з його підкаталогів, а \"**.psd \" відповідає файлам psd будь-де в проєкті."
# gui/game/options.rpy:183
old "## Classify files as None to exclude them from the built distributions."
new "## Класифікуйте файли як None, щоб виключити їх із вбудованих дистрибутивів."
# gui/game/options.rpy:191
old "## To archive files, classify them as 'archive'."
new "## Щоб архівувати файли, класифікуйте їх як 'archive'."
# gui/game/options.rpy:196
old "## Files matching documentation patterns are duplicated in a mac app build, so they appear in both the app and the zip file."
new "## Файли, що відповідають шаблонам документації, дублюються у створенні програми Mac, тому вони з’являються як у програмі, так і в zip-файлі."
# gui/game/options.rpy:203
old "## A Google Play license key is required to download expansion files and perform in-app purchases. It can be found on the \"Services & APIs\" page of the Google Play developer console."
new "## Для завантаження файлів розширення та здійснення покупок у програмі потрібен ліцензійний ключ Google Play. Його можна знайти на сторінці \"Services & APIs\" консолі розробника Google Play."
# gui/game/options.rpy:210
old "## The username and project name associated with an itch.io project, separated by a slash."
new "## Ім’я користувача та назва проєкту, пов’язані з проєктом itch.io, розділені скісною рискою."
+655
View File
@@ -0,0 +1,655 @@
translate ukrainian strings:
# gui/game/screens.rpy:9
old "## Styles"
new "## Стилі"
# gui/game/screens.rpy:81
old "## In-game screens"
new "## Екрани в грі"
# gui/game/screens.rpy:85
old "## Say screen"
new "## Екран розмови"
# gui/game/screens.rpy:87
old "## The say screen is used to display dialogue to the player. It takes two parameters, who and what, which are the name of the speaking character and the text to be displayed, respectively. (The who parameter can be None if no name is given.)"
new "## Екран say використовується для відображення діалогу гравцеві. Він приймає два параметри, хто і що, ім'я персонажа, що говорить, і текст, який буде відображатися відповідно. (Параметр who може мати значення None, якщо ім’я не вказано.)"
# gui/game/screens.rpy:92
old "## This screen must create a text displayable with id \"what\", as Ren'Py uses this to manage text display. It can also create displayables with id \"who\" and id \"window\" to apply style properties."
new "## Цей екран має створювати текст, який можна відображати з ідентифікатором \"what\", оскільки Ren'Py використовує це для керування відображенням тексту. Він також може створювати відображувані елементи з ідентифікаторами \"who\" та ідентифікаторами \"window\" для застосування властивостей стилю."
# gui/game/screens.rpy:96
old "## https://www.renpy.org/doc/html/screen_special.html#say"
new "## https://www.renpy.org/doc/html/screen_special.html#say"
# gui/game/screens.rpy:114
old "## If there's a side image, display it above the text. Do not display on the phone variant - there's no room."
new "## Якщо є зображення збоку, відобразіть його над текстом. Не відображати на телефоні як варіант - немає місця."
# gui/game/screens.rpy:120
old "## Make the namebox available for styling through the Character object."
new "## Робить поле імен доступним для стилізації через об'єкт Character."
# gui/game/screens.rpy:165
old "## Input screen"
new "## Екран введення"
# gui/game/screens.rpy:167
old "## This screen is used to display renpy.input. The prompt parameter is used to pass a text prompt in."
new "## Цей екран використовується для відображення renpy.input. Параметр prompt використовується для передачі текстової підказки."
# gui/game/screens.rpy:170
old "## This screen must create an input displayable with id \"input\" to accept the various input parameters."
new "## Цей екран має створити відображуваний вхід з ідентифікатором \"input\" для прийняття різних вхідних параметрів."
# gui/game/screens.rpy:173
old "## https://www.renpy.org/doc/html/screen_special.html#input"
new "## https://www.renpy.org/doc/html/screen_special.html#input"
# gui/game/screens.rpy:200
old "## Choice screen"
new "## Екран вибору"
# gui/game/screens.rpy:202
old "## This screen is used to display the in-game choices presented by the menu statement. The one parameter, items, is a list of objects, each with caption and action fields."
new "## Цей екран використовується для відображення вибору в грі, представленого командою 'menu'. Один параметр, 'items', — це список об’єктів, кожен із полями заголовка та дії."
# gui/game/screens.rpy:206
old "## https://www.renpy.org/doc/html/screen_special.html#choice"
new "## https://www.renpy.org/doc/html/screen_special.html#choice"
# gui/game/screens.rpy:234
old "## Quick Menu screen"
new "## Екран швидкого меню"
# gui/game/screens.rpy:236
old "## The quick menu is displayed in-game to provide easy access to the out-of-game menus."
new "## Швидке меню відображається в грі, щоб забезпечити легкий доступ до меню поза грою."
# gui/game/screens.rpy:241
old "## Ensure this appears on top of other screens."
new "## Переконайтеся, що це відображається поверх інших екранів."
# gui/game/screens.rpy:252
old "Back"
new "Назад"
# gui/game/screens.rpy:253
old "History"
new "Історія"
# gui/game/screens.rpy:254
old "Skip"
new "Пропустити"
# gui/game/screens.rpy:255
old "Auto"
new "Авто"
# gui/game/screens.rpy:256
old "Save"
new "Зберегти"
# gui/game/screens.rpy:257
old "Q.Save"
new "Ш.Зберегти"
# gui/game/screens.rpy:258
old "Q.Load"
new "Ш.Завантажити"
# gui/game/screens.rpy:259
old "Prefs"
new "Опції"
# gui/game/screens.rpy:262
old "## This code ensures that the quick_menu screen is displayed in-game, whenever the player has not explicitly hidden the interface."
new "## Цей код гарантує, що екран quick_menu відображається в грі, якщо гравець явно не приховав інтерфейс."
# gui/game/screens.rpy:280
old "## Main and Game Menu Screens"
new "## Екрани головного та ігрового меню"
# gui/game/screens.rpy:283
old "## Navigation screen"
new "## Екран навігації"
# gui/game/screens.rpy:285
old "## This screen is included in the main and game menus, and provides navigation to other menus, and to start the game."
new "## Цей екран включено в головне та ігрове меню та забезпечує навігацію до інших меню та початок гри."
# gui/game/screens.rpy:300
old "Start"
new "Почати"
# gui/game/screens.rpy:308
old "Load"
new "Завантажити"
# gui/game/screens.rpy:310
old "Preferences"
new "Налаштування"
# gui/game/screens.rpy:314
old "End Replay"
new "Кінець повтору"
# gui/game/screens.rpy:318
old "Main Menu"
new "Головне меню"
# gui/game/screens.rpy:320
old "About"
new "Про гру"
# gui/game/screens.rpy:324
old "## Help isn't necessary or relevant to mobile devices."
new "## Допомога не є необхідною або актуальною для мобільних пристроїв."
# gui/game/screens.rpy:325
old "Help"
new "Довідка"
# gui/game/screens.rpy:329
old "## The quit button is banned on iOS and unnecessary on Android and Web."
new "## Кнопка виходу заборонена на iOS і непотрібна на Android і в Веб."
# gui/game/screens.rpy:330
old "Quit"
new "Вийти"
# gui/game/screens.rpy:344
old "## Main Menu screen"
new "## Екран головного меню"
# gui/game/screens.rpy:346
old "## Used to display the main menu when Ren'Py starts."
new "## Використовується для відображення головного меню під час запуску Ren'Py."
# gui/game/screens.rpy:348
old "## https://www.renpy.org/doc/html/screen_special.html#main-menu"
new "## https://www.renpy.org/doc/html/screen_special.html#main-menu"
# gui/game/screens.rpy:352
old "## This ensures that any other menu screen is replaced."
new "## Це гарантує, що будь-який інший екран меню буде замінено."
# gui/game/screens.rpy:357
old "## This empty frame darkens the main menu."
new "## Ця порожня рамка затемнює головне меню."
# gui/game/screens.rpy:361
old "## The use statement includes another screen inside this one. The actual contents of the main menu are in the navigation screen."
new "## Інструкція використання включає інший екран всередині цього. Фактичний вміст головного меню знаходиться на екрані навігації."
# gui/game/screens.rpy:406
old "## Game Menu screen"
new "## Екран меню гри"
# gui/game/screens.rpy:408
old "## This lays out the basic common structure of a game menu screen. It's called with the screen title, and displays the background, title, and navigation."
new "## Це описує базову структуру екрана меню гри. Він викликається за допомогою заголовка екрана та відображає фон, заголовок і навігацію."
# gui/game/screens.rpy:411
old "## The scroll parameter can be None, or one of \"viewport\" or \"vpgrid\". When this screen is intended to be used with one or more children, which are transcluded (placed) inside it."
new "## Параметр прокручування може бути None або одним із \"viewport\" чи \"vpgrid\". Коли цей екран призначений для використання з одним або декількома об'єктами, які включені (розміщені) всередині нього."
# gui/game/screens.rpy:429
old "## Reserve space for the navigation section."
new "## Зарезервуйте місце для розділу навігації."
# gui/game/screens.rpy:471
old "Return"
new "Повернутися"
# gui/game/screens.rpy:534
old "## About screen"
new "## Про екран"
# gui/game/screens.rpy:536
old "## This screen gives credit and copyright information about the game and Ren'Py."
new "## Цей екран містить інформацію про авторство та авторські права щодо гри та Ren'Py."
# gui/game/screens.rpy:539
old "## There's nothing special about this screen, and hence it also serves as an example of how to make a custom screen."
new "## У цьому екрані немає нічого особливого, тому він також служить прикладом того, як створити власний екран."
# gui/game/screens.rpy:546
old "## This use statement includes the game_menu screen inside this one. The vbox child is then included inside the viewport inside the game_menu screen."
new "## Цей оператор використання включає екран game_menu всередині цього. Потім дочірній елемент vbox включається в область перегляду всередині екрана game_menu."
# gui/game/screens.rpy:556
old "Version [config.version!t]\n"
new "Версія [config.version!t]\n"
# gui/game/screens.rpy:558
old "## gui.about is usually set in options.rpy."
new "## gui.about зазвичай встановлюється в options.rpy."
# gui/game/screens.rpy:562
old "Made with {a=https://www.renpy.org/}Ren'Py{/a} [renpy.version_only].\n\n[renpy.license!t]"
new "Створено за допомогою {a=https://www.renpy.org/}Ren'Py{/a} [renpy.version_only].\n\n[renpy.license!t]"
# gui/game/screens.rpy:573
old "## Load and Save screens"
new "## Екрани завантаження та збереження"
# gui/game/screens.rpy:575
old "## These screens are responsible for letting the player save the game and load it again. Since they share nearly everything in common, both are implemented in terms of a third screen, file_slots."
new "## Ці екрани дозволяють гравцеві зберегти гру та завантажити її знову. Оскільки вони мають майже все спільне, обидва реалізовані в термінах третього екрана, file_slots."
# gui/game/screens.rpy:579
old "## https://www.renpy.org/doc/html/screen_special.html#save https://www.renpy.org/doc/html/screen_special.html#load"
new "## https://www.renpy.org/doc/html/screen_special.html#save https://www.renpy.org/doc/html/screen_special.html#load"
# gui/game/screens.rpy:598
old "Page {}"
new "Сторінка {}"
# gui/game/screens.rpy:598
old "Automatic saves"
new "Авто збереження"
# gui/game/screens.rpy:598
old "Quick saves"
new "Швидкі збереження"
# gui/game/screens.rpy:604
old "## This ensures the input will get the enter event before any of the buttons do."
new "## Це гарантує, що введення отримає подію enter раніше, ніж будь-яка кнопка."
# gui/game/screens.rpy:608
old "## The page name, which can be edited by clicking on a button."
new "## Назва сторінки, яку можна редагувати, натиснувши кнопку."
# gui/game/screens.rpy:620
old "## The grid of file slots."
new "## Сітка слотів для файлів."
# gui/game/screens.rpy:640
old "{#file_time}%A, %B %d %Y, %H:%M"
new "{#file_time}%A, %B %d %Y, %H:%M"
# gui/game/screens.rpy:640
old "empty slot"
new "порожній слот"
# gui/game/screens.rpy:648
old "## Buttons to access other pages."
new "## Кнопки для доступу до інших сторінок."
# gui/game/screens.rpy:657
old "<"
new "<"
# gui/game/screens.rpy:660
old "{#auto_page}A"
new "{#auto_page}A"
# gui/game/screens.rpy:663
old "{#quick_page}Q"
new "{#quick_page}Ш"
# gui/game/screens.rpy:665
old "## range(1, 10) gives the numbers from 1 to 9."
new "## діапазон(1, 10) дає числа від 1 до 9."
# gui/game/screens.rpy:669
old ">"
new ">"
# gui/game/screens.rpy:704
old "## Preferences screen"
new "## Екран налаштувань"
# gui/game/screens.rpy:706
old "## The preferences screen allows the player to configure the game to better suit themselves."
new "## Екран налаштувань дозволяє гравцеві налаштувати гру на свій смак."
# gui/game/screens.rpy:709
old "## https://www.renpy.org/doc/html/screen_special.html#preferences"
new "## https://www.renpy.org/doc/html/screen_special.html#preferences"
# gui/game/screens.rpy:726
old "Display"
new "Дисплей"
# gui/game/screens.rpy:727
old "Window"
new "Вікно"
# gui/game/screens.rpy:728
old "Fullscreen"
new "На весь екран"
# gui/game/screens.rpy:733
old "Unseen Text"
new "Невидимий текст"
# gui/game/screens.rpy:734
old "After Choices"
new "Після виборів"
# gui/game/screens.rpy:735
old "Transitions"
new "Переходи"
# gui/game/screens.rpy:737
old "## Additional vboxes of type \"radio_pref\" or \"check_pref\" can be added here, to add additional creator-defined preferences."
new "## Сюди можна долучити додаткові вікна vbox типу \"radio_pref\" або \"check_pref\", щоб долучити додаткові параметри, визначені творцем."
# gui/game/screens.rpy:748
old "Text Speed"
new "Швидкість тексту"
# gui/game/screens.rpy:752
old "Auto-Forward Time"
new "Час авто-переадресації"
# gui/game/screens.rpy:759
old "Music Volume"
new "Гучність музики"
# gui/game/screens.rpy:766
old "Sound Volume"
new "Гучність звуку"
# gui/game/screens.rpy:772
old "Test"
new "Тест"
# gui/game/screens.rpy:776
old "Voice Volume"
new "Гучність голосу"
# gui/game/screens.rpy:787
old "Mute All"
new "Без звуку"
# gui/game/screens.rpy:863
old "## History screen"
new "## Екран історії"
# gui/game/screens.rpy:865
old "## This is a screen that displays the dialogue history to the player. While there isn't anything special about this screen, it does have to access the dialogue history stored in _history_list."
new "## Це екран, на якому гравцеві відображається історія діалогів. Хоча в цьому екрані немає нічого особливого, він має доступ до історії діалогів, що зберігається в _history_list."
# gui/game/screens.rpy:869
old "## https://www.renpy.org/doc/html/history.html"
new "## https://www.renpy.org/doc/html/history.html"
# gui/game/screens.rpy:875
old "## Avoid predicting this screen, as it can be very large."
new "## Уникайте прогнозування цього екрана, оскільки він може бути дуже великим."
# gui/game/screens.rpy:886
old "## This lays things out properly if history_height is None."
new "## Це правильно розкладає речі, якщо history_height дорівнює None."
# gui/game/screens.rpy:896
old "## Take the color of the who text from the Character, if set."
new "## Взяти колір тексту що від персонажа, якщо встановлено."
# gui/game/screens.rpy:905
old "The dialogue history is empty."
new "Історія діалогу порожня."
# gui/game/screens.rpy:908
old "## This determines what tags are allowed to be displayed on the history screen."
new "## Це визначає теги, які можна відображати на екрані історії."
# gui/game/screens.rpy:953
old "## Help screen"
new "## Екран довідки"
# gui/game/screens.rpy:955
old "## A screen that gives information about key and mouse bindings. It uses other screens (keyboard_help, mouse_help, and gamepad_help) to display the actual help."
new "## Екран, що надає інформацію про прив’язку клавіш і миші. Він використовує інші екрани (keyboard_help, mouse_help і gamepad_help), щоб відобразити фактичну довідку."
# gui/game/screens.rpy:974
old "Keyboard"
new "Клавіатура"
# gui/game/screens.rpy:975
old "Mouse"
new "Мишка"
# gui/game/screens.rpy:978
old "Gamepad"
new "Геймпад"
# gui/game/screens.rpy:991
old "Enter"
new "Enter"
# gui/game/screens.rpy:992
old "Advances dialogue and activates the interface."
new "Розвиває діалог і активує інтерфейс."
# gui/game/screens.rpy:995
old "Space"
new "Space"
# gui/game/screens.rpy:996
old "Advances dialogue without selecting choices."
new "Просуває діалог без вибору варіантів."
# gui/game/screens.rpy:999
old "Arrow Keys"
new "Клавіші cтрілок"
# gui/game/screens.rpy:1000
old "Navigate the interface."
new "Навігація по інтерфейсу."
# gui/game/screens.rpy:1003
old "Escape"
new "Escape"
# gui/game/screens.rpy:1004
old "Accesses the game menu."
new "Доступ до меню гри."
# gui/game/screens.rpy:1007
old "Ctrl"
new "Ctrl"
# gui/game/screens.rpy:1008
old "Skips dialogue while held down."
new "Пропускає діалог при утриманні."
# gui/game/screens.rpy:1011
old "Tab"
new "Tab"
# gui/game/screens.rpy:1012
old "Toggles dialogue skipping."
new "Вмикає пропуск діалогу."
# gui/game/screens.rpy:1015
old "Page Up"
new "Page Up"
# gui/game/screens.rpy:1016
old "Rolls back to earlier dialogue."
new "Відкат до попереднього діалогу."
# gui/game/screens.rpy:1019
old "Page Down"
new "Page Down"
# gui/game/screens.rpy:1020
old "Rolls forward to later dialogue."
new "Перехід до наступного діалогу."
# gui/game/screens.rpy:1024
old "Hides the user interface."
new "Приховує інтерфейс користувача."
# gui/game/screens.rpy:1028
old "Takes a screenshot."
new "Робить скріншот."
# gui/game/screens.rpy:1032
old "Toggles assistive {a=https://www.renpy.org/l/voicing}self-voicing{/a}."
new "Вмикає допоміжне {a=https://www.renpy.org/l/voicing}самоозвучення{/a}."
# gui/game/screens.rpy:1036
old "Opens the accessibility menu."
new "Відкриває меню спеціальних можливостей."
# gui/game/screens.rpy:1042
old "Left Click"
new "Лівий клік"
# gui/game/screens.rpy:1046
old "Middle Click"
new "Середній клік"
# gui/game/screens.rpy:1050
old "Right Click"
new "Правий клік"
# gui/game/screens.rpy:1054
old "Mouse Wheel Up\nClick Rollback Side"
new "Колесо миші вгору\nбік повернення назад"
# gui/game/screens.rpy:1058
old "Mouse Wheel Down"
new "Колесо миші вниз"
# gui/game/screens.rpy:1065
old "Right Trigger\nA/Bottom Button"
new "Правий тригер\nA/нижня кнопка"
# gui/game/screens.rpy:1069
old "Left Trigger\nLeft Shoulder"
new "Лівий тригер\nЛіве плече"
# gui/game/screens.rpy:1073
old "Right Shoulder"
new "Праве плече"
# gui/game/screens.rpy:1078
old "D-Pad, Sticks"
new "D-Pad, стіки"
# gui/game/screens.rpy:1082
old "Start, Guide"
new "Старт, Гайд"
# gui/game/screens.rpy:1086
old "Y/Top Button"
new "Кнопка Y/Top"
# gui/game/screens.rpy:1089
old "Calibrate"
new "Калібрувати"
# gui/game/screens.rpy:1117
old "## Additional screens"
new "## Додаткові екрани"
# gui/game/screens.rpy:1121
old "## Confirm screen"
new "## Екран підтвердження"
# gui/game/screens.rpy:1123
old "## The confirm screen is called when Ren'Py wants to ask the player a yes or no question."
new "## Екран підтвердження викликається, коли Ren'Py хоче поставити гравцеві запитання «так» або «ні»."
# gui/game/screens.rpy:1126
old "## https://www.renpy.org/doc/html/screen_special.html#confirm"
new "## https://www.renpy.org/doc/html/screen_special.html#confirm"
# gui/game/screens.rpy:1130
old "## Ensure other screens do not get input while this screen is displayed."
new "## Переконайтеся, що інші екрани не отримують введення, поки відображається цей екран."
# gui/game/screens.rpy:1154
old "Yes"
new "Так"
# gui/game/screens.rpy:1155
old "No"
new "Ні"
# gui/game/screens.rpy:1157
old "## Right-click and escape answer \"no\"."
new "## Клацніть правою кнопкою миші та вийдіть із відповіді \"no\"."
# gui/game/screens.rpy:1184
old "## Skip indicator screen"
new "## Екран індикатора пропуску"
# gui/game/screens.rpy:1186
old "## The skip_indicator screen is displayed to indicate that skipping is in progress."
new "## Екран skip_indicator відображається, щоб вказати, що триває пропуск."
# gui/game/screens.rpy:1189
old "## https://www.renpy.org/doc/html/screen_special.html#skip-indicator"
new "## https://www.renpy.org/doc/html/screen_special.html#skip-indicator"
# gui/game/screens.rpy:1201
old "Skipping"
new "Пропуск"
# gui/game/screens.rpy:1208
old "## This transform is used to blink the arrows one after another."
new "## Це перетворення використовується для миготіння стрілок одна за одною."
# gui/game/screens.rpy:1235
old "## We have to use a font that has the BLACK RIGHT-POINTING SMALL TRIANGLE glyph in it."
new "## Ми повинні використовувати шрифт із гліфом МАЛЕНЬКИЙ ЧОРНИЙ ТРИКУТНИК ВПРАВО."
# gui/game/screens.rpy:1240
old "## Notify screen"
new "## Екран сповіщень"
# gui/game/screens.rpy:1242
old "## The notify screen is used to show the player a message. (For example, when the game is quicksaved or a screenshot has been taken.)"
new "## Екран сповіщень використовується, щоб показати гравцеві повідомлення. (Наприклад, коли гра швидко збережена або зроблено знімок екрана.)"
# gui/game/screens.rpy:1245
old "## https://www.renpy.org/doc/html/screen_special.html#notify-screen"
new "## https://www.renpy.org/doc/html/screen_special.html#notify-screen"
# gui/game/screens.rpy:1279
old "## NVL screen"
new "## Екран NVL"
# gui/game/screens.rpy:1281
old "## This screen is used for NVL-mode dialogue and menus."
new "## Відображає діалог у vpgrid або vbox."
# gui/game/screens.rpy:1283
old "## https://www.renpy.org/doc/html/screen_special.html#nvl"
new "## https://www.renpy.org/doc/html/screen_special.html#nvl"
# gui/game/screens.rpy:1294
old "## Displays dialogue in either a vpgrid or the vbox."
new "## Відображає діалог у vpgrid або vbox."
# gui/game/screens.rpy:1307
old "## Displays the menu, if given. The menu may be displayed incorrectly if config.narrator_menu is set to True."
new "## Відображає меню, якщо є. Меню може відображатися неправильно, якщо для config.narrator_menu встановлено значення True."
# gui/game/screens.rpy:1337
old "## This controls the maximum number of NVL-mode entries that can be displayed at once."
new "## Це визначає максимальну кількість записів у режимі NVL, які можуть бути відображені одночасно."
# gui/game/screens.rpy:1399
old "## Mobile Variants"
new "## Мобільні варіанти"
# gui/game/screens.rpy:1406
old "## Since a mouse may not be present, we replace the quick menu with a version that uses fewer and bigger buttons that are easier to touch."
new "## Оскільки миша може бути відсутня, ми замінюємо швидке меню версією, яка використовує менше та більші кнопки, які легше торкатися."
# gui/game/screens.rpy:1424
old "Menu"
new "Меню"
+33
View File
@@ -0,0 +1,33 @@
# У цьому файлі міститься скрипт гри.
# Оголошення символів, які використовуються в цій грі. Колірний аргумент розфарбовує
# ім'я персонажа.
define e = Character("Ейлін")
# Гра починається тут.
label start:
# Це показує фон. За замовчуванням використовується заповнювач, але ви можете
# додати файл (з назвою "bg room.png" або "bg room.jpg") до
# каталогу images, щоб показати його.
scene bg room
# Це показує спрайт персонажа. Використовується заповнювач, але ви можете
# замінити його, додавши до зображень файл із назвою "eileen happy.png".
# до каталогу.
show eileen happy
# Це репліки діалогу.
e "Ви створили нову гру Ren'Py."
e "Додавши історію, зображення та музику, ви можете оприлюднити це світові!"
# На цьому гра закінчується.
return
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+4 -3
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -78,6 +78,7 @@ init python:
_("Nightly (Ren'Py 7, Python 2)")
_("The bleeding edge of Ren'Py development. This may have the latest features, or might not run at all.")
default allow_repair_update = False
screen update_channel(channels):
@@ -108,8 +109,8 @@ screen update_channel(channels):
for c in channels:
if c["split_version"] != list(renpy.version_tuple):
$ action = [SetField(persistent, "has_update", None), SetField(persistent, "last_update_check", None), updater.Update(c["url"], simulate=UPDATE_SIMULATE, public_key=PUBLIC_KEY, confirm=False)]
if c["split_version"] != list(renpy.version_tuple) or allow_repair_update:
$ action = [SetField(persistent, "has_update", None), SetField(persistent, "last_update_check", None), updater.Update(c["url"], simulate=UPDATE_SIMULATE, public_key=PUBLIC_KEY, confirm=False, force=allow_repair_update)]
if c["channel"].startswith("Release"):
$ current = _("• {a=https://www.renpy.org/doc/html/changelog.html}View change log{/a}")
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+295 -75
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -32,9 +32,97 @@ init python:
import time
import pygame_sdl2
import zipfile
import re
import hashlib
WEB_PATH = None
class ProgressiveFilter(object):
def __init__(self, project):
self.project = project
self.destination = get_web_destination(project)
self.remote_files = {}
self.images = []
self.path_filters = []
load_filters(project, self.path_filters)
def filter(self, file, variant, format):
"""
Detect and copy the files to be downloaded progressively,
and prevent them to be put in the ZIP archive.
Returns True if the file must be included in the ZIP archive.
"""
if variant != 'web' or format != 'zip': # useless?
return True
base, ext = os.path.splitext(file.name)
copy_file = False
# Images
if (ext.lower() in ('.jpg', '.jpeg', '.png', '.webp', '.avif', '.svg')
and filters_match(self.path_filters, file.name, 'image')):
# Add image to list and generate placeholder later
self.images.append((file.path, file.name))
copy_file = True
# Musics (but not SFX - no placeholders for short, non-looping sounds)
elif (ext.lower() in ('.wav', '.mp2', '.mp3', '.ogg', '.opus')
and filters_match(self.path_filters, file.name, 'music')):
self.remote_files[file.name[len('game/'):]] = 'music -'
copy_file = True
# Voices
elif (ext.lower() in ('.wav', '.mp2', '.mp3', '.ogg', '.opus')
and filters_match(self.path_filters, file.name, 'voice')):
self.remote_files[file.name[len('game/'):]] = 'voice -'
copy_file = True
# Videos are never included.
elif (ext.lower() in ('.ogv', '.webm', '.mp4', '.mkv', '.avi')):
self.remote_files[file.name[len('game/'):]] = 'video -'
copy_file = True
if not copy_file:
return True
# Copy the file to the destination folder, keeping metadata
dst_path = os.path.join(self.destination, file.name)
dst_dir = os.path.dirname(dst_path)
if not os.path.isdir(dst_dir):
os.makedirs(dst_dir, 0o755)
shutil.copy2(file.path, dst_path)
return False
def finalize(self):
"""
Append some generated files to the ZIP archive.
"""
zout = zipfile.ZipFile(os.path.join(self.destination, 'game.zip'), 'a')
tmpdir = tempfile.mkdtemp()
# Generate and append placeholder image files to archive
for (src, dst) in self.images:
surface = pygame_sdl2.image.load(src)
(w, h) = (surface.get_width(), surface.get_height())
self.remote_files[dst[len('game/'):]] = 'image {},{}'.format(w,h)
tmpfile = generate_image_placeholder(surface, tmpdir)
placeholder_relpath = os.path.join('_placeholders', dst[len('game/'):])
zout.write(tmpfile, placeholder_relpath)
# Prepare a list of remote files for renpy.loader
remote_files_str = ''
for f in sorted(self.remote_files):
remote_files_str += f + "\n"
remote_files_str += self.remote_files[f] + "\n"
zout.writestr('game/renpyweb_remote_files.txt',
remote_files_str,
zipfile.ZIP_DEFLATED)
# Clean-up
shutil.rmtree(tmpdir)
zout.close()
def find_web():
global WEB_PATH
@@ -140,80 +228,175 @@ init python:
return f_rule
return False
def repack_for_progressive_download(p):
def generate_pwa_icons(p, destination):
"""
Filter out downloadable resources and generate placeholders
Checks if the pwa_icon.png file exists in the game folder and generates
required icons for PWA in subdirectory icons/ in the destination folder.
If no pwa_icon.png is found, the default Ren'Py icon is used instead in
the web folder, if exists.
"""
# Check if there's a custom icon in the game directory
icon_path = os.path.join(p.path, 'web-icon.png')
# Generate a default icon if there isn't
if not os.path.exists(icon_path):
icon_path = os.path.join(WEB_PATH, 'web-icon.png')
# Check if path is a valid image
if not os.path.exists(icon_path):
# Skip pwa support if no icon is found
return
# Create icons directory
icons_dir = os.path.join(destination, 'icons')
if not os.path.isdir(icons_dir):
os.makedirs(icons_dir, 0o777)
# Check the height and width of the icon
icon = pygame_sdl2.image.load(icon_path)
icon_width = icon.get_width()
icon_height = icon.get_height()
if icon_width != icon_height:
raise RuntimeError("The icon must be square")
if icon_width < 512:
raise RuntimeError("The icon must be at least 512x512 pixels")
scale = renpy.display.scale.smoothscale
best_compression = 9
# Generate 512x512 icon, if needed
if icon_width != 512:
icon512 = scale(icon, (512, 512))
pygame_sdl2.image.save(icon512, os.path.join(icons_dir, 'icon-512x512.png'), best_compression)
else:
pygame_sdl2.image.save(icon, os.path.join(icons_dir, 'icon-512x512.png'), best_compression)
# Generate 384x384 icon
icon384 = scale(icon, (384, 384))
pygame_sdl2.image.save(icon384, os.path.join(icons_dir, 'icon-384x384.png'), best_compression)
# Generate 192x192 icon
icon192 = scale(icon, (192, 192))
pygame_sdl2.image.save(icon192, os.path.join(icons_dir, 'icon-192x192.png'), best_compression)
# Generate 152x152 icon
icon152 = scale(icon, (152, 152))
pygame_sdl2.image.save(icon152, os.path.join(icons_dir, 'icon-152x152.png'), best_compression)
# Generate 144x144 icon
icon144 = scale(icon, (144, 144))
pygame_sdl2.image.save(icon144, os.path.join(icons_dir, 'icon-144x144.png'), best_compression)
# Generate 128x128 icon
icon128 = scale(icon, (128, 128))
pygame_sdl2.image.save(icon128, os.path.join(icons_dir, 'icon-128x128.png'), best_compression)
# Generate 96x96 icon
icon96 = scale(icon, (96, 96))
pygame_sdl2.image.save(icon96, os.path.join(icons_dir, 'icon-96x96.png'), best_compression)
# Generate 72x72 icon
icon72 = scale(icon, (72, 72))
pygame_sdl2.image.save(icon72, os.path.join(icons_dir, 'icon-72x72.png'), best_compression)
# Add 128 pixels to the 384x384 icon to generate 512x512 icon maskable
icon512_maskable = pygame_sdl2.Surface((512, 512), pygame_sdl2.SRCALPHA)
icon512_maskable.blit(icon384, (64, 64))
pygame_sdl2.image.save(icon512_maskable, os.path.join(icons_dir, 'icon-512x512-maskable.png'), best_compression)
# Resize icon512_maskable to 384x384 to generate 384x384 icon maskable
icon384_maskable = scale(icon512_maskable, (384, 384))
pygame_sdl2.image.save(icon384_maskable, os.path.join(icons_dir, 'icon-384x384-maskable.png'), best_compression)
# Resize icon512_maskable to 192x192 to generate 192x192 icon maskable
icon192_maskable = scale(icon512_maskable, (192, 192))
pygame_sdl2.image.save(icon192_maskable, os.path.join(icons_dir, 'icon-192x192-maskable.png'), best_compression)
# Resize icon512_maskable to 152x152 to generate 152x152 icon maskable
icon152_maskable = scale(icon512_maskable, (152, 152))
pygame_sdl2.image.save(icon152_maskable, os.path.join(icons_dir, 'icon-152x152-maskable.png'), best_compression)
# Resize icon512_maskable to 144x144 to generate 144x144 icon maskable
icon144_maskable = scale(icon512_maskable, (144, 144))
pygame_sdl2.image.save(icon144_maskable, os.path.join(icons_dir, 'icon-144x144-maskable.png'), best_compression)
# Resize icon512_maskable to 128x128 to generate 128x128 icon maskable
icon128_maskable = scale(icon512_maskable, (128, 128))
pygame_sdl2.image.save(icon128_maskable, os.path.join(icons_dir, 'icon-128x128-maskable.png'), best_compression)
# Resize icon512_maskable to 96x96 to generate 96x96 icon maskable
icon96_maskable = scale(icon512_maskable, (96, 96))
pygame_sdl2.image.save(icon96_maskable, os.path.join(icons_dir, 'icon-96x96-maskable.png'), best_compression)
# Resize icon512_maskable to 72x72 to generate 72x72 icon maskable
icon72_maskable = scale(icon512_maskable, (72, 72))
pygame_sdl2.image.save(icon72_maskable, os.path.join(icons_dir, 'icon-72x72-maskable.png'), best_compression)
def generate_files_catalog(destination):
"""
Generates a JSON file with information about the game files.
This file is used by the service worker to cache the game files.
:param destination: string, The destination path where the files will be copied to and where
game folder is located.
:param version: string, the version of the game. Should be the same as the version in the
manifest.json file.
:return: None
"""
catalog = {
"files": [ ],
"version": int(time.time())
}
# Walk through the game folder
for root, dirs, files in os.walk(destination):
for file in files:
# Get the absolute path of the file
file_path = os.path.join(root, file)
# Convert it to relative path of the file
file_name = os.path.relpath(file_path, destination)
# Replace backslashes with forward slashes
file_name = file_name.replace("\\", "/")
# Add the file to the catalog
catalog["files"].append(file_name)
with io.open(os.path.join(destination, "pwa_catalog.json"), 'w', encoding='utf-8') as f:
f.write(json.dumps(catalog))
def prepare_pwa_files(p, destination):
"""
Replaces in service-worker.js the cache name with the game name and current timestamp.
Replace in manifest.json the project name with the ones in the game.
"""
destination = get_web_destination(p)
# Open the service-worker.js file
with io.open(os.path.join(destination, "service-worker.js"), encoding='utf-8') as f:
service_worker = f.read()
path_filters = []
load_filters(p, path_filters)
# Use re to slugify the game name, avoiding use of 3rd party libraries
slugified_name = re.sub(r'\W+', '-', p.dump['build']['display_name']).lower()
service_worker = service_worker.replace('renpy-web-game', slugified_name)
shutil.move(
os.path.join(destination, 'game.zip'),
os.path.join(destination, 'game-old.zip'))
zin = zipfile.ZipFile(os.path.join(destination, 'game-old.zip'))
zout = zipfile.ZipFile(os.path.join(destination, 'game.zip'), 'w')
remote_files = {}
tmpdir = tempfile.mkdtemp()
# Write the file
with io.open(os.path.join(destination, "service-worker.js"), 'w', encoding='utf-8') as f:
f.write(service_worker)
for m in zin.infolist():
# Open the manifest.json file
with io.open(os.path.join(destination, "manifest.json"), encoding='utf-8') as f:
manifest = json.load(f)
base, ext = os.path.splitext(m.filename)
# Images
if (ext.lower() in ('.jpg', '.jpeg', '.png', '.webp')
and filters_match(path_filters, m.filename, 'image')):
zin.extract(m, path=destination)
surface = pygame_sdl2.image.load(os.path.join(destination,m.filename))
(w,h) = (surface.get_width(),surface.get_height())
# Replace the project name with the ones in the game
manifest["name"] = p.dump['build']['display_name']
remote_files[m.filename[len('game/'):]] = 'image {},{}'.format(w,h)
screen_size = p.dump.get("size")
# If width are smaller than height, set the orientation to portrait. If not, leave it as is.
if screen_size[0] < screen_size[1]:
manifest["orientation"] = "portrait-primary"
tmpfile = generate_image_placeholder(surface, tmpdir)
placeholder_relpath = os.path.join('_placeholders', m.filename[len('game/'):])
zout.write(tmpfile, placeholder_relpath)
# Write the file
with io.open(os.path.join(destination, "manifest.json"), 'w', encoding='utf-8') as f:
f.write(json.dumps(manifest))
# Musics (but not SFX - no placeholders for short, non-looping sounds)
elif (ext.lower() in ('.wav', '.mp2', '.mp3', '.ogg', '.opus')
and filters_match(path_filters, m.filename, 'music')):
zin.extract(m, path=destination)
remote_files[m.filename[len('game/'):]] = 'music -'
# Voices
elif (ext.lower() in ('.wav', '.mp2', '.mp3', '.ogg', '.opus')
and filters_match(path_filters, m.filename, 'voice')):
zin.extract(m, path=destination)
remote_files[m.filename[len('game/'):]] = 'voice -'
# Videos are currently not supported, strip them if not already
elif (ext.lower() in ('.ogv', '.webm', '.mp4', '.mkv', '.avi')):
pass
# Default: keep (extract & recompress to new .zip)
else:
# Not using zout.writestr(m, zin.read(m)) to avoid MemoryError
tmpfile = zin.extract(m, tmpdir)
date_time = time.mktime(m.date_time+(0,0,0))
os.utime(tmpfile, (date_time,date_time))
zout.write(tmpfile, m.filename, m.compress_type)
# Prepare a list of remote files for renpy.loader
remote_files_str = ''
for f in sorted(remote_files):
remote_files_str += f + "\n"
remote_files_str += remote_files[f] + "\n"
zout.writestr('game/renpyweb_remote_files.txt',
remote_files_str,
zipfile.ZIP_DEFLATED)
# Clean-up
shutil.rmtree(tmpdir)
zout.close()
zin.close()
os.unlink(os.path.join(destination, 'game-old.zip'))
generate_files_catalog(destination)
def build_web(p, gui=True):
@@ -236,28 +419,73 @@ init python:
os.makedirs(destination, 0o777)
files_filter = ProgressiveFilter(p)
# Use the distributor to make game.zip.
distribute.Distributor(p, packages=[ "web" ], packagedest=os.path.join(destination, "game"), reporter=reporter, noarchive=True, scan=False)
distribute.Distributor(p, packages=[ "web" ], packagedest=os.path.join(destination, "game"),
reporter=reporter, noarchive=True, scan=False, files_filter=files_filter)
reporter.info(_("Preparing progressive download"))
repack_for_progressive_download(p)
files_filter.finalize()
# Copy the files from WEB_PATH to destination.
for fn in os.listdir(WEB_PATH):
if fn in { "game.zip", "hash.txt", "index.html" }:
if fn in { "game.zip", "hash.txt", "index.html", "pwa_icon.png" }:
continue
shutil.copy(os.path.join(WEB_PATH, fn), os.path.join(destination, fn))
# Find the presplash and copy it over.
presplash = None
if not PY2:
for fn in [ "web-presplash.png", "web-presplash.jpg", "web-presplash.webp" ]:
fullfn = os.path.join(project.current.path, fn)
if os.path.exists(fullfn):
presplash = fn
break
if presplash:
os.unlink(os.path.join(destination, "web-presplash.jpg"))
shutil.copy(os.path.join(project.current.path, presplash), os.path.join(destination, presplash))
# Copy over index.html.
with io.open(os.path.join(WEB_PATH, "index.html"), encoding='utf-8') as f:
html = f.read()
html = html.replace("%%TITLE%%", display_name)
if PY2:
html = html.replace("%%TITLE%%", display_name)
else:
html = html.replace("Ren'Py Web Game", display_name)
if presplash:
html = html.replace("web-presplash.jpg", presplash)
with io.open(os.path.join(destination, "index.html"), "w", encoding='utf-8') as f:
f.write(html)
if not PY2:
generate_pwa_icons(p, destination)
prepare_pwa_files(p, destination)
# Zip up the game.
zip_targets = [ ]
for dn, dirs, files in os.walk(destination):
for directory in dirs:
zip_targets.append(os.path.join(dn, directory))
for file in files:
zip_targets.append(os.path.join(dn, file))
with zipfile.ZipFile(destination + ".zip", 'w') as zf:
for i, target in enumerate(zip_targets):
zf.write(target, os.path.relpath(target, destination))
reporter.progress(_("Creating package..."), i + 1, len(zip_targets))
# Start the web server.
webserver.start(destination)
@@ -331,19 +559,11 @@ screen web():
text _("Images and music can be downloaded while playing. A 'progressive_download.txt' file will be created so you can configure this behavior.")
add SPACER
text _("Current limitations in the web platform mean that loading large images may cause audio or framerate glitches, and lower performance in general. Movies aren't supported.")
textbutton _("Return") action Jump("front_page") style "l_left_button"
label web:
if not PY2:
$ interface.info(_("This feature is not supported in Ren'Py 8."), _("We will restore support in a future release of Ren'Py 8. Until then, please use Ren'Py 7 for web support."))
return
if WEB_PATH is None:
$ interface.yesno(_("Before packaging web apps, you'll need to download RenPyWeb, Ren'Py's web support. Would you like to download RenPyWeb now?"), no=Jump("front_page"))
$ add_dlc("web", restart=True)
+46 -5
View File
@@ -10,6 +10,7 @@ import sys
import shutil
import mimetypes
import io
import hashlib
# The path to the root of the web server.
root = ""
@@ -84,19 +85,44 @@ class WebHandler(http.server.BaseHTTPRequestHandler):
# newline translations, making the actual size of the content
# transmitted *less* than the content-length!
f = open(path, 'rb')
fs = os.fstat(f.fileno())
except IOError:
self.send_error(404, "File not found")
return None
try:
last_modified = self.date_time_string(fs.st_mtime)
ims = self.headers.get("If-Modified-Since", None)
if (ims is not None) and (ims == last_modified):
self.send_response(304)
self.end_headers()
return None
hash = hashlib.md5()
while True:
data = f.read(1024 * 1024)
if not data:
break
hash.update(data)
f.seek(0)
etag = '"{}"'.format(hash.hexdigest())
if self.headers.get("If-None-Match", None) == etag:
self.send_response(304)
self.end_headers()
return None
self.send_response(200)
self.send_header("Content-type", ctype)
fs = os.fstat(f.fileno())
# Ren'Py - bust cache.
self.send_header("Pragma", "no-cache")
self.send_header("Cache-Control", "max-age=0, must-revalidate")
self.send_header("Content-Length", str(fs[6]))
self.send_header("Last-Modified", self.date_time_string(fs.st_mtime))
self.send_header("ETag", etag)
self.end_headers()
return f
except Exception:
@@ -220,7 +246,22 @@ class WebHandler(http.server.BaseHTTPRequestHandler):
'.htm': 'text/html',
'.html': 'text/html',
'.js': 'application/javascript',
}
'.wasm': 'application/wasm',
'.avi': 'video/x-msvideo',
'.m1v': 'video/mpeg',
'.m2v': 'video/mpeg',
'.m4v': 'video/mp4',
'.mkv': 'video/x-matroska',
'.mp4': 'video/mp4',
'.mpe': 'video/mpeg',
'.mpeg': 'video/mpeg',
'.mpg': 'video/mpeg',
'.mpg4': 'video/mp4',
'.mpv': 'video/x-matroska',
'.ogv': 'video/ogg',
'.webm': 'video/webm',
'.wmv': 'video/x-ms-wmv',
}
def run():
+1 -2
View File
@@ -60,7 +60,6 @@ int renpy_IMG_SavePNG_RW(SDL_RWops *src, SDL_Surface *surf,int compression){
SDL_PixelFormat *fmt=NULL;
SDL_Surface *tempsurf=NULL;
int ret;
unsigned int i;
png_colorp palette;
Uint8 *palette_alpha=NULL;
png_byte **row_pointers=NULL;
@@ -149,7 +148,7 @@ int renpy_IMG_SavePNG_RW(SDL_RWops *src, SDL_Surface *surf,int compression){
}
}
for(i=0;i < surf->h;i++){
for(int i=0;i < surf->h;i++){
row_pointers[i]= ((png_byte*) surf->pixels) + i * surf->pitch;
}
+2 -1
View File
@@ -1,9 +1,10 @@
_renpy gen/_renpy.c IMG_savepng.c core.c
_renpybidi gen/_renpybidi.c renpybidicore.c
renpy.audio.renpysound gen/renpy.audio.renpysound.c renpysound_core.c ffmedia.c
renpy.parsersupport gen/renpy.parsersupport.c
renpy.lexersupport gen/renpy.lexersupport.c
renpy.pydict gen/renpy.pydict.c
renpy.style gen/renpy.style.c
renpy.encryption gen/renpy.encryption.c
renpy.compat.dictviews gen/renpy.compat.dictviews.c
renpy.styledata.styleclass gen/renpy.styledata.styleclass.c
renpy.styledata.stylesets gen/renpy.styledata.stylesets.c
+1 -1
View File
@@ -1,5 +1,5 @@
# -*- python -*-
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+2 -2
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@@ -21,7 +21,7 @@
from __future__ import print_function
cdef extern from "fribidi.h":
cdef extern from "fribidi/fribidi.h":
int FRIBIDI_TYPE_LTR
int FRIBIDI_TYPE_ON
int FRIBIDI_TYPE_RTL
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2004-2022 Tom Rothamel <pytom@bishoujo.us>
# Copyright 2004-2023 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
+24 -50
View File
@@ -51,9 +51,9 @@ void pixellate32_core(PyObject *pysrc,
SDL_Surface *dst;
int x, y, i, j;
Uint32 srcpitch, dstpitch;
Uint32 srcw, srch;
Uint32 dstw, dsth;
int srcpitch, dstpitch;
int srcw, srch;
int dstw, dsth;
int vw, vh;
unsigned char *srcpixels;
@@ -193,9 +193,9 @@ void pixellate24_core(PyObject *pysrc,
SDL_Surface *dst;
int x, y, i, j;
Uint32 srcpitch, dstpitch;
Uint32 srcw, srch;
Uint32 dstw, dsth;
int srcpitch, dstpitch;
int srcw, srch;
int dstw, dsth;
int vw, vh;
unsigned char *srcpixels;
@@ -322,9 +322,8 @@ void map32_core(PyObject *pysrc,
SDL_Surface *dst;
int x, y;
Uint32 srcpitch, dstpitch;
Uint32 srcw, srch;
Uint32 dstw, dsth;
int srcpitch, dstpitch;
int srcw, srch;
char *srcpixels;
char *dstpixels;
@@ -344,9 +343,7 @@ void map32_core(PyObject *pysrc,
srcpitch = src->pitch;
dstpitch = dst->pitch;
srcw = src->w;
dstw = dst->w;
srch = src->h;
dsth = dst->h;
srcrow = srcpixels;
dstrow = dstpixels;
@@ -381,9 +378,8 @@ void map24_core(PyObject *pysrc,
SDL_Surface *dst;
int x, y;
Uint32 srcpitch, dstpitch;
Uint32 srcw, srch;
Uint32 dstw, dsth;
int srcpitch, dstpitch;
int srcw, srch;
char *srcpixels;
char *dstpixels;
@@ -403,9 +399,7 @@ void map24_core(PyObject *pysrc,
srcpitch = src->pitch;
dstpitch = dst->pitch;
srcw = src->w;
dstw = dst->w;
srch = src->h;
dsth = dst->h;
srcrow = srcpixels;
dstrow = dstpixels;
@@ -446,9 +440,8 @@ void linmap32_core(PyObject *pysrc,
SDL_Surface *dst;
int x, y;
Uint32 srcpitch, dstpitch;
Uint32 srcw, srch;
Uint32 dstw, dsth;
int srcpitch, dstpitch;
int srcw, srch;
char *srcpixels;
char *dstpixels;
@@ -468,9 +461,7 @@ void linmap32_core(PyObject *pysrc,
srcpitch = src->pitch;
dstpitch = dst->pitch;
srcw = src->w;
dstw = dst->w;
srch = src->h;
dsth = dst->h;
srcrow = srcpixels;
dstrow = dstpixels;
@@ -505,9 +496,8 @@ void linmap24_core(PyObject *pysrc,
SDL_Surface *dst;
int x, y;
Uint32 srcpitch, dstpitch;
Uint32 srcw, srch;
Uint32 dstw, dsth;
int srcpitch, dstpitch;
int srcw, srch;
char *srcpixels;
char *dstpixels;
@@ -527,9 +517,7 @@ void linmap24_core(PyObject *pysrc,
srcpitch = src->pitch;
dstpitch = dst->pitch;
srcw = src->w;
dstw = dst->w;
srch = src->h;
dsth = dst->h;
srcrow = srcpixels;
dstrow = dstpixels;
@@ -653,8 +641,8 @@ void linblur32_core(PyObject *pysrc,
SDL_Surface *src;
SDL_Surface *dst;
Uint32 rows, cols;
Uint32 incr, skip;
int rows, cols;
int incr, skip;
unsigned char *srcpixels;
unsigned char *dstpixels;
@@ -793,8 +781,8 @@ void linblur24_core(PyObject *pysrc,
SDL_Surface *src;
SDL_Surface *dst;
Uint32 rows, cols;
Uint32 incr, skip;
int rows, cols;
int incr, skip;
unsigned char *srcpixels;
unsigned char *dstpixels;
@@ -928,9 +916,8 @@ void alphamunge_core(PyObject *pysrc,
SDL_Surface *src;
SDL_Surface *dst;
Uint32 srcpitch, dstpitch;
Uint32 srcw, srch;
Uint32 dstw, dsth;
int srcpitch, dstpitch;
int dstw, dsth;
unsigned char *srcpixels;
unsigned char *dstpixels;
@@ -951,9 +938,7 @@ void alphamunge_core(PyObject *pysrc,
dstpixels = (unsigned char *) dst->pixels;
srcpitch = src->pitch;
dstpitch = dst->pitch;
srcw = src->w;
dstw = dst->w;
srch = src->h;
dsth = dst->h;
@@ -996,9 +981,8 @@ void scale32_core(PyObject *pysrc, PyObject *pydst,
SDL_Surface *dst;
int y;
Uint32 srcpitch, dstpitch;
Uint32 srcw, srch;
Uint32 dstw, dsth;
int srcpitch, dstpitch;
int dstw, dsth;
float xdelta, ydelta;
unsigned char *srcpixels;
@@ -1014,9 +998,7 @@ void scale32_core(PyObject *pysrc, PyObject *pydst,
dstpixels = (unsigned char *) dst->pixels;
srcpitch = src->pitch;
dstpitch = dst->pitch;
srcw = src->w;
dstw = dst->w;
srch = src->h;
dsth = dst->h;
if (precise) {
@@ -1041,7 +1023,6 @@ void scale32_core(PyObject *pysrc, PyObject *pydst,
for (y = 0; y < dsth; y++) {
unsigned char *s0;
unsigned char *s1;
unsigned char *d;
unsigned char *dend;
@@ -1058,7 +1039,6 @@ void scale32_core(PyObject *pysrc, PyObject *pydst,
s0frac = 256 - s1frac;
s0 = srcpixels + (sline >> 8) * srcpitch;
s1 = s0 + srcpitch;
scol = source_xoff * 256 + dest_xoff * xdelta;
@@ -1109,15 +1089,13 @@ void scale24_core(PyObject *pysrc, PyObject *pydst,
SDL_Surface *dst;
int y;
Uint32 srcpitch, dstpitch;
Uint32 srcw, srch;
Uint32 dstw, dsth;
int srcpitch, dstpitch;
int dstw, dsth;
float xdelta, ydelta;
unsigned char *srcpixels;
unsigned char *dstpixels;
src = PySurface_AsSurface(pysrc);
dst = PySurface_AsSurface(pydst);
@@ -1127,9 +1105,7 @@ void scale24_core(PyObject *pysrc, PyObject *pydst,
dstpixels = (unsigned char *) dst->pixels;
srcpitch = src->pitch;
dstpitch = dst->pitch;
srcw = src->w;
dstw = dst->w;
srch = src->h;
dsth = dst->h;
xdelta = 255.0 * (source_width - 1) / dest_width;
@@ -1138,7 +1114,6 @@ void scale24_core(PyObject *pysrc, PyObject *pydst,
for (y = 0; y < dsth; y++) {
unsigned char *s0;
unsigned char *s1;
unsigned char *d;
unsigned char *dend;
@@ -1155,7 +1130,6 @@ void scale24_core(PyObject *pysrc, PyObject *pydst,
s0frac = 256 - s1frac;
s0 = srcpixels + (sline >> 8) * srcpitch;
s1 = s0 + srcpitch;
scol = source_xoff * 255 + dest_xoff * xdelta;
+131 -182
View File
@@ -56,7 +56,7 @@ static SDL_Surface *rgba_surface = NULL;
/*******************************************************************************
* SDL_RWops <-> AVIOContext
* */
*/
static int rwops_read(void *opaque, uint8_t *buf, int buf_size) {
SDL_RWops *rw = (SDL_RWops *) opaque;
@@ -116,9 +116,14 @@ static void rwops_close(SDL_RWops *rw) {
static double current_time = 0;
typedef struct PacketQueueEntry {
AVPacket *pkt;
struct PacketQueueEntry *next;
} PacketQueueEntry;
typedef struct PacketQueue {
AVPacketList *first;
AVPacketList *last;
PacketQueueEntry *first;
PacketQueueEntry *last;
} PacketQueue;
typedef struct FrameQueue {
@@ -200,13 +205,10 @@ typedef struct MediaState {
AVCodecContext *video_context;
AVCodecContext *audio_context;
/* Queues of packets going to the audio and video
* streams.
*/
/* Queues of packets going to the audio and video streams. */
PacketQueue video_packet_queue;
PacketQueue audio_packet_queue;
/* The total duration of the video. Only used for information purposes. */
double total_duration;
@@ -239,11 +241,6 @@ typedef struct MediaState {
/* A frame that video is decoded into. */
AVFrame *video_decode_frame;
/* The video packet we're decoding, and the partial packet. */
AVPacket video_pkt;
AVPacket video_pkt_tmp;
/* Video Stuff ***********************************************************/
/* Software rescaling context. */
@@ -268,7 +265,6 @@ typedef struct MediaState {
/* The offset between now and the time of the current frame, at least for video. */
double time_offset;
} MediaState;
static AVFrame *dequeue_frame(FrameQueue *fq);
@@ -310,8 +306,6 @@ static void deallocate(MediaState *ms) {
av_frame_free(&ms->video_decode_frame);
}
av_packet_unref(&ms->video_pkt);
/* Destroy audio stuff. */
if (ms->swr) {
swr_free(&ms->swr);
@@ -404,6 +398,8 @@ static void deallocate_deferred() {
SDL_UnlockMutex(deallocate_mutex);
}
/* Frame queue ***************************************************************/
static void enqueue_frame(FrameQueue *fq, AVFrame *frame) {
frame->opaque = NULL;
@@ -431,68 +427,109 @@ static AVFrame *dequeue_frame(FrameQueue *fq) {
}
/* Packet queue **************************************************************/
static void enqueue_packet(PacketQueue *pq, AVPacket *pkt) {
AVPacketList *pl = av_malloc(sizeof(AVPacketList));
if (pl == NULL)
{
PacketQueueEntry *pqe = av_malloc(sizeof(PacketQueueEntry));
if (pqe == NULL) {
av_packet_free(&pkt);
return;
}
av_init_packet(&pl->pkt);
av_packet_ref(&pl->pkt, pkt);
pl->next = NULL;
pqe->pkt = pkt;
pqe->next = NULL;
if (!pq->first) {
pq->first = pq->last = pl;
pq->first = pq->last = pqe;
} else {
pq->last->next = pl;
pq->last = pl;
pq->last->next = pqe;
pq->last = pqe;
}
}
static int dequeue_packet(PacketQueue *pq, AVPacket *pkt) {
if (! pq->first ) {
return 0;
static AVPacket *first_packet(PacketQueue *pq) {
if (pq->first) {
return pq->first->pkt;
} else {
return NULL;
}
}
static void dequeue_packet(PacketQueue *pq) {
if (! pq->first) {
return;
}
AVPacketList *pl = pq->first;
av_packet_move_ref(pkt, &pl->pkt);
pq->first = pl->next;
PacketQueueEntry *pqe = pq->first;
pq->first = pqe->next;
if (!pq->first) {
pq->last = NULL;
}
av_free(pl);
return 1;
av_packet_free(&pqe->pkt);
av_free(pqe);
}
static int count_packet_queue(PacketQueue *pq) {
AVPacketList *pl = pq->first;
PacketQueueEntry *pqe = pq->first;
int rv = 0;
int rv = 0;
while (pl) {
rv += 1;
pl = pl->next;
}
while (pqe) {
rv += 1;
pqe = pqe->next;
}
return rv;
return rv;
}
static void free_packet_queue(PacketQueue *pq) {
AVPacket scratch;
av_init_packet(&scratch);
while (dequeue_packet(pq, &scratch)) {
av_packet_unref(&scratch);
while(first_packet(pq)) {
dequeue_packet(pq);
}
}
/**
* Reads a packet from one of the queues, filling the other queue if
* necessary. Returns the packet, or NULL if end of file has been reached.
*/
static AVPacket *read_packet(MediaState *ms, PacketQueue *pq) {
AVPacket *pkt;
AVPacket *rv;
while (1) {
rv = first_packet(pq);
if (rv) {
return rv;
}
pkt = av_packet_alloc();
if (!pkt) {
return NULL;
}
if (av_read_frame(ms->ctx, pkt)) {
return NULL;
}
if (pkt->stream_index == ms->video_stream && ! ms->video_finished) {
enqueue_packet(&ms->video_packet_queue, pkt);
} else if (pkt->stream_index == ms->audio_stream && ! ms->audio_finished) {
enqueue_packet(&ms->audio_packet_queue, pkt);
} else {
av_packet_free(&pkt);
}
}
}
/* Surface queue *************************************************************/
static void enqueue_surface(SurfaceQueueEntry **queue, SurfaceQueueEntry *sqe) {
while (*queue) {
queue = &(*queue)->next;
@@ -532,36 +569,7 @@ static void check_surface_queue(MediaState *ms) {
}
#endif
/**
* Reads a packet from one of the queues, filling the other queue if
* necessary.
*/
static int read_packet(MediaState *ms, PacketQueue *pq, AVPacket *pkt) {
AVPacket scratch;
av_init_packet(&scratch);
while (1) {
if (dequeue_packet(pq, pkt)) {
return 1;
}
if (av_read_frame(ms->ctx, &scratch)) {
pkt->data = NULL;
pkt->size = 0;
return 0;
}
if (scratch.stream_index == ms->video_stream && ! ms->video_finished) {
enqueue_packet(&ms->video_packet_queue, &scratch);
} else if (scratch.stream_index == ms->audio_stream && ! ms->audio_finished) {
enqueue_packet(&ms->audio_packet_queue, &scratch);
}
av_packet_unref(&scratch);
}
}
/* Find decoder context ******************************************************/
static AVCodecContext *find_context(AVFormatContext *ctx, int index) {
@@ -613,62 +621,11 @@ fail:
}
/**
* Given a packet, decodes a frame if possible. This is intended to be a drop-in replacement
* for the now deprecated avcodec_decode_audio4/video2 APIs.
*
* \param[in] context The context the decoding is done in.
* \param[out] frame A frame that is updated with the decoded data.
* \param[out] got_frame Set to 1 if a frame was decoded, 0 if not.
* \param[in] pkt The packet data to present.
*
* Returns pkt->size if the packet was consumed, 0 if not, or < 0 on error (including
* end of file.)
*/
static int decode_common(AVCodecContext *context, AVFrame *frame, int *got_frame, AVPacket *pkt) {
/* Audio decoding *************************************************************/
int ret;
int rv = 0;
if (pkt) {
ret = avcodec_send_packet(context, pkt);
if (ret >= 0) {
rv = pkt->size;
} else if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
rv = 0;
} else {
return ret;
}
}
ret = avcodec_receive_frame(context, frame);
if (ret >= 0) {
*got_frame = 1;
} else if (ret == AVERROR(EAGAIN)) {
*got_frame = 0;
} else if (ret == AVERROR_EOF) {
*got_frame = 0;
if (!pkt || pkt->size == 0) {
return ret;
}
} else {
*got_frame = 0;
return ret;
}
return rv;
}
/**
* Decodes audio. Returns 0 if no audio was decoded, or 1 if some audio was
* decoded.
*/
static void decode_audio(MediaState *ms) {
AVPacket pkt;
AVPacket pkt_temp;
int ret;
AVPacket *pkt;
AVFrame *converted_frame;
if (!ms->audio_context) {
@@ -685,8 +642,6 @@ static void decode_audio(MediaState *ms) {
return;
}
av_init_packet(&pkt);
double timebase = av_q2d(ms->ctx->streams[ms->audio_stream]->time_base);
if (ms->audio_queue_target_samples < audio_target_samples) {
@@ -695,35 +650,31 @@ static void decode_audio(MediaState *ms) {
while (ms->audio_queue_samples < ms->audio_queue_target_samples) {
read_packet(ms, &ms->audio_packet_queue, &pkt);
/** Read a packet, and send it to the decoder. */
pkt = read_packet(ms, &ms->audio_packet_queue);
ret = avcodec_send_packet(ms->audio_context, pkt);
pkt_temp = pkt;
if (ret == 0) {
dequeue_packet(&ms->audio_packet_queue);
} else if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
// pass
} else {
ms->audio_finished = 1;
return;
}
do {
int got_frame;
int read_size = decode_common(ms->audio_context, ms->audio_decode_frame, &got_frame, &pkt_temp);
while (1) {
if (read_size < 0) {
ret = avcodec_receive_frame(ms->audio_context, ms->audio_decode_frame);
if (pkt.data) {
av_packet_unref(&pkt);
}
ms->audio_finished = 1;
return;
// More input is needed.
if (ret == AVERROR(EAGAIN)) {
break;
}
pkt_temp.data += read_size;
pkt_temp.size -= read_size;
if (!got_frame) {
if (pkt.data == NULL) {
ms->audio_finished = 1;
av_packet_unref(&pkt);
return;
}
break;
if (ret < 0) {
ms->audio_finished = 1;
return;
}
converted_frame = av_frame_alloc();
@@ -785,18 +736,17 @@ static void decode_audio(MediaState *ms) {
}
SDL_UnlockMutex(ms->lock);
} while (pkt_temp.size);
if (pkt.data) {
av_packet_unref(&pkt);
}
}
return;
}
/* Video decoding *************************************************************/
static enum AVPixelFormat get_pixel_format(SDL_Surface *surf) {
uint32_t pixel;
uint8_t *bytes = (uint8_t *) &pixel;
@@ -819,37 +769,37 @@ static enum AVPixelFormat get_pixel_format(SDL_Surface *surf) {
}
static SurfaceQueueEntry *decode_video_frame(MediaState *ms) {
int ret;
while (1) {
if (! ms->video_pkt_tmp.size) {
av_packet_unref(&ms->video_pkt);
read_packet(ms, &ms->video_packet_queue, &ms->video_pkt);
ms->video_pkt_tmp = ms->video_pkt;
}
AVPacket *pkt = read_packet(ms, &ms->video_packet_queue);
ret = avcodec_send_packet(ms->video_context, pkt);
int got_frame = 0;
int read_size = decode_common(ms->video_context, ms->video_decode_frame, &got_frame, &ms->video_pkt_tmp);
if (read_size < 0) {
if (ret == 0) {
dequeue_packet(&ms->video_packet_queue);
} else if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
// pass
} else {
ms->video_finished = 1;
return NULL;
}
ms->video_pkt_tmp.data += read_size;
ms->video_pkt_tmp.size -= read_size;
ret = avcodec_receive_frame(ms->video_context, ms->video_decode_frame);
if (got_frame) {
break;
// More input is needed.
if (ret == AVERROR(EAGAIN)) {
continue;
}
if (!got_frame && !ms->video_pkt.size) {
if (ret < 0) {
ms->video_finished = 1;
return NULL;
}
break;
}
double pts = ms->video_decode_frame->best_effort_timestamp * av_q2d(ms->ctx->streams[ms->video_stream]->time_base);
@@ -914,7 +864,10 @@ static SurfaceQueueEntry *decode_video_frame(MediaState *ms) {
#ifndef USE_POSIX_MEMALIGN
rv->pixels = SDL_calloc(rv->pitch * rv->h, 1);
#else
posix_memalign(&rv->pixels, ROW_ALIGNMENT, rv->pitch * rv->h);
if (posix_memalign(&rv->pixels, ROW_ALIGNMENT, rv->pitch * rv->h)) {
av_free(rv);
return NULL;
}
memset(rv->pixels, 0, rv->pitch * rv->h);
#endif
@@ -1193,8 +1146,6 @@ static int decode_thread(void *arg) {
goto finish;
}
av_init_packet(&ms->video_pkt);
// Compute the number of samples we need to play back.
if (ms->audio_duration < 0) {
if (av_fmt_ctx_get_duration_estimation_method(ctx) != AVFMT_DURATION_FROM_BITRATE) {
@@ -1355,8 +1306,6 @@ static int decode_sync_start(void *arg) {
media_read_sync_finish(ms);
}
av_init_packet(&ms->video_pkt);
// Compute the number of samples we need to play back.
if (ms->audio_duration < 0) {
if (av_fmt_ctx_get_duration_estimation_method(ctx) != AVFMT_DURATION_FROM_BITRATE) {
-40
View File
@@ -1,40 +0,0 @@
behdad: Behdad Esfahbod <behdad@gnu.org>
#
# Behdad Esfahbod is the only author that actually codes these days. He
# maintains the package too. He has revised all of the code written by
# others, and has written much of the code himself. He's listed (or should
# be listed) on every file in the package as one of the authors. Behdad
# designs, implements, documents, maintains, ...
#
dov-g: Dov Grobgeld <dov@imagic.weizmann.ac.il>
#
# Dov Grobgeld originally wrote FriBidi. The 0.1.* releases were all done
# by him. After that, Dov rarely touched the code, but contributed ideas.
# All files that he has originally authored have him listed as an author in
# the header of the file.
#
roozbeh: Roozbeh Pournader <roozbeh@gnu.org>
#
# Roozbeh Pournader hasn't contributed much code to FriBidi personally; but
# has maintained, promoted, and supported the project for a while. He has
# helped with making GNU FriBidi standards compliant, and has sometimes
# lobbied with the Unicode Consortium when needed. Roozbeh was supposed to
# be a co-maintainer of GNU FriBidi, but he's not doing that yet.
#
#
# Note: Other people have contributed significant amounts of code, but
# usually the code has faded out because of restructuring and redesigning
# things around GNU FriBidi. As an example, the FriBidiEnv patch by Omer
# Zak, made itself into FriBidi CVS for a couple of years, but was finally
# implemented in a better way by Behdad.
#
# Note: GNU getopt is distributed with and used in GNU FriBidi under bin/, but
# is not part of GNU FriBidi.
#
# Note: Parts of the Unicode Character Database are distributed with and used
# in GNU FriBidi under gen.tab/unidata/, but are not part of GNU FriBidi.
#
-340
View File
@@ -1,340 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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.
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
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
-30
View File
@@ -1,30 +0,0 @@
Thanks to:
Behnam Esfahbod <behnam@esfahbod.info>
* Testing and auditing code.
And for the previous versions of FriBidi (pre 2002), thanks to:
Tomas Frydrych <tomas@frydrych.uklinux.net>
* Contirbuted patches for compiling GNU FriBidi under other OSes.
Dov Grobgeld <dov@imagic.weizmann.ac.il>
* Initial author, and maintainer before the 0.9 releases.
Franck Portaneri
* For the Mozilla BiDi languges support document;
Roozbeh Pournader <roozbeh@sharif.edu>
* Fixed things here and there.
Pablo Saratxaga <pablo@mandrakesoft.com>
* Contributed several Arabic charset converters.
Owen Tayler <otaylor@redhat.com>
* Contributed very important memory leak and speed patches.
Omer Zak <omerz@actcom.co.il>
* Contributed several bug fixes, and several considerations for
embedded systems.
-105
View File
@@ -1,105 +0,0 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you want to include debug code in the library */
#define DEBUG 1
/* Define to 1 if you have the <asm/page.h> header file. */
/* #undef HAVE_ASM_PAGE_H */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if cpp supports the ANSI # stringizing operator. */
#define HAVE_STRINGIZE 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/times.h> header file. */
#define HAVE_SYS_TIMES_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <wchar.h> header file. */
#define HAVE_WCHAR_H 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Name of package */
#define PACKAGE "fribidi"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "http://fribidi.org/bug"
/* Define to the full name of this package. */
#define PACKAGE_NAME "GNU FriBidi"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "GNU FriBidi 0.19.2"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "fribidi"
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.19.2"
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT 4
/* The size of `short', as computed by sizeof. */
#define SIZEOF_SHORT 2
/* The size of `void *', as computed by sizeof. */
#define SIZEOF_VOID_P 8
/* The size of `wchar_t', as computed by sizeof. */
#define SIZEOF_WCHAR_T 4
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if you want to use simple mallocs instead of memory chunks */
/* #undef USE_SIMPLE_MALLOC */
/* Version number of package */
#define VERSION "0.19.2"
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
-94
View File
@@ -1,94 +0,0 @@
/* The tables in this file should all be sorted on their first item. */
/* *INDENT-OFF* */
const PairMap mandatory_liga_table[] = {
{{0xFEDF, 0xFE82}, 0xFEF5},
{{0xFEDF, 0xFE84}, 0xFEF7},
{{0xFEDF, 0xFE88}, 0xFEF9},
{{0xFEDF, 0xFE8E}, 0xFEFB},
{{0xFEE0, 0xFE82}, 0xFEF6},
{{0xFEE0, 0xFE84}, 0xFEF8},
{{0xFEE0, 0xFE88}, 0xFEFA},
{{0xFEE0, 0xFE8E}, 0xFEFC},
};
const PairMap console_liga_table[] = {
{{0x0640, 0xFC60}, 0xFCF2},
{{0x0640, 0xFC61}, 0xFCF3},
{{0x0640, 0xFC62}, 0xFCF4},
{{0x0640, 0xFE70}, 0xFE71},
{{0x0640, 0xFE76}, 0xFE77},
{{0x0640, 0xFE78}, 0xFE79},
{{0x0640, 0xFE7A}, 0xFE7B},
{{0x0640, 0xFE7C}, 0xFE7D},
{{0x0640, 0xFE7E}, 0xFE7F},
{{0xFBE8, 0x0654}, 0xFE8B},
{{0xFBE9, 0x0654}, 0xFE8C},
{{0xFBFC, 0x0654}, 0xFE89},
{{0xFBFC, 0x0670}, 0xFC5D},
{{0xFBFD, 0x0654}, 0xFE8A},
{{0xFBFD, 0x0670}, 0xFC90},
{{0xFE7C, 0x0670}, 0xFC63},
{{0xFE7C, 0xFE72}, 0xFC5E},
{{0xFE7C, 0xFE74}, 0xFC5F},
{{0xFE7C, 0xFE76}, 0xFC60},
{{0xFE7C, 0xFE78}, 0xFC61},
{{0xFE7C, 0xFE7A}, 0xFC62},
{{0xFE7D, 0xFE76}, 0xFCF2},
{{0xFE7D, 0xFE77}, 0xFCF2},
{{0xFE7D, 0xFE78}, 0xFCF3},
{{0xFE7D, 0xFE79}, 0xFCF3},
{{0xFE7D, 0xFE7A}, 0xFCF4},
{{0xFE7D, 0xFE7B}, 0xFCF4},
{{0xFE8D, 0x0653}, 0xFE81},
{{0xFE8D, 0x0654}, 0xFE83},
{{0xFE8D, 0x0655}, 0xFE87},
{{0xFE8D, 0xFE70}, 0xFD3D},
{{0xFE8E, 0x0653}, 0xFE82},
{{0xFE8E, 0x0654}, 0xFE84},
{{0xFE8E, 0x0655}, 0xFE88},
{{0xFE8E, 0xFE70}, 0xFD3C},
{{0xFEE9, 0x0654}, 0xFBA4},
{{0xFEEA, 0x0654}, 0xFBA5},
{{0xFEED, 0x0654}, 0xFE85},
{{0xFEEE, 0x0654}, 0xFE86},
{{0xFEEF, 0x0654}, 0xFE89},
{{0xFEEF, 0x0670}, 0xFC5D},
{{0xFEF0, 0x0654}, 0xFE8A},
{{0xFEF0, 0x0670}, 0xFC90},
{{0xFEF1, 0x0654}, 0xFE89},
{{0xFEF1, 0x0670}, 0xFC5D},
{{0xFEF2, 0x0654}, 0xFE8A},
{{0xFEF2, 0x0670}, 0xFC90},
{{0xFEF3, 0x0654}, 0xFE8B},
{{0xFEF4, 0x0654}, 0xFE8C},
{{0xFEFB, 0x0653}, 0xFEF5},
{{0xFEFB, 0x0654}, 0xFEF7},
{{0xFEFB, 0x0655}, 0xFEF9},
{{0xFEFC, 0x0653}, 0xFEF6},
{{0xFEFC, 0x0654}, 0xFEF8},
{{0xFEFC, 0x0655}, 0xFEFA},
};
static const FriBidiChar NSMShap[][4] = {
{0xFE70, 0xFE71, 0xFE70, 0xFE71,},
{0xFE72, 0xFE72, 0xFE72, 0xFE72,},
{0xFE74, 0xFE74, 0xFE74, 0xFE74,},
{0xFE76, 0xFE77, 0xFE76, 0xFE77,},
{0xFE78, 0xFE79, 0xFE78, 0xFE79,},
{0xFE7A, 0xFE7B, 0xFE7A, 0xFE7B,},
{0xFE7C, 0xFE7D, 0xFE7C, 0xFE7D,},
{0xFE7E, 0xFE7F, 0xFE7E, 0xFE7F,},
};
/* *INDENT-ON* */
#ifndef FRIBIDI_ACCESS_SHAPE_TABLE
# define FRIBIDI_ACCESS_SHAPE_TABLE(table,min,max,x,shape) \
(((x)<(min)||(x)>(max))?(x):(table)[(x)-(min)][(shape)])
#endif
#define FRIBIDI_GET_ARABIC_SHAPE_NSM(x,shape) FRIBIDI_ACCESS_SHAPE_TABLE(NSMShap, 0x064B, 0x0652, (x), (shape))
-205
View File
@@ -1,205 +0,0 @@
/* arabic-shaping.tab.i
* generated by gen-arabic-shaping-tab (GNU FriBidi 0.19.1)
* from the files UnicodeData.txt, (null) of Unicode version 5.1.0. */
/*
use FRIBIDI_GET_ARABIC_SHAPE_PRES(key,shape) to access your table
required memory: 2864
*/
/* *INDENT-OFF* */
static const FriBidiChar ArShap[179][4] = {
{0xfe80,0x0621,0x0621,0x0621,},
{0xfe81,0xfe82,0x0622,0x0622,},
{0xfe83,0xfe84,0x0623,0x0623,},
{0xfe85,0xfe86,0x0624,0x0624,},
{0xfe87,0xfe88,0x0625,0x0625,},
{0xfe89,0xfe8a,0xfe8b,0xfe8c,},
{0xfe8d,0xfe8e,0x0627,0x0627,},
{0xfe8f,0xfe90,0xfe91,0xfe92,},
{0xfe93,0xfe94,0x0629,0x0629,},
{0xfe95,0xfe96,0xfe97,0xfe98,},
{0xfe99,0xfe9a,0xfe9b,0xfe9c,},
{0xfe9d,0xfe9e,0xfe9f,0xfea0,},
{0xfea1,0xfea2,0xfea3,0xfea4,},
{0xfea5,0xfea6,0xfea7,0xfea8,},
{0xfea9,0xfeaa,0x062f,0x062f,},
{0xfeab,0xfeac,0x0630,0x0630,},
{0xfead,0xfeae,0x0631,0x0631,},
{0xfeaf,0xfeb0,0x0632,0x0632,},
{0xfeb1,0xfeb2,0xfeb3,0xfeb4,},
{0xfeb5,0xfeb6,0xfeb7,0xfeb8,},
{0xfeb9,0xfeba,0xfebb,0xfebc,},
{0xfebd,0xfebe,0xfebf,0xfec0,},
{0xfec1,0xfec2,0xfec3,0xfec4,},
{0xfec5,0xfec6,0xfec7,0xfec8,},
{0xfec9,0xfeca,0xfecb,0xfecc,},
{0xfecd,0xfece,0xfecf,0xfed0,},
{0x063b,0x063b,0x063b,0x063b,},
{0x063c,0x063c,0x063c,0x063c,},
{0x063d,0x063d,0x063d,0x063d,},
{0x063e,0x063e,0x063e,0x063e,},
{0x063f,0x063f,0x063f,0x063f,},
{0x0640,0x0640,0x0640,0x0640,},
{0xfed1,0xfed2,0xfed3,0xfed4,},
{0xfed5,0xfed6,0xfed7,0xfed8,},
{0xfed9,0xfeda,0xfedb,0xfedc,},
{0xfedd,0xfede,0xfedf,0xfee0,},
{0xfee1,0xfee2,0xfee3,0xfee4,},
{0xfee5,0xfee6,0xfee7,0xfee8,},
{0xfee9,0xfeea,0xfeeb,0xfeec,},
{0xfeed,0xfeee,0x0648,0x0648,},
{0xfeef,0xfef0,0xfbe8,0xfbe9,},
{0xfef1,0xfef2,0xfef3,0xfef4,},
{0x064b,0x064b,0x064b,0x064b,},
{0x064c,0x064c,0x064c,0x064c,},
{0x064d,0x064d,0x064d,0x064d,},
{0x064e,0x064e,0x064e,0x064e,},
{0x064f,0x064f,0x064f,0x064f,},
{0x0650,0x0650,0x0650,0x0650,},
{0x0651,0x0651,0x0651,0x0651,},
{0x0652,0x0652,0x0652,0x0652,},
{0x0653,0x0653,0x0653,0x0653,},
{0x0654,0x0654,0x0654,0x0654,},
{0x0655,0x0655,0x0655,0x0655,},
{0x0656,0x0656,0x0656,0x0656,},
{0x0657,0x0657,0x0657,0x0657,},
{0x0658,0x0658,0x0658,0x0658,},
{0x0659,0x0659,0x0659,0x0659,},
{0x065a,0x065a,0x065a,0x065a,},
{0x065b,0x065b,0x065b,0x065b,},
{0x065c,0x065c,0x065c,0x065c,},
{0x065d,0x065d,0x065d,0x065d,},
{0x065e,0x065e,0x065e,0x065e,},
{0x065f,0x065f,0x065f,0x065f,},
{0x0660,0x0660,0x0660,0x0660,},
{0x0661,0x0661,0x0661,0x0661,},
{0x0662,0x0662,0x0662,0x0662,},
{0x0663,0x0663,0x0663,0x0663,},
{0x0664,0x0664,0x0664,0x0664,},
{0x0665,0x0665,0x0665,0x0665,},
{0x0666,0x0666,0x0666,0x0666,},
{0x0667,0x0667,0x0667,0x0667,},
{0x0668,0x0668,0x0668,0x0668,},
{0x0669,0x0669,0x0669,0x0669,},
{0x066a,0x066a,0x066a,0x066a,},
{0x066b,0x066b,0x066b,0x066b,},
{0x066c,0x066c,0x066c,0x066c,},
{0x066d,0x066d,0x066d,0x066d,},
{0x066e,0x066e,0x066e,0x066e,},
{0x066f,0x066f,0x066f,0x066f,},
{0x0670,0x0670,0x0670,0x0670,},
{0xfb50,0xfb51,0x0671,0x0671,},
{0x0672,0x0672,0x0672,0x0672,},
{0x0673,0x0673,0x0673,0x0673,},
{0x0674,0x0674,0x0674,0x0674,},
{0x0675,0x0675,0x0675,0x0675,},
{0x0676,0x0676,0x0676,0x0676,},
{0xfbdd,0x0677,0x0677,0x0677,},
{0x0678,0x0678,0x0678,0x0678,},
{0xfb66,0xfb67,0xfb68,0xfb69,},
{0xfb5e,0xfb5f,0xfb60,0xfb61,},
{0xfb52,0xfb53,0xfb54,0xfb55,},
{0x067c,0x067c,0x067c,0x067c,},
{0x067d,0x067d,0x067d,0x067d,},
{0xfb56,0xfb57,0xfb58,0xfb59,},
{0xfb62,0xfb63,0xfb64,0xfb65,},
{0xfb5a,0xfb5b,0xfb5c,0xfb5d,},
{0x0681,0x0681,0x0681,0x0681,},
{0x0682,0x0682,0x0682,0x0682,},
{0xfb76,0xfb77,0xfb78,0xfb79,},
{0xfb72,0xfb73,0xfb74,0xfb75,},
{0x0685,0x0685,0x0685,0x0685,},
{0xfb7a,0xfb7b,0xfb7c,0xfb7d,},
{0xfb7e,0xfb7f,0xfb80,0xfb81,},
{0xfb88,0xfb89,0x0688,0x0688,},
{0x0689,0x0689,0x0689,0x0689,},
{0x068a,0x068a,0x068a,0x068a,},
{0x068b,0x068b,0x068b,0x068b,},
{0xfb84,0xfb85,0x068c,0x068c,},
{0xfb82,0xfb83,0x068d,0x068d,},
{0xfb86,0xfb87,0x068e,0x068e,},
{0x068f,0x068f,0x068f,0x068f,},
{0x0690,0x0690,0x0690,0x0690,},
{0xfb8c,0xfb8d,0x0691,0x0691,},
{0x0692,0x0692,0x0692,0x0692,},
{0x0693,0x0693,0x0693,0x0693,},
{0x0694,0x0694,0x0694,0x0694,},
{0x0695,0x0695,0x0695,0x0695,},
{0x0696,0x0696,0x0696,0x0696,},
{0x0697,0x0697,0x0697,0x0697,},
{0xfb8a,0xfb8b,0x0698,0x0698,},
{0x0699,0x0699,0x0699,0x0699,},
{0x069a,0x069a,0x069a,0x069a,},
{0x069b,0x069b,0x069b,0x069b,},
{0x069c,0x069c,0x069c,0x069c,},
{0x069d,0x069d,0x069d,0x069d,},
{0x069e,0x069e,0x069e,0x069e,},
{0x069f,0x069f,0x069f,0x069f,},
{0x06a0,0x06a0,0x06a0,0x06a0,},
{0x06a1,0x06a1,0x06a1,0x06a1,},
{0x06a2,0x06a2,0x06a2,0x06a2,},
{0x06a3,0x06a3,0x06a3,0x06a3,},
{0xfb6a,0xfb6b,0xfb6c,0xfb6d,},
{0x06a5,0x06a5,0x06a5,0x06a5,},
{0xfb6e,0xfb6f,0xfb70,0xfb71,},
{0x06a7,0x06a7,0x06a7,0x06a7,},
{0x06a8,0x06a8,0x06a8,0x06a8,},
{0xfb8e,0xfb8f,0xfb90,0xfb91,},
{0x06aa,0x06aa,0x06aa,0x06aa,},
{0x06ab,0x06ab,0x06ab,0x06ab,},
{0x06ac,0x06ac,0x06ac,0x06ac,},
{0xfbd3,0xfbd4,0xfbd5,0xfbd6,},
{0x06ae,0x06ae,0x06ae,0x06ae,},
{0xfb92,0xfb93,0xfb94,0xfb95,},
{0x06b0,0x06b0,0x06b0,0x06b0,},
{0xfb9a,0xfb9b,0xfb9c,0xfb9d,},
{0x06b2,0x06b2,0x06b2,0x06b2,},
{0xfb96,0xfb97,0xfb98,0xfb99,},
{0x06b4,0x06b4,0x06b4,0x06b4,},
{0x06b5,0x06b5,0x06b5,0x06b5,},
{0x06b6,0x06b6,0x06b6,0x06b6,},
{0x06b7,0x06b7,0x06b7,0x06b7,},
{0x06b8,0x06b8,0x06b8,0x06b8,},
{0x06b9,0x06b9,0x06b9,0x06b9,},
{0xfb9e,0xfb9f,0x06ba,0x06ba,},
{0xfba0,0xfba1,0xfba2,0xfba3,},
{0x06bc,0x06bc,0x06bc,0x06bc,},
{0x06bd,0x06bd,0x06bd,0x06bd,},
{0xfbaa,0xfbab,0xfbac,0xfbad,},
{0x06bf,0x06bf,0x06bf,0x06bf,},
{0xfba4,0xfba5,0x06c0,0x06c0,},
{0xfba6,0xfba7,0xfba8,0xfba9,},
{0x06c2,0x06c2,0x06c2,0x06c2,},
{0x06c3,0x06c3,0x06c3,0x06c3,},
{0x06c4,0x06c4,0x06c4,0x06c4,},
{0xfbe0,0xfbe1,0x06c5,0x06c5,},
{0xfbd9,0xfbda,0x06c6,0x06c6,},
{0xfbd7,0xfbd8,0x06c7,0x06c7,},
{0xfbdb,0xfbdc,0x06c8,0x06c8,},
{0xfbe2,0xfbe3,0x06c9,0x06c9,},
{0x06ca,0x06ca,0x06ca,0x06ca,},
{0xfbde,0xfbdf,0x06cb,0x06cb,},
{0xfbfc,0xfbfd,0xfbfe,0xfbff,},
{0x06cd,0x06cd,0x06cd,0x06cd,},
{0x06ce,0x06ce,0x06ce,0x06ce,},
{0x06cf,0x06cf,0x06cf,0x06cf,},
{0xfbe4,0xfbe5,0xfbe6,0xfbe7,},
{0x06d1,0x06d1,0x06d1,0x06d1,},
{0xfbae,0xfbaf,0x06d2,0x06d2,},
{0xfbb0,0xfbb1,0x06d3,0x06d3,},
};
/* *INDENT-ON* */
#ifndef FRIBIDI_ACCESS_SHAPE_TABLE
# define FRIBIDI_ACCESS_SHAPE_TABLE(table,min,max,x,shape) \
(((x)<(min)||(x)>(max))?(x):(table)[(x)-(min)][(shape)])
#endif
#define FRIBIDI_GET_ARABIC_SHAPE_PRES(x,shape) FRIBIDI_ACCESS_SHAPE_TABLE(ArShap, 0x0621, 0x06d3, (x), (shape))
/* End of generated arabic-shaping.tab.i */
File diff suppressed because it is too large Load Diff
-61
View File
@@ -1,61 +0,0 @@
/* FriBidi
* bidi-types.h - define internal bidi types
*
* $Id: bidi-types.h,v 1.7 2006/01/31 03:23:12 behdad Exp $
* $Author: behdad $
* $Date: 2006/01/31 03:23:12 $
* $Revision: 1.7 $
* $Source: /cvs/fribidi/fribidi2/lib/bidi-types.h,v $
*
* Author:
* Behdad Esfahbod, 2001, 2002, 2004
*
* Copyright (C) 2004 Sharif FarsiWeb, Inc.
* Copyright (C) 2001,2002 Behdad Esfahbod
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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 GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library, in a file named COPYING; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA
*
* For licensing issues, contact <license@farsiweb.info>.
*/
#ifndef _BIDI_TYPES_H
#define _BIDI_TYPES_H
#include "common.h"
#include <fribidi-types.h>
#include <fribidi-bidi-types.h>
#include <fribidi-begindecls.h>
#define FRIBIDI_LEVEL_INVALID FRIBIDI_BIDI_MAX_RESOLVED_LEVELS
#define FRIBIDI_SENTINEL -1
#if DEBUG+0
#define fribidi_char_from_bidi_type FRIBIDI_PRIVATESPACE(char_from_bidi_type)
char
fribidi_char_from_bidi_type (
FriBidiCharType t /* input bidi type */
) FRIBIDI_GNUC_HIDDEN;
#endif /* DEBUG */
#include <fribidi-enddecls.h>
#endif /* !_BIDI_TYPES_H */
/* Editor directions:
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
*/
-190
View File
@@ -1,190 +0,0 @@
/* FriBidi
* common.h - common include for library sources
*
* $Id: common.h,v 1.20 2008-04-08 21:38:23 behdad Exp $
* $Author: behdad $
* $Date: 2008-04-08 21:38:23 $
* $Revision: 1.20 $
* $Source: /cvs/fribidi/fribidi2/lib/common.h,v $
*
* Author:
* Behdad Esfahbod, 2004
*
* Copyright (C) 2004 Sharif FarsiWeb, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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 GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library, in a file named COPYING; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA
*
* For licensing issues, contact <license@farsiweb.info>.
*/
#ifndef _COMMON_H
#define _COMMON_H
#if HAVE_CONFIG_H+0
# include <config.h>
#endif
#include <fribidi-common.h>
/* FRIBIDI_PRIVATESPACE is a macro used to name library internal symbols. */
#ifndef FRIBIDI_PRIVATESPACE
# define FRIBIDI_PRIVATESPACE1(A,B) A##B
# define FRIBIDI_PRIVATESPACE0(A,B) FRIBIDI_PRIVATESPACE1(A,B)
# define FRIBIDI_PRIVATESPACE(SYMBOL) FRIBIDI_PRIVATESPACE0(_,FRIBIDI_NAMESPACE(_##SYMBOL##__internal__))
#endif /* !FRIBIDI_PRIVATESPACE */
#if (defined(WIN32)) || (defined(_WIN32_WCE))
# define FRIBIDI_ENTRY __declspec(dllexport)
#endif /* WIN32 */
#if FRIBIDI_USE_GLIB+0
# ifndef SIZEOF_LONG
# define SIZEOF_LONG GLIB_SIZEOF_LONG
# endif /* !SIZEOF_LONG */
# ifndef SIZEOF_VOID_P
# define SIZEOF_VOID_P GLIB_SIZEOF_VOID_P
# endif /* !SIZEOF_VOID_P */
# ifndef __FRIBIDI_DOC
# include <glib/gmem.h>
# endif /* !__FRIBIDI_DOC */
# ifndef fribidi_malloc
# define fribidi_malloc g_try_malloc
# define fribidi_free g_free
# endif /* !fribidi_malloc */
# ifndef fribidi_assert
# ifndef __FRIBIDI_DOC
# include <glib/gmessages.h>
# endif /* !__FRIBIDI_DOC */
# define fribidi_assert g_assert
# endif /* !fribidi_assert */
# ifndef __FRIBIDI_DOC
# include <glib/gmacros.h>
# endif /* !__FRIBIDI_DOC */
# ifndef FRIBIDI_BEGIN_STMT
# define FRIBIDI_BEGIN_STMT G_STMT_START {
# define FRIBIDI_END_STMT } G_STMT_END
# endif /* !FRIBIDI_BEGIN_STMT */
# ifndef LIKELY
# define LIKELY G_LIKELY
# define UNLIKELY G_UNLIKELY
# endif /* !LIKELY */
# ifndef false
# define false FALSE
# endif /* !false */
# ifndef true
# define true TRUE
# endif /* !true */
#endif /* FRIBIDI_USE_GLIB */
#ifndef false
# define false (0)
# endif /* !false */
# ifndef true
# define true (!false)
# endif /* !true */
#ifndef NULL
# ifdef __cplusplus
# define NULL (0L)
# else /* !__cplusplus */
# define NULL ((void*) 0)
# endif /* !__cplusplus */
#endif /* !NULL */
/* fribidi_malloc and fribidi_free should be used instead of malloc and free.
* No need to include any headers. */
#ifndef fribidi_malloc
# if HAVE_STDLIB_H
# ifndef __FRIBIDI_DOC
# include <stdlib.h>
# endif /* __FRIBIDI_DOC */
# define fribidi_malloc malloc
# else /* !HAVE_STDLIB_H */
# define fribidi_malloc (void *) malloc
# endif /* !HAVE_STDLIB_H */
# define fribidi_free free
#else /* fribidi_malloc */
# ifndef fribidi_free
# error "You should define fribidi_free too when you define fribidi_malloc."
# endif /* !fribidi_free */
#endif /* fribidi_malloc */
#if HAVE_STRING_H+0
# if !STDC_HEADERS && HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H+0
# include <strings.h>
#endif
/* FRIBIDI_CHUNK_SIZE is the number of bytes in each chunk of memory being
* allocated for data structure pools. */
#ifndef FRIBIDI_CHUNK_SIZE
# if HAVE_ASM_PAGE_H
# ifndef __FRIBIDI_DOC
# include <asm/page.h>
# endif /* __FRIBIDI_DOC */
# define FRIBIDI_CHUNK_SIZE (PAGE_SIZE - 16)
# else /* !HAVE_ASM_PAGE_H */
# define FRIBIDI_CHUNK_SIZE (4096 - 16)
# endif /* !HAVE_ASM_PAGE_H */
#else /* FRIBIDI_CHUNK_SIZE */
# if FRIBIDI_CHUNK_SIZE < 256
# error "FRIBIDI_CHUNK_SIZE now should define the size of a chunk in bytes."
# endif /* FRIBIDI_CHUNK_SIZE < 256 */
#endif /* FRIBIDI_CHUNK_SIZE */
/* FRIBIDI_BEGIN_STMT should be used at the beginning of your macro
* definitions that are to behave like simple statements. Use
* FRIBIDI_END_STMT at the end of the macro after the semicolon or brace. */
#ifndef FRIBIDI_BEGIN_STMT
# define FRIBIDI_BEGIN_STMT do {
# define FRIBIDI_END_STMT } while (0)
#endif /* !FRIBIDI_BEGIN_STMT */
/* LIKEYLY and UNLIKELY are used to give a hint on branch prediction to the
* compiler. */
#ifndef LIKELY
# define LIKELY
# define UNLIKELY
#endif /* !LIKELY */
#ifndef FRIBIDI_EMPTY_STMT
# define FRIBIDI_EMPTY_STMT FRIBIDI_BEGIN_STMT (void) 0; FRIBIDI_END_STMT
#endif /* !FRIBIDI_EMPTY_STMT */
#if HAVE_STRINGIZE+0
# define STRINGIZE(symbol) #symbol
#else /* !HAVE_STRINGIZE */
# error "No stringize operator available?"
#endif /* !HAVE_STRINGIZE */
/* As per recommendation of GNU Coding Standards. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif /* !_GNU_SOURCE */
/* We respect our own rules. */
#define FRIBIDI_NO_DEPRECATED
#include "debug.h"
#endif /* !_COMMON_H */
/* Editor directions:
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
*/
-113
View File
@@ -1,113 +0,0 @@
/* FriBidi
* debug.h - debug-only interfaces
*
* $Id: debug.h,v 1.10 2006/01/31 03:23:12 behdad Exp $
* $Author: behdad $
* $Date: 2006/01/31 03:23:12 $
* $Revision: 1.10 $
* $Source: /cvs/fribidi/fribidi2/lib/debug.h,v $
*
* Author:
* Behdad Esfahbod, 2001, 2002, 2004
*
* Copyright (C) 2004 Sharif FarsiWeb, Inc.
* Copyright (C) 2001,2002 Behdad Esfahbod
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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 GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library, in a file named COPYING; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA
*
* For licensing issues, contact <license@farsiweb.info>.
*/
#ifndef _DEBUG_H
#define _DEBUG_H
#include "common.h"
#include <fribidi-types.h>
#include <fribidi-begindecls.h>
#if DEBUG+0
/* These definitions should only be used in DEBUG mode: */
#ifndef __LINE__
# define __LINE__ 0
#endif /* !__LINE__ */
#ifndef __FILE__
# define __FILE__ "unknown"
#endif /* !__FILE__ */
#ifndef FRIBIDI_FPRINTF
# ifndef __FRIBIDI_DOC
# include <stdio.h>
# endif /* !__FRIBIDI_DOC */
# define FRIBIDI_FPRINTF fprintf
# define FRIBIDI_STDERR_ stderr,
#endif /* !FRIBIDI_FPRINTF */
#ifndef MSG
#define MSG(s) \
FRIBIDI_BEGIN_STMT \
FRIBIDI_FPRINTF(FRIBIDI_STDERR_ s); \
FRIBIDI_END_STMT
#define MSG2(s, t) \
FRIBIDI_BEGIN_STMT \
FRIBIDI_FPRINTF(FRIBIDI_STDERR_ s, t); \
FRIBIDI_END_STMT
#define MSG5(s, t, u, v, w) \
FRIBIDI_BEGIN_STMT \
FRIBIDI_FPRINTF(FRIBIDI_STDERR_ s, t, u, v, w); \
FRIBIDI_END_STMT
#endif /* !MSG */
#ifndef DBG
# define DBG(s) \
FRIBIDI_BEGIN_STMT \
if (fribidi_debug_status()) { MSG(FRIBIDI ": " s "\n"); } \
FRIBIDI_END_STMT
# define DBG2(s, t) \
FRIBIDI_BEGIN_STMT \
if (fribidi_debug_status()) { MSG2(FRIBIDI ": " s "\n", t); } \
FRIBIDI_END_STMT
#endif /* !DBG */
#ifndef fribidi_assert
# define fribidi_assert(cond) \
FRIBIDI_BEGIN_STMT \
if (!(cond)) { \
DBG(__FILE__ ":" STRINGIZE(__LINE__) ": " \
"assertion failed (" STRINGIZE(cond) ")"); \
} \
FRIBIDI_END_STMT
#endif /* !fribidi_assert */
#else /* !DEBUG */
#ifndef DBG
# define DBG(s) FRIBIDI_EMPTY_STMT
# define DBG2(s, t) FRIBIDI_EMPTY_STMT
#endif /* !DBG */
#ifndef fribidi_assert
# define fribidi_assert(cond) FRIBIDI_EMPTY_STMT
#endif /* !fribidi_assert */
#endif /* !DEBUG */
#include <fribidi-enddecls.h>
#endif /* !_DEBUG_H */
/* Editor directions:
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
*/
-193
View File
@@ -1,193 +0,0 @@
/* fribidi-arabic.c - Arabic shaping
*
* Copyright (C) 2005 Behdad Esfahbod
*
* This file is part of GNU FriBidi.
*
* GNU FriBidi is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* GNU FriBidi 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
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with GNU FriBidi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For licensing issues, contact <license@farsiweb.info> or write to
* Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran.
*/
/* $Id: fribidi-arabic.c,v 1.3 2007/04/05 16:14:39 behdad Exp $
* $Author: behdad $
* $Date: 2007/04/05 16:14:39 $
* $Revision: 1.3 $
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-arabic.c,v $
*
* Author(s):
* Behdad Esfahbod, 2005
*/
#include "common.h"
#if HAVE_STDLIB_H+0
# include <stdlib.h>
#endif
#include <fribidi-arabic.h>
#include <fribidi-unicode.h>
typedef struct _PairMap {
FriBidiChar pair[2], to;
} PairMap;
#define FRIBIDI_ACCESS_SHAPE_TABLE(table,min,max,x,shape) (table), (min), (max)
# define FRIBIDI_ACCESS_SHAPE_TABLE_REAL(table,min,max,x,shape) \
(((x)<(min)||(x)>(max))?(x):(table)[(x)-(min)][(shape)])
#include "arabic-shaping.tab.i"
#include "arabic-misc.tab.i"
static void
fribidi_shape_arabic_joining (
/* input */
const FriBidiChar table[][4],
FriBidiChar min,
FriBidiChar max,
const FriBidiStrIndex len,
const FriBidiArabicProp *ar_props,
/* input and output */
FriBidiChar *str
)
{
register FriBidiStrIndex i;
for (i = 0; i < len; i++)
if (FRIBIDI_ARAB_SHAPES(ar_props[i]))
str[i] = FRIBIDI_ACCESS_SHAPE_TABLE_REAL (table, min, max, str[i], FRIBIDI_JOIN_SHAPE (ar_props[i]));
}
static int
comp_PairMap (const void *pa, const void *pb)
{
PairMap *a = (PairMap *)pa;
PairMap *b = (PairMap *)pb;
if (a->pair[0] != b->pair[0])
return a->pair[0] < b->pair[0] ? -1 : +1;
else
return a->pair[1] < b->pair[1] ? -1 :
a->pair[1] > b->pair[1] ? +1 :
0;
}
static FriBidiChar
find_pair_match (const PairMap *table, int size, FriBidiChar first, FriBidiChar second)
{
PairMap *match;
PairMap x;
x.pair[0] = first;
x.pair[1] = second;
x.to = 0;
match = bsearch (&x, table, size, sizeof (table[0]), comp_PairMap);
return match ? match->to : 0;
}
#define PAIR_MATCH(table,len,first,second) \
((first)<(table[0].pair[0])||(first)>(table[len-1].pair[0])?0: \
find_pair_match(table, len, first, second))
static void
fribidi_shape_arabic_ligature (
/* input */
const PairMap *table,
int size,
const FriBidiLevel *embedding_levels,
const FriBidiStrIndex len,
/* input and output */
FriBidiArabicProp *ar_props,
FriBidiChar *str
)
{
/* TODO: This doesn't form ligatures for even-level Arabic text.
* no big problem though. */
register FriBidiStrIndex i;
for (i = 0; i < len - 1; i++) {
register FriBidiChar c;
if (FRIBIDI_LEVEL_IS_RTL(embedding_levels[i]) &&
embedding_levels[i] == embedding_levels[i+1] &&
(c = PAIR_MATCH(table, size, str[i], str[i+1])))
{
str[i] = FRIBIDI_CHAR_FILL;
FRIBIDI_SET_BITS(ar_props[i], FRIBIDI_MASK_LIGATURED);
str[i+1] = c;
}
}
}
#define DO_LIGATURING(table, levels, len, ar_props, str) \
fribidi_shape_arabic_ligature ((table), sizeof(table)/sizeof((table)[0]), levels, len, ar_props, str)
#define DO_SHAPING(tablemacro, len, ar_props, str) \
fribidi_shape_arabic_joining (tablemacro(,), len, ar_props, str);
FRIBIDI_ENTRY void
fribidi_shape_arabic (
/* input */
FriBidiFlags flags,
const FriBidiLevel *embedding_levels,
const FriBidiStrIndex len,
/* input and output */
FriBidiArabicProp *ar_props,
FriBidiChar *str
)
{
DBG ("in fribidi_shape_arabic");
if UNLIKELY
(len == 0 || !str) return;
DBG ("in fribidi_shape");
fribidi_assert (ar_props);
if (FRIBIDI_TEST_BITS (flags, FRIBIDI_FLAG_SHAPE_ARAB_PRES))
{
DO_SHAPING (FRIBIDI_GET_ARABIC_SHAPE_PRES, len, ar_props, str);
}
if (FRIBIDI_TEST_BITS (flags, FRIBIDI_FLAG_SHAPE_ARAB_LIGA))
{
DO_LIGATURING (mandatory_liga_table, embedding_levels, len, ar_props, str);
}
if (FRIBIDI_TEST_BITS (flags, FRIBIDI_FLAG_SHAPE_ARAB_CONSOLE))
{
DO_LIGATURING (console_liga_table, embedding_levels, len, ar_props, str);
DO_SHAPING (FRIBIDI_GET_ARABIC_SHAPE_NSM, len, ar_props, str);
}
}
/* Editor directions:
* Local Variables:
* mode: c
* c-basic-offset: 2
* indent-tabs-mode: t
* tab-width: 8
* End:
* vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8:
*/
-88
View File
@@ -1,88 +0,0 @@
/* fribidi-arabic.h - do Arabic shaping to presentation forms
*
* Copyright (C) 2005 Behdad Esfahbod
*
* This file is part of GNU FriBidi.
*
* GNU FriBidi is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* GNU FriBidi 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
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with GNU FriBidi; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* For licensing issues, contact <license@farsiweb.info> or write to
* Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran.
*/
/* $Id: fribidi-arabic.h,v 1.1 2005/11/03 01:39:01 behdad Exp $
* $Author: behdad $
* $Date: 2005/11/03 01:39:01 $
* $Revision: 1.1 $
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-arabic.h,v $
*
* Author(s):
* Behdad Esfahbod, 2005
*/
#ifndef _FRIBIDI_ARABIC_H
#define _FRIBIDI_ARABIC_H
#include "fribidi-common.h"
#include "fribidi-types.h"
#include "fribidi-flags.h"
#include "fribidi-bidi-types.h"
#include "fribidi-joining.h"
#include "fribidi-begindecls.h"
#define fribidi_shape_arabic FRIBIDI_NAMESPACE(shape_arabic)
/* fribidi_shape_arabic - do Arabic shaping
*
* The actual shaping that is done depends on the flags set. Only flags
* starting with FRIBIDI_FLAG_SHAPE_ARAB_ affect this function.
* Currently these are:
*
* * FRIBIDI_FLAG_SHAPE_MIRRORING: Do mirroring.
* * FRIBIDI_FLAG_SHAPE_ARAB_PRES: Shape Arabic characters to their
* presentation form glyphs.
* * FRIBIDI_FLAG_SHAPE_ARAB_LIGA: Form mandatory Arabic ligatures.
* * FRIBIDI_FLAG_SHAPE_ARAB_CONSOLE: Perform additional Arabic shaping
* suitable for text rendered on
* grid terminals with no mark
* rendering capabilities.
*
* Of the above, FRIBIDI_FLAG_SHAPE_ARAB_CONSOLE is only used in special
* cases, but the rest are recommended in any enviroment that doesn't have
* other means for doing Arabic shaping. The set of extra flags that enable
* this level of Arabic support has a shortcut named FRIBIDI_FLAGS_ARABIC.
*/
FRIBIDI_ENTRY void
fribidi_shape_arabic (
FriBidiFlags flags, /* shaping flags */
const FriBidiLevel *embedding_levels,
const FriBidiStrIndex len, /* input string length */
FriBidiArabicProp *ar_props, /* input/output Arabic properties as
* computed by fribidi_join_arabic */
FriBidiChar *str /* string to shape */
);
#include "fribidi-enddecls.h"
#endif /* !_FRIBIDI_ARABIC_H */
/* Editor directions:
* Local Variables:
* mode: c
* c-basic-offset: 2
* indent-tabs-mode: t
* tab-width: 8
* End:
* vim: textwidth=78: autoindent: cindent: shiftwidth=2: tabstop=8:
*/
@@ -1,3 +0,0 @@
#ifdef FRIBIDI_BEGIN_DECLS
FRIBIDI_BEGIN_DECLS
#endif /* FRIBIDI_BEGIN_DECLS */
@@ -1,98 +0,0 @@
#ifndef __FRIBIDI_DOC
/* FriBidi
* fribidi-bidi-types-list.h - list of bidi types
*
* $Id: fribidi-bidi-types-list.h,v 1.5 2004/06/13 20:11:42 behdad Exp $
* $Author: behdad $
* $Date: 2004/06/13 20:11:42 $
* $Revision: 1.5 $
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-bidi-types-list.h,v $
*
* Author:
* Behdad Esfahbod, 2001, 2002, 2004
*
* Copyright (C) 2004 Sharif FarsiWeb, Inc.
* Copyright (C) 2001,2002 Behdad Esfahbod
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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 GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library, in a file named COPYING; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA
*
* For licensing issues, contact <license@farsiweb.info>.
*/
/* *INDENT-OFF* */
#endif /* !__FRIBIDI_DOC */
#ifndef _FRIBIDI_ADD_TYPE
# define _FRIBIDI_ADD_TYPE(x,y)
#endif
#ifndef _FRIBIDI_ADD_ALIAS
# define _FRIBIDI_ADD_ALIAS(x1,x2)
#endif
#if !defined(_FRIBIDI_PAR_TYPES) || defined(_FRIBIDI_ALL_TYPES)
_FRIBIDI_ADD_TYPE (LTR, 'L') /* Left-To-Right letter */
_FRIBIDI_ADD_TYPE (RTL, 'R') /* Right-To-Left letter */
_FRIBIDI_ADD_TYPE (AL, 'A') /* Arabic Letter */
_FRIBIDI_ADD_TYPE (EN, '1') /* European Numeral */
_FRIBIDI_ADD_TYPE (AN, '9') /* Arabic Numeral */
_FRIBIDI_ADD_TYPE (ES, 'w') /* European number Separator */
_FRIBIDI_ADD_TYPE (ET, 'w') /* European number Terminator */
_FRIBIDI_ADD_TYPE (CS, 'w') /* Common Separator */
_FRIBIDI_ADD_TYPE (NSM, '`') /* Non Spacing Mark */
_FRIBIDI_ADD_TYPE (BN, 'b') /* Boundary Neutral */
_FRIBIDI_ADD_TYPE (BS, 'B') /* Block Separator */
_FRIBIDI_ADD_TYPE (SS, 'S') /* Segment Separator */
_FRIBIDI_ADD_TYPE (WS, '_') /* WhiteSpace */
_FRIBIDI_ADD_TYPE (ON, 'n') /* Other Neutral */
_FRIBIDI_ADD_TYPE (LRE, '+') /* Left-to-Right Embedding */
_FRIBIDI_ADD_TYPE (RLE, '+') /* Right-to-Left Embedding */
_FRIBIDI_ADD_TYPE (LRO, '+') /* Left-to-Right Override */
_FRIBIDI_ADD_TYPE (RLO, '+') /* Right-to-Left Override */
_FRIBIDI_ADD_TYPE (PDF, '-') /* Pop Directional Flag */
#if defined(_FRIBIDI_ADD_ALIAS)
_FRIBIDI_ADD_ALIAS (L, LTR)
_FRIBIDI_ADD_ALIAS (R, RTL)
_FRIBIDI_ADD_ALIAS (B, BS)
_FRIBIDI_ADD_ALIAS (S, SS)
#endif /* _FRIBIDI_ADD_ALIAS */
#if defined(_FRIBIDI_SENTINEL_TYPE) || defined(_FRIBIDI_ALL_TYPES)
_FRIBIDI_ADD_TYPE (SENTINEL, '$') /* SENTINEL */
#endif /* _FRIBIDI_SENTINEL_TYPES || _FRIBIDI_ALL_TYPES*/
#endif /* !_FRIBIDI_PAR_TYPES || _FRIBIDI_ALL_TYPES */
#if defined(_FRIBIDI_PAR_TYPES) || defined(_FRIBIDI_ALL_TYPES)
# if !defined(_FRIBIDI_ALL_TYPES)
_FRIBIDI_ADD_TYPE (LTR, 'L') /* Left-To-Right paragraph */
_FRIBIDI_ADD_TYPE (RTL, 'R') /* Right-To-Left paragraph */
_FRIBIDI_ADD_TYPE (ON, 'n') /* directiOn-Neutral paragraph */
# endif /* !_FRIBIDI_ALL_TYPES */
_FRIBIDI_ADD_TYPE (WLTR, 'l') /* Weak Left To Right paragraph */
_FRIBIDI_ADD_TYPE (WRTL, 'r') /* Weak Right To Left paragraph */
#endif /* _FRIBIDI_PAR_TYPES || _FRIBIDI_ALL_TYPES*/
#if defined(_FRIBIDI_ENUM_TYPES)
typedef enum {
# define _FRIBIDI_ADD_TYPE _FRIBIDI_ENUM_ADD_TYPE
# include "fribidi-bidi-types-list.h"
# undef _FRIBIDI_ADD_TYPE
_FRIBIDI_TYPES_MAX
} _FRIBIDI_ENUM_TYPES
#endif /* _FRIBIDI_ENUM_TYPES */
#ifndef __FRIBIDI_DOC
/* *INDENT-ON* */
#endif /* !__FRIBIDI_DOC */
-125
View File
@@ -1,125 +0,0 @@
/* FriBidi
* fribidi-bidi-types.c - character bidi types
*
* $Id: fribidi-bidi-types.c,v 1.9 2006/01/31 03:23:13 behdad Exp $
* $Author: behdad $
* $Date: 2006/01/31 03:23:13 $
* $Revision: 1.9 $
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-bidi-types.c,v $
*
* Authors:
* Behdad Esfahbod, 2001, 2002, 2004
*
* Copyright (C) 2004 Sharif FarsiWeb, Inc.
* Copyright (C) 2001,2002 Behdad Esfahbod
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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 GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library, in a file named COPYING; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA
*
* For licensing issues, contact <license@farsiweb.info>.
*/
#include "common.h"
#include <fribidi-bidi-types.h>
#include "bidi-types.h"
enum FriBidiCharTypeLinearEnum
{
# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) TYPE,
# include "fribidi-bidi-types-list.h"
# undef _FRIBIDI_ADD_TYPE
_FRIBIDI_NUM_TYPES
};
#include "bidi-type.tab.i"
/* Map FriBidiCharTypeLinearEnum to FriBidiCharType. */
static const FriBidiCharType linear_enum_to_char_type[] = {
# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) FRIBIDI_TYPE_##TYPE,
# include "fribidi-bidi-types-list.h"
# undef _FRIBIDI_ADD_TYPE
};
FRIBIDI_ENTRY FriBidiCharType
fribidi_get_bidi_type (
/* input */
FriBidiChar ch
)
{
return linear_enum_to_char_type[FRIBIDI_GET_BIDI_TYPE (ch)];
}
FRIBIDI_ENTRY void
fribidi_get_bidi_types (
/* input */
const FriBidiChar *str,
const FriBidiStrIndex len,
/* output */
FriBidiCharType *btypes
)
{
register FriBidiStrIndex i = len;
for (; i; i--)
{
*btypes++ = linear_enum_to_char_type[FRIBIDI_GET_BIDI_TYPE (*str)];
str++;
}
}
FRIBIDI_ENTRY const char *
fribidi_get_bidi_type_name (
/* input */
FriBidiCharType t
)
{
switch (t)
{
# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) case FRIBIDI_TYPE_##TYPE: return STRINGIZE(TYPE);
# define _FRIBIDI_ALL_TYPES
# include "fribidi-bidi-types-list.h"
# undef _FRIBIDI_ALL_TYPES
# undef _FRIBIDI_ADD_TYPE
default:
return "?";
}
}
#if DEBUG+0
char
fribidi_char_from_bidi_type (
/* input */
FriBidiCharType t
)
{
switch (t)
{
# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) case FRIBIDI_TYPE_##TYPE: return SYMBOL;
# define _FRIBIDI_ALL_TYPES
# include "fribidi-bidi-types-list.h"
# undef _FRIBIDI_ALL_TYPES
# undef _FRIBIDI_ADD_TYPE
default:
return '?';
}
}
#endif /* DEBUG */
/* Editor directions:
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
*/
-389
View File
@@ -1,389 +0,0 @@
/* FriBidi
* fribidi-bidi-types.h - character bidi types
*
* $Id: fribidi-bidi-types.h,v 1.15 2008-11-24 17:48:31 behdad Exp $
* $Author: behdad $
* $Date: 2008-11-24 17:48:31 $
* $Revision: 1.15 $
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-bidi-types.h,v $
*
* Author:
* Behdad Esfahbod, 2001, 2002, 2004
*
* Copyright (C) 2004 Sharif FarsiWeb, Inc.
* Copyright (C) 2001,2002 Behdad Esfahbod
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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 GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library, in a file named COPYING; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA
*
* For licensing issues, contact <license@farsiweb.info>.
*/
#ifndef _FRIBIDI_BIDI_TYPES_H
#define _FRIBIDI_BIDI_TYPES_H
#include "fribidi-common.h"
#include "fribidi-types.h"
#include "fribidi-begindecls.h"
typedef signed char FriBidiLevel;
/*
* Define bit masks that bidi types are based on, each mask has
* only one bit set.
*/
/* RTL mask better be the least significant bit. */
#define FRIBIDI_MASK_RTL 0x00000001L /* Is right to left */
#define FRIBIDI_MASK_ARABIC 0x00000002L /* Is arabic */
/* Each char can be only one of the three following. */
#define FRIBIDI_MASK_STRONG 0x00000010L /* Is strong */
#define FRIBIDI_MASK_WEAK 0x00000020L /* Is weak */
#define FRIBIDI_MASK_NEUTRAL 0x00000040L /* Is neutral */
#define FRIBIDI_MASK_SENTINEL 0x00000080L /* Is sentinel */
/* Sentinels are not valid chars, just identify the start/end of strings. */
/* Each char can be only one of the five following. */
#define FRIBIDI_MASK_LETTER 0x00000100L /* Is letter: L, R, AL */
#define FRIBIDI_MASK_NUMBER 0x00000200L /* Is number: EN, AN */
#define FRIBIDI_MASK_NUMSEPTER 0x00000400L /* Is separator or terminator: ES, ET, CS */
#define FRIBIDI_MASK_SPACE 0x00000800L /* Is space: BN, BS, SS, WS */
#define FRIBIDI_MASK_EXPLICIT 0x00001000L /* Is expilict mark: LRE, RLE, LRO, RLO, PDF */
/* Can be set only if FRIBIDI_MASK_SPACE is also set. */
#define FRIBIDI_MASK_SEPARATOR 0x00002000L /* Is text separator: BS, SS */
/* Can be set only if FRIBIDI_MASK_EXPLICIT is also set. */
#define FRIBIDI_MASK_OVERRIDE 0x00004000L /* Is explicit override: LRO, RLO */
/* The following exist to make types pairwise different, some of them can
* be removed but are here because of efficiency (make queries faster). */
#define FRIBIDI_MASK_ES 0x00010000L
#define FRIBIDI_MASK_ET 0x00020000L
#define FRIBIDI_MASK_CS 0x00040000L
#define FRIBIDI_MASK_NSM 0x00080000L
#define FRIBIDI_MASK_BN 0x00100000L
#define FRIBIDI_MASK_BS 0x00200000L
#define FRIBIDI_MASK_SS 0x00400000L
#define FRIBIDI_MASK_WS 0x00800000L
/* We reserve a single bit for user's private use: we will never use it. */
#define FRIBIDI_MASK_PRIVATE 0x01000000L
/*
* Define values for FriBidiCharType
*/
/* Strong types */
/* Left-To-Right letter */
#define FRIBIDI_TYPE_LTR_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER )
/* Right-To-Left letter */
#define FRIBIDI_TYPE_RTL_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER \
| FRIBIDI_MASK_RTL)
/* Arabic Letter */
#define FRIBIDI_TYPE_AL_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_LETTER \
| FRIBIDI_MASK_RTL | FRIBIDI_MASK_ARABIC )
/* Left-to-Right Embedding */
#define FRIBIDI_TYPE_LRE_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT)
/* Right-to-Left Embedding */
#define FRIBIDI_TYPE_RLE_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \
| FRIBIDI_MASK_RTL )
/* Left-to-Right Override */
#define FRIBIDI_TYPE_LRO_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \
| FRIBIDI_MASK_OVERRIDE )
/* Right-to-Left Override */
#define FRIBIDI_TYPE_RLO_VAL ( FRIBIDI_MASK_STRONG | FRIBIDI_MASK_EXPLICIT \
| FRIBIDI_MASK_RTL | FRIBIDI_MASK_OVERRIDE )
/* Weak types */
/* Pop Directional Flag*/
#define FRIBIDI_TYPE_PDF_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_EXPLICIT )
/* European Numeral */
#define FRIBIDI_TYPE_EN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMBER )
/* Arabic Numeral */
#define FRIBIDI_TYPE_AN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMBER \
| FRIBIDI_MASK_ARABIC )
/* European number Separator */
#define FRIBIDI_TYPE_ES_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \
| FRIBIDI_MASK_ES )
/* European number Terminator */
#define FRIBIDI_TYPE_ET_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \
| FRIBIDI_MASK_ET )
/* Common Separator */
#define FRIBIDI_TYPE_CS_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NUMSEPTER \
| FRIBIDI_MASK_CS )
/* Non Spacing Mark */
#define FRIBIDI_TYPE_NSM_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_NSM )
/* Boundary Neutral */
#define FRIBIDI_TYPE_BN_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_SPACE \
| FRIBIDI_MASK_BN )
/* Neutral types */
/* Block Separator */
#define FRIBIDI_TYPE_BS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \
| FRIBIDI_MASK_SEPARATOR | FRIBIDI_MASK_BS )
/* Segment Separator */
#define FRIBIDI_TYPE_SS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \
| FRIBIDI_MASK_SEPARATOR | FRIBIDI_MASK_SS )
/* WhiteSpace */
#define FRIBIDI_TYPE_WS_VAL ( FRIBIDI_MASK_NEUTRAL | FRIBIDI_MASK_SPACE \
| FRIBIDI_MASK_WS )
/* Other Neutral */
#define FRIBIDI_TYPE_ON_VAL ( FRIBIDI_MASK_NEUTRAL )
/* The following are used in specifying paragraph direction only. */
/* Weak Left-To-Right */
#define FRIBIDI_TYPE_WLTR_VAL ( FRIBIDI_MASK_WEAK )
/* Weak Right-To-Left */
#define FRIBIDI_TYPE_WRTL_VAL ( FRIBIDI_MASK_WEAK | FRIBIDI_MASK_RTL )
/* start or end of text (run list) SENTINEL. Only used internally */
#define FRIBIDI_TYPE_SENTINEL ( FRIBIDI_MASK_SENTINEL )
/* Private types for applications. More private types can be obtained by
* summing up from this one. */
#define FRIBIDI_TYPE_PRIVATE ( FRIBIDI_MASK_PRIVATE )
/* Define Enums only if sizeof(int) == 4 (UTF-32), and not compiling C++.
* The problem with C++ is that then casts between int32 and enum will fail!
*/
#if defined(__FRIBIDI_DOC) || (FRIBIDI_SIZEOF_INT+0 == 4 && !defined(__cplusplus))
typedef enum
{
# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) \
FRIBIDI_TYPE_##TYPE = FRIBIDI_TYPE_##TYPE##_VAL,
# include "fribidi-bidi-types-list.h"
# undef _FRIBIDI_ADD_TYPE
_FRIBIDI_TYPE_SENTINEL = FRIBIDI_TYPE_SENTINEL /* Don't use this */
} FriBidiCharType;
typedef enum
{
# define _FRIBIDI_PAR_TYPES
# define _FRIBIDI_ADD_TYPE(TYPE,SYMBOL) \
FRIBIDI_PAR_##TYPE = FRIBIDI_TYPE_##TYPE##_VAL,
# include "fribidi-bidi-types-list.h"
# undef _FRIBIDI_ADD_TYPE
# undef _FRIBIDI_PAR_TYPES
_FRIBIDI_PAR_SENTINEL = FRIBIDI_TYPE_SENTINEL /* Don't use this */
} FriBidiParType;
#else
typedef fribidi_uint32 FriBidiCharType;
# define FRIBIDI_TYPE_LTR FRIBIDI_TYPE_LTR_VAL
# define FRIBIDI_TYPE_RTL FRIBIDI_TYPE_RTL_VAL
# define FRIBIDI_TYPE_AL FRIBIDI_TYPE_AL_VAL
# define FRIBIDI_TYPE_EN FRIBIDI_TYPE_EN_VAL
# define FRIBIDI_TYPE_AN FRIBIDI_TYPE_AN_VAL
# define FRIBIDI_TYPE_ES FRIBIDI_TYPE_ES_VAL
# define FRIBIDI_TYPE_ET FRIBIDI_TYPE_ET_VAL
# define FRIBIDI_TYPE_CS FRIBIDI_TYPE_CS_VAL
# define FRIBIDI_TYPE_NSM FRIBIDI_TYPE_NSM_VAL
# define FRIBIDI_TYPE_BN FRIBIDI_TYPE_BN_VAL
# define FRIBIDI_TYPE_BS FRIBIDI_TYPE_BS_VAL
# define FRIBIDI_TYPE_SS FRIBIDI_TYPE_SS_VAL
# define FRIBIDI_TYPE_WS FRIBIDI_TYPE_WS_VAL
# define FRIBIDI_TYPE_ON FRIBIDI_TYPE_ON_VAL
# define FRIBIDI_TYPE_LRE FRIBIDI_TYPE_LRE_VAL
# define FRIBIDI_TYPE_RLE FRIBIDI_TYPE_RLE_VAL
# define FRIBIDI_TYPE_LRO FRIBIDI_TYPE_LRO_VAL
# define FRIBIDI_TYPE_RLO FRIBIDI_TYPE_RLO_VAL
# define FRIBIDI_TYPE_PDF FRIBIDI_TYPE_PDF_VAL
typedef fribidi_uint32 FriBidiParType;
# define FRIBIDI_PAR_LTR FRIBIDI_TYPE_LTR_VAL
# define FRIBIDI_PAR_RTL FRIBIDI_TYPE_RTL_VAL
# define FRIBIDI_PAR_ON FRIBIDI_TYPE_ON_VAL
# define FRIBIDI_PAR_WLTR FRIBIDI_TYPE_WLTR_VAL
# define FRIBIDI_PAR_WRTL FRIBIDI_TYPE_WRTL_VAL
#endif
/* Please don't use these two type names, use FRIBIDI_PAR_* form instead. */
#define FRIBIDI_TYPE_WLTR FRIBIDI_PAR_WLTR
#define FRIBIDI_TYPE_WRTL FRIBIDI_PAR_WRTL
/*
* Defining macros for needed queries, It is fully dependent on the
* implementation of FriBidiCharType.
*/
/* Is right-to-left level? */
#define FRIBIDI_LEVEL_IS_RTL(lev) ((lev) & 1)
/* Return the bidi type corresponding to the direction of the level number,
FRIBIDI_TYPE_LTR for evens and FRIBIDI_TYPE_RTL for odds. */
#define FRIBIDI_LEVEL_TO_DIR(lev) \
(FRIBIDI_LEVEL_IS_RTL (lev) ? FRIBIDI_TYPE_RTL : FRIBIDI_TYPE_LTR)
/* Return the minimum level of the direction, 0 for FRIBIDI_TYPE_LTR and
1 for FRIBIDI_TYPE_RTL and FRIBIDI_TYPE_AL. */
#define FRIBIDI_DIR_TO_LEVEL(dir) \
((FriBidiLevel) (FRIBIDI_IS_RTL (dir) ? 1 : 0))
/* Is right to left: RTL, AL, RLE, RLO? */
#define FRIBIDI_IS_RTL(p) ((p) & FRIBIDI_MASK_RTL)
/* Is arabic: AL, AN? */
#define FRIBIDI_IS_ARABIC(p) ((p) & FRIBIDI_MASK_ARABIC)
/* Is strong? */
#define FRIBIDI_IS_STRONG(p) ((p) & FRIBIDI_MASK_STRONG)
/* Is weak? */
#define FRIBIDI_IS_WEAK(p) ((p) & FRIBIDI_MASK_WEAK)
/* Is neutral? */
#define FRIBIDI_IS_NEUTRAL(p) ((p) & FRIBIDI_MASK_NEUTRAL)
/* Is sentinel? */
#define FRIBIDI_IS_SENTINEL(p) ((p) & FRIBIDI_MASK_SENTINEL)
/* Is letter: L, R, AL? */
#define FRIBIDI_IS_LETTER(p) ((p) & FRIBIDI_MASK_LETTER)
/* Is number: EN, AN? */
#define FRIBIDI_IS_NUMBER(p) ((p) & FRIBIDI_MASK_NUMBER)
/* Is number separator or terminator: ES, ET, CS? */
#define FRIBIDI_IS_NUMBER_SEPARATOR_OR_TERMINATOR(p) \
((p) & FRIBIDI_MASK_NUMSEPTER)
/* Is space: BN, BS, SS, WS? */
#define FRIBIDI_IS_SPACE(p) ((p) & FRIBIDI_MASK_SPACE)
/* Is explicit mark: LRE, RLE, LRO, RLO, PDF? */
#define FRIBIDI_IS_EXPLICIT(p) ((p) & FRIBIDI_MASK_EXPLICIT)
/* Is text separator: BS, SS? */
#define FRIBIDI_IS_SEPARATOR(p) ((p) & FRIBIDI_MASK_SEPARATOR)
/* Is explicit override: LRO, RLO? */
#define FRIBIDI_IS_OVERRIDE(p) ((p) & FRIBIDI_MASK_OVERRIDE)
/* Some more: */
/* Is left to right letter: LTR? */
#define FRIBIDI_IS_LTR_LETTER(p) \
((p) & (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL) == FRIBIDI_MASK_LETTER)
/* Is right to left letter: RTL, AL? */
#define FRIBIDI_IS_RTL_LETTER(p) \
((p) & (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL) \
== (FRIBIDI_MASK_LETTER | FRIBIDI_MASK_RTL))
/* Is ES or CS: ES, CS? */
#define FRIBIDI_IS_ES_OR_CS(p) \
((p) & (FRIBIDI_MASK_ES | FRIBIDI_MASK_CS))
/* Is explicit or BN: LRE, RLE, LRO, RLO, PDF, BN? */
#define FRIBIDI_IS_EXPLICIT_OR_BN(p) \
((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN))
/* Is explicit or BN or NSM: LRE, RLE, LRO, RLO, PDF, BN, NSM? */
#define FRIBIDI_IS_EXPLICIT_OR_BN_OR_NSM(p) \
((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN | FRIBIDI_MASK_NSM))
/* Is explicit or BN or WS: LRE, RLE, LRO, RLO, PDF, BN, WS? */
#define FRIBIDI_IS_EXPLICIT_OR_BN_OR_WS(p) \
((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_BN | FRIBIDI_MASK_WS))
/* Is explicit or separator or BN or WS: LRE, RLE, LRO, RLO, PDF, BS, SS, BN, WS? */
#define FRIBIDI_IS_EXPLICIT_OR_SEPARATOR_OR_BN_OR_WS(p) \
((p) & (FRIBIDI_MASK_EXPLICIT | FRIBIDI_MASK_SEPARATOR \
| FRIBIDI_MASK_BN | FRIBIDI_MASK_WS))
/* Is private-use type for application? */
#define FRIBIDI_IS_PRIVATE(p) ((p) & FRIBIDI_MASK_PRIVATE)
/* Define some conversions. */
/* Change numbers to RTL: EN,AN -> RTL. */
#define FRIBIDI_CHANGE_NUMBER_TO_RTL(p) \
(FRIBIDI_IS_NUMBER(p) ? FRIBIDI_TYPE_RTL : (p))
/* Override status of an explicit mark:
* LRO,LRE->LTR, RLO,RLE->RTL, otherwise->ON. */
#define FRIBIDI_EXPLICIT_TO_OVERRIDE_DIR(p) \
(FRIBIDI_IS_OVERRIDE(p) ? FRIBIDI_LEVEL_TO_DIR(FRIBIDI_DIR_TO_LEVEL(p)) \
: FRIBIDI_TYPE_ON)
/* Weaken type for paragraph fallback purposes:
* LTR->WLTR, RTL->WRTL. */
#define FRIBIDI_WEAK_PARAGRAPH(p) (FRIBIDI_PAR_WLTR | ((p) & FRIBIDI_MASK_RTL))
/* Functions finally */
#define fribidi_get_bidi_type FRIBIDI_NAMESPACE(get_bidi_type)
/* fribidi_get_bidi_type - get character bidi type
*
* This function returns the bidi type of a character as defined in Table 3.7
* Bidirectional Character Types of the Unicode Bidirectional Algorithm
* available at
* http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types, using
* data provided in file UnicodeData.txt of the Unicode Character Database
* available at http://www.unicode.org/Public/UNIDATA/UnicodeData.txt.
*
* There are a few macros defined in fribidi-bidi-types.h for querying a bidi
* type.
*/
FRIBIDI_ENTRY FriBidiCharType
fribidi_get_bidi_type (
FriBidiChar ch /* input character */
) FRIBIDI_GNUC_CONST;
#define fribidi_get_bidi_types FRIBIDI_NAMESPACE(get_bidi_types)
/* fribidi_get_bidi_types - get bidi types for an string of characters
*
* This function finds the bidi types of an string of characters. See
* fribidi_get_bidi_type() for more information about the bidi types returned
* by this function.
*/
FRIBIDI_ENTRY void fribidi_get_bidi_types (
const FriBidiChar *str, /* input string */
const FriBidiStrIndex len, /* input string length */
FriBidiCharType *btypes /* output bidi types */
);
#define fribidi_get_bidi_type_name FRIBIDI_NAMESPACE(get_bidi_type_name)
/* fribidi_get_bidi_type_name - get bidi type name
*
* This function returns the bidi type name of a character type. The
* returned string is a static string and should not be freed.
*
* The type names are the same as ones defined in Table 3.7 Bidirectional
* Character Types of the Unicode Bidirectional Algorithm available at
* http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types, with a
* few modifications: L->LTR, R->RTL, B->BS, S->SS.
*/
FRIBIDI_ENTRY const char *fribidi_get_bidi_type_name (
FriBidiCharType t /* input bidi type */
) FRIBIDI_GNUC_CONST;
#include "fribidi-enddecls.h"
#endif /* !_FRIBIDI_BIDI_TYPES_H */
/* Editor directions:
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
*/
-992
View File
@@ -1,992 +0,0 @@
/* FriBidi
* fribidi-bidi.c - bidirectional algorithm
*
* $Id: fribidi-bidi.c,v 1.21 2007/03/15 18:09:25 behdad Exp $
* $Author: behdad $
* $Date: 2007/03/15 18:09:25 $
* $Revision: 1.21 $
* $Source: /cvs/fribidi/fribidi2/lib/fribidi-bidi.c,v $
*
* Authors:
* Behdad Esfahbod, 2001, 2002, 2004
* Dov Grobgeld, 1999, 2000
*
* Copyright (C) 2004 Sharif FarsiWeb, Inc
* Copyright (C) 2001,2002 Behdad Esfahbod
* Copyright (C) 1999,2000 Dov Grobgeld
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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 GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library, in a file named COPYING; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA
*
* For licensing issues, contact <license@farsiweb.info>.
*/
#include "common.h"
#include <fribidi-bidi.h>
#include <fribidi-mirroring.h>
#include <fribidi-unicode.h>
#include "mem.h"
#include "bidi-types.h"
#include "run.h"
/*
* This file implements most of Unicode Standard Annex #9, Tracking Number 13.
*/
#ifndef MAX
# define MAX(a,b) ((a) > (b) ? (a) : (b))
#endif /* !MAX */
/* Some convenience macros */
#define RL_TYPE(list) ((list)->type)
#define RL_LEN(list) ((list)->len)
#define RL_POS(list) ((list)->pos)
#define RL_LEVEL(list) ((list)->level)
static FriBidiRun *
merge_with_prev (
FriBidiRun *second
)
{
FriBidiRun *first;
fribidi_assert (second);
fribidi_assert (second->next);
first = second->prev;
fribidi_assert (first);
first->next = second->next;
first->next->prev = first;
RL_LEN (first) += RL_LEN (second);
free_run (second);
return first;
}
static void
compact_list (
FriBidiRun *list
)
{
fribidi_assert (list);
if (list->next)
for_run_list (list, list)
if (RL_TYPE (list->prev) == RL_TYPE (list)
&& RL_LEVEL (list->prev) == RL_LEVEL (list))
list = merge_with_prev (list);
}
static void
compact_neutrals (
FriBidiRun *list
)
{
fribidi_assert (list);
if (list->next)
{
for_run_list (list, list)
{
if (RL_LEVEL (list->prev) == RL_LEVEL (list)
&&
((RL_TYPE
(list->prev) == RL_TYPE (list)
|| (FRIBIDI_IS_NEUTRAL (RL_TYPE (list->prev))
&& FRIBIDI_IS_NEUTRAL (RL_TYPE (list))))))
list = merge_with_prev (list);
}
}
}
#if DEBUG+0
/*======================================================================
* For debugging, define some functions for printing the types and the
* levels.
*----------------------------------------------------------------------*/
static char char_from_level_array[] = {
'$', /* -1 == FRIBIDI_SENTINEL, indicating
* start or end of string. */
/* 0-61 == 0-9,a-z,A-Z are the the only valid levels before resolving
* implicits. after that the level @ may be appear too. */
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D',
'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
'Y', 'Z',
'@', /* 62 == only must appear after resolving
* implicits. */
'!', /* 63 == FRIBIDI_LEVEL_INVALID, internal error,
* this level shouldn't be seen. */
'*', '*', '*', '*', '*' /* >= 64 == overflows, this levels and higher
* levels show a real bug!. */
};
#define fribidi_char_from_level(level) char_from_level_array[(level) + 1]
static void
print_types_re (
const FriBidiRun *pp
)
{
fribidi_assert (pp);
MSG (" Run types : ");
for_run_list (pp, pp)
{
MSG5 ("%d:%d(%s)[%d] ",
pp->pos, pp->len, fribidi_get_bidi_type_name (pp->type), pp->level);
}
MSG ("\n");
}
static void
print_resolved_levels (
const FriBidiRun *pp
)
{
fribidi_assert (pp);
MSG (" Res. levels: ");
for_run_list (pp, pp)
{
register FriBidiStrIndex i;
for (i = RL_LEN (pp); i; i--)
MSG2 ("%c", fribidi_char_from_level (RL_LEVEL (pp)));
}
MSG ("\n");
}
static void
print_resolved_types (
const FriBidiRun *pp
)
{
fribidi_assert (pp);
MSG (" Res. types : ");
for_run_list (pp, pp)
{
FriBidiStrIndex i;
for (i = RL_LEN (pp); i; i--)
MSG2 ("%c", fribidi_char_from_bidi_type (pp->type));
}
MSG ("\n");
}
static void
print_bidi_string (
/* input */
const FriBidiCharType *bidi_types,
const FriBidiStrIndex len
)
{
register FriBidiStrIndex i;
fribidi_assert (bidi_types);
MSG (" Org. types : ");
for (i = 0; i < len; i++)
MSG2 ("%c", fribidi_char_from_bidi_type (bidi_types[i]));
MSG ("\n");
}
#endif /* DEBUG */
/*=========================================================================
* define macros for push and pop the status in to / out of the stack
*-------------------------------------------------------------------------*/
/* There are a few little points in pushing into and poping from the status
stack:
1. when the embedding level is not valid (more than
FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL=61), you must reject it, and not to push
into the stack, but when you see a PDF, you must find the matching code,
and if it was pushed in the stack, pop it, it means you must pop if and
only if you have pushed the matching code, the over_pushed var counts the
number of rejected codes so far.
2. there's a more confusing point too, when the embedding level is exactly
FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL-1=60, an LRO or LRE is rejected
because the new level would be FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL+1=62, that
is invalid; but an RLO or RLE is accepted because the new level is
FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL=61, that is valid, so the rejected codes
may be not continuous in the logical order, in fact there are at most two
continuous intervals of codes, with an RLO or RLE between them. To support
this case, the first_interval var counts the number of rejected codes in
the first interval, when it is 0, means that there is only one interval.
*/
/* a. If this new level would be valid, then this embedding code is valid.
Remember (push) the current embedding level and override status.
Reset current level to this new level, and reset the override status to
new_override.
b. If the new level would not be valid, then this code is invalid. Don't
change the current level or override status.
*/
#define PUSH_STATUS \
FRIBIDI_BEGIN_STMT \
if LIKELY(new_level <= FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL) \
{ \
if UNLIKELY(level == FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL - 1) \
first_interval = over_pushed; \
status_stack[stack_size].level = level; \
status_stack[stack_size].override = override; \
stack_size++; \
level = new_level; \
override = new_override; \
} else \
over_pushed++; \
FRIBIDI_END_STMT
/* If there was a valid matching code, restore (pop) the last remembered
(pushed) embedding level and directional override.
*/
#define POP_STATUS \
FRIBIDI_BEGIN_STMT \
if (stack_size) \
{ \
if UNLIKELY(over_pushed > first_interval) \
over_pushed--; \
else \
{ \
if LIKELY(over_pushed == first_interval) \
first_interval = 0; \
stack_size--; \
level = status_stack[stack_size].level; \
override = status_stack[stack_size].override; \
} \
} \
FRIBIDI_END_STMT
/* Return the type of previous run or the SOR, if already at the start of
a level run. */
#define PREV_TYPE_OR_SOR(pp) \
( \
RL_LEVEL(pp->prev) == RL_LEVEL(pp) ? \
RL_TYPE(pp->prev) : \
FRIBIDI_LEVEL_TO_DIR(MAX(RL_LEVEL(pp->prev), RL_LEVEL(pp))) \
)
/* Return the type of next run or the EOR, if already at the end of
a level run. */
#define NEXT_TYPE_OR_EOR(pp) \
( \
RL_LEVEL(pp->next) == RL_LEVEL(pp) ? \
RL_TYPE(pp->next) : \
FRIBIDI_LEVEL_TO_DIR(MAX(RL_LEVEL(pp->next), RL_LEVEL(pp))) \
)
/* Return the embedding direction of a link. */
#define FRIBIDI_EMBEDDING_DIRECTION(link) \
FRIBIDI_LEVEL_TO_DIR(RL_LEVEL(link))
FRIBIDI_ENTRY FriBidiParType
fribidi_get_par_direction (
/* input */
const FriBidiCharType *bidi_types,
const FriBidiStrIndex len
)
{
register FriBidiStrIndex i;
fribidi_assert (bidi_types);
for (i = 0; i < len; i++)
if (FRIBIDI_IS_LETTER (bidi_types[i]))
return FRIBIDI_IS_RTL (bidi_types[i]) ? FRIBIDI_PAR_RTL :
FRIBIDI_PAR_LTR;
return FRIBIDI_PAR_ON;
}
FRIBIDI_ENTRY FriBidiLevel
fribidi_get_par_embedding_levels (
/* input */
const FriBidiCharType *bidi_types,
const FriBidiStrIndex len,
/* input and output */
FriBidiParType *pbase_dir,
/* output */
FriBidiLevel *embedding_levels
)
{
FriBidiLevel base_level, max_level = 0;
FriBidiParType base_dir;
FriBidiRun *main_run_list = NULL, *explicits_list = NULL, *pp;
fribidi_boolean status = false;
if UNLIKELY
(!len)
{
status = true;
goto out;
}
DBG ("in fribidi_get_par_embedding_levels");
fribidi_assert (bidi_types);
fribidi_assert (pbase_dir);
fribidi_assert (embedding_levels);
/* Determinate character types */
{
/* Get run-length encoded character types */
main_run_list = run_list_encode_bidi_types (bidi_types, len);
if UNLIKELY
(!main_run_list) goto out;
}
/* Find base level */
/* If no strong base_dir was found, resort to the weak direction
that was passed on input. */
base_level = FRIBIDI_DIR_TO_LEVEL (*pbase_dir);
if (!FRIBIDI_IS_STRONG (*pbase_dir))
/* P2. P3. Search for first strong character and use its direction as
base direction */
{
for_run_list (pp, main_run_list) if (FRIBIDI_IS_LETTER (RL_TYPE (pp)))
{
base_level = FRIBIDI_DIR_TO_LEVEL (RL_TYPE (pp));
*pbase_dir = FRIBIDI_LEVEL_TO_DIR (base_level);
break;
}
}
base_dir = FRIBIDI_LEVEL_TO_DIR (base_level);
DBG2 (" base level : %c", fribidi_char_from_level (base_level));
DBG2 (" base dir : %c", fribidi_char_from_bidi_type (base_dir));
# if DEBUG
if UNLIKELY
(fribidi_debug_status ())
{
print_types_re (main_run_list);
}
# endif /* DEBUG */
/* Explicit Levels and Directions */
DBG ("explicit levels and directions");
{
FriBidiLevel level, new_level;
FriBidiCharType override, new_override;
FriBidiStrIndex i;
int stack_size, over_pushed, first_interval;
struct
{
FriBidiCharType override; /* only LTR, RTL and ON are valid */
FriBidiLevel level;
} *status_stack;
FriBidiRun temp_link;
/* explicits_list is a list like main_run_list, that holds the explicit
codes that are removed from main_run_list, to reinsert them later by
calling the shadow_run_list.
*/
explicits_list = new_run_list ();
if UNLIKELY
(!explicits_list) goto out;
/* X1. Begin by setting the current embedding level to the paragraph
embedding level. Set the directional override status to neutral.
Process each character iteratively, applying rules X2 through X9.
Only embedding levels from 0 to 61 are valid in this phase. */
level = base_level;
override = FRIBIDI_TYPE_ON;
/* stack */
stack_size = 0;
over_pushed = 0;
first_interval = 0;
status_stack = fribidi_malloc (sizeof (status_stack[0]) *
FRIBIDI_BIDI_MAX_RESOLVED_LEVELS);
for_run_list (pp, main_run_list)
{
FriBidiCharType this_type = RL_TYPE (pp);
if (FRIBIDI_IS_EXPLICIT_OR_BN (this_type))
{
if (FRIBIDI_IS_STRONG (this_type))
{ /* LRE, RLE, LRO, RLO */
/* 1. Explicit Embeddings */
/* X2. With each RLE, compute the least greater odd
embedding level. */
/* X3. With each LRE, compute the least greater even
embedding level. */
/* 2. Explicit Overrides */
/* X4. With each RLO, compute the least greater odd
embedding level. */
/* X5. With each LRO, compute the least greater even
embedding level. */
new_override = FRIBIDI_EXPLICIT_TO_OVERRIDE_DIR (this_type);
for (i = RL_LEN (pp); i; i--)
{
new_level =
((level + FRIBIDI_DIR_TO_LEVEL (this_type) + 2) & ~1) -
FRIBIDI_DIR_TO_LEVEL (this_type);
PUSH_STATUS;
}
}
else if (this_type == FRIBIDI_TYPE_PDF)
{
/* 3. Terminating Embeddings and overrides */
/* X7. With each PDF, determine the matching embedding or
override code. */
for (i = RL_LEN (pp); i; i--)
POP_STATUS;
}
/* X9. Remove all RLE, LRE, RLO, LRO, PDF, and BN codes. */
/* Remove element and add it to explicits_list */
RL_LEVEL (pp) = FRIBIDI_SENTINEL;
temp_link.next = pp->next;
move_node_before (pp, explicits_list);
pp = &temp_link;
}
else
{
/* X6. For all types besides RLE, LRE, RLO, LRO, and PDF:
a. Set the level of the current character to the current
embedding level.
b. Whenever the directional override status is not neutral,
reset the current character type to the directional override
status. */
RL_LEVEL (pp) = level;
if (!FRIBIDI_IS_NEUTRAL (override))
RL_TYPE (pp) = override;
}
/* X8. All explicit directional embeddings and overrides are
completely terminated at the end of each paragraph. Paragraph
separators are not included in the embedding. */
/* This function is running on a single paragraph, so we can do
X8 after all the input is processed. */
}
/* Implementing X8. It has no effect on a single paragraph! */
level = base_level;
override = FRIBIDI_TYPE_ON;
stack_size = 0;
over_pushed = 0;
fribidi_free (status_stack);
}
/* X10. The remaining rules are applied to each run of characters at the
same level. For each run, determine the start-of-level-run (sor) and
end-of-level-run (eor) type, either L or R. This depends on the
higher of the two levels on either side of the boundary (at the start
or end of the paragraph, the level of the 'other' run is the base
embedding level). If the higher level is odd, the type is R, otherwise
it is L. */
/* Resolving Implicit Levels can be done out of X10 loop, so only change
of Resolving Weak Types and Resolving Neutral Types is needed. */
compact_list (main_run_list);
# if DEBUG
if UNLIKELY
(fribidi_debug_status ())
{
print_types_re (main_run_list);
print_bidi_string (bidi_types, len);
print_resolved_levels (main_run_list);
print_resolved_types (main_run_list);
}
# endif /* DEBUG */
/* 4. Resolving weak types */
DBG ("resolving weak types");
{
FriBidiCharType last_strong, prev_type_orig;
fribidi_boolean w4;
last_strong = base_dir;
for_run_list (pp, main_run_list)
{
register FriBidiCharType prev_type, this_type, next_type;
prev_type = PREV_TYPE_OR_SOR (pp);
this_type = RL_TYPE (pp);
next_type = NEXT_TYPE_OR_EOR (pp);
if (FRIBIDI_IS_STRONG (prev_type))
last_strong = prev_type;
/* W1. NSM
Examine each non-spacing mark (NSM) in the level run, and change the
type of the NSM to the type of the previous character. If the NSM
is at the start of the level run, it will get the type of sor. */
/* Implementation note: it is important that if the previous character
is not sor, then we should merge this run with the previous,
because of rules like W5, that we assume all of a sequence of
adjacent ETs are in one FriBidiRun. */
if (this_type == FRIBIDI_TYPE_NSM)
{
if (RL_LEVEL (pp->prev) == RL_LEVEL (pp))
pp = merge_with_prev (pp);
else
RL_TYPE (pp) = prev_type;
continue; /* As we know the next condition cannot be true. */
}
/* W2: European numbers. */
if (this_type == FRIBIDI_TYPE_EN && last_strong == FRIBIDI_TYPE_AL)
{
RL_TYPE (pp) = FRIBIDI_TYPE_AN;
/* Resolving dependency of loops for rules W1 and W2, so we
can merge them in one loop. */
if (next_type == FRIBIDI_TYPE_NSM)
RL_TYPE (pp->next) = FRIBIDI_TYPE_AN;
}
}
last_strong = base_dir;
/* Resolving dependency of loops for rules W4 and W5, W5 may
want to prevent W4 to take effect in the next turn, do this
through "w4". */
w4 = true;
/* Resolving dependency of loops for rules W4 and W5 with W7,
W7 may change an EN to L but it sets the prev_type_orig if needed,
so W4 and W5 in next turn can still do their works. */
prev_type_orig = FRIBIDI_TYPE_ON;
for_run_list (pp, main_run_list)
{
register FriBidiCharType prev_type, this_type, next_type;
prev_type = PREV_TYPE_OR_SOR (pp);
this_type = RL_TYPE (pp);
next_type = NEXT_TYPE_OR_EOR (pp);
if (FRIBIDI_IS_STRONG (prev_type))
last_strong = prev_type;
/* W3: Change ALs to R. */
if (this_type == FRIBIDI_TYPE_AL)
{
RL_TYPE (pp) = FRIBIDI_TYPE_RTL;
w4 = true;
prev_type_orig = FRIBIDI_TYPE_ON;
continue;
}
/* W4. A single european separator changes to a european number.
A single common separator between two numbers of the same type
changes to that type. */
if (w4
&& RL_LEN (pp) == 1 && FRIBIDI_IS_ES_OR_CS (this_type)
&& FRIBIDI_IS_NUMBER (prev_type_orig)
&& prev_type_orig == next_type
&& (prev_type_orig == FRIBIDI_TYPE_EN
|| this_type == FRIBIDI_TYPE_CS))
{
RL_TYPE (pp) = prev_type;
this_type = RL_TYPE (pp);
}
w4 = true;
/* W5. A sequence of European terminators adjacent to European
numbers changes to All European numbers. */
if (this_type == FRIBIDI_TYPE_ET
&& (prev_type_orig == FRIBIDI_TYPE_EN
|| next_type == FRIBIDI_TYPE_EN))
{
RL_TYPE (pp) = FRIBIDI_TYPE_EN;
w4 = false;
this_type = RL_TYPE (pp);
}
/* W6. Otherwise change separators and terminators to other neutral. */
if (FRIBIDI_IS_NUMBER_SEPARATOR_OR_TERMINATOR (this_type))
RL_TYPE (pp) = FRIBIDI_TYPE_ON;
/* W7. Change european numbers to L. */
if (this_type == FRIBIDI_TYPE_EN && last_strong == FRIBIDI_TYPE_LTR)
{
RL_TYPE (pp) = FRIBIDI_TYPE_LTR;
prev_type_orig = (RL_LEVEL (pp) == RL_LEVEL (pp->next) ?
FRIBIDI_TYPE_EN : FRIBIDI_TYPE_ON);
}
else
prev_type_orig = PREV_TYPE_OR_SOR (pp->next);
}
}
compact_neutrals (main_run_list);
# if DEBUG
if UNLIKELY
(fribidi_debug_status ())
{
print_resolved_levels (main_run_list);
print_resolved_types (main_run_list);
}
# endif /* DEBUG */
/* 5. Resolving Neutral Types */
DBG ("resolving neutral types");
{
/* N1. and N2.
For each neutral, resolve it. */
for_run_list (pp, main_run_list)
{
FriBidiCharType prev_type, this_type, next_type;
/* "European and Arabic numbers are treated as though they were R"
FRIBIDI_CHANGE_NUMBER_TO_RTL does this. */
this_type = FRIBIDI_CHANGE_NUMBER_TO_RTL (RL_TYPE (pp));
prev_type = FRIBIDI_CHANGE_NUMBER_TO_RTL (PREV_TYPE_OR_SOR (pp));
next_type = FRIBIDI_CHANGE_NUMBER_TO_RTL (NEXT_TYPE_OR_EOR (pp));
if (FRIBIDI_IS_NEUTRAL (this_type))
RL_TYPE (pp) = (prev_type == next_type) ?
/* N1. */ prev_type :
/* N2. */ FRIBIDI_EMBEDDING_DIRECTION (pp);
}
}
compact_list (main_run_list);
# if DEBUG
if UNLIKELY
(fribidi_debug_status ())
{
print_resolved_levels (main_run_list);
print_resolved_types (main_run_list);
}
# endif /* DEBUG */
/* 6. Resolving implicit levels */
DBG ("resolving implicit levels");
{
max_level = base_level;
for_run_list (pp, main_run_list)
{
FriBidiCharType this_type;
int level;
this_type = RL_TYPE (pp);
level = RL_LEVEL (pp);
/* I1. Even */
/* I2. Odd */
if (FRIBIDI_IS_NUMBER (this_type))
RL_LEVEL (pp) = (level + 2) & ~1;
else
RL_LEVEL (pp) =
level +
(FRIBIDI_LEVEL_IS_RTL (level) ^ FRIBIDI_DIR_TO_LEVEL (this_type));
if (RL_LEVEL (pp) > max_level)
max_level = RL_LEVEL (pp);
}
}
compact_list (main_run_list);
# if DEBUG
if UNLIKELY
(fribidi_debug_status ())
{
print_bidi_string (bidi_types, len);
print_resolved_levels (main_run_list);
print_resolved_types (main_run_list);
}
# endif /* DEBUG */
/* Reinsert the explicit codes & BN's that are already removed, from the
explicits_list to main_run_list. */
DBG ("reinserting explicit codes");
if UNLIKELY
(explicits_list->next != explicits_list)
{
register FriBidiRun *p;
register fribidi_boolean stat =
shadow_run_list (main_run_list, explicits_list, true);
explicits_list = NULL;
if UNLIKELY
(!stat) goto out;
/* Set level of inserted explicit chars to that of their previous
* char, such that they do not affect reordering. */
p = main_run_list->next;
if (p != main_run_list && p->level == FRIBIDI_SENTINEL)
p->level = base_level;
for_run_list (p, main_run_list) if (p->level == FRIBIDI_SENTINEL)
p->level = p->prev->level;
}
# if DEBUG
if UNLIKELY
(fribidi_debug_status ())
{
print_types_re (main_run_list);
print_resolved_levels (main_run_list);
print_resolved_types (main_run_list);
}
# endif /* DEBUG */
DBG ("reset the embedding levels, 1, 2, 3.");
{
register int j, state, pos;
register FriBidiCharType char_type;
register FriBidiRun *p, *q, *list;
/* L1. Reset the embedding levels of some chars:
1. segment separators,
2. paragraph separators,
3. any sequence of whitespace characters preceding a segment
separator or paragraph separator, and
... (to be continued in fribidi_reorder_line()). */
list = new_run_list ();
if UNLIKELY
(!list) goto out;
q = list;
state = 1;
pos = len - 1;
for (j = len - 1; j >= -1; j--)
{
/* close up the open link at the end */
if (j >= 0)
char_type = bidi_types[j];
else
char_type = FRIBIDI_TYPE_ON;
if (!state && FRIBIDI_IS_SEPARATOR (char_type))
{
state = 1;
pos = j;
}
else if (state && !FRIBIDI_IS_EXPLICIT_OR_SEPARATOR_OR_BN_OR_WS
(char_type))
{
state = 0;
p = new_run ();
if UNLIKELY
(!p)
{
free_run_list (list);
goto out;
}
p->pos = j + 1;
p->len = pos - j;
p->type = base_dir;
p->level = base_level;
move_node_before (p, q);
q = p;
}
}
if UNLIKELY
(!shadow_run_list (main_run_list, list, false)) goto out;
}
# if DEBUG
if UNLIKELY
(fribidi_debug_status ())
{
print_types_re (main_run_list);
print_resolved_levels (main_run_list);
print_resolved_types (main_run_list);
}
# endif /* DEBUG */
{
FriBidiStrIndex pos = 0;
for_run_list (pp, main_run_list)
{
register FriBidiStrIndex l;
register FriBidiLevel level = pp->level;
for (l = pp->len; l; l--)
embedding_levels[pos++] = level;
}
}
status = true;
out:
DBG ("leaving fribidi_get_par_embedding_levels");
if (main_run_list)
free_run_list (main_run_list);
if UNLIKELY
(explicits_list) free_run_list (explicits_list);
return status ? max_level + 1 : 0;
}
static void
bidi_string_reverse (
FriBidiChar *str,
const FriBidiStrIndex len
)
{
FriBidiStrIndex i;
fribidi_assert (str);
for (i = 0; i < len / 2; i++)
{
FriBidiChar tmp = str[i];
str[i] = str[len - 1 - i];
str[len - 1 - i] = tmp;
}
}
static void
index_array_reverse (
FriBidiStrIndex *arr,
const FriBidiStrIndex len
)
{
FriBidiStrIndex i;
fribidi_assert (arr);
for (i = 0; i < len / 2; i++)
{
FriBidiStrIndex tmp = arr[i];
arr[i] = arr[len - 1 - i];
arr[len - 1 - i] = tmp;
}
}
FRIBIDI_ENTRY FriBidiLevel
fribidi_reorder_line (
/* input */
FriBidiFlags flags, /* reorder flags */
const FriBidiCharType *bidi_types,
const FriBidiStrIndex len,
const FriBidiStrIndex off,
const FriBidiParType base_dir,
/* input and output */
FriBidiLevel *embedding_levels,
FriBidiChar *visual_str,
/* output */
FriBidiStrIndex *map
)
{
fribidi_boolean status = false;
FriBidiLevel max_level = 0;
if UNLIKELY
(len == 0)
{
status = true;
goto out;
}
DBG ("in fribidi_reorder_line");
fribidi_assert (bidi_types);
fribidi_assert (embedding_levels);
DBG ("reset the embedding levels, 4. whitespace at the end of line");
{
register FriBidiStrIndex i;
/* L1. Reset the embedding levels of some chars:
4. any sequence of white space characters at the end of the line. */
for (i = off + len - 1; i >= off &&
FRIBIDI_IS_EXPLICIT_OR_BN_OR_WS (bidi_types[i]); i--)
embedding_levels[i] = FRIBIDI_DIR_TO_LEVEL (base_dir);
}
/* 7. Reordering resolved levels */
{
register FriBidiLevel level;
register FriBidiStrIndex i;
/* Reorder both the outstring and the order array */
{
if (FRIBIDI_TEST_BITS (flags, FRIBIDI_FLAG_REORDER_NSM))
{
/* L3. Reorder NSMs. */
for (i = off + len - 1; i >= off; i--)
if (FRIBIDI_LEVEL_IS_RTL (embedding_levels[i])
&& bidi_types[i] == FRIBIDI_TYPE_NSM)
{
register FriBidiStrIndex seq_end = i;
level = embedding_levels[i];
for (i--; i >= off &&
FRIBIDI_IS_EXPLICIT_OR_BN_OR_NSM (bidi_types[i])
&& embedding_levels[i] == level; i--)
;
if (i < off || embedding_levels[i] != level)
{
i++;
DBG ("warning: NSM(s) at the beggining of level run");
}
if (visual_str)
{
bidi_string_reverse (visual_str + i, seq_end - i + 1);
}
if (map)
{
index_array_reverse (map + i, seq_end - i + 1);
}
}
}
/* Find max_level of the line. We don't reuse the paragraph
* max_level, both for a cleaner API, and that the line max_level
* may be far less than paragraph max_level. */
for (i = off + len - 1; i >= off; i--)
if (embedding_levels[i] > max_level)
max_level = embedding_levels[i];
/* L2. Reorder. */
for (level = max_level; level > 0; level--)
for (i = off + len - 1; i >= off; i--)
if (embedding_levels[i] >= level)
{
/* Find all stretches that are >= level_idx */
register FriBidiStrIndex seq_end = i;
for (i--; i >= off && embedding_levels[i] >= level; i--)
;
if (visual_str)
bidi_string_reverse (visual_str + i + 1, seq_end - i);
if (map)
index_array_reverse (map + i + 1, seq_end - i);
}
}
}
status = true;
out:
return status ? max_level + 1 : 0;
}
/* Editor directions:
* vim:textwidth=78:tabstop=8:shiftwidth=2:autoindent:cindent
*/

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