Restructured elf and psexe building

Moved assembly to `asm/` and mips rust to `rust/`.
This commit is contained in:
2022-10-29 07:22:58 +01:00
parent c47a8addfa
commit 9b89611882
24 changed files with 305 additions and 88 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,62 @@
//! Digimon profile
/// A digimon profile
#[repr(C)]
pub struct DigimonProfile {
pub value0: u16,
pub stat_str: u16,
pub stat_def: u16,
pub stat_spt: u16,
pub stat_wis: u16,
pub stat_spd: u16,
pub stat_chr: u16,
pub stat_fire: u16,
pub stat_water: u16,
pub stat_ice: u16,
pub stat_wind: u16,
pub stat_thunder: u16,
pub stat_machine: u16,
pub stat_dark: u16,
pub moves: [u16; 8],
pub res_poison: u8,
pub res_paralyze: u8,
pub res_confuse: u8,
pub res_sleep: u8,
pub res_ko: u8,
pub unknown0: [u8; 11],
pub unknown1: [u8; 3],
pub stat_hp: u8,
pub stat_mp: u8,
pub growth_hp: u8,
pub growth_mp: u8,
pub growth_str: u8,
pub growth_def: u8,
pub growth_spt: u8,
pub growth_wis: u8,
pub growth_spd: u8,
pub growth_chr: u8,
pub growth_fire: u8,
pub growth_water: u8,
pub growth_ice: u8,
pub growth_wind: u8,
pub growth_thunder: u8,
pub growth_machine: u8,
pub growth_dark: u8,
pub blasts: [u8; 5],
pub this: u8,
pub unknown2: [u8; 2],
}
const _ASSERT_DIGIMON_PROFILE_SIZE: [u8; 0x58] = [0; core::mem::size_of::<DigimonProfile>()];

View File

@@ -0,0 +1,25 @@
//! `ddw3` data
// Features
#![feature(decl_macro)]
#![no_std]
// Modules
mod data;
mod digimon_profile;
mod util;
// Exports
use digimon_profile::DigimonProfile;
// Dummy panic handler
#[panic_handler]
#[inline(never)]
fn _panic_handler(_info: &core::panic::PanicInfo) -> ! {
// SAFETY: This function will not make it to the final binary
// due to our linker script discarding it and being
// annotated with `inline(never)`
unsafe {
core::hint::unreachable_unchecked();
}
}

View File

@@ -0,0 +1 @@
//! Utilities