This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #[macro_export] | |
| macro_rules! animation_state_for_character_state_libarry_macro { | |
| ( $( $character_state:ident, $crouched:ident, $standing:ident, $jumping:ident),* ) => { | |
| let mut animation_for_character_state_library = HashMap::new(); | |
| $( | |
| animation_for_character_state_library.insert(CharacterState::$character_state, AnimationStateForCharacterState::new(AnimationState::$crouched,AnimationState::$standing,AnimationState::$jumping)); | |
| )* | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| precision highp float; | |
| precision highp int; | |
| layout(location = 0) in vec3 a_pos; | |
| layout(location = 1) in vec2 uv; | |
| layout(location = 2) in vec3 col; | |
| out vec3 v_col; | |
| out float v_toSunDot; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use cgmath::*; | |
| use crate::*; | |
| use std::fmt::Debug; | |
| use serde::{Serialize, Deserialize}; | |
| #[derive(Hash, Eq, PartialEq, Copy, Clone, Serialize, Deserialize, Debug)] | |
| #[repr(u64)] | |
| pub enum ComponentType { | |
| TransformComponent = 1,//The first one needs to be 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pub const INPUT_WINDOW_MESSAGE : usize = PLAYER_MESSAGE_TYPE_BASE + 1; | |
| #[derive(Encode, Decode, PartialEq, Debug)] | |
| #[repr(C)] | |
| pub struct InputWindowMessage { | |
| pub message_type: usize, | |
| pub input_messages: Vec<u8> | |
| } | |
| impl InputWindowMessage { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use sdl2::render::{WindowCanvas, BlendMode}; | |
| use sdl2::pixels::Color; | |
| use sdl2::rect::{Point, Rect}; | |
| pub trait FauxGFX { | |
| fn draw_quadrants(&mut self, p: Point, dp: Point, f: i32) -> Result<(), String>; | |
| fn pixel_rgba_weight(&mut self, p: Point, color: Color, weight: i32) -> Result<(), String>; | |
| fn pixel_rgba(&mut self, p: Point, color: Color) -> Result<(), String>; | |
| fn pixel(&mut self, p: Point) -> Result<(), String>; | |
| fn vline(&mut self, x: i32, y1: i32, y2: i32) -> Result<(), String>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::io; | |
| use std::usize; | |
| use std::collections::HashMap; | |
| use storm::input::message::*; | |
| use storm::cgmath::Vector2; | |
| use storm::render::message::*; | |
| use tactics::Controller; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void branch_instructions(long opcode) { | |
| //almost branch instructions follow the same format | |
| //condition test | |
| //and branch to vvvvvvvv if pass test | |
| //for BR just always branch | |
| //so this just preforms the correct test for each | |
| //branch test | |
| //and then either drops to the branch if needs to, | |
| //or does not |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #[macro_export] | |
| macro_rules! struct_builder { | |
| ( | |
| $( | |
| $struct_id:ident; public - [$($var:ident : $var_type:ty), *]; private - [$($pri_var:ident : $pri_var_type:ty), *]; | |
| ),* | |
| ) => ( | |
| $( | |
| pub struct $struct_id { | |
| $( |