Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Eeyoocah5Moh

Pages: [1] 2
1
Suggestions / Re: Using const strings instead of #define
« on: January 26, 2011, 03:58:05 am »
> The hardcoded DATA_FOLDER is just a temporary thing anyways, I might move it to an Options file once that's implemented.

IMHO it is better to just use current working directory and write less code. On Windows you can set working directory in shortcut properties. On Unix you can write wrapper script or use shortcuts if you are using some DE. Keep it simple.

2
Offtopic / Re: Daiky's x-com project
« on: August 15, 2010, 08:17:51 pm »
I wish OpenXcom will have the same UI as original but with shortcuts for each action so mouse will be used only on map, but not on the panel.

3
Programming / Re: Window popup animation
« on: August 02, 2010, 01:53:07 am »
If this is annoying to you though, I will look into adding an option in the future to disable it.

Adding option for each thing is not good at all. Maybe just make the popup a little faster? Current speed is the same as Windows version? If not, then maybe just tweak it a little?

4
Programming / Re: Window popup animation
« on: August 02, 2010, 01:48:43 am »
Image attached. Ufopaedia window popup both horizontally and vertically. Slow down game in dosbox and you will see it.

5
Programming / Re: Compiling OpenXCOM on Mac OS X
« on: July 22, 2010, 06:45:04 am »
r108 - no change :'( The game hangs while loading, and the debugger says: "Error from Debugger: mi_cmd_stack_list_frames: Not enough frames in stack.

Try adding some fprintf(stderr, "hello!\n") in different places. Place one in main and move it forward until it don't print anything (the game crashes before fprintf). Then place it inside function where you think game crashes and so on. This is sometimes more useful than debugger, at least you would know where game crashes.

6
Programming / Re: Compiling OpenXCOM on Mac OS X
« on: July 22, 2010, 06:37:06 am »
Oddly enough, I can't seem to start the game on my Ubuntu system anymore. It compiles fine, but just won't do anything when I run the executable. Hope it's just something with my system and not some bizarro bug.

Check different revisions. Some revision should work.

It even don't write anything to stderr and stdout before crash?

7
Programming / Re: Compiling OpenXCOM on Mac OS X
« on: July 20, 2010, 06:20:45 am »
Here is a patch for SoundSet.cpp. On my x86_64 GNU/Linux system game crashed on line 86 of SoundSet.cpp:
Code: [Select]
name = new char[namesize];

There were no error message, it just crashed with the following message, backtrace and memory map:
Code: [Select]
*** glibc detected *** src/openxcom/trunk/openxcom: malloc(): memory corruption: 0x0000000001ce9ed0 ***
======= Backtrace: =========
...
======= Memory map: ========
...

Obviously, error were not on line 86, but malloc (called by new operator) crashed because of corrupted heap. So with inserting fprintf and malloc here and there to check if the program is still running (with fprintf(stderr, "hi!\n")) and if the heap is still ok (with malloc and new) i was able to find the error. Probably it should work on 32-bit systems but it corrupt memory by buffer overflow on 64-bit systems.

Patch is attached.

I post it here because I think it is related to last post in this thread. Hope SupSuper will read it.

8
Builds & Ports / Re: Makefile for Dingoo A320
« on: July 14, 2010, 11:34:32 pm »
I also took Eeyoocah5Moh's advice and just changed the initialization on all platforms, since OpenXcom only really uses VIDEO and AUDIO, and to keep the source clean of platform-specific-stuff.

So you didn't add #ifdef DINGOO anywhere. Then -DDINGOO in makefile is unnecessary.

9
Builds & Ports / Re: Makefile for Dingoo A320
« on: July 13, 2010, 05:12:25 pm »
Instead of replacing CXX and adding SDL-CONFIG in makefile, you can run make like this:
Code: [Select]
PATH=$PATH:/opt/mipsel-linux-uclibc/usr/bin/
CXX=mipsel-linux-g++
export CXX PATH
make

I also think
Code: [Select]
if (SDL_Init(SDL_INIT_EVERYTHING) < 0)
should be replaced in code with
Code: [Select]
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK | SDL_INIT_TIMER) < 0)
for all platforms so only neccessary things are initialized.

Instead of pathing initialization of `scale` variable you can just run game as
Code: [Select]
openxcom -scale 1


10
Programming / Re: [Solved] Textures
« on: July 10, 2010, 06:02:25 pm »
Why thread is marked as solved? Black dots are still here in last build.

11
In any case I have been considering using XML for OpenXcom's external data. It's easy to read, easy to write, easy to debug, and I don't wanna be worrying too much about file format and specifications and upgrades and junk like if I go with some binary format.

There are a few C++ XML libraries available, it's just a matter of trying them out.

JSON instead of XML please. It is much more suitable for storing data.

And for maps it is better to either use binary format (cause you wouldn't edit map with text editor anyway) or create some simple text format like in Wesnoth.

12
Open Feedback / Re: GitHub ?
« on: July 08, 2010, 07:33:18 pm »
I can see the appeal but I really like TortoiseSVN and Git doesn't seem to have a Windows equivalent

TortoiseGit?

The real difference between centralized and distributed systems is that commiting changes and uploading them are separated. So you can commit even if you have not connection and upload then. In this case you commit in your local repository. Then you push your changes to remote repository on sourceforge.

In git (and mercurial, they are both distributed) it is easier to fork and merge. After someone clone remote repository, he can commit in his local repository and track his changes. And it is still possible to merge changes from remote repository. That way someone can maintain his patchset and use new code from main repository at the same time.

13
Open Feedback / Re: GitHub ?
« on: July 08, 2010, 04:05:31 pm »
Really, git is much better than svn. And it is not hard to convert svn repository to git repository.

14
Programming / small fix
« on: July 08, 2010, 04:02:18 pm »
Last update didn't compile without this. I think there should not be "Game::", gcc don't accept it.
Code: [Select]
Index: Game.h
===================================================================
--- Game.h (revision 95)
+++ Game.h (working copy)
@@ -63,7 +63,7 @@
  https:/// Gets the game's display screen.
  Screen *getScreen();
  https:/// Gets the game's states.
- list<State*> *Game::getStates();
+ list<State*> *getStates();
  https:/// Sets the game's 8bpp palette.
  void setPalette(SDL_Color *colors, int firstcolor = 0, int ncolors = 256);
  https:/// Resets the state stack to a new state.
@@ -86,4 +86,4 @@
  void setRuleset(Ruleset *rules);
 };
 
-#endif
\ No newline at end of file
+#endif

15
Programming / Compiling on Cygwin
« on: June 30, 2010, 05:00:04 am »
The Makefile somehow doesn't expand backticks for me using borland make 5.2 in cygwin.

Why you are using borland make? You should use GNU make. AFAIK there is GNU make included in cygwin, you should just install it.

Pages: [1] 2