Skip to content

Instantly share code, notes, and snippets.

View rdeioris's full-sized avatar

Roberto De Ioris rdeioris

View GitHub Profile
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Gas : Mineral
{
// Update is called once per frame
void Update()
{
@rdeioris
rdeioris / first_sdl.c
Created November 7, 2017 10:27
First SDL program
#define SDL_MAIN_HANDLED
#ifdef _WIN32
#include <SDL.h>
#else
#include <SDL2/SDL.h>
#endif
#include <stdio.h>
@rdeioris
rdeioris / second_sdl.c
Created November 7, 2017 10:30
Draw a texture with SDL2
#define SDL_MAIN_HANDLED
#ifdef _WIN32
#include <SDL.h>
#else
#include <SDL2/SDL.h>
#endif
#include <stdio.h>
#include <stdio.h>
#ifdef _WIN32
#include <windows.h>
#else
#include <dlfcn.h>
#endif
#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#else
#define EXPORT
#endif
EXPORT int app_adder(int, int);
EXPORT int app_multiplier(int , int);
#include "app.h"
int app_adder(int a, int b)
{
return a + b;
}
int app_multiplier(int a, int b)
{
return a * b;
#include "app.h"
EXPORT int plugin_divider(int a, int b)
{
int value0 = app_adder(a, b);
int value1 = app_multiplier(a, b);
return value0 / value1;
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BattleSimulator
{
class Program
{
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ScavengerStateMachine : MonoBehaviour
{
public float Speed;
delegate void ScavengerState();
#include <aiv_opengl.h>
#include <stdio.h>
#include <stdlib.h>
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>
aiv_opengl_context_t context;
int main(int argc, char *argv[])
{