mirror of
https://github.com/G2-Games/lbee-utils.git
synced 2025-04-19 07:12:55 -05:00
Updated version, changed to Rust 2024
This commit is contained in:
parent
982f55fde6
commit
d33323fd87
4 changed files with 6 additions and 8 deletions
|
@ -302,10 +302,6 @@ impl SpecificOpcode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn encode_message(&self) -> Vec<u8> {
|
|
||||||
todo!()
|
|
||||||
}
|
|
||||||
|
|
||||||
fn decode_add<R: Read>(param_bytes: &mut R) -> Self {
|
fn decode_add<R: Read>(param_bytes: &mut R) -> Self {
|
||||||
let var1 = param_bytes.read_u16::<LE>().unwrap();
|
let var1 = param_bytes.read_u16::<LE>().unwrap();
|
||||||
let expr = utils::decode_string_v1(param_bytes, Encoding::ShiftJIS).unwrap();
|
let expr = utils::decode_string_v1(param_bytes, Encoding::ShiftJIS).unwrap();
|
||||||
|
|
|
@ -4,11 +4,13 @@ use encoding_rs::*;
|
||||||
use byteorder_lite::{LE, ReadBytesExt};
|
use byteorder_lite::{LE, ReadBytesExt};
|
||||||
|
|
||||||
pub enum Encoding {
|
pub enum Encoding {
|
||||||
|
#[allow(dead_code)]
|
||||||
UTF8,
|
UTF8,
|
||||||
UTF16,
|
UTF16,
|
||||||
ShiftJIS,
|
ShiftJIS,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
impl Encoding {
|
impl Encoding {
|
||||||
pub fn width(&self) -> usize {
|
pub fn width(&self) -> usize {
|
||||||
match self {
|
match self {
|
||||||
|
@ -58,6 +60,7 @@ pub fn decode_string_v1<R: Read>(
|
||||||
Ok(string)
|
Ok(string)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn encode_string_v1(string: String, format: Encoding) -> Vec<u8> {
|
pub fn encode_string_v1(string: String, format: Encoding) -> Vec<u8> {
|
||||||
match format {
|
match format {
|
||||||
Encoding::UTF8 => string.as_bytes().to_vec(),
|
Encoding::UTF8 => string.as_bytes().to_vec(),
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pak_explorer"
|
name = "pak_explorer"
|
||||||
edition = "2021"
|
edition = "2024"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
description = """
|
description = """
|
||||||
A simple GUI for exploring and making modifications to LUCA System PAK files.
|
A simple GUI for exploring and making modifications to LUCA System PAK files.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release
|
||||||
|
|
||||||
use colog;
|
|
||||||
use eframe::egui::{
|
use eframe::egui::{
|
||||||
self, ColorImage, Image, ProgressBar, TextureFilter, TextureHandle, TextureOptions, ThemePreference
|
self, ColorImage, Image, ProgressBar, TextureFilter, TextureHandle, TextureOptions, ThemePreference
|
||||||
};
|
};
|
||||||
use kira::{backend::Backend, sound::static_sound::{StaticSoundData, StaticSoundHandle}, AudioManager, AudioManagerSettings, DefaultBackend, Tween};
|
use kira::{sound::static_sound::{StaticSoundData, StaticSoundHandle}, AudioManager, AudioManagerSettings, DefaultBackend, Tween};
|
||||||
use log::error;
|
use log::error;
|
||||||
use luca_pak::{entry::EntryType, Pak};
|
use luca_pak::{entry::EntryType, Pak};
|
||||||
use std::{fs, io::Cursor, time::Duration};
|
use std::{fs, io::Cursor, time::Duration};
|
||||||
|
|
Loading…
Reference in a new issue