Merge branch 'master' into feature/controller

This commit is contained in:
Alula 2020-12-06 16:43:17 +01:00
commit a3c2ce03ae
No known key found for this signature in database
GPG Key ID: 3E00485503A1D8BA
4 changed files with 11 additions and 7 deletions

View File

@ -35,6 +35,7 @@ cache:
# - cargo test --verbose --all --no-fail-fast
build_script:
- set DRS_BUILD_VERSION_OVERRIDE=%APPVEYOR_BUILD_VERSION%
- cargo build --release --bin doukutsu-rs
- mkdir release
- copy target\release\doukutsu-rs.exe release

View File

@ -1,5 +1,5 @@
[package]
authors = ["Alula <julekonopinska@gmail.com>"]
authors = ["Alula"]
edition = "2018"
name = "doukutsu-rs"
version = "0.1.0"

View File

@ -1,19 +1,23 @@
use std::cmp::Ordering;
use std::fmt;
use ggez::GameError;
use ggez::GameError::InvalidValue;
use lazy_static::lazy_static;
use num_traits::{AsPrimitive, Num};
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
use serde::de::{SeqAccess, Visitor};
use serde::ser::SerializeTupleStruct;
use crate::bitfield;
use crate::macros::fmt::Formatter;
/// Multiply cave story degrees (0-255, which corresponds to 0°-360°) with this to get
/// respective value in radians.
pub const CDEG_RAD: f64 = std::f64::consts::PI / 128.0;
lazy_static! {
pub static ref VERSION_BANNER: String = {
let version = option_env!("DRS_BUILD_VERSION_OVERRIDE").unwrap_or(env!("CARGO_PKG_VERSION"));
format!("doukutsu-rs {}", version)
};
}
bitfield! {
#[derive(Clone, Copy)]

View File

@ -1,7 +1,7 @@
use ggez::{Context, GameResult, graphics};
use ggez::graphics::Color;
use crate::common::Rect;
use crate::common::{Rect, VERSION_BANNER};
use crate::menu::{Menu, MenuEntry, MenuSelectionResult};
use crate::scene::Scene;
use crate::shared_game_state::{SharedGameState, TimingMode};
@ -75,7 +75,6 @@ impl TitleScene {
}
}
static ENGINE_VERSION: &str = "doukutsu-rs 0.1.0";
// asset copyright for freeware version
static COPYRIGHT_PIXEL: &str = "2004.12 Studio Pixel";
// asset copyright for Nicalis
@ -235,7 +234,7 @@ impl Scene for TitleScene {
batch.draw(ctx)?;
}
self.draw_text_centered(ENGINE_VERSION, state.canvas_size.1 - 15.0, state, ctx)?;
self.draw_text_centered(VERSION_BANNER.as_str(), state.canvas_size.1 - 15.0, state, ctx)?;
if state.constants.is_switch {
self.draw_text_centered(COPYRIGHT_NICALIS_SWITCH, state.canvas_size.1 - 30.0, state, ctx)?;