Skip to content

Instantly share code, notes, and snippets.

View jmeggitt's full-sized avatar

Jasper Meggitt jmeggitt

View GitHub Profile
This file has been truncated, but you can view the full file.
package org.team114.ocelot.util.motion;
import org.team114.lib.geometry.Point;
import java.util.ArrayList;
import java.util.List;
public class JavaPathFile {
public static final PathPointList path = new PathPointList(new ArrayList<>(Arrays.toList({
package org.team114.ocelot.auto.paths;
import org.team114.lib.geometry.Point;
import org.team114.ocelot.util.motion.PathComponentList;
import org.team114.ocelot.util.motion.PathComponent;
import java.util.ArrayList;
import java.util.List;
public class JavaPathFile {
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
--> src/lib.rs:130:40
|
130 | self.board_id.hw_rev = config[NAVX_REG_HW_REV];
| ^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `std::slice::SliceIndex<[u8]>` is not implemented for `u8`
= note: required because of the requirements on the impl of `std::ops::Index<u8>` for `[u8]`
error[E0277]: the trait bound `u8: std::slice::SliceIndex<[u8]>` is not satisfied
error[E0277]: the trait bound `shred::res::Fetch<'_, amethyst_assets::storage::AssetStorage<amethyst_renderer::mesh::Mesh>>: shred::system::SystemData<'_>` is not satisfied
--> src\tile\pass.rs:71:13
|
71 | impl<'a, V> PassData<'a> for DrawTilemap<V>
| ^^^^^^^^^^^^ the trait `shred::system::SystemData<'_>` is not implemented for `shred::res::Fetch<'_, amethyst_assets::storage::AssetStorage<amethyst_renderer::mesh::Mesh>>`
|
= note: required because of the requirements on the impl of `shred::system::SystemData<'a>` for `(std::option::Option<shred::res::Fetch<'_, amethyst_renderer::cam::ActiveCamera>>, specs::storage::Storage<'_, amethyst_renderer::cam::Camera, shred::res::Fetch<'_,
specs::storage::MaskedStorage<amethyst_renderer::cam::Camera>>>, shred::res::Fetch<'_, amethyst_assets::storage::AssetStorage<amethyst_renderer::mesh::Mesh>>, shred::res::Fetch<'_, amethyst_assets::storage::AssetStorage<amethyst_renderer::tex::Texture>>, shred::res
::Fetch<'_, amethyst_renderer::mtl::Materi
error: failed to run custom build command for `survival v0.1.0 (C:\Users\Jasper\IdeaProjects\survival)`
process didn't exit successfully: `C:\Users\Jasper\IdeaProjects\survival\target\release\build\survival-253dead4bb388bc2\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }', src\libcore\result.rs:997:5
stack backtrace:
0: std::sys::windows::backtrace::set_frames
at /rustc/94fd0458951a4ff91c03366445f0e2e93b86bd2f\/src\libstd\sys\windows\backtrace\mod.rs:95
1: std::sys::windows::backtrace::unwind_backtrace
at /rustc/94fd0458951a4ff91c03366445f0e2e93b86bd2f\/src\libstd\sys\windows\backtrace\mod.rs:82
2: std::sys_common::backtrace::_print
thread '<unnamed>' panicked at 'Already borrowed mutably: InvalidBorrow', src\libcore\result.rs:997:5
stack backtrace:
0: std::sys::windows::backtrace::set_frames
at /rustc/94fd0458951a4ff91c03366445f0e2e93b86bd2f\/src\libstd\sys\windows\backtrace\mod.rs:95
1: std::sys::windows::backtrace::unwind_backtrace
at /rustc/94fd0458951a4ff91c03366445f0e2e93b86bd2f\/src\libstd\sys\windows\backtrace\mod.rs:82
2: std::sys_common::backtrace::_print
at /rustc/94fd0458951a4ff91c03366445f0e2e93b86bd2f\/src\libstd\sys_common\backtrace.rs:71
3: std::sys_common::backtrace::print
at /rustc/94fd0458951a4ff91c03366445f0e2e93b86bd2f\/src\libstd\sys_common\backtrace.rs:59
Prefab(
entities: [
// Grey bat
PrefabEntity(
data: MyPrefabData(
// SpriteScenePrefab
sprite_scene: (
// SpriteSheetPrefab with index 0
sheet: Sheet(
// TexturePrefab
@jmeggitt
jmeggitt / system_data.rs
Created August 25, 2019 17:47
Make regular rigid bodies from nphysics2d/3d visible in specs
use specs::{WriteStorage, WriteExpect, ReadStorage, SystemData, Join, Resources, Component, BitSet};
use specs::storage::UnprotectedStorage;
use specs::Entity;
use specs::shred::ResourceId;
use specs::storage::{MaskedStorage, AnyStorage, FlaggedStorage, DenseVecStorage};
use specs::shred::MetaTable;
use specs::storage::TryDefault;
use nphysics::object::BodyHandle;
use nphysics::object::RigidBody;
@jmeggitt
jmeggitt / world_storage.rs
Last active September 13, 2019 16:30
An idea I had for how storage could be managed in nphysics.
//! The idea of this system is to abstract the Set type, remove the need for `pop_insertion_event`
//! and `pop_removal_event`, and abstract the maintain functions of both worlds. The only issue I
//! have had so far is trying to figure out what WorldStorage should be responsible over compared to
//! GeometricalWorld.
//!
//! Goal:
//! - Give ecs control over how storages are maintained
//! - Make the implementation of Set consistent for bodies, colliders, and constraints
//! - Bundle all of the storages into one convenient struct (low priority)
#![allow(missing_docs)]
[INFO][amethyst::app] Initializing Amethyst...
[INFO][amethyst::app] Version: 0.13.2
[INFO][amethyst::app] Platform: x86_64-pc-windows-msvc
[INFO][amethyst::app] Amethyst git commit:
[INFO][amethyst::app] Rustc version: 1.39.0 Stable
[INFO][amethyst::app] Rustc git commit: 4560ea788cb760f0a34127156c78e2552949f734
[INFO][winit::platform::platform::window] Guessed window DPI factor: 1
[WARN][rendy_factory::factory] Slow safety checks are enabled! Disable them in production by enabling the 'no-slow-safety-checks' feature!
[INFO][rendy_util::wrap] Slow safety checks are enabled! You can disable them in production by enabling the 'no-slow-safety-checks' feature!
[INFO][gfx_backend_vulkan]