From 1f00b2bb92cd4bcfcc4c24806df71a453f481f34 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Thu, 29 Dec 2016 11:17:30 +0100 Subject: Formatting --- global.h | 6 ++---- library.cpp | 1 + library.h | 6 ++---- main.cpp | 1 + main.h | 1 + object_base.cpp | 1 + object_base.h | 6 ++---- 7 files changed, 10 insertions(+), 12 deletions(-) diff --git a/global.h b/global.h index 65aaa5e..e980582 100644 --- a/global.h +++ b/global.h @@ -1,5 +1,4 @@ -#ifndef _GLOBAL_H_ -#define _GLOBAL_H_ +#pragma once #include #include @@ -8,10 +7,9 @@ using namespace std; + class Global{ public: int room_speed=30; vector> objects; }; - -#endif //_GLOBAL_H_ diff --git a/library.cpp b/library.cpp index f59d542..687914a 100644 --- a/library.cpp +++ b/library.cpp @@ -4,6 +4,7 @@ using namespace std; + extern Fl_Window_draw *window; void draw_text(int x,int y,const char *s){ diff --git a/library.h b/library.h index 9722d41..b00acdb 100644 --- a/library.h +++ b/library.h @@ -1,7 +1,5 @@ -#ifndef _LIBRARY_H_ -#define _LIBRARY_H_ +#pragma once + void draw_text(int x,int y,const char *s); void log(const char *s); - -#endif //_LIBRARY_H_ diff --git a/main.cpp b/main.cpp index 9f62068..0321e7d 100644 --- a/main.cpp +++ b/main.cpp @@ -12,6 +12,7 @@ using namespace std; + shared_ptr makeobjectbyname(int x,int y,const char *name){ #define X(objname) if(strcmp(name,#objname)==0)return make_shared(x,y); diff --git a/main.h b/main.h index b49d507..218d5d2 100644 --- a/main.h +++ b/main.h @@ -4,6 +4,7 @@ #include #include + class Fl_Window_draw : public Fl_Window{ public: Fl_Window_draw(int w,int h,const char *title); diff --git a/object_base.cpp b/object_base.cpp index 502c2e5..b16acc1 100644 --- a/object_base.cpp +++ b/object_base.cpp @@ -4,6 +4,7 @@ using namespace std; + Object::Object(void){ log("Object constructed"); } diff --git a/object_base.h b/object_base.h index 0b407ab..2651be0 100644 --- a/object_base.h +++ b/object_base.h @@ -1,5 +1,5 @@ -#ifndef _OBJECT_BASE_H_ -#define _OBJECT_BASE_H_ +#pragma once + class Object{ public: @@ -14,5 +14,3 @@ public: virtual void step(void); virtual void draw(void); }; - -#endif //_OBJECT_BASE_H_ -- cgit v1.2.3-70-g09d2