Skip to content

Instantly share code, notes, and snippets.

View untodesu's full-sized avatar
💣
アイウエオ > アエイオウ

Kirill Dmitrievich untodesu

💣
アイウエオ > アエイオウ
View GitHub Profile
@untodesu
untodesu / mathlib.c
Created April 25, 2021 17:46
mathlib
#include "mathlib.h"
#define ROW1 0
#define ROW2 4
#define ROW3 8
#define ROW4 12
void Math_VectorInit(vector2D vec)
{
vec[0] = 0.0f;
@untodesu
untodesu / main.c
Created April 17, 2021 20:48
fckn vulkan
#include <glad/vulkan.h>
#include <GLFW/glfw3.h>
#include <stddef.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "tri_v.h"
#include "tri_f.h"
/*
* tileset.cc
* Created: 2021-03-03, 20:46:34.
* Copyright (C) 2021, Kirill GPRB.
*/
#include <data/tileset.hh>
#include <util/format.hh>
#include <util/fs.hh>
#include <util/logger.hh>
#include <stb_image.h>

Error table

ID Mnemonic Alias Description
0 ENOTHING No errors
1 EMALLOC #MA Allocation failure
2 EBYTECODE #BC Invalid bytecode
3 ECALL #CL Undefined procedure
4 ETYPE #TM Type mismatch
5 EDIVZERO #DZ Division by zero

GVM opcodes

Opcode Mnemonic Arguments Length in bytes Description
0x00 nop 1 Do nothing
0x01 sys integer 9 System call
0x02 call integer 9 Function call
0x03 ret 1 Function return
0x04 pop 1 Pop to nothing
0x05 ldi integer 9 Push integer
0x06 ldf float 9 Push float
// Updated: 2025-01-02
// Copyright (c) 2018-2025, Kirill Dmitrievich
// https://steamcommunity.com/id/untodesu
// TF2 command-line
// -novid -nojoy -nosteamcontroller -nohltv -particles 1 -precachefontchars
// neworking
cl_cmdrate 66
cl_interp 0.0152
class RenderContext final {
public:
RenderContext(Window *window)
{
glfwMakeContextCurrent(window.window());
}
void setViewport(const BaseViewport &viewport)
{
//
// backend_ogl.cpp -- opengl graphics backend.
// Copyright (C) 2020, Voxelius team.
//
#include <voxelius/debug.h>
#include "graphics/backend_ogl.h"
void VxOpenGlGraphicsBackend::Init(SDL_Window *pWindow)
{
m_pWindow = pWindow;
//
// vulkan.cpp -- internal vulkan wrapper.
// Copyright (C) 2020, Voxelius team.
//
#include <voxelius/engine.h>
#include "debug.h"
#include "vulkan.h"
const bool VkQueueIndices::IsValid(void) const
{
//
// autoexec.cfg -- initial game configuration setup for TF2.
// Copyright (C) 2019-2020 Q3Rad, undbsd
//
ai_expression_optimization 1
cl_ask_blacklist_opt_out 1
cl_ask_favorite_opt_out 1
cl_autoreload 1
cl_cloud_settings 0