If I recall correctly (I last touched LCS source April 2015), you should need to set non-default constants to enable those features. I'm not familiar with Code::Blocks.
I've pushed the latest commit, which works on my Linux machine, but let me know if it gives you any problems.
||=== Build: Debug in Liberal Crime Squad (compiler: GNU GCC Compiler) ===|
..\..\..\..\home\brian\Desktop\Stuff\Games\Liberal-Crime-Squad\ Makefile||No such file or directory|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
Thanks Kamal, but why is the release tagged 4.1.0 if it comes after 4.07.0? Did you mean 4.10.0?Yeah, that would make a bit more sense, wouldn't it? Thanks for the catch, updated it.
Yeah, I should've seen that coming! I finally managed to get it working after a couple of hours in a Windows VM, after starting a new make configuration for CodeBlocks and messing around with it. I'll push the latest commit, but I still need to update the COMPILE_README.txt, because depending on the platform you'll need to change a few settings (linking options, etc.) to get it to compile. In the meantime, here's (https://github.com/Kamal-Sadek/Liberal-Crime-Squad/releases/tag/v4.10.0) the latest builds for both Linux and Windows (remember to change the terminal size!). Hopefully you don't have too high expectations going into it! Let me know if it works.
Are corpses of those killed in a car crash supposed to teleport to my safehouse, and is it a new feature for the Police to raid me even after the Police Station is shut down?
I managed to compile under Windows with the latest version of Code::Blocks (without the bundled MinGW), plus the latest TDM-GCC (http://tdm-gcc.tdragon.net/download, first bundle installer) and changing the project build setting where it says -lncurses for -lpdcurses (the only actual change to the files I got from Git). Which apparently works with or without the c++11 flag, as it is enabled in the debug but disabled in the release profile, and both compiled fine.
Trying to use MINGW or Visual Studio Express 2010, or the bundled-MinGW version of Code::Blocks just ended with failure and disappointment.
I managed to compile under Windows with the latest version of Code::Blocks (without the bundled MinGW), plus the latest TDM-GCC (http://tdm-gcc.tdragon.net/download, first bundle installer) and changing the project build setting where it says -lncurses for -lpdcurses (the only actual change to the files I got from Git). Which apparently works with or without the c++11 flag, as it is enabled in the debug but disabled in the release profile, and both compiled fine.
Trying to use MINGW or Visual Studio Express 2010, or the bundled-MinGW version of Code::Blocks just ended with failure and disappointment.
"Liberal Crime Squad - Debug": The compiler's setup (GNU GCC Compiler) is invalid, so Code::Blocks cannot find/run the compiler.
Probably the toolchain path within the compiler options is not setup correctly?! (Do you have a compiler installed?)
Goto "Settings->Compiler...->Global compiler settings->GNU GCC Compiler->Toolchain executables" and fix the compiler's setup.
Skipping...
Nothing to be done (all items are up-to-date).
||=== Build: Debug in Liberal Crime Squad (compiler: GNU GCC Compiler) ===|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp||In function 'void select_augmentation(Creature*)':|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp|1743|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp|1743|warning: unused variable 'y' [-Wunused-variable]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp|1757|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp|1765|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp|1818|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp|1827|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp|1834|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\basemode\activate.cpp|1941|warning: 'selected_aug' may be used uninitialized in this function [-Wmaybe-uninitialized]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\common\consolesupport.cpp|319|warning: "FE_FONTSMOOTHINGSTANDARD" redefined|
D:\TDM-GCC-64\x86_64-w64-mingw32\include\winuser.h|5103|note: this is the location of the previous definition|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\common\consolesupport.cpp|320|warning: "FE_FONTSMOOTHINGCLEARTYPE" redefined|
D:\TDM-GCC-64\x86_64-w64-mingw32\include\winuser.h|5104|note: this is the location of the previous definition|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\common\consolesupport.cpp|322|warning: "SPI_SETFONTSMOOTHINGTYPE" redefined|
D:\TDM-GCC-64\x86_64-w64-mingw32\include\winuser.h|5101|note: this is the location of the previous definition|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\common\consolesupport.cpp|323|warning: "SPI_GETFONTSMOOTHINGCONTRAST" redefined|
D:\TDM-GCC-64\x86_64-w64-mingw32\include\winuser.h|5107|note: this is the location of the previous definition|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\common\consolesupport.cpp|324|warning: "SPI_SETFONTSMOOTHINGCONTRAST" redefined|
D:\TDM-GCC-64\x86_64-w64-mingw32\include\winuser.h|5108|note: this is the location of the previous definition|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\common\consolesupport.cpp||In function 'void end_cleartype_fix()':|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\common\consolesupport.cpp|368|warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp||In function 'long unsigned int getSeed()':|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp|188|error: cast from 'LPVOID {aka void*}' to 'long unsigned int' loses precision [-fpermissive]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp|189|error: cast from 'LPVOID {aka void*}' to 'long unsigned int' loses precision [-fpermissive]|
||=== Build failed: 2 error(s), 14 warning(s) (0 minute(s), 56 second(s)) ===|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp|188|error: cast from 'LPVOID {aka void*}' to 'long unsigned int' loses precision [-fpermissive]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp|189|error: cast from 'LPVOID {aka void*}' to 'long unsigned int' loses precision [-fpermissive]|
void fnvHash(unsigned long &fnv_hash,unsigned long num)
tovoid fnvHash(unsigned long &fnv_hash,intptr_t num)
It's worth the try, I suppose! It really should've been that type in the first place, from what I can gather at a glance. Fingers crossed!
Probably because the long int variable types are different in 64 bit than in 32 bit. Try the 32-bit compilers. (or make sure they're compiling in 32-bit mode, I know there's a flag somewhere but not sure where it goes, maybe there's a checkbox? HOWEVER this would only work if the GNU 32-bit libraries are included in your install...)
The only actual errors in that log areCode: [Select]D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp|188|error: cast from 'LPVOID {aka void*}' to 'long unsigned int' loses precision [-fpermissive]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp|189|error: cast from 'LPVOID {aka void*}' to 'long unsigned int' loses precision [-fpermissive]|
Hm, I didn't have a chance to test this on a failing build, so here's a chance to embarrass myself! What happens if you change the header of fnvHash fromCode: [Select]void fnvHash(unsigned long &fnv_hash,unsigned long num)toCode: [Select]void fnvHash(unsigned long &fnv_hash,intptr_t num)It's worth the try, I suppose! It really should've been that type in the first place, from what I can gather at a glance. Fingers crossed!
Like I said, unchecking the option to look for updates in the install should get rid of the error.
||=== Build: Release in Liberal Crime Squad (compiler: GNU GCC Compiler) ===|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp||In function 'long unsigned int getSeed()':|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp|188|error: cast from 'LPVOID {aka void*}' to 'long unsigned int' loses precision [-fpermissive]|
D:\Program Files (x86)\RANDOM GAMES\Liberal-Crime-Squad-master\src\compat.cpp|189|error: cast from 'LPVOID {aka void*}' to 'long unsigned int' loses precision [-fpermissive]|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
Like I said, unchecking the option to look for updates in the install should get rid of the error.
I remember unchecking it, though. Clicked tdm-gcc again and this time the "Check for updates" box was still checked. Tried unchecking the box and clicking the option to manage a tdm-gcc installation before opening it again, the box was checked again. Can't seem to get that box to actually stay unchecked.
"Liberal Crime Squad - Release": The compiler's setup (GNU GCC Compiler) is invalid, so Code::Blocks cannot find/run the compiler.
Probably the toolchain path within the compiler options is not setup correctly?! (Do you have a compiler installed?)
Goto "Settings->Compiler...->Global compiler settings->GNU GCC Compiler->Toolchain executables" and fix the compiler's setup.
Skipping...
Nothing to be done (all items are up-to-date).
Did you reset or auto-detect the toolchain executables/installation directory in the Global compiler settings?
||=== Build: Release in Liberal Crime Squad (compiler: GNU GCC Compiler) ===|
||error: ld returned 1 exit status|
||=== Build failed: 1 error(s), 0 warning(s) (1 minute(s), 53 second(s)) ===|
Did you reset or auto-detect the toolchain executables/installation directory in the Global compiler settings?
Auto-detect makes it pick tdm-gcc-64, but resetting works. Now there's another new error message:Code: [Select]||=== Build: Release in Liberal Crime Squad (compiler: GNU GCC Compiler) ===|
||error: ld returned 1 exit status|
||=== Build failed: 1 error(s), 0 warning(s) (1 minute(s), 53 second(s)) ===|
No idea what that means.
(http://i.imgur.com/Brpd3tP.png)Did you reset or auto-detect the toolchain executables/installation directory in the Global compiler settings?
Auto-detect makes it pick tdm-gcc-64, but resetting works. Now there's another new error message:Code: [Select]||=== Build: Release in Liberal Crime Squad (compiler: GNU GCC Compiler) ===|
||error: ld returned 1 exit status|
||=== Build failed: 1 error(s), 0 warning(s) (1 minute(s), 53 second(s)) ===|
No idea what that means.
It seems to be a linker error, which happens when you try to use some kind of definition (whether it be for a function, variable, etc.), but the linker doesn't know where it's actually defined. (It could also happen because you mistyped the name of something, and it's looking for a misspelled name, and can't find it. But I'm going to assume you didn't mischievously edit anything).
It's probably because under Project Build Options -> Linker Settings, there's a library that is utilized but wasn't properly linked to (SDL, PDCurses, something or another), but more of the output / error is needed to decipher which library it is.
Unfortunately, ld is order-sensitive regarding library sequencing. That weird duplication of SDL2 is actually needed due to a build problem with SDL(2), so I'd try putting PDCurses before SDL2. (Generally speaking, if one library depends on another, the one being depended on should be after the one using it. The MSVC linker link is immune to such lexical ordering concerns.)
Is there ANYWHERE I can get a pre-compiled download of the latest GitHub version?For Windows?
Is there ANYWHERE I can get a pre-compiled download of the latest GitHub version?For Windows?
http://www.mediafire.com/file/8d6cji4r8djrqd3/Liberal+Crime+Squad+4.11.zip
If you just want to play it, this has no gameplay differences from the GitHub version.
Is there ANYWHERE I can get a pre-compiled download of the latest GitHub version?For Windows?
http://www.mediafire.com/file/8d6cji4r8djrqd3/Liberal+Crime+Squad+4.11.zip
If you just want to play it, this has no gameplay differences from the GitHub version.
There's a bug that causes some values to be changed upon reloading a game. If you start on nightmare mode, save the game, and reload it, the issues will shift and some supreme court justices will shift alignment. Gun control shifts one point and become conservative, Civil Rights will shift 3 and become liberal, election reform will shift 2 and become moderate, Human rights will shift one point and become conservative, Tax structure becomes moderate, Drug laws are conservative, and Military Spending becomes conservative, Flag Burning and Women's Right's become Liberal, Immigration and Prison regulation become moderate. 2 Conservative Justices and one moderate justice will become liberal.
The values are over-written every time you reload the game it seems, at least the political issues affected are. You can advance a month and let the issues change, to the point where they glitch out, because they moved off the chart, and upon reloading, the issues will be reset.
Is there ANYWHERE I can get a pre-compiled download of the latest GitHub version?For Windows?
http://www.mediafire.com/file/8d6cji4r8djrqd3/Liberal+Crime+Squad+4.11.zip
If you just want to play it, this has no gameplay differences from the GitHub version.
There's a bug that causes some values to be changed upon reloading a game. If you start on nightmare mode, save the game, and reload it, the issues will shift and some supreme court justices will shift alignment. Gun control shifts one point and become conservative, Civil Rights will shift 3 and become liberal, election reform will shift 2 and become moderate, Human rights will shift one point and become conservative, Tax structure becomes moderate, Drug laws are conservative, and Military Spending becomes conservative, Flag Burning and Women's Right's become Liberal, Immigration and Prison regulation become moderate. 2 Conservative Justices and one moderate justice will become liberal.
The values are over-written every time you reload the game it seems, at least the political issues affected are. You can advance a month and let the issues change, to the point where they glitch out, because they moved off the chart, and upon reloading, the issues will be reset.
Huh. I'm going to have to look into that.
The last official release is 4.07, but Fox hasn't been seen in forever, so KamelSadek worked to update it by adding Liberal Augmentation. I don't know precisely how much is his work, but he included updates to allow mucalitiple saves and several quality of life changes. KamelSadek calls his version 4.10. I used this version as a starting point for improved procedural string support, moving most of the in game text to external files, specifically pickup lines and battle text. I spoke with KamelSadek, and since we don't really know one another, and since neither of us is sure I didn't introduce a bunch of new bugs he has decided not to merge my changes into version 4.10. Eventually I made enough changes that I felt the need to differentiate my release from 4.10 so I renamed my version 4.11, and later renamed it 4.12.Is there ANYWHERE I can get a pre-compiled download of the latest GitHub version?For Windows?
http://www.mediafire.com/file/8d6cji4r8djrqd3/Liberal+Crime+Squad+4.11.zip
If you just want to play it, this has no gameplay differences from the GitHub version.
There's a bug that causes some values to be changed upon reloading a game. If you start on nightmare mode, save the game, and reload it, the issues will shift and some supreme court justices will shift alignment. Gun control shifts one point and become conservative, Civil Rights will shift 3 and become liberal, election reform will shift 2 and become moderate, Human rights will shift one point and become conservative, Tax structure becomes moderate, Drug laws are conservative, and Military Spending becomes conservative, Flag Burning and Women's Right's become Liberal, Immigration and Prison regulation become moderate. 2 Conservative Justices and one moderate justice will become liberal.
The values are over-written every time you reload the game it seems, at least the political issues affected are. You can advance a month and let the issues change, to the point where they glitch out, because they moved off the chart, and upon reloading, the issues will be reset.
Huh. I'm going to have to look into that.
Yeah same thing here. Also isn't that 4.10? Didn't know there was a 4.11 release.
Schmel924 did work on 4.10, starting a fork of their own.
Okay, i parsed all your messages on this forum and found out that instead of IsaacG (which is already present on github) you put LCS 4.12 as King-Drake.It's just the price I pay for having usernames easily pronounced and spelled.
He-he. Managed to compile it! It wasn't an easy journey.The problems ultimately stem from "includes.h" (and "externs.h"). My computer can compile the code for crimesquad.exe in about thirty seconds, but it takes 4~5 seconds to parse through and recompile includes.h. Since it's included in every single file, that adds about five minutes to the compile time. Being able to recompile in thirty seconds makes changes easier, safer, and better.
Mostly because i did it on my dayjob PC, where i'm no admin. So no installation of any program in usual way.
I downloaded and unpacked MiniGW and GnuMake.
After this, i indexed in makeshift makefile all cpp files from src folder.
After several more error-inducing changes (disable SDL and weird mingw #define), it worked.
My changes are on Github as of right now.
https://github.com/Schmel924/Liberal-Crime-Squad/tree/Dayjob (https://github.com/Schmel924/Liberal-Crime-Squad/tree/Dayjob)
I've decided to feel flattered by the people who painstakingly track me down rather than ask me directly.Well, You know, You weren't responding in three seconds after my post, and I was pumping adrenaline, so it was easier to act, than think. Also, that part of Your signature doesn't yell out "4.12 LCS IS HERE", so i went my way. Also, did You know, they making TV-series of Good Omens? With David Tennant! OMG!
new ones are created and destroyed like fruit flies in pursuit of reduced interdependenceThat's why we use git. It proves to us the lifecycle of such changes.
That's a good point... I should update that.I've decided to feel flattered by the people who painstakingly track me down rather than ask me directly.Well, You know, You weren't responding in three seconds after my post, and I was pumping adrenaline, so it was easier to act, than think. Also, that part of Your signature doesn't yell out "4.12 LCS IS HERE", so i went my way.
Also, did You know, they making TV-series of Good Omens? With David Tennant! OMG!...
It's not so much hard as it is time consuming.new ones are created and destroyed like fruit flies in pursuit of reduced interdependenceThat's why we use git. It proves to us the lifecycle of such changes.
Also, i think that's the right way, just break it in parts, that seems usable.
I wonder what exactly make it so hard.
Do You happen to have git log regarding this file and his counterparts?
If You don't mind, i will try and do the same in my free time.
LCS contains enough code that it qualifies for the old adage that starting over might be easier than maintenance, and while it is split into multiple files, nearly all the code is contained within the same class (at least 80%) making it arguably an example of procedural programming instead of object oriented.
To give an example, the car crash teleportation bug. Some of the people who die in a car crash are potentially 'teleported' to the safehouse, meaning their dead bodies appear at home for their compatriots to deal with.
Testing to determine if the bug is fixed requires causing a car crash, but a savefile can only exist before the player even goes to a site, meaning the tester has to go to the site, antagonize its inhabitants, enter a car chase with the police, crash the car, and then check back at the safehouse to see whether the bodies were teleported.
The code dealing with car chases is 1800 lines long, and the issue was fixed by adding lines 1556 and 1599. It is possible that only one of those two additions is necessary, and it is also possible that one of those two changes causes some other problem. The car chase code is integrated into the main class and cannot be changed or tested on its own.
I once changed the code that displays combat messages, then every month congress started voting unanimously regardless of legislation, and two of the issues in the "status of the liberal agenda" were displayed in flashing red text (which only appears when an obvious error is detected). I don't know how my changes did that, so I had to revert to an earlier copy and start over. (I went line by line of the earlier copy to my new version and only included the changes I felt confident about and 4.12 was born.)
Oh, absolutely.LCS contains enough code that it qualifies for the old adage that starting over might be easier than maintenance, and while it is split into multiple files, nearly all the code is contained within the same class (at least 80%) making it arguably an example of procedural programming instead of object oriented.
OOP would also helping with transferring most item definitions to XML files, along with making development and maintenance easier.
Do You happen to have git log regarding this file and his counterparts?
If You don't mind, i will try and do the same in my free time.
and while it is split into multiple files, nearly all the code is contained within the same class (at least 80%) making it arguably an example of procedural programming instead of object oriented.
To give an example ....
I don't have a git log, since I haven't figured out how to get version control software to work offline, so I've just been making copies of the entire project folder. Crude, but effective.
I'll put together a zip archive.
And right now it surprises me even more than i imagined.
I run a command, which shows me all changes to code which were made, and suddenly, i get this
...
It hooked all commits from effing 2007
faultNO! I did not mean that!
Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it ;)
QuotefaultNO! I did not mean that!
First of all, if You look into spoiler, You should see that my patches (Dayjob, Schmel924-patch-1) are at top. So this is most recent things happened in repository. About 15 rows in You should see wonderful "0bd15b9 (tag: v4.12.1, origin/master) Updated Readme for 4.12.1", which You must recognize. And about 15 rows further there is "127d712 (tag: v4.10.0) CodeBlocks now functioning properly", which obviously is Kamal-Sadek's. So, first of all, it is placed right in this timeline.
Secondly, and it is mostly subjective: i don't see it as a flaw. It's beautiful! I feel as Archaeologist (my wish for profession). I was amused, that all this intricate history of changes is here at my fingertips, preserved, contained, and cloned to 23 different forks (according to github), and to three different PCs and a phone (and that's just for me). As nowadays scientists often find themselves in position, where they have only final stage (take example of any virus, which they "catch"), and they can only make assumptions how it was changing and growing all these years based on timeflow and environment. But here, i can clearly see it myself. Like a timetravel! Heck, i even watched 12 Monkeys yesterday. I only once before witnessed something comparatively monumental that i could sense story of changes through more than 10 years. It was git log of git itself (https://github.com/git/git). Yeah, it's there too...
You'll get no complaints from me. I'm used to being the craziest, creepiest, most emotional person in a conversation, just hesitant to express it. And the passion I see here makes my heart race.Quote from: Linus TorvaldsOnly wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it ;)
PS: Sorry if i got emotional. I just like what happens here, and get attached.
You'll get no complaints from me.Nice!
Also, i failed miserably in my first attempt to untangle includes.h.Took me a couple tries. It takes some doing.
It seems some of classes definitions that are in it, use some consts and enums from itself.I've heard that, but I don't know how to use enums without also having them defined in the file that uses them. That's why I've been defining enums in header files and keeping the ones already there.
Well. As my C intuition says nothing should be defined in H file. Only declarations.
As my C intuition says nothing should be defined in H file. Only declarations.Enlightenment awaits your untrained intuition.
I managed to compile under Windows with the latest version of Code::Blocks (without the bundled MinGW), plus the latest TDM-GCC (http://tdm-gcc.tdragon.net/download, first bundle installer) and changing the project build setting where it says -lncurses for -lpdcurses (the only actual change to the files I got from Git). Which apparently works with or without the c++11 flag, as it is enabled in the debug but disabled in the release profile, and both compiled fine.Shouldn't the Code::Blocks workspace file be updated? I still had to change -lncurses to -lpdcurses with the most recent from https://github.com/Kamal-Sadek/Liberal-Crime-Squad
Trying to use MINGW or Visual Studio Express 2010, or the bundled-MinGW version of Code::Blocks just ended with failure and disappointment.
It's under linker settings tab (don't select Debug or Release but the parent node "Liberal Crime Squad").Code Blocks claims the 64-bit TDM install is "invalid", so I guess it doesn't.
Also the TDM setup should work fine if you uncheck "check for updated files".
No idea if it will compile in 64 bit, let us know if it works.