%ifndef INCLUDE_ALLOC
%define INCLUDE_ALLOC
%include "lib/syscalls.asm"
%define PROT_READ 0x1
%define PROT_WRITE 0x2
%define MAP_PRIVATE 0x02
%define MAP_ANONYMOUS 0x20
section .bss
section .text
; void* alloc(size_t bytes)
; returns a ptr to the allocated bytes on rax
alloc:
mov rsi, rdi ; rdi has the bytes
xor rdi, rdi ; addr 0
mov rdx, PROT_READ|PROT_WRITE
mov r10, MAP_PRIVATE|MAP_ANONYMOUS
mov r8, -1
xor r9, r9
call mmap
ret
%endif
shutdown /r /p
(in cmd)[Client] Don't disable practice mode on death [furo321]
is it what I just said? x)[Client] Don't disable practice mode on death [furo321]
is it what I just said? x) /r
for you. But if you die by a spike (and haven't touched the start line) you will still be in practice. Then once you died, you could run /lasttp
to get back to your previous spot you used /tp
to./r
for you. But if you die by a spike (and haven't touched the start line) you will still be in practice. Then once you died, you could run /lasttp
to get back to your previous spot you used /tp
to. 1400.0f
and 800.0f
as it varies depending on which screen resolution you have. It now uses the values of the first ShowDistance
packet, which will be default zoom. As pointed out by @0xfaulty in #7511.
name: Cross-Compile for ARM
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install ARM Cross Compiler
run: |
sudo apt-get update
sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
- name: Create Build Directory
run: mkdir build && cd build
- name: Run CMake
run: |
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../path/to/your/toolchainfile.cmake
- name: Build
run: |
cd build
make
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: compiled-app
path: build/your-app-binary # Replace with the path to your binary
# Set the system name to cross compile for
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
# Specify the cross compiler
set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
# Specify the root directory for the target environment (optional)
#set(CMAKE_FIND_ROOT_PATH /path/to/your/arm/rootfs)
# Search for programs in the build host directories
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# For libraries and headers in the target directories
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
next_pow_2:
dec eax
bsr rcx, rax
inc ecx
mov eax, 1
shl rax, cl
ret
$ cargo clean
Removed 90180 files, 48.7GiB total
Sv_RaceFinish
packet, we could also localize finish messages just like in 0.7 and move away from parsing finish messages.
$ cargo clean
Removed 90180 files, 48.7GiB total
15e4f9a
Remove remaining obsolete // ignore_convention
comments - Robyt3
0427dff
Use bool
instead of int
- Robyt3
82b75dd
Improve error log messages for PNG loading - Robyt3
f0a1743
Ensure freed image buffer is not propagated - Robyt3
bcae7da
Handle all color channel counts in image loader - Robyt3
35f071b
Merge pull request #7513 from Robyt3/ImageLoader-Greyscale-Fix - def-// Compare function for qsort
int cmpfunc(const void* a, const void* b)
{
return (*(int*)a - *(int*)b);
}
// Function to return K'th smallest
// element in a given array
int kthSmallest(int arr[], int N, int K)
{
// Sort the given array
qsort(arr, N, sizeof(int), cmpfunc);
// Return k'th element in the sorted array
return arr[K - 1];
}
k_smallest
is using) https://en.wikipedia.org/wiki/Sorting_network true btw?pub(crate) fn k_smallest<T: Ord, I: Iterator<Item = T>>(mut iter: I, k: usize) -> BinaryHeap<T> {
if k == 0 {
return BinaryHeap::new();
}
let mut heap = iter.by_ref().take(k).collect::<BinaryHeap<_>>();
iter.for_each(|i| {
debug_assert_eq!(heap.len(), k);
// Equivalent to heap.push(min(i, heap.pop())) but more efficient.
// This should be done with a single `.peek_mut().unwrap()` but
// `PeekMut` sifts-down unconditionally on Rust 1.46.0 and prior.
if *heap.peek().unwrap() > i {
*heap.peek_mut().unwrap() = i;
}
});
heap
}
crate::k_smallest::k_smallest(self, k)
)crate::k_smallest::k_smallest(self, k)
) qsort
uses quicksort
which in worst-case performance is O(n^2)
while Bitonic sort
worst-case is O(log^2(n))
.BOT
and thought it was github