mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-12 15:04:38 +01:00
repository cleanup
This commit is contained in:
16
.github/workflows/go.yml
vendored
16
.github/workflows/go.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Erupe
|
name: Build
|
||||||
|
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
@@ -15,16 +15,16 @@ jobs:
|
|||||||
go-version: 1.18
|
go-version: 1.18
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cd Erupe && go build -v
|
run: go build -v
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Erupe
|
name: Erupe
|
||||||
path: |
|
path: |
|
||||||
./Erupe/erupe-ce.exe
|
./erupe-ce.exe
|
||||||
./Erupe/config.json
|
./config.json
|
||||||
./Erupe/www/
|
./www/
|
||||||
./Erupe/savedata/
|
./savedata/
|
||||||
./Erupe/bin/
|
./bin/
|
||||||
./Erupe/RoadShopItems.csv
|
./RoadShopItems.csv
|
||||||
|
|||||||
14
Erupe/.gitignore
vendored
14
Erupe/.gitignore
vendored
@@ -1,14 +0,0 @@
|
|||||||
.idea/
|
|
||||||
|
|
||||||
www/jp/
|
|
||||||
vendor/
|
|
||||||
bin/*.bin
|
|
||||||
bin/*.bak
|
|
||||||
bin/quests/*.bin
|
|
||||||
bin/questlists/*.bin
|
|
||||||
bin/scenarios/*.bin
|
|
||||||
bin/debug/*.bin
|
|
||||||
savedata/*/
|
|
||||||
*.exe
|
|
||||||
*.lnk
|
|
||||||
*.bat
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
package pascalstring
|
|
||||||
|
|
||||||
import (
|
|
||||||
"erupe-ce/common/byteframe"
|
|
||||||
"golang.org/x/text/encoding/japanese"
|
|
||||||
"golang.org/x/text/transform"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Uint8(bf *byteframe.ByteFrame, x string, t bool) {
|
|
||||||
if t {
|
|
||||||
e := japanese.ShiftJIS.NewEncoder()
|
|
||||||
xt, _, err := transform.String(e, x)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
x = xt
|
|
||||||
}
|
|
||||||
bf.WriteUint8(uint8(len(x) + 1))
|
|
||||||
bf.WriteNullTerminatedBytes([]byte(x))
|
|
||||||
}
|
|
||||||
|
|
||||||
func Uint16(bf *byteframe.ByteFrame, x string, t bool) {
|
|
||||||
if t {
|
|
||||||
e := japanese.ShiftJIS.NewEncoder()
|
|
||||||
xt, _, err := transform.String(e, x)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
x = xt
|
|
||||||
}
|
|
||||||
bf.WriteUint16(uint16(len(x) + 1))
|
|
||||||
bf.WriteNullTerminatedBytes([]byte(x))
|
|
||||||
}
|
|
||||||
|
|
||||||
func Uint32(bf *byteframe.ByteFrame, x string, t bool) {
|
|
||||||
if t {
|
|
||||||
e := japanese.ShiftJIS.NewEncoder()
|
|
||||||
xt, _, err := transform.String(e, x)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
x = xt
|
|
||||||
}
|
|
||||||
bf.WriteUint32(uint32(len(x) + 1))
|
|
||||||
bf.WriteNullTerminatedBytes([]byte(x))
|
|
||||||
}
|
|
||||||
46
common/pascalstring/pascalstring.go
Normal file
46
common/pascalstring/pascalstring.go
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
package pascalstring
|
||||||
|
|
||||||
|
import (
|
||||||
|
"erupe-ce/common/byteframe"
|
||||||
|
"golang.org/x/text/encoding/japanese"
|
||||||
|
"golang.org/x/text/transform"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Uint8(bf *byteframe.ByteFrame, x string, t bool) {
|
||||||
|
if t {
|
||||||
|
e := japanese.ShiftJIS.NewEncoder()
|
||||||
|
xt, _, err := transform.String(e, x)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
x = xt
|
||||||
|
}
|
||||||
|
bf.WriteUint8(uint8(len(x) + 1))
|
||||||
|
bf.WriteNullTerminatedBytes([]byte(x))
|
||||||
|
}
|
||||||
|
|
||||||
|
func Uint16(bf *byteframe.ByteFrame, x string, t bool) {
|
||||||
|
if t {
|
||||||
|
e := japanese.ShiftJIS.NewEncoder()
|
||||||
|
xt, _, err := transform.String(e, x)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
x = xt
|
||||||
|
}
|
||||||
|
bf.WriteUint16(uint16(len(x) + 1))
|
||||||
|
bf.WriteNullTerminatedBytes([]byte(x))
|
||||||
|
}
|
||||||
|
|
||||||
|
func Uint32(bf *byteframe.ByteFrame, x string, t bool) {
|
||||||
|
if t {
|
||||||
|
e := japanese.ShiftJIS.NewEncoder()
|
||||||
|
xt, _, err := transform.String(e, x)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
x = xt
|
||||||
|
}
|
||||||
|
bf.WriteUint32(uint32(len(x) + 1))
|
||||||
|
bf.WriteNullTerminatedBytes([]byte(x))
|
||||||
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package binpacket
|
package binpacket
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"erupe-ce/common/byteframe"
|
||||||
"erupe-ce/common/stringsupport"
|
"erupe-ce/common/stringsupport"
|
||||||
"erupe-ce/network"
|
"erupe-ce/network"
|
||||||
"erupe-ce/common/byteframe"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type MsgBinMailNotify struct {
|
type MsgBinMailNotify struct {
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package binpacket
|
package binpacket
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"erupe-ce/network"
|
|
||||||
"erupe-ce/common/byteframe"
|
"erupe-ce/common/byteframe"
|
||||||
|
"erupe-ce/network"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MsgBinTargeted is a format used for some broadcast types
|
// MsgBinTargeted is a format used for some broadcast types
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user