Menu

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.

Show posts Menu

Messages - JJS

#141
You can never be sure what a plugin does. Also the "write everywhere" could be achieved by writing the file to an accessible directory and then using the ags_shell plugin to copy it to the final location. Since that plugin can run any command it is already such a big security risk that the risk added with this plugin wouldn't matter imho.

E: If run with standard user permissions, the plugin should not be able to destroy the operating system. Destroying user data is possible of course.
#142
Ok, if you checked this then alright. I am probably wrong about it :)
#143
Game resources are already searched as actual files before accessing the packed files. Check clibfopen(). Data files first/Real files first can be toggled with the cfopenpriority variable.

Also: Yes, clib creates a list of packed files (MultiFileLibNew).


Edit: There might be a problem with returning anything but FILE* variables. I am not sure about it, but it might be that files are closed outside of the engine code (somewhere in Allegro or libraries). So I see a possible memory leak there. It is hard to keep track of this because there are multiple layers of abstraction. A big role plays the overridden pack_fopen Allegro function too. It is modified so that it can take advantage of clib.
#144
Both ORs are with boolean values, so the ORed values are only 0 or 1. So it doesn't matter if a bitwise or a boolean OR operator is used, it has the same result.

E: || should be used, the other option is confusing.
#145
Quote from: Crimson Wizard on Fri 20/07/2012 14:49:06Is it possible to fix other ports on "refactory" branch? So that we could mark the work there completed for now.
Is this a pressing issue? Because I cannot really devote the required time right now.

I suppose next on your to-do-list is creating base classes for strings/arrays/and so on?
#146
I actually don't see the point in AGS32BitOSDriver at all. It only adds two methods to AGSPlatformDriver that are not 32 bit specific. So those methods might as well be pulled into AGSPlatformDriver, then the platform classes can be derieved from that.
#147
You can only write to the documents and the appdata folder. The program files directory is indeed not writable by an application.
#148
Engine Development / Re: Ps Vita?
Sat 14/07/2012 07:48:10
The PS Mobile SDK only provides support for managed .NET code written in C#. As the engine needs to be able to run native code, unless someone wants to rewrite everything for C#, a port will not happen.

The Vita has a PSP emulator, yes. But the PSP port relies on being able to run unsigned code which is only possible with a custom firmware, HEN or binary loader. There is a binary loader (VHBL) for the Vita, but it only provides 24 MB of RAM which is not enough to run any complex game.

Overall: No chance until the Vita itself is hacked for running unsigned code (it's like jailbreaking an iOS device).
#149
Engine Development / Re: AGS engine iOS port
Sat 14/07/2012 07:41:53
AGS has a script function to check for the underlying platform. But at the moment it returns "Windows" on all mobile platforms because I noticed that games make assumptions based on the reported operating system that don't hold true (e.g. that plugins are not available).

Both Android and iOS ports have a way to invoke the standard system keyboard and to press the function keys and ESC. Adding more buttons is a bit difficult and in the end action scenes like in Gemini Rue will be difficult to play on them anyway. What would be possible is adding customizable buttons that are overlaid over the game and that can be bound to any key. If someone wants to implement that, be my guest.


Edit: Just for reference, this is how the iOS virtual keyboard looks like in AGS:

#150
Quote from: tzachs on Thu 12/07/2012 19:14:54Let me know if that's what you had in mind.
Nice! It works exactly as I had envisioned.

A couple more things:

When right-clicking a function/variable and selecting "Go to definition" I get this error message:

Code: text
Error: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
Version: AGS 3.2.2.112

System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei AGS.Editor.ScriptEditor.GoToDefinition(String structName, String memberName)
   bei AGS.Editor.ScriptEditor.ContextMenuChooseOption(Object sender, EventArgs e)
   bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   bei System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   bei System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   bei System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
   bei System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)



Also I must admit that I haven't worked with the Editor in a long time, but I found these things about the translation system a bit weird:
- When you don't rename the translation from "New translation" you don't get the prompt to initialize the translation file and it stays just empty. I found this pretty irritating as I didn't care what it was named and just wanted to quickly test it out.
- When double-clicking a translation file, there is a message box that tells you to open the file externally. I think it should either give the option to open the file directly with the standard text editor ("AGS cannot open this file directly. Do you want to display it in the standard text editor instead? YES/NO") or the file should be displayed as a text file in the AGS editor. This should be possible as there is already a text editor for the scripts.

Well, I should probably have created issues tracker entries about these as they are not really related to this version...
#151
I guess the downside of a static member as the callback is that it can itself only access static member variables. But since it is a singleton it doesn't matter really. Either the class instance must be resolved in the static function or in the C helper function - same difference.
The static method has the advantage of not needing that helper function though.
#152
Common/core/types.h:
Shouldn't we use the stdint.h names with _t suffix (int32_t instead of int32)? Actually I would say that including stdint.h where supported and only typedefing ourselves on Windows should be preferred.


Configuration file reading:
I think the reading should be split in two parts: one general and one for each platform. For example the sound device selection is platform-specific while the "use speech pack" option is platform independent.


You used a leading underscore for member variables (at least in CEngine). I would be in favour of marking member variables like that instead of not marking them.


void CAGSEngine::winclosehook()
I don't know if this a callback, but it looks like it. If so, it has to be declared static. Otherwise its signature doesn't match the exprected C function prototype. Just saying, I know the code is not at all final.
Fake edit: This is the same situation as with the sound thread entry points, they have to be static I think.


CLIB:
Every time a resource inside the game exe or another archive is opened, this is done through
Code: C
csetlib(archive_file_name, "");
FILE *f = clibfopen("filename.ext", "rb");
fread(); fscanf(); //... whatever
fclose(f);

I wonder if this can be converted to use the stream classes, but I am not sure it can in any case. This is because of the way clib interacts with the Allegro functions which expect a FILE pointer and being able to use stdio functions for access.

#153
I have a bug:

Create a folder in "Inventory items". Double-click on the empty folder. It will give you an error message:

Code: text

Error: Die Eingabezeichenfolge hat das falsche Format.
Version: AGS 3.2.2.112

System.FormatException: Die Eingabezeichenfolge hat das falsche Format.
   bei System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   bei System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   bei System.Convert.ToInt32(String value)
   bei AGS.Editor.Components.InventoryComponent.ItemCommandClick(String controlID)
   bei AGS.Editor.Components.BaseComponentWithFolders`2.CommandClick(String controlID)
   bei AGS.Editor.ProjectTree.ProcessClickOnNode(String nodeID, MouseButtons button)
   bei AGS.Editor.ProjectTree.projectTree_NodeMouseDoubleClick(Object sender, TreeNodeMouseClickEventArgs e)
   bei System.Windows.Forms.TreeView.OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e)
   bei System.Windows.Forms.TreeView.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)



Also a suggestion:

If you drag an item, I would expect the folder under the item to get highlighted if the item can be dropped there. Right now the first item that the mouse is dragged over gets highlighted and after that there is no feedback. It would be extra sweet if folders with subfolders would automatically expand when hovering over them while dragging so that the item can be dropped into a subfolder.
#155
^^ I agree on both accounts. The source contributers could also be listed in a separate file. They should certainly not be all in the file header, which should be designed so that it ideally doesn't have to be changed at all in the future. Basically just the project name, a generic copyright notice and the license should do.
#156
Unfortunately no. The reason is completely unclear.
#157
This is a known issue with the 64 bit branch. On some PCs it always crashes like this and it seems to be related to where the system decides to place the heap memory. I cannot at all reproduce this on my computer unfortunately. Interestingly the other PC that exhibits this problem is also running Debian (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=46152.msg622619#msg622619). Though I cannot reproduce it with Debian either.
#158
Site & Forum Reports / Re: Forum upgrade
Fri 06/07/2012 19:37:38
Oh, I did have another look and there are two code tags defined in Subs.php. One is for code (type=unparsed_content) and one for code= (type=unparsed_equals_content).

So the "code=" version has to be copied over to "code". I don't know if it will work though if it expects parameters.
#159
Site & Forum Reports / Re: Forum upgrade
Fri 06/07/2012 18:04:58
I did take a quick look and I think that inserting
Code: php
if (empty($lang))
  $lang = "ags";

before the line
Code: php
$geshi = new Geshi($data[0], $lang);

in subs.php should do the trick.
#160
I haven't done too much for the Linux port, most of it was already finished by the maintainer of the closed source version. The Debian packaging was also done by BigMc.
SMF spam blocked by CleanTalk