• Advertisement

Edgar Reynaldo

  • Content count

  • Joined

  • Last visited

Community Reputation

113 Neutral

About Edgar Reynaldo

  • Rank

Personal Information


  • Github
  1. 72h speedhack with Allegro held Oct 20-23

    Allegro 5.2.3 released! See the official release thread for details : https://www.allegro.cc/forums/thread/617085 And don't forget, TINS is next weekend! Sign up now : https://tins.amarillion.org/ Also, submit your own rules for TINS and they might be chosen for this years competition! https://www.allegro.cc/forums/thread/617086
  2. 72h speedhack with Allegro held Oct 20-23

    I'm in. I never manage to produce much, but I always have fun and I always learn something. Looking forward to it amarillion. By the way everyone, the best place to get binaries for Allegro is from Nuget for MSVC on Windows, or the official binaries for MinGW, or else you can use my own binaries compiled for MinGW-W64 gcc 7.3.0 here : https://www.allegro.cc/forums/thread/616935 If anyone has trouble with my binaries, PM me on allegro.cc or start a new thread there. Edgar
  3. Programming and depression research

    I appreciate all your criticisms, that will help me in my evaluation of the testing methods validity! :D   As to concerns I am only applying the test to programmers thats not true, at least not in intent, I did ask these questions on DeviantArt too, but only got one response, and she was a programmer!   So yeah, I know there are problems, this is my first psych experiment ever, so a little slack might be nice.
  4. Programming and depression research

    @ranakor - scores on individual questions are not necessary to report, but thank you for helping my researc   The idea is to gather as much data from programmers and non-programmers as possible, and then to see if there are any correlations that would warrant further research. This is not the only forum I am seeking data from. Very good point though.   @aurioch - thanks!   @phantom - I understand the test may not be perfect, but hopefully it does serve as some indicator of depression. Many of the questions relate directly to symptoms of depression.
  5. Programming and depression research

    Hello fellow game devs! I am currently conducting a research project for my psych class. I am in need of volunteers to help with my research. All you need to do is to take this short depression screening and answer the question of how many hours you have generally spent programming in an average week over the last 6 months or so. The screening is self scored, and is called Beck's Depression Inventory.   Beck's Depression Inventory This depression inventory can be self-scored. The scoring scale is at the end of the questionnaire. 1. 0 I do not feel sad. 1 I feel sad 2 I am sad all the time and I can't snap out of it. 3 I am so sad and unhappy that I can't stand it. 2. 0 I am not particularly discouraged about the future. 1 I feel discouraged about the future. 2 I feel I have nothing to look forward to. 3 I feel the future is hopeless and that things cannot improve. 3. 0 I do not feel like a failure. 1 I feel I have failed more than the average person. 2 As I look back on my life, all I can see is a lot of failures. 3 I feel I am a complete failure as a person. 4. 0 I get as much satisfaction out of things as I used to. 1 I don't enjoy things the way I used to. 2 I don't get real satisfaction out of anything anymore. 3 I am dissatisfied or bored with everything. 5. 0 I don't feel particularly guilty 1 I feel guilty a good part of the time. 2 I feel quite guilty most of the time. 3 I feel guilty all of the time. 6. 0 I don't feel I am being punished. 1 I feel I may be punished. 2 I expect to be punished. 3 I feel I am being punished. 7. 0 I don't feel disappointed in myself. 1 I am disappointed in myself. 2 I am disgusted with myself. 3 I hate myself. 8. 0 I don't feel I am any worse than anybody else. 1 I am critical of myself for my weaknesses or mistakes. 2 I blame myself all the time for my faults. 3 I blame myself for everything bad that happens. 9. 0 I don't have any thoughts of killing myself. 1 I have thoughts of killing myself, but I would not carry them out. 2 I would like to kill myself. 3 I would kill myself if I had the chance. 10. 0 I don't cry any more than usual. 1 I cry more now than I used to. 2 I cry all the time now. 3 I used to be able to cry, but now I can't cry even though I want to. 11. 0 I am no more irritated by things than I ever was. 1 I am slightly more irritated now than usual. 2 I am quite annoyed or irritated a good deal of the time. 3 I feel irritated all the time. 12. 0 I have not lost interest in other people. 1 I am less interested in other people than I used to be. 2 I have lost most of my interest in other people. 3 I have lost all of my interest in other people. 13. 0 I make decisions about as well as I ever could. 1 I put off making decisions more than I used to. 2 I have greater difficulty in making decisions more than I used to. 3 I can't make decisions at all anymore. 14. 0 I don't feel that I look any worse than I used to. 1 I am worried that I am looking old or unattractive. 2 I feel there are permanent changes in my appearance that make me look unattractive 3 I believe that I look ugly. 15. 0 I can work about as well as before. 1 It takes an extra effort to get started at doing something. 2 I have to push myself very hard to do anything. 3 I can't do any work at all. 16. 0 I can sleep as well as usual. 1 I don't sleep as well as I used to. 2 I wake up 1-2 hours earlier than usual and find it hard to get back to sleep. 3 I wake up several hours earlier than I used to and cannot get back to sleep. 17. 0 I don't get more tired than usual. 1 I get tired more easily than I used to. 2 I get tired from doing almost anything. 3 I am too tired to do anything. 18. 0 My appetite is no worse than usual. 1 My appetite is not as good as it used to be. 2 My appetite is much worse now. 3 I have no appetite at all anymore. 19. 0 I haven't lost much weight, if any, lately. 1 I have lost more than five pounds. 2 I have lost more than ten pounds. 3 I have lost more than fifteen pounds. 20. 0 I am no more worried about my health than usual. 1 I am worried about physical problems like aches, pains, upset stomach, or constipation. 2 I am very worried about physical problems and it's hard to think of much else. 3 I am so worried about my physical problems that I cannot think of anything else. 21. 0 I have not noticed any recent change in my interest in sex. 1 I am less interested in sex than I used to be. 2 I have almost no interest in sex. 3 I have lost interest in sex completely. INTERPRETING THE BECK DEPRESSION INVENTORY Now that you have completed the questionnaire, add up the score for each of the twenty-one questions by counting the number to the right of each question you marked. The highest possible total for the whole test would be sixty-three. This would mean you circled number three on all twenty-one questions. Since the lowest possible score for each question is zero, the lowest possible score for the test would be zero. This would mean you circles zero on each question. You can evaluate your depression according to the Table below. Total Score____________________Levels of Depression 1-10____________________These ups and downs are considered normal 11-16___________________ Mild mood disturbance 17-20___________________Borderline clinical depression 21-30___________________Moderate depression 31-40___________________Severe depression over 40__________________Extreme depression A PERSISTENT SCORE OF 17 OR ABOVE INDICATES THAT YOU MAY NEED MEDICAL TREATMENT.   If you are uncomfortable sharing the results publicly, please PM me your results, and if not, please post them here so I can record them. My scores : BDI - 18 Average hrs spent programming per week over last 6 months - 10 I most definitely appreciate you guys taking the time to help me out. ;) Edgar There are no right or wrong answers, please be as honest as possible. With me, and yourself. If you feel you may have depression, I encourage you to explore treatment options with your doctor and your psychiatrist. I've never been diagnosed explicitly with depression, but I know I have trouble being happy, and I am currently on Buproprion to help with it. Depression is entirely treatable. Don't suffer for no reason. Seek treatment if you need it.  
  6. Collision Response

    To determine which side a collision occurred on, you need to calculate intercept times. Find the relative velocity of the 'leader' to the 'collider' and then determine when the leading edge of the leader overlaps with the front edge of the collider. If at that time, they overlap in the other dimension, then you have a collsion time. Repeat for the other dimension. Find the earliest collision - that will tell you which side they collided on. I only know how to do this for Axis Aligned Bounding Boxes though - wouldn't know how to do this pixel perfectly. The only way you can know which side collided first is if one relative velocity component is zero, or if you calculate intercept times. Simply finding overlap of a future position will never tell you which side collided first, only that they overlap.
  7. Collision hiccups

    If your pixel perfect collision library is working as it should be, then it is a problem with the way you 'undo' the collisions. Check the future positions of your objects, not your current position after you move them but before you detect a collision. Ie.. Check for a collision at the end of the update before you move your object. 'Fix' the collision by reducing the velocity of the object until there would be no collision, and continue to check that object with its now reduced velocity against the rest of your objects.
  8. SantaHack 2011

    Sorry for the double post, but there are only 7 hours and 10 minutes remaining to register for SantaHack if you want to make and receive a game for Christmas. Like I said before, the use of Allegro is NOT required, only a free account at allegro.cc. Wishlist voting begins in 7 hours! Sign up now!
  9. SantaHack 2011

    Instead of the traditional ChristmasHack held by Jakub Wasilewski, this year at [url="http://www.allegro.cc"]http://www.allegro.cc[/url], we are hosting SantaHack 2011. The basic idea is to create a wishlist, vote on other peoples wishlists, spend a week making a game for someone else, and receive one in return. The use of Allegro 4 or 5 is NOT required. To register for the compo, you need to register at the allegro.cc forums. Relevant links : [url="https://www.allegro.cc/account/join"]https://www.allegro.cc/account/join[/url] (Create a free account at allegro.cc) [url="http://www.allegro.cc/forums/thread/609036"]http://www.allegro.c...s/thread/609036[/url] (SantaHack 2011 thread at a.cc) [url="http://www.allegro.cc/forums/thread/608970"]http://www.allegro.c...s/thread/608970[/url] (ChristmasHack this year? thread at a.cc) [url="http://www.santahack.net/home"]http://www.santahack.net/home[/url] (SantaHack website) [url="http://www.santahack.net/rules"]http://www.santahack.net/rules[/url] (SantaHack rules) [b]Important Dates[/b] [list][*]Registration phase begins [b]December 12, 2011 at 12:00 UTC.[/b][*]Wishlist voting phase begins [b]December 15, 2011 at 12:00 UTC[/b] and ends [b]December 17, 2011 at 10:00 UTC.[/b][*]Development phase begins [b]December 17, 2011 at 12:00 UTC.[/b][*]All entries are due by [b]December 24, 2011 at 12:00 UTC.[/b][*]Entries are released to recipients on [b]December 25, 2011 at 0:00 UTC.[/b][*]All entries are publicly released on [b]December 26, 2011 at 12:00 UTC.[/b][/list]
  10. C++ friend

    [code] class Cat { friend void PrintAge(Cat& cat) {cout << cat.age << endl;} private: int age; }; [/code] Someone correct me if I'm wrong, but friend seems redundant and useless for a member function. Also, the method is not static because it has not been declared as such. You still need a Cat object to call it from, even though it works on a different Cat object.
  11. SOLVED : See solution below I can't get the makefile for my software library Eagle to only build the files that are out of date. Can anyone see why this makefile always builds everything? Does it have anything to do with implicit rules? It should only rebuild the .d files when the source files or their dependencies are newer than they are. It should only rebuild the object files when the .d files or their .c or .cpp file dependencies are newer than they are. It should only rebuild the libraries when the object files are newer than they are. However, it rebuilds all the .d files, all the .o files, and the library every time I run make and I don't understand why. Any makefile gurus out there who can help me? If you want to try building the library yourself, you can download the latest SVN code from sourceforge : [i]svn checkout "http://svn.code.sf.net/p/eaglegui/code/trunk eaglegui-code"[/i] Here's the current makefile : [code] #/* # * # * _______ ___ ____ __ _______ # * /\ ____\ /| \ / __\ /\ \ /\ ____\ # * \ \ \___/_ || _ \ | /__/____\ \ \ \ \ \___/_ # * \ \ ____\ || |_\ \ |\ \ /\_ _\\ \ \ \ \ ____\ # * \ \ \___/_ || ___ \ \ \ \\//\ \/ \ \ \____\ \ \___/_ # * \ \______\||_|__/\_\ \ \ \_\/ | \ \_____\\ \______\ # * \/______/|/_/ \/_/ \_\_____/ \/_____/ \/______/ # * # * # * EAGLE # * Edgar's Allegro Gui Library and Extensions # * # * Copyright 2009-2011 by Edgar Reynaldo # * # * See EagleLicense.txt for allowed uses of this library. # * # */ # Must include makefile.version before makefile.platform! include makefile.version # Platform specific shiznit goes here # makefile.platform is generated by fix.* include makefile.platform ifndef STATICLINK DYNAMICLINK = 1 endif ifndef DEBUGMODE ifndef PROFILEMODE RELEASEMODE = 1 endif else PROFILEMODE= RELEASEMODE= endif ifndef PROFILEMODE ifndef DEBUGMODE RELEASEMODE = 1 endif else DEBUGMODE= RELEASEMODE= endif ifndef BUILDDIR BUILDDIR = testbuild endif WFLAGS = -Wall -Wshadow CC = g++ ifeq (WINDOWS,$(PLATFORM)) LIBALLEGROPROFILE := -lalleg44-profile.dll LIBALLEGRODEBUG := -lalleg44-debug.dll LIBALLEGRORELEASE := -lalleg44.dll endif ifeq (NIX,$(PLATFORM)) LIBALLEGROPROFILE := -lalleg-profile LIBALLEGRODEBUG := -lalleg-debug LIBALLEGRORELEASE := -lalleg endif ifdef STATICLINK ifdef PROFILEMODE OBJDIR := $(BUILDDIR)/obj/Static/Profiling LIBSUFFIX := _ps CFLAGS := -pg LFLAGS := -pg $(GMON) MODE := Static Profiling mode endif ifdef DEBUGMODE OBJDIR := $(BUILDDIR)/obj/Static/Debug LIBSUFFIX := _ds CFLAGS := -g -DDEBUGMODE -DEAGLE_ASSERT_EXCEPTION LFLAGS := MODE := Static Debugging mode endif ifdef RELEASEMODE OBJDIR := $(BUILDDIR)/obj/Static/Release LIBSUFFIX := _rs CFLAGS := -O2 LFLAGS := MODE := Static Release mode endif CFLAGS := $(CFLAGS) -c -DALLEGRO_STATICLINK endif ifdef DYNAMICLINK ifdef PROFILEMODE OBJDIR := $(BUILDDIR)/obj/Dynamic/Profiling LIBSUFFIX := _p CFLAGS := -pg LFLAGS := -pg $(GMON) $(LIBALLEGROPROFILE) MODE := Dynamic Profiling mode endif ifdef DEBUGMODE OBJDIR := $(BUILDDIR)/obj/Dynamic/Debug LIBSUFFIX := _d CFLAGS := -g -DDEBUGMODE -DEAGLE_ASSERT_EXCEPTION LFLAGS := $(LIBALLEGRODEBUG) MODE := Dynamic Debugging mode endif ifdef RELEASEMODE OBJDIR := $(BUILDDIR)/obj/Dynamic/Release LIBSUFFIX := _r CFLAGS := -O2 LFLAGS := $(LIBALLEGRORELEASE) -s MODE := Dynamic Release mode endif CFLAGS := $(CFLAGS) -c CFLAGS := $(CFLAGS) $(EXTRACFLAGS) endif COMPILEFLAGS = $(WFLAGS) $(CFLAGS) LINKFLAGS = $(LFLAGS) CPPSRCS = $(notdir $(wildcard src/*.cpp)) CSRCS = $(notdir $(wildcard src/*.c)) CPPGUISRCS = $(notdir $(wildcard src/GuiCode/*.cpp)) CGUISRCS = $(notdir $(wildcard src/GuiCode/*.c)) CPPOBJS = $(addsuffix .o , $(basename $(CPPSRCS))) COBJS = $(addsuffix .o , $(basename $(CSRCS))) CPPGUIOBJS = $(addsuffix .o , $(basename $(CPPGUISRCS))) CGUIOBJS = $(addsuffix .o , $(basename $(CGUISRCS))) CPPOBJS := $(addprefix $(OBJDIR)/,$(CPPOBJS)) COBJS := $(addprefix $(OBJDIR)/,$(COBJS)) CPPGUIOBJS := $(addprefix $(OBJDIR)/,$(CPPGUIOBJS)) CGUIOBJS := $(addprefix $(OBJDIR)/,$(CGUIOBJS)) CPPSRCS := $(addprefix src/,$(CPPSRCS)) CSRCS := $(addprefix src/,$(CSRCS)) CPPGUISRCS := $(addprefix src/GuiCode/,$(CPPGUISRCS)) CGUISRCS := $(addprefix src/GuiCode/,$(CGUISRCS)) ALLCSRCS := $(CSRCS) $(CGUISRCS) ALLCPPSRCS := $(CPPSRCS) $(CPPGUISRCS) ALLSRCS := $(ALLCSRCS) $(ALLCPPSRCS) ALLCOBJS := $(COBJS) $(CGUIOBJS) ALLCPPOBJS := $(CPPOBJS) $(CPPGUIOBJS) ALLOBJS := $(ALLCOBJS) $(ALLCPPOBJS) $(warning Including *.d files...) include $(ALLOBJS:%.c:$(OBJDIR)$(SLASH)%.d) include $(ALLOBJS:%.cpp:$(OBJDIR)$(SLASH)%.d) #CHDRS = $(notdir $(wildcard include/*.h)) #CPPHDRS = $(notdir $(wildcard include/*.hpp)) #CGUIHDRS = $(notdir $(wildcard include/GuiCode/*.h)) #CPPGUIHDRS = $(notdir $(wildcard include/GuiCode/*.hpp)) EAGLEHDR = include/Eagle.hpp CHDRS = $(wildcard include/Eagle/*.h) CPPHDRS = $(wildcard include/Eagle/*.hpp) CGUIHDRS = $(wildcard include/Eagle/GuiCode/*.h) CPPGUIHDRS = $(wildcard include/Eagle/GuiCode/*.hpp) HDRS := $(CHDRS) $(CPPHDRS) GUIHDRS := $(CGUIHDRS) $(CPPGUIHDRS) ALLHDRS := $(EAGLEHDR) $(HDRS) $(GUIHDRS) LIBDIR := $(BUILDDIR)$(SLASH)lib LIBNAME = eagle # eagle_* FULLLIBNAME := $(LIBNAME)$(LIBSUFFIX) # WIN = eagle_*.dll NIX = eagle_*.so.1 DLLNAME := $(FULLLIBNAME)$(SHAREDLIBEXT) #soname = dll , -o = .a #static libs on *NIX are .a files ifdef STATICLINK # libeagle_*.a ARCHIVENAME := lib$(FULLLIBNAME).a else # libeagle_*.so on unix , libeagle_*.dll.a on MinGW ifeq (WINDOWS,$(PLATFORM)) # WIN = libeagle_*.dll.a ARCHIVENAME := lib$(DLLNAME).a endif ifeq (NIX,$(PLATFORM)) # NIX libeagle_*.so ARCHIVENAME := lib$(FULLLIBNAME).so SONAME = $(ARCHIVENAME).$(MAJORVERSION).$(MINORVERSION) DLLNAME := lib$(DLLNAME).$(FULLVERSION) endif endif BINDIR = $(INSTALLDIR)$(SLASH)bin OUTPUTLIB := $(LIBDIR)$(SLASH)$(ARCHIVENAME) OUTPUTDLL := $(LIBDIR)$(SLASH)$(DLLNAME) #fake : ifeq (WINDOWS,$(PLATFORM)) # $(ECHO) Platform is WINDOWS! OUTPUTDEF = $(LIBDIR)$(SLASH)$(DLLNAME).def CREATEDEF = -Wl,--output-def=$(OUTPUTDEF) CREATEIMPLIB = -Wl,--out-implib=$(OUTPUTLIB) MAKEDLL = -Wl,--dll endif ifeq (NIX,$(PLATFORM)) # $(ECHO) Platform is NIX! CREATEIMPLIB = -Wl,-soname,$(SONAME) endif # Targets begin here #$(OUTPUTLIB) $(OUTPUTDLL) $(OUTPUTDEF) : $(ALLOBJS) # $(ECHO) Building lib $(OUTPUTLIB) in $(MODE) #ifdef STATICLINK # $(TEST) ar.exe -rcs $(OUTPUTLIB) $(ALLOBJS) #endif #ifdef DYNAMICLINK # mingw32-g++.exe -shared -Wl,--output-def=build\lib\libeagle_r.dll.def -Wl,--out-implib=build\lib\libeagle_r.dll.a -Wl,--dll # $(TEST) $(CC) -shared -Wl,--output-def=$(OUTPUTDEF) -Wl,--out-implib=$(OUTPUTLIB) -Wl,--dll $(ALLOBJS) -o $(OUTPUTDLL) $(LINKFLAGS) #endif ifdef STATICLINK $(OUTPUTLIB) : $(ALLOBJS) $(ECHO) Building lib $(OUTPUTLIB) in $(MODE) $(TEST) ar.exe -rcs $(OUTPUTLIB) $(ALLOBJS) endif ifdef DYNAMICLINK $(OUTPUTLIB) $(OUTPUTDLL) $(OUTPUTDEF) : $(ALLOBJS) # Windows # mingw32-g++.exe -shared -Wl,--output-def=build\lib\libeagle_r.dll.def -Wl,--out-implib=build\lib\libeagle_r.dll.a -Wl,--dll # *NIX # g++ -shared -Wl,-soname,libprint.so.1 -o libprint.so.1.0 $(OBJS) $(ECHO) Building lib $(OUTPUTLIB) in $(MODE) $(TEST) $(CC) -shared $(CREATEDEF) $(CREATEIMPLIB) $(MAKEDLL) $(ALLOBJS) -o $(OUTPUTDLL) $(LINKFLAGS) endif $(FIXDFILES) : Fixdfiles.cpp $(CC) -Wall -O2 -o $(FIXDFILES) Fixdfiles.cpp ifeq (NIX,$(PLATFORM)) chmod +x $(FIXDFILES) endif .PRECIOUS : $(OBJDIR)/%.d $(OBJDIR)/%.d : src/%.c makebuilddirs $(FIXDFILES) $(TEST) $(CC) -MM $< -Iinclude > $@ # $(FIXDFILES) $(OBJDIR) $(@F) > $@ $(FIXDFILES) $(OBJDIR) $(@F) $(OBJDIR)/%.d : src/%.cpp makebuilddirs $(FIXDFILES) $(TEST) $(CC) -MM $< -Iinclude > $@ # $(FIXDFILES) $(OBJDIR) $(@F) > $@ $(FIXDFILES) $(OBJDIR) $(@F) $(OBJDIR)/%.d : src/GuiCode/%.c makebuilddirs $(FIXDFILES) $(TEST) $(CC) -MM $< -Iinclude > $@ # $(FIXDFILES) $(OBJDIR) $(@F) > $@ $(FIXDFILES) $(OBJDIR) $(@F) $(OBJDIR)/%.d : src/GuiCode/%.cpp makebuilddirs $(FIXDFILES) $(TEST) $(CC) -MM $< -Iinclude > $@ # $(FIXDFILES) $(OBJDIR) $(@F) > $@ $(FIXDFILES) $(OBJDIR) $(@F) #$(warning Including d files!) #include $(COBJS:%.o:%.d) #include $(CPPOBJS:%.o:%.d) #include $(CGUIOBJS:%.o:%.d) #include $(CPPGUIOBJS:%.o:%.d) $(OBJDIR)/%.o : src/%.c $(OBJDIR)/%.d $(TEST) $(CC) $(COMPILEFLAGS) -Iinclude -o $@ $< $(OBJDIR)/%.o : src/%.cpp $(OBJDIR)/%.d $(TEST) $(CC) $(COMPILEFLAGS) -Iinclude -o $< $(OBJDIR)/%.o : src/GuiCode/%.c $(OBJDIR)/%.d $(TEST) $(CC) $(COMPILEFLAGS) -Iinclude -o $@ $< $(OBJDIR)/%.o : src/GuiCode/%.cpp $(OBJDIR)/%.d $(TEST) $(CC) $(COMPILEFLAGS) -Iinclude -o $@ $< .PHONY : makefile.platform makefile.platform : ifeq (,$(findstring makefile.platform,$(wildcard makefile.platform))) $(error Please run fix.bat for Windows or ./fix.sh for *nix to generate makefile.platform) endif makebuilddirs : -$(MKDIR) $(LIBDIR) -$(MKDIR) $(subst /,$(SLASH),$(OBJDIR)) makeinstalldirs : -$(MKDIR) $(BINDIR) -$(MKDIR) $(INSTALLDIR)$(SLASH)lib # -$(MKDIR) $(INSTALLDIR)$(SLASH)include # -$(MKDIR) $(INSTALLDIR)$(SLASH)include$(SLASH)Eagle # This should take care of creating include and Eagle as well -$(MKDIR) $(INSTALLDIR)$(SLASH)include$(SLASH)Eagle$(SLASH)GuiCode all : $(MAKE) DEBUGMODE=1 $(MAKE) PROFILEMODE=1 $(MAKE) $(MAKE) DEBUGMODE=1 STATICLINK=1 $(MAKE) PROFILEMODE=1 STATICLINK=1 $(MAKE) STATICLINK=1 install : $(OUTPUTLIB) $(OUTPUTDLL) $(OUTPUTDEF) makeinstalldirs installheaders ifeq (WINDOWS,$(PLATFORM)) $(COPY) $(OUTPUTDLL) $(INSTALLDIR)$(SLASH)bin $(COPY) $(OUTPUTLIB) $(INSTALLDIR)$(SLASH)lib endif ifeq (NIX,$(PLATFORM)) $(COPY) $(OUTPUTDLL) $(INSTALLDIR)$(SLASH)lib ln -sf $(INSTALLDIR)$(SLASH)lib$(SLASH)$(DLLNAME) $(INSTALLDIR)$(SLASH)lib$(SLASH)$(SONAME) ln -sf $(INSTALLDIR)$(SLASH)lib$(SLASH)$(SONAME) $(INSTALLDIR)$(SLASH)lib$(SLASH)$(ARCHIVEAME) endif installheaders : $(ALLHDRS) $(COPY) include$(SLASH)Eagle$(SLASH)*.* $(INSTALLDIR)$(SLASH)include$(SLASH)Eagle $(COPY) include$(SLASH)Eagle$(SLASH)GuiCode$(SLASH)*.* $(INSTALLDIR)$(SLASH)include$(SLASH)Eagle$(SLASH)GuiCode $(COPY) include$(SLASH)Eagle.hpp $(INSTALLDIR)$(SLASH)include uninstall : -$(REMOVE) $(INSTALLDIR)$(SLASH)bin$(SLASH)$(DLLNAME) -$(REMOVE) $(INSTALLDIR)$(SLASH)lib$(SLASH)$(ARCHIVENAME) -$(REMDIR) $(INSTALLDIR)$(SLASH)include$(SLASH)Eagle -$(REMOVE) $(INSTALLDIR)$(SLASH)include$(SLASH)Eagle.hpp installall : all $(MAKE) DEBUGMODE=1 install INSTALLDIR=$(INSTALLDIR) $(MAKE) PROFILEMODE=1 install INSTALLDIR=$(INSTALLDIR) $(MAKE) install INSTALLDIR=$(INSTALLDIR) $(MAKE) DEBUGMODE=1 STATICLINK=1 install INSTALLDIR=$(INSTALLDIR) $(MAKE) PROFILEMODE=1 STATICLINK=1 install INSTALLDIR=$(INSTALLDIR) $(MAKE) STATICLINK=1 install INSTALLDIR=$(INSTALLDIR) uninstallall : $(MAKE) DEBUGMODE=1 uninstall INSTALLDIR=$(INSTALLDIR) $(MAKE) PROFILEMODE=1 uninstall INSTALLDIR=$(INSTALLDIR) $(MAKE) uninstall INSTALLDIR=$(INSTALLDIR) $(MAKE) DEBUGMODE=1 STATICLINK=1 uninstall INSTALLDIR=$(INSTALLDIR) $(MAKE) PROFILEMODE=1 STATICLINK=1 uninstall INSTALLDIR=$(INSTALLDIR) $(MAKE) STATICLINK=1 uninstall INSTALLDIR=$(INSTALLDIR) .PHONY : clean cleanobj cleanlib clean : cleanobj cleanlib cleanobj : $(REMOVE) $(subst /,$(SLASH),$(OBJDIR))$(SLASH)*.* cleanlib : $(REMOVE) $(subst /,$(SLASH),$(OUTPUTLIB)) cleanall : $(MAKE) DEBUGMODE=1 clean $(MAKE) PROFILEMODE=1 clean $(MAKE) clean $(MAKE) DEBUGMODE=1 STATICLINK=1 clean $(MAKE) PROFILEMODE=1 STATICLINK=1 clean $(MAKE) STATICLINK=1 clean help : $(ECHO) Available options : (Default build is dynamic release mode) $(ECHO) DEBUGMODE=1 $(ECHO) PROFILEMODE=1 $(ECHO) STATICLINK=1 $(ECHO) on $(ECHO) Available targets : (Default target is dynamic release library) $(ECHO) all $(ECHO) install $(ECHO) uninstall $(ECHO) installall $(ECHO) uninstallall $(ECHO) clean $(ECHO) cleanall $(ECHO) on $(ECHO) Default installation directory is $MINGDIR$ for Windows and /usr for *nix $(ECHO) Set using INSTALLDIR=install/directory/path [/code] The rules for building the *.d and *.o and the *.dll / *.so / *.a files are here : [code] # Targets begin here #$(OUTPUTLIB) $(OUTPUTDLL) $(OUTPUTDEF) : $(ALLOBJS) # $(ECHO) Building lib $(OUTPUTLIB) in $(MODE) #ifdef STATICLINK # $(TEST) ar.exe -rcs $(OUTPUTLIB) $(ALLOBJS) #endif #ifdef DYNAMICLINK # mingw32-g++.exe -shared -Wl,--output-def=build\lib\libeagle_r.dll.def -Wl,--out-implib=build\lib\libeagle_r.dll.a -Wl,--dll # $(TEST) $(CC) -shared -Wl,--output-def=$(OUTPUTDEF) -Wl,--out-implib=$(OUTPUTLIB) -Wl,--dll $(ALLOBJS) -o $(OUTPUTDLL) $(LINKFLAGS) #endif ifdef STATICLINK $(OUTPUTLIB) : $(ALLOBJS) $(ECHO) Building lib $(OUTPUTLIB) in $(MODE) $(TEST) ar.exe -rcs $(OUTPUTLIB) $(ALLOBJS) endif ifdef DYNAMICLINK $(OUTPUTLIB) $(OUTPUTDLL) $(OUTPUTDEF) : $(ALLOBJS) # Windows # mingw32-g++.exe -shared -Wl,--output-def=build\lib\libeagle_r.dll.def -Wl,--out-implib=build\lib\libeagle_r.dll.a -Wl,--dll # *NIX # g++ -shared -Wl,-soname,libprint.so.1 -o libprint.so.1.0 $(OBJS) $(ECHO) Building lib $(OUTPUTLIB) in $(MODE) $(TEST) $(CC) -shared $(CREATEDEF) $(CREATEIMPLIB) $(MAKEDLL) $(ALLOBJS) -o $(OUTPUTDLL) $(LINKFLAGS) endif $(FIXDFILES) : Fixdfiles.cpp $(CC) -Wall -O2 -o $(FIXDFILES) Fixdfiles.cpp ifeq (NIX,$(PLATFORM)) chmod +x $(FIXDFILES) endif .PRECIOUS : $(OBJDIR)/%.d $(OBJDIR)/%.d : src/%.c makebuilddirs $(FIXDFILES) $(TEST) $(CC) -MM $< -Iinclude > $@ # $(FIXDFILES) $(OBJDIR) $(@F) > $@ $(FIXDFILES) $(OBJDIR) $(@F) $(OBJDIR)/%.d : src/%.cpp makebuilddirs $(FIXDFILES) $(TEST) $(CC) -MM $< -Iinclude > $@ # $(FIXDFILES) $(OBJDIR) $(@F) > $@ $(FIXDFILES) $(OBJDIR) $(@F) $(OBJDIR)/%.d : src/GuiCode/%.c makebuilddirs $(FIXDFILES) $(TEST) $(CC) -MM $< -Iinclude > $@ # $(FIXDFILES) $(OBJDIR) $(@F) > $@ $(FIXDFILES) $(OBJDIR) $(@F) $(OBJDIR)/%.d : src/GuiCode/%.cpp makebuilddirs $(FIXDFILES) $(TEST) $(CC) -MM $< -Iinclude > $@ # $(FIXDFILES) $(OBJDIR) $(@F) > $@ $(FIXDFILES) $(OBJDIR) $(@F) #$(warning Including d files!) #include $(COBJS:%.o:%.d) #include $(CPPOBJS:%.o:%.d) #include $(CGUIOBJS:%.o:%.d) #include $(CPPGUIOBJS:%.o:%.d) $(OBJDIR)/%.o : src/%.c $(OBJDIR)/%.d $(TEST) $(CC) $(COMPILEFLAGS) -Iinclude -o $@ $< $(OBJDIR)/%.o : src/%.cpp $(OBJDIR)/%.d $(TEST) $(CC) $(COMPILEFLAGS) -Iinclude -o $@ $< $(OBJDIR)/%.o : src/GuiCode/%.c $(OBJDIR)/%.d $(TEST) $(CC) $(COMPILEFLAGS) -Iinclude -o $@ $< $(OBJDIR)/%.o : src/GuiCode/%.cpp $(OBJDIR)/%.d $(TEST) $(CC) $(COMPILEFLAGS) -Iinclude -o $@ $< [/code] To build the library, run (fix.bat on Windows or ./fix.sh on *NIX) and then make [DEBUGMODE=1 | PROFILEMODE=1] [STATICLINK=1] [install | clean | installall | cleanall | help] [BUILDDIR=build/directory] [INSTALLDIR=install/directory] SOLUTION : These solutions were kindly given by the folks on the help-make mailing list. [quote] All your rules have extra prerequisites on them: $(OBJDIR)/%.d : src/%.c makebuilddirs $(FIXDFILES) ... $(OBJDIR)/%.o : src/%.c $(OBJDIR)/%.d ... makebuilddirs : -$(MKDIR) $(LIBDIR) -$(MKDIR) $(subst /,$(SLASH),$(OBJDIR)) Here we see that all .o's depend on the .d files and all .d files depend on a target "makebuilddirs". That target creates directories, but the target itself (a file named "makebuilddirs") is never created. That means that the target "makebuilddirs" is never up to date, and that means that the .d target is always out of date, and that means that the .o target is always out of date, and that means make will always rebuild it. Every time you run make it "rebuilds" the makebuilddirs target and that causes every other target in your makefile which depends on it (or depends on something that depends on it) to be rebuilt. [/quote] Also, a further solution for creating directories was to make them an 'order only prerequisite' by placing them in the prerequisites after a pipe symbol. This way they are only run once before the target's recipe is executed. [code] BUILDDIR = obj/$(LINKTYPE)/$(BUILDTYPE) //... %.d : %.cpp | $(BUILDDIR) $(GCC) -MM -o $@ $< $(BUILDDIR) : $(MKDIR) $(BUILDDIR) [/code]
  12. Line Collision Response

    A few notes about your code : Indent when you start a new block of code - it's hard to follow your code when it's all at the same column. Your initial distance check only compares against the first element of 'closePoints'. Shouldn't it be for each element? When you create the velocity line segments, you should add the velocity to the point, not subtract it. The algorithm itself should go something like this : [i] 1. Find three line segments that represent where your vertical line segment will be between now and the update with regard to velocity. (2 are created by extending the endpoints by the velocity vector, and the other is where it would be if it didn't collide with anything) 2. For each line segment in the world, test whether the three line segments from #1 intersect it. 2a. If they intersect, store the smallest distance of the three intersection tests. 3. Set the velocity of the object to the smallest distance detected (using the original velocity as the initial vector). [/i]
  13. problems building Allegro

    If the CodeBlocks template Cmake generates is not working for you, then try using the "MinGW Makefiles" generator with -G. [code] cd allegro5.0.3 mkdir build cd build cmake -G "MinGW Makefiles" .. mingw32-make mingw32-make install [/code] Also, the correct generator for Code Blocks and MinGW is [code] cmake -G "CodeBlocks - MinGW Makefiles" [/code] And, the error you are getting may be fixed by renaming mingw32-make to make.
  14. Best Calculus Textbook?

    [quote name='guyver23'] Have you considered using MIT OpenCourseWare as an alternative tobuying a textbook? His style may not suit you, but Gilbert Strang'scalculus textbook is also available for free online: [/quote] I'm not terribly fond of PDF's, since they are usually poorly linked together, but that probably wouldn't matter as a textbook is so logically organized. It may be a nice reference in a pinch, so I'll consider it. I'd still like a hard copy though, and that was last published in 1991. It would be nice to get something more recent, but things probably haven't changed much since then. [quote name='jesse007'] I don't have any recommendations because almost all standard calculusbook like James Stewart's Calculus will have #1,2,4,5. If you reallywant to know the proofs behind calculus, then you will need to studyelementary real analysis. A good elementary analysis book like TomApostol's One Variable Calculus with Introduction Linear Algebra willmore than suffice. I learned analysis as a math major but it'spractically useless for programming. (except maybe in the case when youwant to design a numerical method) [/quote] I've been looking over [url="http://www.amazon.com/Calculus-James-Stewart/dp/0538497815/ref=dp_ob_title_bk"]Stewart's 'Calculus' 7th Edition[/url] and it looks pretty thorough. One review did say that there were some cases where necessary explanations of how/why equations were transformed were glossed over in the 6th edition, but maybe those have been remedied. So I guess unless there are any other recommendations for textbooks over that of Stewart's, I will go with that one in the next week or so.
  15. Best Calculus Textbook?

    I used to know calculus rather well, but I'm afraid the years have taken their toll and rusted out the portion of my brain that knew about it. So, I'm looking for a good calculus text book that fits these criteria : 1) Is hard bound. 2) Has good reference tables of common derivatives and integrals. 3) Provides good proofs for learning the formulas that govern it. 4) Covers derivatives, integrals, and volume calculations at the least. 5) Advanced calculus like partial differentials not necessary, but might be nice to learn anyway (new to these). So if you've got a good textbook that you can recommend to me to buy, that would be really great. Please make sure to include the ISBN number of the book so I can get an exact copy. Thanks, Edgar
  • Advertisement