Merge pull request #4 from GabrielRavier/autoNormalizeLineEndings

Automatically normalize line endings
This commit is contained in:
Clownacy 2019-05-03 13:37:20 +01:00 committed by GitHub
commit b83365f09b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 1095 additions and 1085 deletions

10
.gitattributes vendored Normal file
View file

@ -0,0 +1,10 @@
# Automatically normalize line endings.
* text=auto
# MSVC files have to be CRLF
*.vcproj text eol=crlf
*.sln text eol=crlf
# Do not change external files
external/** -text
DoConfig/fltk/** -text

486
Makefile
View file

@ -1,243 +1,243 @@
ifeq ($(RELEASE), 1) ifeq ($(RELEASE), 1)
CXXFLAGS = -O3 -flto CXXFLAGS = -O3 -flto
LDFLAGS = -s LDFLAGS = -s
FILENAME_DEF = release FILENAME_DEF = release
else else
CXXFLAGS = -O0 -g CXXFLAGS = -O0 -g
FILENAME_DEF = debug FILENAME_DEF = debug
endif endif
ifeq ($(JAPANESE), 1) ifeq ($(JAPANESE), 1)
BUILD_DIR = build_jp BUILD_DIR = build_jp
CXXFLAGS += -DJAPANESE CXXFLAGS += -DJAPANESE
ifeq ($(RELEASE), 1) ifeq ($(RELEASE), 1)
FILENAME_DEF = releasejp FILENAME_DEF = releasejp
else else
FILENAME_DEF = debugjp FILENAME_DEF = debugjp
endif endif
else else
BUILD_DIR = build_en BUILD_DIR = build_en
endif endif
FILENAME ?= $(FILENAME_DEF) FILENAME ?= $(FILENAME_DEF)
ifeq ($(FIX_BUGS), 1) ifeq ($(FIX_BUGS), 1)
CXXFLAGS += -DFIX_BUGS CXXFLAGS += -DFIX_BUGS
endif endif
ifeq ($(WINDOWS), 1) ifeq ($(WINDOWS), 1)
ifeq ($(CONSOLE), 1) ifeq ($(CONSOLE), 1)
CXXFLAGS += -mconsole CXXFLAGS += -mconsole
endif endif
CXXFLAGS += -DWINDOWS CXXFLAGS += -DWINDOWS
LIBS += -lkernel32 LIBS += -lkernel32
endif endif
ifeq ($(RASPBERRY_PI), 1) ifeq ($(RASPBERRY_PI), 1)
CXXFLAGS += -DRASPBERRY_PI CXXFLAGS += -DRASPBERRY_PI
endif endif
CXXFLAGS += -std=c++98 `pkg-config sdl2 --cflags` `pkg-config freetype2 --cflags` -MMD -MP -MF $@.d CXXFLAGS += -std=c++98 `pkg-config sdl2 --cflags` `pkg-config freetype2 --cflags` -MMD -MP -MF $@.d
ifeq ($(STATIC), 1) ifeq ($(STATIC), 1)
LDFLAGS += -static LDFLAGS += -static
LIBS += `pkg-config sdl2 --libs --static` `pkg-config freetype2 --libs --static` -lfreetype LIBS += `pkg-config sdl2 --libs --static` `pkg-config freetype2 --libs --static` -lfreetype
else else
LIBS += `pkg-config sdl2 --libs` `pkg-config freetype2 --libs` LIBS += `pkg-config sdl2 --libs` `pkg-config freetype2 --libs`
endif endif
# For an accurate result to the original's code, compile in alphabetical order # For an accurate result to the original's code, compile in alphabetical order
SOURCES = \ SOURCES = \
ArmsItem \ ArmsItem \
Back \ Back \
Boss \ Boss \
BossAlmo1 \ BossAlmo1 \
BossAlmo2 \ BossAlmo2 \
BossBallos \ BossBallos \
BossFrog \ BossFrog \
BossIronH \ BossIronH \
BossLife \ BossLife \
BossOhm \ BossOhm \
BossPress \ BossPress \
BossTwinD \ BossTwinD \
BossX \ BossX \
BulHit \ BulHit \
Bullet \ Bullet \
Caret \ Caret \
Config \ Config \
Draw \ Draw \
Ending \ Ending \
Escape \ Escape \
Fade \ Fade \
File \ File \
Flags \ Flags \
Flash \ Flash \
Font \ Font \
Frame \ Frame \
Game \ Game \
Generic \ Generic \
GenericLoad \ GenericLoad \
Input \ Input \
KeyControl \ KeyControl \
Main \ Main \
Map \ Map \
MapName \ MapName \
MiniMap \ MiniMap \
MyChar \ MyChar \
MycHit \ MycHit \
MycParam \ MycParam \
NpcAct000 \ NpcAct000 \
NpcAct020 \ NpcAct020 \
NpcAct040 \ NpcAct040 \
NpcAct060 \ NpcAct060 \
NpcAct080 \ NpcAct080 \
NpcAct100 \ NpcAct100 \
NpcAct120 \ NpcAct120 \
NpcAct140 \ NpcAct140 \
NpcAct160 \ NpcAct160 \
NpcAct180 \ NpcAct180 \
NpcAct200 \ NpcAct200 \
NpcAct220 \ NpcAct220 \
NpcAct240 \ NpcAct240 \
NpcAct260 \ NpcAct260 \
NpcAct280 \ NpcAct280 \
NpcAct300 \ NpcAct300 \
NpcAct320 \ NpcAct320 \
NpcAct340 \ NpcAct340 \
NpChar \ NpChar \
NpcHit \ NpcHit \
NpcTbl \ NpcTbl \
Organya \ Organya \
PixTone \ PixTone \
Profile \ Profile \
Resource \ Resource \
SelStage \ SelStage \
Shoot \ Shoot \
Sound \ Sound \
Stage \ Stage \
Star \ Star \
TextScr \ TextScr \
Triangle \ Triangle \
ValueView ValueView
RESOURCES = \ RESOURCES = \
BITMAP/CREDIT01.bmp \ BITMAP/CREDIT01.bmp \
BITMAP/CREDIT02.bmp \ BITMAP/CREDIT02.bmp \
BITMAP/CREDIT03.bmp \ BITMAP/CREDIT03.bmp \
BITMAP/CREDIT04.bmp \ BITMAP/CREDIT04.bmp \
BITMAP/CREDIT05.bmp \ BITMAP/CREDIT05.bmp \
BITMAP/CREDIT06.bmp \ BITMAP/CREDIT06.bmp \
BITMAP/CREDIT07.bmp \ BITMAP/CREDIT07.bmp \
BITMAP/CREDIT08.bmp \ BITMAP/CREDIT08.bmp \
BITMAP/CREDIT09.bmp \ BITMAP/CREDIT09.bmp \
BITMAP/CREDIT10.bmp \ BITMAP/CREDIT10.bmp \
BITMAP/CREDIT11.bmp \ BITMAP/CREDIT11.bmp \
BITMAP/CREDIT12.bmp \ BITMAP/CREDIT12.bmp \
BITMAP/CREDIT14.bmp \ BITMAP/CREDIT14.bmp \
BITMAP/CREDIT15.bmp \ BITMAP/CREDIT15.bmp \
BITMAP/CREDIT16.bmp \ BITMAP/CREDIT16.bmp \
BITMAP/CREDIT17.bmp \ BITMAP/CREDIT17.bmp \
BITMAP/CREDIT18.bmp \ BITMAP/CREDIT18.bmp \
CURSOR/CURSOR_IKA.bmp \ CURSOR/CURSOR_IKA.bmp \
CURSOR/CURSOR_NORMAL.bmp \ CURSOR/CURSOR_NORMAL.bmp \
ORG/ACCESS.org \ ORG/ACCESS.org \
ORG/ANZEN.org \ ORG/ANZEN.org \
ORG/BALCONY.org \ ORG/BALCONY.org \
ORG/BALLOS.org \ ORG/BALLOS.org \
ORG/BDOWN.org \ ORG/BDOWN.org \
ORG/CEMETERY.org \ ORG/CEMETERY.org \
ORG/CURLY.org \ ORG/CURLY.org \
ORG/DR.org \ ORG/DR.org \
ORG/ENDING.org \ ORG/ENDING.org \
ORG/ESCAPE.org \ ORG/ESCAPE.org \
ORG/FANFALE1.org \ ORG/FANFALE1.org \
ORG/FANFALE2.org \ ORG/FANFALE2.org \
ORG/FANFALE3.org \ ORG/FANFALE3.org \
ORG/FIREEYE.org \ ORG/FIREEYE.org \
ORG/GAMEOVER.org \ ORG/GAMEOVER.org \
ORG/GINSUKE.org \ ORG/GINSUKE.org \
ORG/GRAND.org \ ORG/GRAND.org \
ORG/GRAVITY.org \ ORG/GRAVITY.org \
ORG/HELL.org \ ORG/HELL.org \
ORG/IRONH.org \ ORG/IRONH.org \
ORG/JENKA.org \ ORG/JENKA.org \
ORG/JENKA2.org \ ORG/JENKA2.org \
ORG/KODOU.org \ ORG/KODOU.org \
ORG/LASTBT3.org \ ORG/LASTBT3.org \
ORG/LASTBTL.org \ ORG/LASTBTL.org \
ORG/LASTCAVE.org \ ORG/LASTCAVE.org \
ORG/MARINE.org \ ORG/MARINE.org \
ORG/MAZE.org \ ORG/MAZE.org \
ORG/MDOWN2.org \ ORG/MDOWN2.org \
ORG/MURA.org \ ORG/MURA.org \
ORG/OSIDE.org \ ORG/OSIDE.org \
ORG/PLANT.org \ ORG/PLANT.org \
ORG/QUIET.org \ ORG/QUIET.org \
ORG/REQUIEM.org \ ORG/REQUIEM.org \
ORG/TOROKO.org \ ORG/TOROKO.org \
ORG/VIVI.org \ ORG/VIVI.org \
ORG/WANPAK2.org \ ORG/WANPAK2.org \
ORG/WANPAKU.org \ ORG/WANPAKU.org \
ORG/WEED.org \ ORG/WEED.org \
ORG/WHITE.org \ ORG/WHITE.org \
ORG/XXXX.org \ ORG/XXXX.org \
ORG/ZONBIE.org \ ORG/ZONBIE.org \
WAVE/WAVE100 WAVE/WAVE100
ifeq ($(JAPANESE), 1) ifeq ($(JAPANESE), 1)
RESOURCES += BITMAP/PIXEL_JP.bmp RESOURCES += BITMAP/PIXEL_JP.bmp
else else
RESOURCES += BITMAP/PIXEL.bmp RESOURCES += BITMAP/PIXEL.bmp
endif endif
ifneq ($(WINDOWS), 1) ifneq ($(WINDOWS), 1)
RESOURCES += ICON/ICON_MINI.bmp RESOURCES += ICON/ICON_MINI.bmp
endif endif
OBJECTS = $(addprefix obj/$(FILENAME)/, $(addsuffix .o, $(SOURCES))) OBJECTS = $(addprefix obj/$(FILENAME)/, $(addsuffix .o, $(SOURCES)))
DEPENDENCIES = $(addprefix obj/$(FILENAME)/, $(addsuffix .o.d, $(SOURCES))) DEPENDENCIES = $(addprefix obj/$(FILENAME)/, $(addsuffix .o.d, $(SOURCES)))
ifeq ($(WINDOWS), 1) ifeq ($(WINDOWS), 1)
OBJECTS += obj/$(FILENAME)/win_icon.o OBJECTS += obj/$(FILENAME)/win_icon.o
endif endif
all: $(BUILD_DIR)/$(FILENAME) all: $(BUILD_DIR)/$(FILENAME)
$(BUILD_DIR)/$(FILENAME): $(OBJECTS) $(BUILD_DIR)/$(FILENAME): $(OBJECTS)
@mkdir -p $(@D) @mkdir -p $(@D)
@echo Linking @echo Linking
@$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS) @$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(LIBS)
@echo Finished compiling: $@ @echo Finished compiling: $@
obj/$(FILENAME)/%.o: src/%.cpp obj/$(FILENAME)/%.o: src/%.cpp
@mkdir -p $(@D) @mkdir -p $(@D)
@echo Compiling $< @echo Compiling $<
@$(CXX) $(CXXFLAGS) $< -o $@ -c @$(CXX) $(CXXFLAGS) $< -o $@ -c
obj/$(FILENAME)/Resource.o: src/Resource.cpp $(addprefix src/Resource/, $(addsuffix .h, $(RESOURCES))) obj/$(FILENAME)/Resource.o: src/Resource.cpp $(addprefix src/Resource/, $(addsuffix .h, $(RESOURCES)))
@mkdir -p $(@D) @mkdir -p $(@D)
@echo Compiling $< @echo Compiling $<
@$(CXX) $(CXXFLAGS) $< -o $@ -c @$(CXX) $(CXXFLAGS) $< -o $@ -c
src/Resource/%.h: res/% obj/bin2h src/Resource/%.h: res/% obj/bin2h
@mkdir -p $(@D) @mkdir -p $(@D)
@echo Converting $< @echo Converting $<
@obj/bin2h $< $@ @obj/bin2h $< $@
obj/bin2h: src/misc/bin2h.c obj/bin2h: src/misc/bin2h.c
@mkdir -p $(@D) @mkdir -p $(@D)
@echo Compiling $^ @echo Compiling $^
@$(CC) -O3 -s -std=c90 $^ -o $@ @$(CC) -O3 -s -std=c90 $^ -o $@
include $(wildcard $(DEPENDENCIES)) include $(wildcard $(DEPENDENCIES))
obj/$(FILENAME)/win_icon.o: res/ICON/ICON.rc res/ICON/0.ico res/ICON/ICON_MINI.ico obj/$(FILENAME)/win_icon.o: res/ICON/ICON.rc res/ICON/0.ico res/ICON/ICON_MINI.ico
@mkdir -p $(@D) @mkdir -p $(@D)
@windres $< $@ @windres $< $@
# TODO # TODO
clean: clean:
@rm -rf obj @rm -rf obj

View file

@ -1,6 +1,6 @@
#pragma once #pragma once
#define PATH_LENGTH 260 //Pixel had the path size locked to 260 (dangerously low), if you tried to open the executable in a path with more than around 220 characters, it'd crash. #define PATH_LENGTH 260 //Pixel had the path size locked to 260 (dangerously low), if you tried to open the executable in a path with more than around 220 characters, it'd crash.
#define WINDOW_WIDTH 320 #define WINDOW_WIDTH 320
#define WINDOW_HEIGHT 240 #define WINDOW_HEIGHT 240

View file

@ -1,72 +1,72 @@
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "WindowsWrapper.h" #include "WindowsWrapper.h"
#include "CommonDefines.h" #include "CommonDefines.h"
#include "Config.h" #include "Config.h"
#include "File.h" #include "File.h"
#include "Tags.h" #include "Tags.h"
#include "Types.h" #include "Types.h"
bool LoadConfigData(CONFIG *conf) bool LoadConfigData(CONFIG *conf)
{ {
//Clear old config data //Clear old config data
memset(conf, 0, sizeof(CONFIG)); memset(conf, 0, sizeof(CONFIG));
//Get path //Get path
char path[PATH_LENGTH]; char path[PATH_LENGTH];
sprintf(path, "%s/%s", gModulePath, "Config.dat"); sprintf(path, "%s/%s", gModulePath, "Config.dat");
//Open file //Open file
FILE *fp = fopen(path, "rb"); FILE *fp = fopen(path, "rb");
if (fp == NULL) if (fp == NULL)
return false; return false;
//Read data //Read data
//Read the version id and font name //Read the version id and font name
fread(conf->proof, sizeof(conf->proof), 1, fp); fread(conf->proof, sizeof(conf->proof), 1, fp);
fread(conf->font_name, sizeof(conf->font_name), 1, fp); fread(conf->font_name, sizeof(conf->font_name), 1, fp);
//Read control settings //Read control settings
conf->move_button_mode = File_ReadLE32(fp); conf->move_button_mode = File_ReadLE32(fp);
conf->attack_button_mode = File_ReadLE32(fp); conf->attack_button_mode = File_ReadLE32(fp);
conf->ok_button_mode = File_ReadLE32(fp); conf->ok_button_mode = File_ReadLE32(fp);
//Read display mode (320x240, 640x480, 24-bit fullscreen, 32-bit fullscreen) TODO: add more things? //Read display mode (320x240, 640x480, 24-bit fullscreen, 32-bit fullscreen) TODO: add more things?
conf->display_mode = File_ReadLE32(fp); conf->display_mode = File_ReadLE32(fp);
//Read joystick configuration (if enabled, and mappings) //Read joystick configuration (if enabled, and mappings)
conf->bJoystick = File_ReadLE32(fp); conf->bJoystick = File_ReadLE32(fp);
for (int button = 0; button < 8; button++) for (int button = 0; button < 8; button++)
conf->joystick_button[button] = File_ReadLE32(fp); conf->joystick_button[button] = File_ReadLE32(fp);
//Close file //Close file
fclose(fp); fclose(fp);
//Check if version is correct, return that it succeeded //Check if version is correct, return that it succeeded
if (!strcmp(conf->proof, "DOUKUTSU20041206")) if (!strcmp(conf->proof, "DOUKUTSU20041206"))
return true; return true;
//If not, return that it failed //If not, return that it failed
return false; return false;
} }
void DefaultConfigData(CONFIG *conf) void DefaultConfigData(CONFIG *conf)
{ {
//Claer old config data //Claer old config data
memset(conf, 0, sizeof(CONFIG)); memset(conf, 0, sizeof(CONFIG));
//Reset joystick settings (as these can't simply be set to 0) //Reset joystick settings (as these can't simply be set to 0)
conf->bJoystick = 1; conf->bJoystick = 1;
conf->joystick_button[0] = 2; conf->joystick_button[0] = 2;
conf->joystick_button[1] = 1; conf->joystick_button[1] = 1;
conf->joystick_button[2] = 5; conf->joystick_button[2] = 5;
conf->joystick_button[3] = 6; conf->joystick_button[3] = 6;
conf->joystick_button[4] = 3; conf->joystick_button[4] = 3;
conf->joystick_button[5] = 4; conf->joystick_button[5] = 4;
conf->joystick_button[6] = 6; conf->joystick_button[6] = 6;
conf->joystick_button[7] = 3; conf->joystick_button[7] = 3;
} }

View file

@ -1,18 +1,18 @@
#pragma once #pragma once
#include <stdint.h> #include <stdint.h>
struct CONFIG struct CONFIG
{ {
char proof[0x20]; char proof[0x20];
char font_name[0x40]; char font_name[0x40];
int32_t move_button_mode; int32_t move_button_mode;
int32_t attack_button_mode; int32_t attack_button_mode;
int32_t ok_button_mode; int32_t ok_button_mode;
int32_t display_mode; int32_t display_mode;
int32_t bJoystick; int32_t bJoystick;
int32_t joystick_button[8]; int32_t joystick_button[8];
}; };
bool LoadConfigData(CONFIG *conf); bool LoadConfigData(CONFIG *conf);
void DefaultConfigData(CONFIG *conf); void DefaultConfigData(CONFIG *conf);

View file

@ -1,24 +1,24 @@
#include "KeyControl.h" #include "KeyControl.h"
int gKey; int gKey;
int gKeyTrg; int gKeyTrg;
int gKeyJump = KEY_Z; int gKeyJump = KEY_Z;
int gKeyShot = KEY_X; int gKeyShot = KEY_X;
int gKeyArms = KEY_ARMS; int gKeyArms = KEY_ARMS;
int gKeyArmsRev = KEY_ARMSREV; int gKeyArmsRev = KEY_ARMSREV;
int gKeyItem = KEY_ITEM; int gKeyItem = KEY_ITEM;
int gKeyMap = KEY_MAP; int gKeyMap = KEY_MAP;
int gKeyOk = KEY_Z; int gKeyOk = KEY_Z;
int gKeyCancel = KEY_X; int gKeyCancel = KEY_X;
int gKeyLeft = KEY_LEFT; int gKeyLeft = KEY_LEFT;
int gKeyUp = KEY_UP; int gKeyUp = KEY_UP;
int gKeyRight = KEY_RIGHT; int gKeyRight = KEY_RIGHT;
int gKeyDown = KEY_DOWN; int gKeyDown = KEY_DOWN;
void GetTrg() void GetTrg()
{ {
static int key_old; static int key_old;
gKeyTrg = gKey & (gKey ^ key_old); gKeyTrg = gKey & (gKey ^ key_old);
key_old = gKey; key_old = gKey;
} }

View file

@ -1,53 +1,53 @@
#pragma once #pragma once
enum KEYBIND enum KEYBIND
{ {
//The movement keys go in the order of left, right, up and down //The movement keys go in the order of left, right, up and down
KEY_LEFT = 0x00000001, KEY_LEFT = 0x00000001,
KEY_RIGHT = 0x00000002, KEY_RIGHT = 0x00000002,
KEY_UP = 0x00000004, KEY_UP = 0x00000004,
KEY_DOWN = 0x00000008, KEY_DOWN = 0x00000008,
//Map key //Map key
KEY_MAP = 0x00000010, KEY_MAP = 0x00000010,
//Okay and cancel / Jump and Shoot keys //Okay and cancel / Jump and Shoot keys
KEY_X = 0x00000020, KEY_X = 0x00000020,
KEY_Z = 0x00000040, KEY_Z = 0x00000040,
//Left and right weapon switch keys //Left and right weapon switch keys
KEY_ARMS = 0x00000080, KEY_ARMS = 0x00000080,
KEY_ARMSREV = 0x00000100, KEY_ARMSREV = 0x00000100,
//Unused? //Unused?
KEY_SHIFT = 0x00000200, KEY_SHIFT = 0x00000200,
//Function keys //Function keys
KEY_F1 = 0x00000400, KEY_F1 = 0x00000400,
KEY_F2 = 0x00000800, KEY_F2 = 0x00000800,
//Inventory //Inventory
KEY_ITEM = 0x00001000, KEY_ITEM = 0x00001000,
//Escape key //Escape key
KEY_ESCAPE = 0x00008000, KEY_ESCAPE = 0x00008000,
//The alt movement keys go in the order of left, up, right and down //The alt movement keys go in the order of left, up, right and down
KEY_ALT_LEFT = 0x00010000, KEY_ALT_LEFT = 0x00010000,
KEY_ALT_DOWN = 0x00020000, KEY_ALT_DOWN = 0x00020000,
KEY_ALT_RIGHT = 0x00040000, KEY_ALT_RIGHT = 0x00040000,
KEY_ALT_UP = 0x00180000, KEY_ALT_UP = 0x00180000,
//Alt up actually has 2 seperate keys, but they're kind of merged together (and also for some reason the second one is +/=) //Alt up actually has 2 seperate keys, but they're kind of merged together (and also for some reason the second one is +/=)
KEY_L = 0x00080000, KEY_L = 0x00080000,
KEY_PLUS = 0x00100000 KEY_PLUS = 0x00100000
}; };
extern int gKey; extern int gKey;
extern int gKeyTrg; extern int gKeyTrg;
extern int gKeyJump; extern int gKeyJump;
extern int gKeyShot; extern int gKeyShot;
extern int gKeyArms; extern int gKeyArms;
extern int gKeyArmsRev; extern int gKeyArmsRev;
extern int gKeyItem; extern int gKeyItem;
extern int gKeyMap; extern int gKeyMap;
extern int gKeyOk; extern int gKeyOk;
extern int gKeyCancel; extern int gKeyCancel;
extern int gKeyLeft; extern int gKeyLeft;
extern int gKeyUp; extern int gKeyUp;
extern int gKeyRight; extern int gKeyRight;
extern int gKeyDown; extern int gKeyDown;
void GetTrg(); void GetTrg();

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,3 @@
#pragma once #pragma once
//This was originally some sort of POSIX standard thing? leftover from the linux port //This was originally some sort of POSIX standard thing? leftover from the linux port

View file

@ -1,32 +1,32 @@
#pragma once #pragma once
int rep_rand(); int rep_rand();
void rep_srand(unsigned int seed); void rep_srand(unsigned int seed);
typedef int BOOL; typedef int BOOL;
#ifndef FALSE #ifndef FALSE
#define FALSE 0 #define FALSE 0
#endif #endif
#ifndef TRUE #ifndef TRUE
#define TRUE 1 #define TRUE 1
#endif #endif
struct RECT struct RECT
{ {
union union
{ {
int left; int left;
int front; int front;
}; };
int top; int top;
union union
{ {
int right; int right;
int back; int back;
}; };
int bottom; int bottom;
}; };
bool SystemTask(); bool SystemTask();