repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
cmesias/FattestBossFightEver | src/Game/Enemies.h | /*
* Enemies.h
*
* Created on: Dec 18, 2016
* Author: Carl
*/
#ifndef LOCAL_ENEMIES_H_
#define LOCAL_ENEMIES_H_
#include <SDL2/SDL_mixer.h>
#include "../Helper.h"
#include "../LTexture.h"
#include "../Particless.h"
class Enemy: public Helper {
public:
// Enemy variables
float x, y;
int w, h;
int timer... |
cmesias/FattestBossFightEver | src/LWindow.h | /*
* LWindow.h
*
* Created on: Apr 18, 2017
* Author: healt
*/
#ifndef LWINDOW_H_
#define LWINDOW_H_
#include <iostream>
#include <sstream>
#include <SDL2/SDL.h>
class LWindow {
public:
void applySettings(int RESOLUTION, int ANTI_ALIS, int FULLSCREEN, int VSYNC);
public:
//Intializes internals
LWindow(... |
cmesias/FattestBossFightEver | src/Game/TextNFont.h | /*
* TextNFont.h
*
* Created on: Mar 8, 2022
* Author: healt
*/
#ifndef TEXTNFONT_H_
#define TEXTNFONT_H_
#include <SDL2/SDL_ttf.h>
#include "../LTexture.h"
class TextNFont {
public:
// Textures
LTexture gText;
// Fonts
TTF_Font *gFont13 = NULL;
TTF_Font *gFont20 = NULL;
TTF_Font *gFont24 = NULL;... |
cmesias/FattestBossFightEver | src/Game.h | <filename>src/Game.h
/*
* Game.h
*
* Created on: Apr 19, 2017
* Author: healt
*/
#ifndef GAME_H_
#define GAME_H_
#include "LWindow.h"
#include <cstdio>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_mixer.h>
#include <SDL2/SDL_ttf.h>
#include "Options.h"
#include "Helper.h"
class Gam... |
cmesias/FattestBossFightEver | src/Game/Players.h | <reponame>cmesias/FattestBossFightEver
/*
* Players.h
*
* Created on: Dec 18, 2016
* Author: Carl
*/
#ifndef LOCAL_PLAYERS_H_
#define LOCAL_PLAYERS_H_
#include <SDL2/SDL_ttf.h>
#include "../LWindow.h"
#include "../LTexture.h"
#include "../Particless.h"
#include "Enemies.h"
#include "../Helper.h"
#include ... |
cmesias/FattestBossFightEver | src/Game/Button.h | /*
* Button.h
*
* Created on: Mar 11, 2022
* Author: healt
*/
#ifndef BUTTON_H_
#define BUTTON_H_
#include "TextNFont.h"
#include "../Helper.h"
struct Button: public TextNFont, public Helper {
public:
float x, y;
float w, h;
bool hover;
bool pressed;
std::string textField;
std::string resultText;
... |
cmesias/FattestBossFightEver | src/Game/Maps.h | /*
* Maps.h
*
* Created on: Dec 20, 2016
* Author: Carl
*/
#ifndef LOCAL_MAPS_H_
#define LOCAL_MAPS_H_
//Map size
class Map {
public:
int x = 0;
int y = 0;
//int w = 1536;
//int h = 640;
//const int w = 1536;
//const int h = 624;
//const int w = 2304;
//const int w = 6912;
//const int h = 1152;
... |
cmesias/FattestBossFightEver | src/Game/TileBar.h | <gh_stars>0
/*
* TileBar.h
*
* Created on: Jan 16, 2017
* Author: Carl
*/
#ifndef LOCAL_TILEBAR_H_
#define LOCAL_TILEBAR_H_
#include "../LWindow.h"
#include "../LTexture.h"
//Tile Class
class TileBar {
public:
const int HowManyTilesHorizontal = 24;
const int HowManyTilesVertical = 12;
static const int ... |
timothykinyanjui/Household-Regression | model/likelihoodCalc.c | <reponame>timothykinyanjui/Household-Regression<gh_stars>0
/* Function generated the relevant matrix for the system of equations given by Addy
Input
beta: Transmission parameter - As coded currently, it can only be a
vector or a scalar. TO DO: Code for matrix
B: Probability that a susceptible of type i will escape ... |
BradyBromley/Hardcoder | libapp2sys/src/main/cpp/protocol.h | <filename>libapp2sys/src/main/cpp/protocol.h<gh_stars>1000+
/**
* protocal const definition and implement
*/
#ifndef AMC_PROTOCOL_H
#define AMC_PROTOCOL_H
#include "amc.pb.h"
#include "header.h"
#include <cJSON.h>
// LEVEL
static const uint32_t CPU_LEVEL_0 = 0; // not change
static const uint32_t CPU_LEVEL_1 = 1; /... |
BradyBromley/Hardcoder | libapp2sys/src/main/cpp/header.h | <reponame>BradyBromley/Hardcoder
/**
* req and resp packer header
*/
#ifndef HARDCODER_HEADER_H
#define HARDCODER_HEADER_H
#include "util.h"
static const uint16_t HEADER_PROTOCAL_VERSION = 4;
static const uint16_t HEADER_JSON_VERSION = 16;
static const uint16_t HEADER_BODYFORMAT_RAW = 1;
static const uint16_t HE... |
BradyBromley/Hardcoder | libapp2sys/src/main/cpp/server.h | /**
* Hardcoder server sample implementation
*/
#ifndef HARDCODER_SERVER_H_H
#define HARDCODER_SERVER_H_H
#include <map>
#include "localsocket.h"
#include "udp.h"
#include "protocol.h"
class LocalSocketServer : public LocalSocket, public IHardCoderDataCallback {
private :
rqueue<ServerDataWorker<int> *, 0> res... |
BradyBromley/Hardcoder | libapp2sys/src/main/cpp/util.h | /**
* Utility for common operation(debug, log, numeric conversion)
*/
#ifndef HARDCODER_UTIL_H_H
#define HARDCODER_UTIL_H_H
#include <arpa/inet.h>
#include <assert.h>
#include <ctype.h>
#include <fcntl.h>
#include <limits.h>
#include <list>
#include <netdb.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdl... |
OnlyLoyalty-ty/TYLibraryKit | Example/TYLibraryKit/TYViewController.h | //
// TYViewController.h
// TYLibraryKit
//
// Created by OnlyLoyalty-ty on 06/05/2021.
// Copyright (c) 2021 OnlyLoyalty-ty. All rights reserved.
//
@import UIKit;
@interface TYViewController : UIViewController
@end
|
OnlyLoyalty-ty/TYLibraryKit | Example/TYLibraryKit/TYAppDelegate.h | //
// TYAppDelegate.h
// TYLibraryKit
//
// Created by OnlyLoyalty-ty on 06/05/2021.
// Copyright (c) 2021 OnlyLoyalty-ty. All rights reserved.
//
@import UIKit;
@interface TYAppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
anrongwn/nghttp2 | src/h2load.h | /*
* nghttp2 - HTTP/2 C Library
*
* Copyright (c) 2014 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, ... |
surendranadkarni/ring-buffer | src/ring_buffer.c | /*
Module for ring buffer
Copyright (C) {{ 2017 }} {{ <NAME> <EMAIL> }}
All rights reserved.
Please check LICENSE file for details. Refered Stuart Cording's code.
*/
/***************************************************************************************************************************************... |
surendranadkarni/ring-buffer | include/ring_buffer.h | /*
Header for ring buffer
Copyright (C) {{ 2017 }} {{ <NAME> <EMAIL> }}
All rights reserved.
Please check LICENSE file for details
*/
/*@{*/
#include <stdint.h>
/*******************************************************************************************************************************************... |
surendranadkarni/ring-buffer | test/test.c | #include <stdio.h>
#include <ring_buffer.h>
#include <assert.h>
#include <stdlib.h>
int main()
{
uint8_t buffer[10] = {0};
uint8_t data1[20] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20};
uint8_t data2[10] = {0};
struct ring_buffer *rb = (struct ring_buffer*) malloc(sizeof(struct... |
Cherve3/2D-Game-Project | include/bu_collision.h | #ifndef __BU_COLLISION_H__
#define __BU_COLLISION_H__
#include "bu_shapes.h"
Bool player_bounds_collision(Rect player, Rect bounds);
Bool entity_collision(Rect ent, Rect other);
Bool attack_collision(Rect attack, int damage);
#endif
|
Cherve3/2D-Game-Project | include/bu_timer.h | #ifndef __BU_TIMER_H__
#define __BU_TIMER_H__
#include "gfc_types.h"
typedef struct
{
Uint32 timer;
Uint32 old_time;
}Cooldown;
void time_init();
Uint32 get_start_time();
Uint32 get_current_time();
#endif
|
Cherve3/2D-Game-Project | include/bu_shop.h | #ifndef __BU_SHOP_H__
#define __BU_SHOP_H__
#include "gfc_types.h"
#include "bu_items.h"
#include "bu_entity.h"
Bool *get_shop_open();
void shop_init();
void open_shop();
Bool buy_item(Item *item, Entity *player);
#endif
|
Cherve3/2D-Game-Project | include/bu_level.h | <filename>include/bu_level.h<gh_stars>0
#ifndef __BU_LEVEL_H__
#define __BU_LEVEL_H__
#include "chipmunk/chipmunk.h"
#include "chipmunk/chipmunk_types.h"
#include "gf2d_sprite.h"
#include "bu_entity.h"
#define space_f 0x0001
#define camera_f 0x0002
#define world_f 0x0003
#define player_f 0x0004
#define npc_f 0x... |
Cherve3/2D-Game-Project | src/bu_level.c |
#include "chipmunk/chipmunk_private.h"
#include "simple_logger.h"
#include "simple_json.h"
#include "gf2d_config.h"
#include "gf2d_draw.h"
#include "gfc_audio.h"
#include "bu_camera.h"
#include "bu_level.h"
#include "bu_door.h"
#include "bu_items.h"
#include "bu_hazards.h"
#include "bu_player.h"
#include "bu_npc.h"... |
Cherve3/2D-Game-Project | include/bu_door.h | #ifndef __BU_DOOR_H__
#define __BU_DOOR_H__
#include "chipmunk/chipmunk.h"
#include "gfc_vector.h"
#include "simple_json.h"
#include "bu_entity.h"
void door_spawn(cpVect position, Vector2D dimension, TextWord **args);
#endif
|
Cherve3/2D-Game-Project | include/bu_entity.h | <reponame>Cherve3/2D-Game-Project
#ifndef __ENTITY_H__
#define __ENTITY_H__
#include "chipmunk/chipmunk.h"
#include "gfc_types.h"
#include "gfc_audio.h"
#include "gf2d_sprite.h"
#include "bu_shapes.h"
#define EntitySoundMax 8
typedef struct Entity_s
{
Bool _inuse;
TextWord *name;
/*physics*/
cpVect posit... |
Cherve3/2D-Game-Project | src/bu_editor.c |
#include "bu_editor.h"
/*eol@eof*/
|
Cherve3/2D-Game-Project | include/gf2d_windows.h | #ifndef __GF2D_MENUS_H__
#define __GF2D_MENUS_H__
#include "gf2d_sprite.h"
#include "gfc_list.h"
#include "gf2d_elements.h"
#include "gf2d_element_label.h"
#include "gf2d_element_actor.h"
#include "gf2d_element_list.h"
#include <simple_json.h>
typedef enum
{
BE_TL,
BE_Top,
BE_TR,
BE_Left,
BE_Right... |
Cherve3/2D-Game-Project | src/bu_money.c |
#include "simple_logger.h"
#include "bu_money.h"
#include "bu_player.h"
#include "bu_level.h"
#include "bu_entity.h"
typedef struct
{
int value;
}Money;
void money_touch(Entity *self, Entity *player)
{
Money *money;
const Uint8 *keys;
if (!self) return;
keys = SDL_GetKeyboardState(NULL);
money = (Money*)self-... |
Cherve3/2D-Game-Project | include/bu_hazards.h |
#ifndef __BU_HAZARDS_H__
#define __BU_HAZARDS_H__
#include "bu_entity.h"
void new_hazard(TextWord* name, cpVect position);
#endif
|
Cherve3/2D-Game-Project | src/gf2d_windows.c | <gh_stars>0
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "gf2d_windows.h"
#include "gfc_color.h"
#include "simple_logger.h"
#include "bu_shapes.h"
typedef struct
{
Sprite* generic_border;
Sprite* generic_background;
Window* window_list; /**<*/
int window_max; /**<how ... |
Cherve3/2D-Game-Project | include/bu_FSM.h | #ifndef __BU_FSM_H__
#define __BU_FSM_H__
typedef struct {
void (*active_state)();
void (*set_state)(void (*state));
}FSM;
void free_FSM(FSM* fsm);
FSM *new_FSM();
void update_state(FSM* fsm);
#endif
|
Cherve3/2D-Game-Project | src/bu_entity.c | <filename>src/bu_entity.c
#include "simple_logger.h"
#include "gf2d_draw.h"
#include "bu_collision.h"
#include "bu_camera.h"
#include "bu_entity.h"
typedef struct
{
Entity *entity_list;
Uint32 max_entities;
}EntityManager;
static EntityManager entity_manager = { 0 };
void entity_manager_init(Uint32 max_entiti... |
Cherve3/2D-Game-Project | include/bu_player.h | #ifndef __BU_PLAYER_H__
#define __BU_PLAYER_H__
#include "chipmunk/chipmunk.h"
#include "bu_entity.h"
#include "bu_items.h"
typedef struct{
char* name;
int level;
int money;
int life;
int life_max;
int stamina;
int stamina_max;
int stamina_regen;
int strength;
int strength_max;
int agility;
int agilit... |
Cherve3/2D-Game-Project | include/gf2d_element_actor.h | #ifndef __GF2D_ACTOR_ELEMENT_H__
#define __GF2D_ACTOR_ELEMENT_H__
#include "gf2d_elements.h"
#include "gf2d_actor.h"
typedef struct
{
Actor actor;
Vector2D scale;
}ActorElement;
ActorElement* gf2d_element_actor_new();
ActorElement* gf2d_element_actor_new_full(char* actorFile);
/**
* @brief get a pointer t... |
Cherve3/2D-Game-Project | src/bu_timer.c |
#include "bu_timer.h"
static Uint32 start_time = 0;
static Uint32 current_time = 0;
void time_init()
{
start_time = SDL_GetTicks();
}
Uint32 get_start_time()
{
return start_time;
}
Uint32 get_current_time()
{
current_time = SDL_GetTicks();
return current_time;
}
/*eol@eof*/
|
Cherve3/2D-Game-Project | src/bu_shop.c |
#include "simple_logger.h"
#include "bu_shop.h"
#include "bu_player.h"
static Bool shop_open;
static Bool bought_item;
Bool *get_shop_open()
{
return shop_open;
}
void shop_init()
{
shop_open = false;
bought_item = false;
}
void open_shop()
{
//slog("Shop open : %i", shop_open);
Uint32 *keys = SDL_GetKeyboar... |
Cherve3/2D-Game-Project | include/bu_editor.h | <gh_stars>0
#ifndef __BU_EDITOR_H__
#define __BU_EDITOR_H__
void editor_init();
#endif
|
Cherve3/2D-Game-Project | src/gf2d_elements.c | #include <stdlib.h>
#include <string.h>
#include "gf2d_elements.h"
#include "gf2d_element_actor.h"
#include "gf2d_element_button.h"
#include "gf2d_element_list.h"
#include "gf2d_element_label.h"
#include "simple_logger.h"
Element* gf2d_element_new()
{
Element* e;
e = (Element*)malloc(sizeof(Element));
if (... |
Cherve3/2D-Game-Project | src/bu_hazards.c | <gh_stars>0
#include "bu_hazards.h"
#include "gfc_types.h"
#include "bu_items.h"
void new_hazard(TextWord *name, cpVect position)
{
item_new(name, hazard, position);
}
/*eol@eof*/
|
Cherve3/2D-Game-Project | include/bu_ui.h | <filename>include/bu_ui.h
#ifndef __BU_UI_H__
#define __BU_UI_H__
#include "SDL_ttf.h"
#include "gf2d_sprite.h"
typedef struct
{
Sprite *health;
Sprite *stamina;
Sprite *base;
}HUD;
typedef struct
{
Sprite *background;
Sprite *start_button;
Sprite *quit_button;
TTF_Font *start_font;
}StartMenu;
typed... |
Cherve3/2D-Game-Project | include/bu_menu.h | <gh_stars>0
#ifndef __BU_MENU_H__
#define __BU_MENU_H__
#include "gfc_vector.h"
int open_menu(Vector2D resolution);
#endif
|
Cherve3/2D-Game-Project | src/gf2d_actor.c | <filename>src/gf2d_actor.c
#include "gf2d_actor.h"
#include "simple_logger.h"
#include <stdio.h>
typedef struct
{
Uint32 maxActionLists;
ActionList* actionLists;
}ActionManager;
static ActionManager action_list_manager;
void gf2d_action_list_clear_all();
void gf2d_action_list_close()
{
gf2d_action_lis... |
Cherve3/2D-Game-Project | include/bu_camera.h | #ifndef __BU_CAMERA_H__
#define __BU_CAMERA_H__
#include "gfc_types.h"
#include "gfc_vector.h"
#include "bu_shapes.h"
typedef struct
{
Rect view;
Rect playerBounds;
Vector2D bounds;
}Camera;
/**
* @brief Set the camera size in width and height
* @param size the width and height of the camera
*/
void camera_... |
Cherve3/2D-Game-Project | src/gf2d_element_list.c | #include <stdlib.h>
#include <stdio.h>
#include "gf2d_element_list.h"
#include "simple_logger.h"
Vector2D gf2d_element_get_item_position(Element* element, int i)
{
ListElement* list;
Vector2D position = { 0 };
int itemsPerLine;
if (!element)return position;
list = (ListElement*)element->data;
i... |
Cherve3/2D-Game-Project | include/bu_items.h | #ifndef __BU_ITEMS_H__
#define __BU_ITEMS_H__
#include "chipmunk/chipmunk.h"
#include "bu_entity.h"
typedef enum
{
consumable,
weapon,
equipment,
hazard
}ItemType;
typedef struct{
Bool _inuse;
Bool picked_up;
Bool store_item;
ItemType type;
char *name;
char *description;
Entity *ent;
int armor;
int ... |
Cherve3/2D-Game-Project | include/bu_money.h | #ifndef __BU_MONEY_H__
#define __BU_MONEY_H__
#include "chipmunk/chipmunk.h"
#include "gfc_vector.h"
void spawn_money(int value, cpVect position);
#endif
|
Cherve3/2D-Game-Project | src/bu_FSM.c |
#include "gfc_types.h"
#include "simple_logger.h"
#include "bu_FSM.h"
#include "bu_npc.h"
void set_state(FSM* fsm, void(*state)());
void update_state(FSM* fsm);
void free_FSM(FSM *fsm)
{
if (!fsm)
return;
fsm->active_state = NULL;
fsm->set_state = NULL;
free(fsm);
slog("FSM freed");
}
FSM *new_FSM()
{
FSM... |
Cherve3/2D-Game-Project | src/bu_collision.c | <reponame>Cherve3/2D-Game-Project
#include "simple_logger.h"
#include "bu_collision.h"
#include "bu_entity.h"
#include "bu_npc.h"
Bool player_bounds_collision(Rect player, Rect bounds)
{
//slog("")
if (((player.x + player.w) < bounds.x) || (player.x > (bounds.x + bounds.w)) ||
((player.y + player.h) < bounds.y) ... |
Cherve3/2D-Game-Project | include/gf2d_element_list.h | #ifndef __GF2D_ELEMENT_LIST_H__
#define __GF2D_ELEMENT_LIST_H__
#include "gfc_list.h"
#include "gf2d_elements.h"
typedef enum
{
LS_Horizontal,
LS_Vertical
}ListStyle;
typedef struct
{
List* list;
Vector2D itemSize;
ListStyle listStyle;
int wraps;
int scrolls;
}ListElement;
ListEleme... |
Cherve3/2D-Game-Project | src/bu_items.c | #include "simple_logger.h"
#include "simple_json.h"
#include "gf2d_config.h"
#include "bu_timer.h"
#include "bu_level.h"
#include "bu_items.h"
#include "bu_player.h"
#include "bu_shop.h"
typedef struct
{
Item *item_list;
Uint32 item_count;
Uint32 max_items;
}ItemManager;
static ItemManager items = { 0 };
stati... |
Cherve3/2D-Game-Project | include/bu_combat.h | #ifndef __BU_COMBAT_H__
#define __BU_COMBAT_H__
#include "simple_logger.h"
#include "bu_player.h"
#include "bu_npc.h"
void attack_list_init();
void punch(Player *player);
void kick(Player *player);
void throw_weapon(Player *player);
void weapon_attack_left(Player *player);
void weapon_attack_right(Player *play... |
Cherve3/2D-Game-Project | src/gf2d_element_actor.c | <reponame>Cherve3/2D-Game-Project
#include <stdlib.h>
#include <stdio.h>
#include "gf2d_element_actor.h"
#include "gf2d_actor.h"
#include "simple_logger.h"
void gf2d_element_actor_draw(Element* element, Vector2D offset)
{
ActorElement* actor;
Vector2D position;
if (!element)return;
actor = (ActorElemen... |
Cherve3/2D-Game-Project | src/bu_menu.c | <gh_stars>0
#include "SDL.h"
#include "simple_logger.h"
#include "gfc_audio.h"
#include "bu_menu.h"
int open_menu(Vector2D resolution)
{
int start = 0;
int done;
int x, y;
SDL_Event event;
SDL_Texture* menu = NULL;
char* model_name = NULL;
SDL_Texture* loading = NULL;
SDL_Texture* load_icon = NULL;
SDL_Rec... |
Cherve3/2D-Game-Project | src/bu_door.c |
#include "simple_logger.h"
#include "bu_entity.h"
#include "bu_door.h"
#include "bu_collision.h"
#include "bu_player.h"
#include "bu_level.h"
void door_touch(Entity *self, Entity *player)
{
if (!self) return;
//slog("Player touch: %s", player->name);
if (player == get_player()->ent)
{
level_load(self->data);
... |
Cherve3/2D-Game-Project | src/bu_shapes.c | <filename>src/bu_shapes.c<gh_stars>0
#include "bu_shapes.h"
#include "gf2d_draw.h"
#include "simple_logger.h"
Rect gf2d_rect(float x, float y, float w, float h)
{
Rect r;
gf2d_rect_set(r, x, y, w, h);
return r;
}
void gf2d_rect_draw(Rect r, Color color)
{
gf2d_draw_rect(gf2d_rect_to_sdl_rect(r), gfc_c... |
Cherve3/2D-Game-Project | src/game.c | #include <math.h>
#include <SDL.h>
#include "chipmunk/chipmunk.h"
#include "chipmunk/chipmunk_private.h"
#include "simple_logger.h"
#include "gf2d_graphics.h"
#include "gf2d_sprite.h"
#include "gf2d_draw.h"
#include "gf2d_windows.h"
#include "gfc_audio.h"
#include "bu_timer.h"
#include "bu_camera.h"
#include "bu_u... |
Cherve3/2D-Game-Project | src/bu_player.c |
#include "chipmunk/chipmunk_private.h"
#include "simple_json.h"
#include "simple_logger.h"
#include "gfc_audio.h"
#include "bu_timer.h"
#include "bu_camera.h"
#include "bu_player.h"
#include "bu_npc.h"
#include "bu_level.h"
#include "bu_combat.h"
#include "bu_money.h"
static Player *player = { 0 };
static Uint8 pl... |
Cherve3/2D-Game-Project | src/gf2d_element_button.c | #include "gf2d_element_button.h"
#include "gf2d_mouse.h"
#include "gf2d_element_actor.h"
#include "simple_logger.h"
void gf2d_element_button_draw(Element* element, Vector2D offset)
{
ButtonElement* button;
Vector2D position;
Actor* actor;
if (!element)return;
button = (ButtonElement*)element->data;... |
Cherve3/2D-Game-Project | src/bu_camera.c |
#include "simple_logger.h"
#include "bu_level.h"
#include "bu_camera.h"
#include "bu_collision.h"
#include "bu_player.h"
static Camera camera = { 0 };
void camera_set_dimensions(Vector2D size)
{
camera.view.w = size.x;
camera.view.h = size.y;
camera.playerBounds.w = size.x / 1.5;
camera.playerBounds.h = size.... |
Cherve3/2D-Game-Project | include/gf2d_element_label.h | #ifndef __GF2D_LABEL_ELEMENT_H__
#define __GF2D_LABEL_ELEMENT_H__
#include "gf2d_elements.h"
typedef enum
{
LJ_Left,
LJ_Center,
LJ_Right
}LabelJustification;
typedef enum
{
LA_Top,
LA_Middle,
LA_Bottom
}LabelAlignment;
typedef struct
{
TextBlock text; /**<the label text*/
Color b... |
Cherve3/2D-Game-Project | include/bu_npc.h | #ifndef __BU_NPC_H__
#define __BU_NPC_H__
#include "chipmunk/chipmunk.h"
#include "bu_entity.h"
#include "bu_items.h"
#include "bu_FSM.h"
typedef enum {
Friendly,
Nerd,
Jock,
Preps,
Goths,
Mobster,
Shop,
Questgiver
}NPCType;
typedef enum {
None,
Brawler,
Weapon,
Thrower
}FightStyle;
typedef struct{
Te... |
Cherve3/2D-Game-Project | src/bu_ui.c |
#include "simple_logger.h"
#include "simple_json.h"
#include "gfc_text.h"
#include "bu_ui.h"
#include "bu_shop.h"
#include "bu_player.h"
#include "bu_npc.h"
#include "bu_camera.h"
typedef struct
{
HUD hud;
StartMenu start_menu;
PlayerMenu player_menu;
EquipMenu equip_menu;
ShopUI shop_ui;
}UI;
static UI... |
Cherve3/2D-Game-Project | src/bu_npc.c |
#include <math.h>
#include "chipmunk/chipmunk_private.h"
#include "simple_json.h"
#include "simple_logger.h"
#include "gfc_types.h"
#include "gf2d_sprite.h"
#include "bu_level.h"
#include "bu_money.h"
#include "bu_npc.h"
static NPC *npc = NULL;
static Uint32 npc_count = 0;
static SJson *npc_info = NULL;
static S... |
Cherve3/2D-Game-Project | include/gf2d_config.h |
#ifndef __GF2D_CONFIG_H__
#define __GF2D_CONFIG_H__
#include <simple_json.h>
#include "gfc_vector.h"
int sj_value_as_vector2d(SJson *json, Vector2D *output);
int sj_value_as_vector3d(SJson *json, Vector3D *output);
int sj_value_as_vector4d(SJson *json, Vector4D *output);
#endif |
Cherve3/2D-Game-Project | src/bu_combat.c | <reponame>Cherve3/2D-Game-Project<filename>src/bu_combat.c
#include "gf2d_draw.h"
#include "gfc_audio.h"
#include "bu_shapes.h"
#include "bu_combat.h"
#include "bu_collision.h"
#include "bu_camera.h"
typedef struct
{
Rect collider;
int damage;
float duration;
Sound **audio;
}Attack;
static List* attack... |
lcferrum/wvtt | fp_routines.h | #ifndef FPROUTINES_H
#define FPROUTINES_H
#include <string>
namespace FPRoutines {
void FillDriveList();
std::string GetSystemFilePath(const char* fname);
}
#endif //FPROUTINES_H |
lcferrum/wvtt | extra_defs.h | //Defines not found in MinGW's windows.h/winnt.h:
#ifndef PRODUCT_ENTERPRISE_SERVER
#define PRODUCT_ENTERPRISE_SERVER 0x0000000A
#endif
#ifndef PRODUCT_ENTERPRISE_SERVER_CORE
#define PRODUCT_ENTERPRISE_SERVER_CORE 0x0000000E
#endif
#ifndef PRODUCT_ENTERPRISE_SERVER_IA64
#define PRODUCT_E... |
lcferrum/wvtt | externs.h | <filename>externs.h
#ifndef EXTERNS_H
#define EXTERNS_H
#include <memory>
#include <windows.h>
#include <accctrl.h>
#include <winternl.h>
class Externs {
private:
static std::unique_ptr<Externs> instance;
HMODULE hNtDll;
HMODULE hKernel32;
HMODULE hVersion;
HMODULE hAdvapi32;
void LoadFunctions();
void Unl... |
dineshkumarc987/EFIgy-GUI | EFIgy/AppDelegate.h | //
// AppDelegate.h
// EFIgy
//
// Created by <NAME> on 10/5/17.
// Copyright © 2017 Duo Security. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface AppDelegate : NSObject <NSApplicationDelegate, NSURLSessionDelegate>
- (IBAction)getEFIReport:(id)sender;
@property (weak) IBOutlet NSTextField *hashedSys... |
mwkrentel/libmonitor | src/spinlock.h | <gh_stars>10-100
/*
* Libmonitor spinlock.
*
* Copyright (c) 2007-2021, Rice University.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code mus... |
mwkrentel/libmonitor | src/monitor.h | /*
* Include file for libmonitor clients.
*
* Copyright (c) 2007-2021, Rice University.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must... |
mwkrentel/libmonitor | tests/hidden.c | <reponame>mwkrentel/libmonitor<gh_stars>10-100
/*
* John's program to launch a pthread by dlopen("libpthread.so") and
* dlsym("pthread_create"). This method seems to bypass monitor's
* normal way of overriding pthread_create().
*
* Copyright (c) 2007-2021, Rice University.
* See the file LICENSE for details... |
mwkrentel/libmonitor | tests/thread_fork.c | /*
* Test fork() from a threaded program.
*
* Normally, the child will have only one running thread, and monitor
* needs to understand that, or else at process exit time, monitor
* will get into an infinite loop trying to signal threads that don't
* exist.
*
* Copyright (c) 2007-2021, Rice University.
* ... |
mwkrentel/libmonitor | src/mpi_comm_c.c | <reponame>mwkrentel/libmonitor<filename>src/mpi_comm_c.c<gh_stars>10-100
/*
* Override MPI_Comm_rank in C/C++.
*
* Copyright (c) 2007-2021, Rice University.
* See the file LICENSE for details.
*
* $Id$
*/
#include "config.h"
#include "common.h"
#include "monitor.h"
typedef int mpi_comm_fcn_t(void *, int *)... |
mwkrentel/libmonitor | tests/side-exit.c | /*
* Adapt the exit.c test to launch several threads and call exit()
* from *one* of them (main or side). Don't join or exit the other
* threads, just let them run.
*
* This tests who gets fini-thread and who gets fini-process.
*
* By contrast, exit.c has multiple calls to exit() and pthread_exit()
* as ... |
sergiosilvajr/popular-movies-ios | popular-movies-ios/Movie.h | <filename>popular-movies-ios/Movie.h
//
// Movie.h
// popular-movies-ios
//
// Created by <NAME> on 22/10/16.
//
//
#import <UIKit/UIKit.h>
#import "JSONModel.h"
@interface Movie : JSONModel
@property (nonatomic) NSString *poster_path;
@property (nonatomic) NSString *title;
@property (nonatomic) NSString *overvie... |
sergiosilvajr/popular-movies-ios | popular-movies-ios/HttpRequests.h | <gh_stars>0
//
// HttpRequests.h
// popular-movies-ios
//
// Created by <NAME> on 22/10/16.
//
//
#import <Foundation/Foundation.h>
#import <AFHTTPSessionManager.h>
#import "Movie.h"
@interface HttpRequests : NSObject
extern NSString *const IMAGE_BASE_URL;
-(void) getPopularMoviesList:(void (^)(NSArray<Movie *> *... |
sergiosilvajr/popular-movies-ios | popular-movies-ios/MovieTableViewCell.h | //
// MovieTableViewCell.h
// popular-movies-ios
//
// Created by <NAME> on 22/10/16.
//
//
#import <UIKit/UIKit.h>
@interface MovieTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIImageView *movieImage;
@property (weak, nonatomic) IBOutlet UILabel *movieTitleLabel;
@end
|
sergiosilvajr/popular-movies-ios | popular-movies-ios/PopularMoviesResult.h | <gh_stars>0
//
// PopularMoviesResult.h
// popular-movies-ios
//
// Created by <NAME> on 22/10/16.
//
//
#import <Foundation/Foundation.h>
#import "Movie.h"
@interface PopularMoviesResult : JSONModel
@property (strong, nonatomic) NSArray<NSDictionary *> *results;
@property (nonatomic) NSNumber *total_pages;
@prope... |
sergiosilvajr/popular-movies-ios | popular-movies-ios/MovieViewController.h | <reponame>sergiosilvajr/popular-movies-ios
//
// MovieViewController.h
// popular-movies-ios
//
// Created by <NAME> on 23/10/16.
//
//
#import "ViewController.h"
#import "Movie.h"
@interface MovieViewController : ViewController
@property (weak, nullable, nonatomic) IBOutlet UIImageView *moviePoster;
@property (we... |
sergiosilvajr/popular-movies-ios | popular-movies-ios/AppDelegate.h | <filename>popular-movies-ios/AppDelegate.h
//
// AppDelegate.h
// popular-movies-ios
//
// Created by <NAME> on 22/10/16.
//
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
sergiosilvajr/popular-movies-ios | popular-movies-ios/ViewController.h | //
// ViewController.h
// popular-movies-ios
//
// Created by <NAME> on 22/10/16.
//
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
@end
|
mmr-ashiq/Gym-Management | gym_management/main.c | #include<stdio.h>
#include<conio.h> //getch(),
#include <stdlib.h> //system("CLS"),
#include<windows.h> //gotoxy(),
#include<string.h>
#include<time.h> //time
//pre-function declaration
void main_menu();
void receptionist_registration();
void receptionist_authentication();
double BMI();
int Loading_Animator();
vo... |
BitMechanic/VaOcean | Source/VaOceanPlugin/Classes/VaOceanSimulatorComponent.h | <gh_stars>1-10
// Copyright 2014 <NAME>. All Rights Reserved.
#pragma once
#include "VaOceanPluginPrivatePCH.h"
#include "VaOceanSimulatorComponent.generated.h"
#define PAD16(n) (((n)+15)/16*16)
/** Phillips spectrum configuration */
USTRUCT()
struct FOceanData
{
GENERATED_USTRUCT_BODY()
/** The size of displace... |
BitMechanic/VaOcean | Source/VaOceanPlugin/Classes/VaOceanShaders.h | // Copyright 2014 <NAME>. All Rights Reserved.
#pragma once
#include "VaOceanPluginPrivatePCH.h"
#include "VaOceanShaders.generated.h"
#define HALF_SQRT_2 0.7071068f
#define GRAV_ACCEL 981.0f // The acceleration of gravity, cm/s^2
#define BLOCK_SIZE_X 16
#define BLOCK_SIZE_Y 16
///////////////////////////////////... |
amoylel/NCUI | third_party/amo/amo/asio/st_asio_wrapper/object.h | /*
* object.h
*
* Created on: 2016-6-11
* Author: youngwolf
* email: <EMAIL>
* QQ: 676218192
* Community on QQ: 198941541
*
* the top class
*/
#ifndef ST_ASIO_OBJECT_H_
#define ST_ASIO_OBJECT_H_
#include <boost/function.hpp>
#include "base.h"
namespace st_asio_wrapper
{
class object
{
protected... |
amoylel/NCUI | NCUI/resource.h | <filename>NCUI/resource.h
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ 生成的包含文件。
// 供 NCUI.rc 使用
//
#define IDC_MYICON 2
#define IDD_EXEGEN_DIALOG 102
#define IDD_ABOUTBOX 103
#define IDM_ABOUT 104
#define IDM_EXIT 105
#... |
amoylel/NCUI | third_party/amo/amo/asio/st_asio_wrapper/socket_service.h | /*
* socket_service.h
*
* Created on: 2012-3-2
* Author: youngwolf
* email: <EMAIL>
* QQ: 676218192
* Community on QQ: 198941541
*
* this class only used at client endpoint
*/
#ifndef ST_ASIO_SOCKET_SERVICE_H_
#define ST_ASIO_SOCKET_SERVICE_H_
#include "object_pool.h"
namespace st_asio_wrapper
{
... |
amoylel/NCUI | third_party/amo/amo/asio/st_asio_wrapper/tcp/client_socket.h | /*
* client_socket.h
*
* Created on: 2012-3-2
* Author: youngwolf
* email: <EMAIL>
* QQ: 676218192
* Community on QQ: 198941541
*
* this class only used at client endpoint
*/
#ifndef ST_ASIO_CLIENT_SOCKET_H_
#define ST_ASIO_CLIENT_SOCKET_H_
#include "socket.h"
#include "../container.h"
namespace ... |
amoylel/NCUI | third_party/amo/amo/asio/st_asio_wrapper/tcp/ssl/alias.h | <reponame>amoylel/NCUI
/*
* alias.h
*
* Created on: 2017-7-17
* Author: youngwolf
* email: <EMAIL>
* QQ: 676218192
* Community on QQ: 198941541
*
* some alias, they are deprecated.
*/
#ifndef ST_ASIO_SSL_ALIAS_H_
#define ST_ASIO_SSL_ALIAS_H_
#include "ssl.h"
namespace st_asio_wrapper { namespace ssl {
tem... |
amoylel/NCUI | third_party/amo/amo/asio/st_asio_wrapper/tcp/server_socket.h | <reponame>amoylel/NCUI<filename>third_party/amo/amo/asio/st_asio_wrapper/tcp/server_socket.h<gh_stars>10-100
/*
* server_socket.h
*
* Created on: 2013-4-11
* Author: youngwolf
* email: <EMAIL>
* QQ: 676218192
* Community on QQ: 198941541
*
* this class only used at server endpoint
*/
#ifndef ST_ASI... |
amoylel/NCUI | third_party/amo/amo/asio/st_asio_wrapper/ext/udp.h | /*
* udp.h
*
* Created on: 2016-9-7
* Author: youngwolf
* email: <EMAIL>
* QQ: 676218192
* Community on QQ: 198941541
*
* udp related conveniences.
*/
#ifndef ST_ASIO_EXT_UDP_H_
#define ST_ASIO_EXT_UDP_H_
#include "packer.h"
#include "unpacker.h"
#include "../udp/socket.h"
#include "../udp/socket_... |
amoylel/NCUI | third_party/amo/amo/asio/st_asio_wrapper/tcp/socket.h | <gh_stars>10-100
/*
* socket.h
*
* Created on: 2012-3-2
* Author: youngwolf
* email: <EMAIL>
* QQ: 676218192
* Community on QQ: 198941541
*
* this class used at both client and server endpoint
*/
#ifndef ST_ASIO_TCP_SOCKET_H_
#define ST_ASIO_TCP_SOCKET_H_
#include "../socket.h"
namespace st_asio_... |
amoylel/NCUI | third_party/amo/amo/asio/st_asio_wrapper/ext/packer.h | /*
* packer.h
*
* Created on: 2012-3-2
* Author: youngwolf
* email: <EMAIL>
* QQ: 676218192
* Community on QQ: 198941541
*
* packers
*/
#ifndef ST_ASIO_EXT_PACKER_H_
#define ST_ASIO_EXT_PACKER_H_
#include "ext.h"
namespace st_asio_wrapper { namespace ext {
class packer_helper
{
public:
//return... |
amoylel/NCUI | third_party/amo/examples/systeminfo.h | /*
* Copyright 2008 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing... |
amoylel/NCUI | third_party/amo/amo/logger/raw_daily_file_sink.h | <reponame>amoylel/NCUI<filename>third_party/amo/amo/logger/raw_daily_file_sink.h<gh_stars>10-100
// Created by amoylel on 12/15/2017.
// Copyright (c) 2017 amoylel All rights reserved.
#ifndef AMO_RAW_DAILY_FILE_SINK_H__
#define AMO_RAW_DAILY_FILE_SINK_H__
#include <spdlog/sinks/base_sink.h>
#include <spdlog/deta... |
amoylel/NCUI | third_party/amo/amo/logger/raw_file_helper.h | <reponame>amoylel/NCUI
//
// Copyright(c) 2015 <NAME>.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
//
// Created by amoylel on 12/15/2017.
// Copyright (c) 2017 amoylel All rights reserved.
#ifndef AMO_RAW_FILE_HELPER_H__
#define AMO_RAW_FILE_HELPER_H__
#pragma once
// Helper class... |
amoylel/NCUI | third_party/amo/amo/asio/st_asio_wrapper/ext/unpacker.h | <reponame>amoylel/NCUI
/*
* unpacker.h
*
* Created on: 2012-3-2
* Author: youngwolf
* email: <EMAIL>
* QQ: 676218192
* Community on QQ: 198941541
*
* unpackers
*/
#ifndef ST_ASIO_EXT_UNPACKER_H_
#define ST_ASIO_EXT_UNPACKER_H_
#include <boost/array.hpp>
#include "ext.h"
namespace st_asio_wrapper... |
amoylel/NCUI | third_party/amo/amo/asio/st_asio_wrapper/config.h | /*
* config.h
*
* Created on: 2012-10-21
* Author: youngwolf
* email: <EMAIL>
* QQ: 676218192
* Community on QQ: 198941541
*
* this head file contain some macros used to verify the compiler and update logs etc.
* license: www.boost.org/LICENSE_1_0.txt
*
* Known issues:
* 1. since 1.2.0, with boo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.