Adds UTF-8 BOM to all C++ files.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include "Abilities.h"
|
||||
#include "Abilities.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef ABILITIES_H__
|
||||
#ifndef ABILITIES_H__
|
||||
#define ABILITIES_H__
|
||||
/***************************************************************************************
|
||||
* @file Abilities.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Abilities.h"
|
||||
#include "Abilities.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Archetypes.h"
|
||||
#include "Archetypes.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef ARCHETYPES_H__
|
||||
#ifndef ARCHETYPES_H__
|
||||
#define ARCHETYPES_H__
|
||||
/***************************************************************************************
|
||||
* @file Archetypes.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Archetypes.h"
|
||||
#include "Archetypes.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Attributes.h"
|
||||
#include "Attributes.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef ATTRIBUTES_H__
|
||||
#ifndef ATTRIBUTES_H__
|
||||
#define ATTRIBUTES_H__
|
||||
/***************************************************************************************
|
||||
* @file Attributes.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Attributes.h"
|
||||
#include "Attributes.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Backgrounds.h"
|
||||
#include "Backgrounds.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef BACKGROUNDS_H__
|
||||
#ifndef BACKGROUNDS_H__
|
||||
#define BACKGROUNDS_H__
|
||||
/***************************************************************************************
|
||||
* @file Backgrounds.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Backgrounds.h"
|
||||
#include "Backgrounds.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Character.h"
|
||||
#include "Character.h"
|
||||
|
||||
namespace SBF {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef CHARACTER_H__
|
||||
#ifndef CHARACTER_H__
|
||||
#define CHARACTER_H__
|
||||
/***************************************************************************************
|
||||
* @file Character.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Character.h"
|
||||
#include "Character.h"
|
||||
|
||||
#include "test.h"
|
||||
using namespace SBF;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Clans.h"
|
||||
#include "Clans.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef CLANS_H__
|
||||
#ifndef CLANS_H__
|
||||
#define CLANS_H__
|
||||
/***************************************************************************************
|
||||
* @file Clans.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Clans.h"
|
||||
#include "Clans.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Colors.h"
|
||||
#include "Colors.h"
|
||||
|
||||
namespace SBF {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef COLORS_H__
|
||||
#ifndef COLORS_H__
|
||||
#define COLORS_H__
|
||||
/***************************************************************************************
|
||||
* @file Colors.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Colors.h"
|
||||
#include "Colors.h"
|
||||
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Derangements.h"
|
||||
#include "Derangements.h"
|
||||
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef DERANGEMENTS_H__
|
||||
#ifndef DERANGEMENTS_H__
|
||||
#define DERANGEMENTS_H__
|
||||
#include "Colors.h"
|
||||
/***************************************************************************************
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Derangements.h"
|
||||
#include "Derangements.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Disciplines.h"
|
||||
#include "Disciplines.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef DISCIPLINES_H__
|
||||
#ifndef DISCIPLINES_H__
|
||||
#define DISCIPLINES_H__
|
||||
/***************************************************************************************
|
||||
* @file Disciplines.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Disciplines.h"
|
||||
#include "Disciplines.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
0
sbf-cpp/Freebies._test.cpp
Normal file
0
sbf-cpp/Freebies._test.cpp
Normal file
0
sbf-cpp/Freebies.cpp
Normal file
0
sbf-cpp/Freebies.cpp
Normal file
15
sbf-cpp/Freebies.h
Normal file
15
sbf-cpp/Freebies.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef FREEBIES_H__
|
||||
#define FREEBIES_H__
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace SBF {
|
||||
struct FreebieType {
|
||||
int id;
|
||||
int cost;
|
||||
std::string name;
|
||||
std::string label;
|
||||
};
|
||||
} // End namespace SBF
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Genders.h"
|
||||
#include "Genders.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef GENDERS_H__
|
||||
#ifndef GENDERS_H__
|
||||
#define GENDERS_H__
|
||||
/***************************************************************************************
|
||||
* @file Genders.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Genders.h"
|
||||
#include "Genders.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Menus.h"
|
||||
#include "Menus.h"
|
||||
|
||||
namespace SBF {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef MENUS_H__
|
||||
#ifndef MENUS_H__
|
||||
#define MENUS_H__
|
||||
|
||||
/***************************************************************************************
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Ranks.h"
|
||||
#include "Ranks.h"
|
||||
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef RANKS_H__
|
||||
#ifndef RANKS_H__
|
||||
#define RANKS_H__
|
||||
/***************************************************************************************
|
||||
* @file Ranks.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Ranks.h"
|
||||
#include "Ranks.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define _XOPEN_SOURCE_EXTENDED
|
||||
#define _XOPEN_SOURCE_EXTENDED
|
||||
#include "Utils.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef UTILS_H__
|
||||
#ifndef UTILS_H__
|
||||
#define UTILS_H__
|
||||
/***************************************************************************************
|
||||
* @file Utils.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Utils.h"
|
||||
#include "Utils.h"
|
||||
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Virtues.h"
|
||||
#include "Virtues.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef VIRTUES_H__
|
||||
#ifndef VIRTUES_H__
|
||||
#define VIRTUES_H__
|
||||
/***************************************************************************************
|
||||
* @file Virtues.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Virtues.h"
|
||||
#include "Virtues.h"
|
||||
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define _XOPEN_SOURCE_EXTENDED
|
||||
#define _XOPEN_SOURCE_EXTENDED
|
||||
#include <ncursesw/curses.h>
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef MAIN_H__
|
||||
#ifndef MAIN_H__
|
||||
#define MAIN_H__
|
||||
|
||||
/***************************************************************************************
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#define _XOPEN_SOURCE_EXTENDED
|
||||
#include "sbf.h"
|
||||
|
||||
#include <ncursesw/curses.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
@@ -11,73 +9,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*
|
||||
| ╔ | WACS_D_ULCORNER | WACS_BDDB |
|
||||
| ╚ | WACS_D_LLCORNER | WACS_DDBB |
|
||||
| ╗ | WACS_D_URCORNER | WACS_BBDD |
|
||||
| ╝ | WACS_D_LRCORNER | WACS_DBBD |
|
||||
| ╣ | WACS_D_RTEE | WACS_DBDD |
|
||||
| ╠ | WACS_D_LTEE | WACS_DDDB |
|
||||
| ╩ | WACS_D_BTEE | WACS_DDBD |
|
||||
| ╦ | WACS_D_TTEE | WACS_BDDD |
|
||||
| ═ | WACS_D_HLINE | WACS_BDBD |
|
||||
| ║ | WACS_D_VLINE | WACS_DBDB |
|
||||
| ╬ | WACS_D_PLUS | WACS_DDDD |
|
||||
*/
|
||||
|
||||
int set_double_border(WINDOW* screen) {
|
||||
return wborder_set(screen,
|
||||
WACS_D_VLINE /*left side*/,
|
||||
WACS_D_VLINE /*right side*/,
|
||||
WACS_D_HLINE /*top side*/,
|
||||
WACS_D_HLINE /*bottom side*/,
|
||||
WACS_D_ULCORNER /*top left corner*/,
|
||||
WACS_D_URCORNER /*top right corner*/,
|
||||
WACS_D_LLCORNER /*bottom left corner*/,
|
||||
WACS_D_LRCORNER /*bottom right corner*/);
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
setlocale(LC_ALL, "");
|
||||
char buffer[255] = {0};
|
||||
WINDOW* pWindow = nullptr;
|
||||
// Load ncurses and initialize stdscr.
|
||||
initscr();
|
||||
pWindow = stdscr;
|
||||
// Enable raw mode to give us direct access to extra keys.
|
||||
raw();
|
||||
// Disable echoing characters as they are typed.
|
||||
noecho();
|
||||
// Enable keypad characters. (function keys, arrow keys, and numpad keys.)
|
||||
keypad(pWindow, true);
|
||||
// Remove the delay when pressing esc.
|
||||
set_escdelay(0);
|
||||
|
||||
int key = KEY_RESIZE;
|
||||
while (key != KEY_ESCAPE) {
|
||||
if (key == KEY_RESIZE) {
|
||||
// Clear the screen.
|
||||
werase(pWindow);
|
||||
// Draw a box around the window with default chars.
|
||||
set_double_border(pWindow);
|
||||
// Display the event
|
||||
mvwaddstr(pWindow, 2, 2, "Resized");
|
||||
// Get the window width and height.
|
||||
int width;
|
||||
int height;
|
||||
getmaxyx(pWindow, height, width);
|
||||
// Display the width and height.
|
||||
snprintf(buffer, sizeof(buffer), "width: %i, height: %i", width, height);
|
||||
mvwaddstr(pWindow, 1, 2, buffer);
|
||||
} else {
|
||||
// Display the keycode of the key that was pressed in hex and octal.
|
||||
snprintf(buffer, sizeof(buffer), "0x%04X %04o pressed", key, key);
|
||||
mvwaddstr(pWindow, 2, 2, buffer);
|
||||
}
|
||||
wrefresh(pWindow);
|
||||
key = wgetch(pWindow);
|
||||
}
|
||||
endwin();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user