repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
Eslam-Abdo/STM32_ARM_drivers
02-MCAL/10-DMA/DMA_program.c
<reponame>Eslam-Abdo/STM32_ARM_drivers /*********************************************************************************/ /* Author : <NAME> */ /* Version : V01 */ /* Date : 17 OCT 2021 ...
Eslam-Abdo/STM32_ARM_drivers
02-MCAL/07-UART/UART_config.h
/*********************************************************************************/ /* Author : <NAME> */ /* Version : V01 */ /* Date : 11 OCT 2020 ...
Eslam-Abdo/STM32_ARM_drivers
02-MCAL/08-CAN/CAN_program.c
<reponame>Eslam-Abdo/STM32_ARM_drivers /*********************************************************************************/ /* Author : <NAME> */ /* Version : V01 */ /* Date : 17 OCT 2020 ...
Eslam-Abdo/STM32_ARM_drivers
02-MCAL/06-STK/STK_private.h
<gh_stars>1-10 /*********************************************************************************/ /* Author : <NAME> */ /* Version : V01 */ /* Date : 17 OCT 2020 ...
Eslam-Abdo/STM32_ARM_drivers
03-HAL/03-ESP8266/ESP8266_program.c
/*********************************************************************************/ /* Author : <NAME> */ /* Version : V01 */ /* Date : 9 MAY 2021 ...
Eslam-Abdo/STM32_ARM_drivers
02-MCAL/06-STK/STK_program.c
<filename>02-MCAL/06-STK/STK_program.c /*********************************************************************************/ /* Author : <NAME> */ /* Version : V02 */ /* Date : 19 NOV 2021 ...
Eslam-Abdo/STM32_ARM_drivers
02-MCAL/08-CAN/CAN_interface.h
<gh_stars>1-10 /*********************************************************************************/ /* Author : <NAME> */ /* Version : V01 */ /* Date : 17 OCT 2020 ...
Eslam-Abdo/STM32_ARM_drivers
02-MCAL/10-DMA/DMA_config.h
/*********************************************************************************/ /* Author : <NAME> */ /* Version : V01 */ /* Date : 17 OCT 2021 ...
Eslam-Abdo/STM32_ARM_drivers
02-MCAL/09-I2C/I2C_private.h
<filename>02-MCAL/09-I2C/I2C_private.h /*********************************************************************************/ /* Author : <NAME> */ /* Version : V01 */ /* Date : 7 JUN 2021 ...
Eslam-Abdo/STM32_ARM_drivers
01-LIB/02-BIT_MATH/BIT_MATH.h
/*********************************************************************************/ /* Author : <NAME> */ /* Version : V01 */ /* Date : 22 SEP 2020 ...
Eslam-Abdo/STM32_ARM_drivers
03-HAL/02-7_SEG/7_SEG_program.c
<filename>03-HAL/02-7_SEG/7_SEG_program.c<gh_stars>1-10 /*********************************************************************************/ /* Author : <NAME> */ /* Version : V01 */ /* Date : 2...
Eslam-Abdo/STM32_ARM_drivers
02-MCAL/10-DMA/DMA_private.h
/*********************************************************************************/ /* Author : <NAME> */ /* Version : V01 */ /* Date : 17 OCT 2021 ...
Eslam-Abdo/STM32_ARM_drivers
02-MCAL/05-AFIO/AFIO_interface.h
/*********************************************************************************/ /* Author : <NAME> */ /* Version : V02 */ /* Date : 19 NOV 2021 ...
Eslam-Abdo/STM32_ARM_drivers
02-MCAL/09-I2C/I2C_program.c
/*********************************************************************************/ /* Author : <NAME> */ /* Version : V01 */ /* Date : 7 JUN 2021 ...
Eslam-Abdo/STM32_ARM_drivers
03-HAL/02-7_SEG/7_SEG_interface.h
<gh_stars>1-10 /*********************************************************************************/ /* Author : <NAME> */ /* Version : V01 */ /* Date : 25 SEP 2020 ...
Eslam-Abdo/STM32_ARM_drivers
02-MCAL/01-RCC/RCC_private.h
<gh_stars>1-10 /*********************************************************************************/ /* Author : <NAME> */ /* Version : V02 */ /* Date : 17 NOV 2021 ...
maany/Sceptre_Myo_URC
SceptreVM/sceptre.h
/* Author : <NAME> This header file defines the wrappers from MyoController and IRRemote libraries */ #ifndef SPECTRE_H #define SCEPTRE_H #include "IRremote.h" #include "IRremoteInt.h" #include "MyoController.h" #define SCEPTRE_NO_OF_DEVICES 1 #define GESTURE_MAP_SIZE 5 //=============================== // Gesture to...
nnn1590/spritely
tutorials/add_title/nds/game_state.h
<reponame>nnn1590/spritely // game_state.h // Global structure to record all game state. // This file was automatically generated by Spritely #ifndef _GAME_STATE_H_ #define _GAME_STATE_H_ #include "sprites.h" #include "background_maps.h" // The levels in our game. const int kLevel_Title = 0; const int kL...
fkuehne/box-ios-sdk-v2
BoxSDK/Categories/NSJSONSerialization+BoxAdditions.h
// // NSJSONSerialization+BoxAdditions.h // BoxSDK // // Created on 8/19/13. // Copyright (c) 2013 Box. All rights reserved. // #import <Foundation/Foundation.h> /** * The BoxAdditions category on NSJSONSerialization provides a class method for ensuring * that an object extracted from a decoded JSON object is o...
fkuehne/box-ios-sdk-v2
BoxSDK/FolderPicker/BoxItemPickerViewController.h
// // BoxItemPickerViewController.h // BoxSDK // // Created on 5/1/13. // Copyright (c) 2013 Box Inc. All rights reserved. // #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import <BoxSDK/BoxItemPickerTableViewController.h> #if TARGET_OS_IOS #import <BoxSDK/BoxAuthorizationViewController.h> #endif ty...
Naithar/NHSelectorView
Example/NHSelectionView/NAppDelegate.h
<filename>Example/NHSelectionView/NAppDelegate.h // // NAppDelegate.h // NHSelectionView // // Created by Naithar on 10/08/2015. // Copyright (c) 2015 Naithar. All rights reserved. // @import UIKit; @interface NAppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @en...
Naithar/NHSelectorView
Example/NHSelectionView/NViewController.h
// // NViewController.h // NHSelectionView // // Created by Naithar on 10/08/2015. // Copyright (c) 2015 Naithar. All rights reserved. // @import UIKit; @interface NViewController : UIViewController @end
Naithar/NHSelectorView
Pod/Classes/NHSelectorView.h
// // NHSelectorView.h // Pods // // Created by <NAME> on 08.10.15. // // #import <UIKit/UIKit.h> typedef NS_ENUM(NSUInteger, NHSelectorViewSelectionStyle) { NHSelectorViewSelectionStyleDefault, NHSelectorViewSelectionStyleLine, }; NS_ASSUME_NONNULL_BEGIN @class NHSelectorView; @protocol NHSelectorViewD...
qimin/pymatgen
dependencies/spglib-1.3.1/src/spglib.c
<filename>dependencies/spglib-1.3.1/src/spglib.c /* spglib.c */ /* Copyright (C) 2008 <NAME> */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include "spglib.h" #include "refinement.h" #include "cell.h" #include "lattice.h" #include "mathfunc.h" #include "pointgroup.h" #include "primitive.h" #include "sp...
sergak01/binary-parser
main.h
#include <node.h> #include <node_buffer.h> #include <node_object_wrap.h> #include <algorithm> #include <bitset> #include <chrono> #include <iostream> #include <numeric> #include <string> #include <vector> using v8::Array; using v8::ArrayBuffer; using v8::Context; using v8::Exception; using v8::Function; using v8::Fu...
lingxiao/good-great-excellent
.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen/cabal_macros.h
<gh_stars>1-10 /* DO NOT EDIT: This file is automatically generated by Cabal */ /* package HUnit-1.3.1.1 */ #define VERSION_HUnit "1.3.1.1" #define MIN_VERSION_HUnit(major1,major2,minor) (\ (major1) < 1 || \ (major1) == 1 && (major2) < 3 || \ (major1) == 1 && (major2) == 3 && (minor) <= 1) /* package attopars...
vanessavvp/DAA-pr8-maximum-diversity-problem
include/element.h
<gh_stars>1-10 /** * PROJECT HEADER * @file element.h * @author: <NAME> * Contact: <EMAIL> * @date: 02/05/2021 * Subject: Diseño y Análisis de Algoritmos * Practice: Numberº8 * Purpose: Maximum Diversity Problem */ #ifndef ELEMENT_H #define ELEMENT_H #include <iostream> #include <vector> #pragma once class...
vanessavvp/DAA-pr8-maximum-diversity-problem
include/interChange.h
/** * PROJECT HEADER * @input interChange.h * @author: <NAME> * Contact: <EMAIL> * @date: 02/05/2021 * Subject: Diseño y Análisis de Algoritmos * Practice: Numberº8 * Purpose: Maximum Diversity Problem */ #ifndef INTER_CHANGE_H #define INTER_CHANGE_H #include "./solution.h" #include "./localSearch.h" #pragm...
vanessavvp/DAA-pr8-maximum-diversity-problem
include/problem.h
/** * PROJECT HEADER * @file problem.h * @author: <NAME> * Contact: <EMAIL> * @date: 02/05/2021 * Subject: Diseño y Análisis de Algoritmos * Practice: Numberº8 * Purpose: Maximum Diversity Problem */ #ifndef PROBLEM_H #define PROBLEM_H #include <iostream> #include <fstream> #include <sstream> #include <strin...
vanessavvp/DAA-pr8-maximum-diversity-problem
include/formulas.h
/** * PROJECT HEADER * @file formulas.cc * @author: <NAME> * Contact: <EMAIL> * @date: 02/05/2021 * Subject: Diseño y Análisis de Algoritmos * Practice: Numberº8 * Purpose: Maximum Diversity Problem */ #include <cmath> #include "./element.h" /** * Returns the calculus of the euclidean distance between two ...
vanessavvp/DAA-pr8-maximum-diversity-problem
include/node.h
/** * PROJECT HEADER * @file nodet.h * @author: <NAME> * Contact: <EMAIL> * @date: 16/05/2021 * Subject: Diseño y Análisis de Algoritmos * Practice: Numberº8 * Purpose: Maximum Diversity Problem */ #ifndef NODE_H #define NODE_H #include <iostream> #include "./solution.h" #pragma once template <typename TY...
vanessavvp/DAA-pr8-maximum-diversity-problem
include/solution.h
/** * PROJECT HEADER * @file solution.h * @author: <NAME> * Contact: <EMAIL> * @date: 02/05/2021 * Subject: Diseño y Análisis de Algoritmos * Practice: Numberº8 * Purpose: Maximum Diversity Problem */ #ifndef SOLUTION_H #define SOLUTION_H #include <iostream> #include <vector> #include "./element.h" #include...
vanessavvp/DAA-pr8-maximum-diversity-problem
include/branchAndBound.h
/** * PROJECT HEADER * @file branchAndBound.h * @author: <NAME> * Contact: <EMAIL> * @date: 15/05/2021 * Subject: Diseño y Análisis de Algoritmos * Practice: Numberº8 * Purpose: Maximum Diversity Problem */ #ifndef BRANCH_AND_BOUND_H #define BRANCH_AND_BOUND_H #define MAX_FLOAT 159874.23 #include <algorithm>...
vanessavvp/DAA-pr8-maximum-diversity-problem
include/greedy.h
/** * PROJECT HEADER * @file greedy.h * @author: <NAME> * Contact: <EMAIL> * @date: 02/05/2021 * Subject: Diseño y Análisis de Algoritmos * Practice: Numberº8 * Purpose: Maximum Diversity Problem */ #ifndef GREEDY_H #define GREEDY_H #include <iostream> #include "./algorithm.h" #include "./problem.h" #includ...
vanessavvp/DAA-pr8-maximum-diversity-problem
include/algorithm.h
/** * PROJECT HEADER * @file algorithm.h * @author: <NAME> * Contact: <EMAIL> * @date: 02/05/2021 * Subject: Diseño y Análisis de Algoritmos * Practice: Numberº8 * Purpose: Maximum Diversity Problem */ #ifndef ALGORITHM_H #define ALGORITHM_H #include <iostream> #include <utility> #include "./solution.h" #p...
vanessavvp/DAA-pr8-maximum-diversity-problem
include/GRASP.h
/** * PROJECT HEADER * @file GRASP.h * @author: <NAME> * Contact: <EMAIL> * @date: 02/05/2021 * Subject: Diseño y Análisis de Algoritmos * Practice: Numberº8 * Purpose: Maximum Diversity Problem */ #ifndef GRASP_H #define GRASP_H #include <iostream> #include "./algorithm.h" #include "./problem.h" #include "...
gurki/lightpainting
src/timer.h
<gh_stars>0 #ifndef TIMER_H #define TIMER_H #include <iostream> #include <chrono> class Timer { public: Timer(); // start timer void tic(); // start or reset the timer double tac(); // return seconds since start double toc(); // print and return seconds since ...
gurki/lightpainting
src/keys.h
<filename>src/keys.h #ifndef KEYS_H #define KEYS_H #include <unordered_set> class Keys { public: Keys(); void down( const int key ); bool isPressed( const int key ) const; private: std::unordered_set<int> pressed_; }; #endif
DavyVan/MiniCaffe
minicaffe/layer.h
/*** * @file layer.h * @author <NAME> * @brief Define the abstract base class of all layers. * @date 20/Feb/2019 */ #ifndef _LAYER_H_ #define _LAYER_H_ #include <vector> #include "seqnet.h" #include "blob.h" using namespace std; /*** * @brief The common abstract base class of all layers, whic...
DavyVan/MiniCaffe
minicaffe/minicaffe.h
<reponame>DavyVan/MiniCaffe #ifndef _MINICAFFE_H_ #define _MINICAFFE_H_ #include "layers/conv_layer.h" #include "layers/fc_layer.h" #include "layers/input_layer.h" #include "layers/mnist_generator.h" #include "layers/relu_layer.h" #include "layers/sigmoid_cross_entropy_loss.h" #include "pooling.h" #include "normalizat...
DavyVan/MiniCaffe
minicaffe/blob.h
<reponame>DavyVan/MiniCaffe /*** * @file blob.h * @author <NAME> * @brief Defines the Blob class. * @date 20/Feb/2019 */ #ifndef _BLOB_H_ #define _BLOB_H_ #include <cstdlib> #include <cstring> // #include "layer.h" class Layer; /*** * @brief Blob class, where the data actually stored. * ...
DavyVan/MiniCaffe
minicaffe/layers/input_layer.h
/*** * @file input_layer.h * @author <NAME> * @brief Header file of input_layer * @date 02/Mar/2019 */ #ifndef MAIN_INPUT_LAYER_H #define MAIN_INPUT_LAYER_H #include "../layer.h" #include "../blob.h" class InputLayer : public Layer { public: InputLayer(char* name); void infer(vector<Blob*> lefts, vector...
DavyVan/MiniCaffe
minicaffe/layers/conv_layer.h
// // Created by mingchen on 3/2/19. // #ifndef MAIN_CONV_LAYER_H #define MAIN_CONV_LAYER_H #include "../layer.h" #include "../blob.h" #include <string> class ConvLayer: public Layer { public: ConvLayer(char* name,int in_width, int in_height,int kernel_size, int in_channels, int out_channels, int w_stride...
DavyVan/MiniCaffe
minicaffe/seqnet.h
/*** * @file seqnet.h * @author <NAME> * @brief New Net * @date 08/Mar/2019 */ #ifdef _NET_H_ #error net.h is obsoleted. Do not use it anywhere. #endif #ifndef _SEQNET_H_ #define _SEQNET_H_ #include <vector> #include "blob.h" #include "layers/mnist_generator.h" #ifdef TEST_ENABLED #include "gt...
DavyVan/MiniCaffe
minicaffe/layers/sigmoid_cross_entropy_loss.h
/*** * @file sigmoid_cross_entropy_loss.h * @author <NAME> * @brief * @date 19/Mar/2019 */ #ifndef _SIGMOID_CROSS_ENTROPY_LOSS_H_ #define _SIGMOID_CROSS_ENTROPY_LOSS_H_ #include "../layer.h" #include "sigmoid.h" class SigmoidCrossEntropyLoss : public Layer { public: SigmoidCrossEntropyLoss(...
DavyVan/MiniCaffe
minicaffe/pooling.h
<gh_stars>1-10 #ifndef _PL_H_ #define _PL_H_ #include <cstdlib> //#include "net.h" #include "layer.h" #include "errors.h" #include "util.h" class PoolingLayer : public Layer { public: int mask_x; int mask_y; int stride; coord_ptr tmp_space; PoolingLayer(); PoolingLayer...
DavyVan/MiniCaffe
minicaffe/errors.h
<reponame>DavyVan/MiniCaffe<filename>minicaffe/errors.h /*** * @file errors.h * @author <NAME> * @brief Definitions of error numbers and related functions. * @date 01/Mar/2019 */ /** * Cannot use errno as variable name due to a confliction with errno.h */ #ifndef _ERRORS_H_ #define _ERRORS_H_ co...
DavyVan/MiniCaffe
minicaffe/layers/relu_layer.h
// // Created by mingchen on 3/2/19. // #ifndef MAIN_RELU_LAYER_H #define MAIN_RELU_LAYER_H #include "../layer.h" #include "../blob.h" #include <string> class ReluLayer: public Layer { public: ReluLayer(char* name):Layer(name){}; void infer(vector<Blob*> lefts, vector<Blob*> rights); void bp(vector<Blob...
DavyVan/MiniCaffe
minicaffe/normalization.h
<reponame>DavyVan/MiniCaffe #ifndef _NL_H_ #define _NL_H_ #include <cstdlib> //#include "net.h" #include "layer.h" #include "errors.h" #include "util.h" #include <string.h> class NormalizationLayer : public Layer { public: int nn; float alpha; float beta; float kk; Normalizati...
DavyVan/MiniCaffe
minicaffe/generator.h
/*** * @file generator.h * @author <NAME> * @brief Generator * @date 08/Mar/2019 */ #ifndef _GENERATOR_H_ #define _GENERATOR_H_ #include "blob.h" /*** * @brief This is the base class of generators * */ class Generator { virtual Blob* next_batch()=0; }; #endif
DavyVan/MiniCaffe
minicaffe/util.h
<gh_stars>1-10 /*** * @file util.h * @author <NAME> * @brief Utilities functions. * @date 01/Mar/2019 */ #ifndef _UTIL_H_ #define _UTIL_H_ #include <cmath> #include <iostream> #include "blob.h" void alloc_and_strcpy(char**dst, const char* src); int print_matrix(float *A, int batch_size, int x, int y, int z); i...
DavyVan/MiniCaffe
minicaffe/layers/sigmoid.h
/*** * @file sigmoid.h * @author <NAME> * @brief * @date 19/Mar/2019 */ #ifndef _SIGMOID_H_ #define _SIGMOID_H_ #include "../layer.h" class SigmoidLayer : public Layer { public: SigmoidLayer(char* name); void infer(std::vector<Blob*> lefts, std::vector<Blob*> rights); void bp(std::...
DavyVan/MiniCaffe
minicaffe/layers/mnist_generator.h
// // Created by mingchen on 3/9/19. // #ifndef MAIN_MNIST_GENERATOR_H #define MAIN_MNIST_GENERATOR_H #include "../blob.h" #include <string> #include <fstream> #include <vector> class MnistGenerator { public: virtual std::vector<Blob> loadSample(int batchSize); int reset(); MnistGenerator(std::string sam...
DavyVan/MiniCaffe
minicaffe/layers/fc_layer.h
<reponame>DavyVan/MiniCaffe /*** * @file fc_layer.h * @author <NAME> * @brief Fully connected layer (inner product layer) * @date 16/Mar/2019 */ #ifndef _FC_LAYER_H_ #define _FC_LAYER_H_ #include "../layer.h" #include "../blob.h" class FCLayer : public Layer { public: FCLayer(char* name, int...
Ridiculous-Innovations/WBANetworking
WBANetworking/WBANetworking.h
// WBANetworking.h // // Copyright (c) 2013 WBANetworking (http://WBANetworking.com/) // // 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 ...
Ridiculous-Innovations/WBANetworking
UIKit+WBANetworking/UIWebView+WBANetworking.h
<gh_stars>0 // UIWebView+WBANetworking.h // // Copyright (c) 2013-2015 WBANetworking (http://WBANetworking.com) // // 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, incl...
henrythebuilder/nif_sample_cpp
src/nif_tool.h
#ifndef NIF_TOOL_INCLUDED # define NIF_TOOL_INCLUDED # include "erl_nif.h" # include <string> ERL_NIF_TERM extract_int_term(ErlNifEnv *env, ERL_NIF_TERM term); ERL_NIF_TERM make_tuple_error(ErlNifEnv *env, const std::string text); ERL_NIF_TERM make_tuple_error(ErlNifEnv *env, const std::string text, const int n);...
iunion/DJDatePicker
DJDatePicker/DJDatePicker/DJDatePicker.h
<gh_stars>0 // // DJDatePicker.h // DJDatePicker // // Created by DJ on 2017/8/24. // Copyright © 2017年 DennisDeng. All rights reserved. // #import <UIKit/UIKit.h> typedef NS_ENUM(NSUInteger, DJPickerStyle) { PickerStyle_YearMonthDayHourMinute = 0, // 年月日时分 PickerStyle_MonthDayHourMinute, ...
iunion/DJDatePicker
DJDatePicker/DJDatePicker/NSDate+Category.h
// // NSDate+Category.h // DJkit // // Created by DennisDeng on 13-12-18. // Copyright (c) 2013年 DennisDeng. All rights reserved. // /* <NAME>, http://ericasadun.com iPhone Developer's Cookbook 3.x and beyond BSD License, Use at your own risk */ #import <Foundation/Foundation.h> //#define D_MINUTE 60 //#defi...
iunion/DJDatePicker
DJDatePicker/DJDatePicker/UIView+Size.h
<reponame>iunion/DJDatePicker // // UIView+Size.h // DJkit // // Created by DennisDeng on 14-5-5. // Copyright (c) 2014年 DennisDeng. All rights reserved. // #import <UIKit/UIKit.h> @interface UIView (Size) /** * Shortcut for frame.origin */ @property (nonatomic, assign) CGPoint origin; /** * Shortcut for fra...
Mikescher/Serpilicum
src/AutoModifierStartEffect.h
<filename>src/AutoModifierStartEffect.h #pragma once #include "leveleffect.h" class AutoModifierStartEffect : public LevelEffect { private: long startTime; int x1; int x2; int y1; int y2; public: AutoModifierStartEffect(int px, int py); ~AutoModifierStartEffect(void); virtual void start(AbstractConsole *conso...
Mikescher/Serpilicum
src/PathFindingAlgorithm.h
<gh_stars>0 #pragma once #include <iostream> #include <iomanip> #include <queue> #include <string> #include <math.h> #include <ctime> #include "AbstractConsole.h" #include "Dynamic2DArray.h" using namespace std; const int dir=4; class PathFindingAlgorithm { private: int m_w; int m_h; int *dx; int *dy; public: ...
Mikescher/Serpilicum
src/PowerUp.h
#pragma once enum PowerUpType {POWERUP_NULL, POWERUP_HEALTH, POWERUP_AUTO, POWERUP_ZOOM}; class PowerUp { private: PowerUp * next; int x; int y; public: PowerUp(int px, int py); ~PowerUp(void); virtual bool hasNextElement(); virtual PowerUp * getNextElement(); virtual void setNextElement(PowerUp * pnext); ...
Mikescher/Serpilicum
src/LevelEffect.h
#pragma once #include "AbstractConsole.h" class LevelEffect { protected: int x; int y; private: bool is_alive; public: LevelEffect(int px, int py); virtual ~LevelEffect(void); virtual void start(AbstractConsole *console) = 0; virtual void run(AbstractConsole *console) = 0; virtual void render(AbstractConsole...
Mikescher/Serpilicum
src/ChooseGameModeMenu.h
<filename>src/ChooseGameModeMenu.h #pragma once #include "displayimagetextmenu.h" #define GAMEMODECOUNT 6 class ChooseGameModeMenu : public DisplayImageTextMenu { protected: virtual void throwAction(); private: long lastRun; bool* traNext; bool* traPrev; int currmode; AbstractConsole* console; double transi...
Mikescher/Serpilicum
src/OGLConsole.h
<reponame>Mikescher/Serpilicum<filename>src/OGLConsole.h<gh_stars>0 #pragma once #include "DBConsole.h" #include <Windows.h> #include <WinBase.h> #include <chrono> #include "Keycodes.h" #include "ListenerCollection.h" #include <stdio.h> #include <stdlib.h> #include <iostream> #include <GL/glew.h> #include <GL/glut.h>...
Mikescher/Serpilicum
src/AbstractConsole.h
<filename>src/AbstractConsole.h #pragma once #include <string> #include "ListenerCollection.h" const int BUFFER_W = 80; const int BUFFER_H = 40; class AbstractConsole { public: virtual void init() = 0; virtual void redraw() = 0; virtual void write(int c, int x, int y) = 0; virtual void write(std::string s, int...
Mikescher/Serpilicum
src/Gamerules.h
<gh_stars>0 #pragma once enum DisplayMethod {WINDOWS_CONSOLE, OGL_CONSOLE, CRAZY_CONSOLE}; const DisplayMethod DISPLAYMETHOD = CRAZY_CONSOLE; const bool SHOWCONSOLE = false; const int FPS_LIMITER = 60; // 0 == UNLIMITED //######################################### const bool GR_EnableCheats = false; //#############...
Mikescher/Serpilicum
src/HighscoreMenuHard.h
#pragma once #include "highscoremenu.h" class HighscoreMenuHard : public HighscoreMenu { protected: virtual std::string getName(); virtual int getHSID(); public: HighscoreMenuHard(ActionListener* listener) : HighscoreMenu(listener){} };
Mikescher/Serpilicum
src/DisplayImageTextMenu.h
<reponame>Mikescher/Serpilicum #pragma once #include "menu.h" #include <math.h> class DisplayImageTextMenu : public Menu { protected: int id; ActionListener* listener; bool* resourceArray; long startTime; int duration; virtual void throwAction(); virtual void createMenu(ActionListener * quitListener); publ...
Mikescher/Serpilicum
src/SnakeElement.h
#pragma once #include "AbstractConsole.h" #include "Gamerules.h" class SnakeElement { private: SnakeElement *next; int x,y; public: SnakeElement(int px, int py); ~SnakeElement(void); virtual bool hasNextElement(); virtual SnakeElement* getNextElement(); virtual void setNextElement(SnakeElement* pnext); virt...
Mikescher/Serpilicum
src/HealthPowerUp.h
<reponame>Mikescher/Serpilicum<filename>src/HealthPowerUp.h #pragma once #include "powerup.h" class HealthPowerUp : public PowerUp { public: HealthPowerUp(int px, int py); virtual ~HealthPowerUp(void); virtual char getSymbol(); virtual PowerUpType getType(); };
Mikescher/Serpilicum
src/WindowsConsole.h
#pragma once #include "DBConsole.h" #include "Keycodes.h" #include <Windows.h> #include <WinBase.h> #include <chrono> #include "ListenerCollection.h" class WindowsConsole : public DBConsole { private: HANDLE hConsole; protected: virtual void writeToConsole(int c, int x, int y); virtual void showConsoleCursor(bool...
Mikescher/Serpilicum
src/CrazyDouble.h
<filename>src/CrazyDouble.h<gh_stars>0 #pragma once #include "AbstractConsole.h" #include <GL/glut.h> class CrazyDouble { private: long lastRun; protected: double max_speed; double max_value; double min_value; double initial_val; double value; double acceleration; double speed; double target; bool runnin...
Mikescher/Serpilicum
src/HighscoreMenuNormal.h
#pragma once #include "highscoremenu.h" class HighscoreMenuNormal : public HighscoreMenu { protected: virtual std::string getName(); virtual int getHSID(); public: HighscoreMenuNormal(ActionListener* listener) : HighscoreMenu(listener){} };
Mikescher/Serpilicum
src/SnakeZoomModifier.h
<filename>src/SnakeZoomModifier.h<gh_stars>0 #pragma once #include "snakemodifier.h" class SnakeZoomModifier : public SnakeModifier { private: long startTime; long runDelta; public: SnakeZoomModifier(Level* lvl, AbstractConsole *pConsole); virtual void run(Level* lvl, AbstractConsole *pConsole); virtual SnakeMod...
Mikescher/Serpilicum
src/SnakeAutoModifier.h
#pragma once #include "snakemodifier.h" #include "AbstractConsole.h" class Level; class SnakeAutoModifier : public SnakeModifier { public: long startTime; long runDelta; public: SnakeAutoModifier(Level* lvl, AbstractConsole *pConsole); virtual void run(Level* lvl, AbstractConsole *pConsole); virtual SnakeModi...
Mikescher/Serpilicum
src/SnakeModifier.h
<filename>src/SnakeModifier.h #pragma once #include "AbstractConsole.h" enum SnakeModifierType {SNAKEMODTYPE_NULL, SNAKEMODTYPE_PREAUTO, SNAKEMODTYPE_AUTO, SNAKEMODTYPE_ZOOM}; class Level; class SnakeModifier { protected: bool running; public: SnakeModifier(): running(true) {}; virtual bool isRunning() {return r...
Mikescher/Serpilicum
src/MainMenu.h
<filename>src/MainMenu.h #pragma once #include "Menu.h" #include "ListenerCollection.h" class MainMenu : public Menu { private: virtual void createMenu(ActionListener * startGamelistener); public: MainMenu(ActionListener * startGamelistener); virtual ~MainMenu(void); };
Mikescher/Serpilicum
src/Menu.h
<reponame>Mikescher/Serpilicum #pragma once #include <vector> #include "MenuElement.h" #include "AbstractConsole.h" class Menu { private: std::vector<MenuElement*> elements; unsigned int focusIndex; virtual void updateFocus(); public: Menu(void); virtual ~Menu(void); virtual void onStart() {}; virtual void r...
Mikescher/Serpilicum
src/Dynamic2DArray.h
<gh_stars>0 template <typename T> T **allocateDynamicArray( int nRows, int nCols) { T **dynamicArray; dynamicArray = new T*[nRows]; for( int i = 0 ; i < nRows ; i++ ) dynamicArray[i] = new T [nCols]; return dynamicArray; } template <typename T> void freeDynamicArray(T** dArray) { ...
Mikescher/Serpilicum
src/PowerUpSpawnEffect.h
<gh_stars>0 #pragma once #include "leveleffect.h" const int HPSE_EFFECT_DELAY = 125; class PowerUpSpawnEffect : public LevelEffect { private: long startTime; int mode; virtual void renderMode0(AbstractConsole *console); virtual void renderMode1(AbstractConsole *console); virtual void renderMode2(AbstractConsol...
Mikescher/Serpilicum
src/Edit.h
#pragma once #include "menuelement.h" class Edit : public MenuElement { private: int id; ActionListener * listener; std::string text; virtual void throwEvent(); public: Edit(int id, std::string initval, int nx, int ny); ~Edit(void); virtual void render(AbstractConsole* pConsole); virtual std::string getText(...
Mikescher/Serpilicum
src/SplashMenu.h
<gh_stars>0 #pragma once #include "displayimagetextmenu.h" class SplashMenu : public DisplayImageTextMenu { private: long startTime; public: SplashMenu(int pid, AbstractConsole* console, ActionListener * quitListener, int resourceID); virtual void render(AbstractConsole* pConsole); };
Mikescher/Serpilicum
src/Keycodes.h
#define KC_UP 0x26 #define KC_DOWN 0x28 #define KC_LEFT 0x25 #define KC_RIGHT 0x27 #define KC_SPACE 0x20 #define KC_ENTER 0x0D #define KC_ESCAPE 0x1B #define KC_BACKSPACE 0x08 #define KC_A 0x41 #define KC_B 0x42 #define KC_C 0x43 #define KC_D 0x44 #define KC_E 0x45 #define KC_F 0x46 #define KC_G 0x47 #define KC_H 0x4...
Mikescher/Serpilicum
src/PowerUpList.h
#pragma once #include "PowerUp.h" #include "AbstractConsole.h" class PowerUpList { private: PowerUp * first; public: PowerUpList(void); ~PowerUpList(void); virtual int getLength(); virtual PowerUp * getFirst(); virtual PowerUp * getLast(); virtual bool isEmpty(); virtual void add(PowerUp * p); virtual bool ...
Mikescher/Serpilicum
src/Game.h
#pragma once #include "AbstractConsole.h" #include "Level.h" #include "MenuDisplay.h" #include "ListenerCollection.h" class Game : public ActionListener { private: AbstractConsole *console; Level *level; MenuDisplay *menu; bool active; std::string playerName; virtual void render(); virtual void startNewLevel...
Mikescher/Serpilicum
src/ListenerCollection.h
#pragma once class ActionListener { public: virtual void actionPerformed(int id, int param) = 0; }; class KeyEventListener { public: virtual void keyEventPerformed(int key) = 0; };
Mikescher/Serpilicum
src/Highscore.h
#pragma once #include <string> #include <vector> #include <iostream> #include <sstream> #include "Gamerules.h" //const std::string FILENAME = "Highscore.txt"; struct HighscoreElement { std::string name; int point; int gamemodeid; }; class Highscore { private: virtual std::string readScoreFile(); virtual std::...
Mikescher/Serpilicum
src/Label.h
#pragma once #include "MenuElement.h" #include "AbstractConsole.h" class Label:public MenuElement { private: std::string text; public: Label(void); Label(std::string initval, int nx, int ny); virtual ~Label(void); virtual void render(AbstractConsole* pConsole); virtual void onKeyDown(int keycode); virtual bool ...
Mikescher/Serpilicum
src/AspirinObstacle.h
<filename>src/AspirinObstacle.h #pragma once #include "levelobstacle.h" class Level; class AspirinObstacle : public LevelObstacle { private: int dx; int dy; long lastMove; public: AspirinObstacle(int px, int py, int deltax, int deltay); virtual bool isHorizontal(); virtual void init(AbstractConsole* pConsol...
Mikescher/Serpilicum
src/AutoPowerUp.h
#pragma once #include "powerup.h" #include "AbstractConsole.h" class AutoPowerUp : public PowerUp { private: long ctime; AbstractConsole* console; public: AutoPowerUp(AbstractConsole* pCons, int px, int py); ~AutoPowerUp(void); virtual char getSymbol(); virtual PowerUpType getType(); };
Mikescher/Serpilicum
src/HighscoreMenu.h
#pragma once #include "menuelement.h" #include "Highscore.h" #include "menu.h" #include "Label.h" #include "Button.h" #include "ListenerCollection.h" #include "Game.h" class HighscoreMenu : public Menu { private: ActionListener* listener; virtual void createMenu(ActionListener* highMenuListener, Highscore* pHighs...
Mikescher/Serpilicum
src/Button.h
#pragma once #include "MenuElement.h" #include "ListenerCollection.h" class Button: public MenuElement { private: std::string text; ActionListener * listener; int id; virtual void throwEvent(); public: Button(void); Button(int id); Button(int id, std::string initval, int nx, int ny); virtual ~Button(void);...
Mikescher/Serpilicum
src/DBConsole.h
<reponame>Mikescher/Serpilicum<gh_stars>0 #pragma once #include <string> #include <algorithm> #include "AbstractConsole.h" class DBConsole : public AbstractConsole { private: long firstTimeMillis; long lastRenderTime; int fpsCount; long fpsSum; double fps; bool showFPS; protected: int display[BUFFER_W][BUFFE...
Mikescher/Serpilicum
src/DeathMenu.h
<reponame>Mikescher/Serpilicum<gh_stars>0 #pragma once #include "menu.h" #include "Label.h" #include "Button.h" #include "ListenerCollection.h" #include "Highscore.h" #include "Game.h" #include "Gamerules.h" class DeathMenu : public Menu { private: virtual void createMenu(ActionListener * restartListener,Highscore*...
Mikescher/Serpilicum
src/BiteEffect.h
<gh_stars>0 #pragma once #include "leveleffect.h" class BiteEffect : public LevelEffect { private: long startTime; int delay; long delta; int mode; int elementchar; public: BiteEffect(int px, int py, int delayID, int elchar); ~BiteEffect(void); virtual void start(AbstractConsole *console); virtual void run(...
Mikescher/Serpilicum
src/CrazyConsole.h
<reponame>Mikescher/Serpilicum #pragma once #pragma warning(disable: 4244) #define _USE_MATH_DEFINES #include "oglconsole.h" #include <vector> #include "CrazyDouble.h" class CrazyConsole : public OGLConsole { private: GLfloat depth; CrazyDouble* heightshift; CrazyDouble* xangleShift; CrazyDouble* yangleShift; ...
Mikescher/Serpilicum
src/Snake.h
<gh_stars>0 #pragma once #include "SnakeElement.h" #include <cmath> #include "SnakeModifier.h" #include "PathFindingAlgorithm.h" class Level; const int SNAKEPARTCHARS[] = {186, 205, 186, 205, 200, 201, 187, 188, 'X'}; enum Direction {NORTH=0, EAST=1, SOUTH=2, WEST=3}; enum SnakeIntersecton {SIS_NULL=8, SIS_N=0, SIS...
Mikescher/Serpilicum
src/Level.h
#pragma once #include "Snake.h" #include "PowerUpList.h" #include "AbstractConsole.h" #include <vector> #include "LevelEffect.h" #include "LevelObstacle.h" #include "PowerUpSpawnEffect.h" #include "Gamerules.h" #include <limits> class Level { private: std::vector<LevelEffect*> effects; std::vector<LevelObstacle*> ob...