Skip to content

Commit

Permalink
[qr] Rename get_string_from_jis_2004
Browse files Browse the repository at this point in the history
  • Loading branch information
IceflowRE committed Oct 3, 2023
1 parent 40810f7 commit 5e24cdc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Download [here](https://github.com/kenyoni-software/godot-addons/releases/tag/la
Extension of `TextureButton` with color options.
- [Logging](#logging)
Simple logger.
- [QR Code (beta)](#qr-code)
- [QR Code](#qr-code)
QRCodeRect and QR Code generation.

### Tools
Expand Down Expand Up @@ -300,9 +300,6 @@ If not log level is set, the log level of the parent logger will be used.

## QR Code

> *This addon might change it's interface and available functions.
> Please test and report any issues.*
QR Code generation either with the included `QRCodeRect` node or use the encoding result of the `QRCode` class.

### Compatibility
Expand Down Expand Up @@ -413,12 +410,16 @@ Shift JIS encoding utility.
### Functions

- `static func to_shift_jis_2004_buffer(text: String) -> PackedByteArray`
- `static func get_string_from_jis_2004(arr: PackedByteArray) -> String`
- `static func get_string_from_shift_jis_2004(arr: PackedByteArray) -> String`
- `static func to_jis_8_buffer(text: String) -> PackedByteArray`
- `static func get_string_from_jis_8(arr: PackedByteArray) -> String`

### Changelog

#### 1.0.0

- Renamed `get_string_from_jis_2004` to `get_string_from_shift_jis_2004`

#### 0.3.1

- Improve inspector properties
Expand Down
2 changes: 1 addition & 1 deletion addons/qr_code/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="QR Code"
description="QR Code generator. - MIT License"
author="Iceflower S"
version="0.3.2"
version="1.0.0"
script="plugin.gd"
2 changes: 1 addition & 1 deletion addons/qr_code/qr_code.gd
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ func put_kanji(data: String) -> void:
if self.mode != Mode.KANJI || data != self._input_data:
self._clear_cache()
self.mode = Mode.KANJI
self._input_data = ShiftJIS.get_string_from_jis_2004(ShiftJIS.to_shift_jis_2004_buffer(data))
self._input_data = ShiftJIS.get_string_from_shift_jis_2004(ShiftJIS.to_shift_jis_2004_buffer(data))

## returns row by row
## to get row size use get_module_count
Expand Down
2 changes: 1 addition & 1 deletion addons/qr_code/qr_code_rect.gd
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func get_data() -> Variant:
QRCode.ECI.ISO_8859_1:
return input_data.get_string_from_ascii()
QRCode.ECI.SHIFT_JIS:
return ShiftJIS.get_string_from_jis_2004(input_data)
return ShiftJIS.get_string_from_shift_jis_2004(input_data)
QRCode.ECI.UTF_8:
return input_data.get_string_from_utf8()
QRCode.ECI.UTF_16:
Expand Down
2 changes: 1 addition & 1 deletion addons/qr_code/shift_jis.gd
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static func to_shift_jis_2004_buffer(text: String) -> PackedByteArray:

## requires an u16 int array, which is Shift JIS encoded
## unknown characters are skipped
static func get_string_from_jis_2004(arr: PackedByteArray) -> String:
static func get_string_from_shift_jis_2004(arr: PackedByteArray) -> String:
assert(arr.size() % 2 == 0)
var res: String = ""

Expand Down

0 comments on commit 5e24cdc

Please sign in to comment.