mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-12 06:54:36 +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]
|
||||
|
||||
@@ -15,16 +15,16 @@ jobs:
|
||||
go-version: 1.18
|
||||
|
||||
- name: Build
|
||||
run: cd Erupe && go build -v
|
||||
run: go build -v
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Erupe
|
||||
path: |
|
||||
./Erupe/erupe-ce.exe
|
||||
./Erupe/config.json
|
||||
./Erupe/www/
|
||||
./Erupe/savedata/
|
||||
./Erupe/bin/
|
||||
./Erupe/RoadShopItems.csv
|
||||
./erupe-ce.exe
|
||||
./config.json
|
||||
./www/
|
||||
./savedata/
|
||||
./bin/
|
||||
./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
|
||||
|
||||
import (
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/common/stringsupport"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
)
|
||||
|
||||
type MsgBinMailNotify struct {
|
||||
@@ -1,8 +1,8 @@
|
||||
package binpacket
|
||||
|
||||
import (
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
)
|
||||
|
||||
// MsgBinTargeted is a format used for some broadcast types
|
||||
@@ -87,4 +87,4 @@ func (c *CryptPacketHeader) Encode() ([]byte, error) {
|
||||
}
|
||||
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user