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.
31
Proposals / Returning multiple variables
« on: January 05, 2013, 10:27:38 am »
Hi! I know this was mentioned before and Josh even made up a way on how it would work, but I would just stress how much this is needed. In GM the biggest problem I ever had is that I cannot return more than one variable in scripts. This makes me use either globals (which is just ugly) or several scripts (which is just slow, because things like find_line_intersect_x and find_line_intersect_y calculate the same thing, but I have to do it twice to return both x and y). So please please please please, hook up the parser and do this as the first great thing that will ever happen.
[x,y] = find_line_intersect(...);
[x,y] = find_line_intersect(...);
32
Function Peer Review / Windows callback
« on: January 04, 2013, 01:04:35 pm »
I forgot how to GIT, so I want someone to get this in their next commit. In WINDOWScallback.cpp delete:
Code: [Select]
keyboard_lastchar = string(1,wParam);
from WM_SYSKEYDOWN and WM_KEYDOWN. Instead add this:Code: [Select]
case WM_CHAR:
keyboard_lastchar = string(1,wParam);
return 0;
Do the same for Linux if you know how. This is correct behavior and can be used for text input and stuff.
33
Issues Help Desk / random seed broke
« on: January 02, 2013, 08:05:39 am »
The random_seed is only used in random function once. Then the next seed is generated without using the seed. This means that the random_set_seed works only once. The correct behavior would be that I set my chosen seed and all random functions play out. Then I set the same seed again and all the same random functions play out. Now only the first one will be correct.
edit: Got it. The correct behavior is if you set mtrandom_seed. Why exactly do we have two seeds for one random function?
edit: Got it. The correct behavior is if you set mtrandom_seed. Why exactly do we have two seeds for one random function?
34
Issues Help Desk / Compiling without Java or at least trough commandline
« on: November 27, 2012, 02:35:27 am »
Hi! Wanted to know if its possible to compile a .gmk (or any other project file) trough cmd on linux? And is it possible without installing Java sdk? I want to compile a project for RaspberryPi and it is a lot faster in hard-float ABI, but Oracle JVM works only in soft-float. Any suggestions? And does ENIGMA has some specific dependencies to launch a project? Of course without OpenAL and the like. I don't think I would be able to compile the project on another linux PC and then just copy the executable. And is there specific GCC flags for ARM? Though I should be able to just search how to compile C++ on RPI, so this part of the question is optional.
35
Function Peer Review / working_directory, temp_directory and program_directory
« on: October 31, 2012, 09:18:37 am »
Hello! Some time ago one good man added working_directory+ to every file io function. This is correct way to do this if working_directory is not the same as the exe directory. This is only true when debugging (which is all we can do in ENIGMA because the lack of the fuc*ing COMPILE BUTTON) as you want the source (gmk, gm6, egm etc.) directory for the program to feel like the exe directory (not the /temp in which it actually is in). The problem is that as the only way to get exe is to copy it out of the temp directory. That means the gmk's position is hard coded in directory and so breaks the shit out of everything. I tried using parameter_string(0), but that isn't implemented (which it should). Here is a topic showing how it could be done:
http://forums.devshed.com/c-programming-42/winmain-and-argv-argc-474770.html
I wasn't able to do that because I didn't try bothering how to convert unicode string to regular char. Then I noticed temp_directory and program_directory are not set either. The default behavior for POSIX file functions is to have them relative to the file anyway, so deleting the addition of "working_directory+" returns the correct behavior. So basically what these variables should return:
"Debug or Run"
working_directory = directory of gmk (works correctly now) or exe if launched separately from LGM
program_directory = directory of exe no mater where launched from or in what mode. Should be the same as parameter_string(0)
temp_directory = temporary directory. Should be the same as exe directory.
"Clean build (Compile button)"
working_directory = directory of exe
program_directory = directory of exe no mater where launched from or in what mode. Should be the same as parameter_string(0)
temp_directory = temporary directory
So either FINALLY make the "Compile" button work that automatically sets working_directory to exe directory on runtime. Or make the "Debug" and "Run" buttons pass an argument to the exe which would basically tell the exe that it is run from LGM and then set working_directory to the gmk directory.
Anyone willing to do anything?
http://forums.devshed.com/c-programming-42/winmain-and-argv-argc-474770.html
I wasn't able to do that because I didn't try bothering how to convert unicode string to regular char. Then I noticed temp_directory and program_directory are not set either. The default behavior for POSIX file functions is to have them relative to the file anyway, so deleting the addition of "working_directory+" returns the correct behavior. So basically what these variables should return:
"Debug or Run"
working_directory = directory of gmk (works correctly now) or exe if launched separately from LGM
program_directory = directory of exe no mater where launched from or in what mode. Should be the same as parameter_string(0)
temp_directory = temporary directory. Should be the same as exe directory.
"Clean build (Compile button)"
working_directory = directory of exe
program_directory = directory of exe no mater where launched from or in what mode. Should be the same as parameter_string(0)
temp_directory = temporary directory
So either FINALLY make the "Compile" button work that automatically sets working_directory to exe directory on runtime. Or make the "Debug" and "Run" buttons pass an argument to the exe which would basically tell the exe that it is run from LGM and then set working_directory to the gmk directory.
Anyone willing to do anything?
36
Issues Help Desk / 3d models not working
« on: July 31, 2012, 10:22:46 am »
poly, I think you made 3d model functions. Are they actually working? Is 3d working at all? Because I get some very weird problems with it. For example, this works fine in GM, but not in ENIGMA. I know culling doesn't work, but even if I remove it is still buggy. You should be able to see 4 shapes and move around with arrow keys. I see part of these shapes and when I move around they distort. What could be the problem? I want to render a point cloud, but if I can't get basic shapes going I don't see how I could do that.
37
Issues Help Desk / Simple Transformations
« on: June 28, 2012, 08:49:17 am »
Hi. Not really connected to ENIGMA, but still thought I might ask here. In one of my projects I need to transform from a convex quadrilateral to a rectangle. I though of just using bilinear interpolation, but got stuck at some basic ideas - mainly that the points for the convex quadrilateral with the point P has the origin still at the top left and so x0,y0 isn't 0,0 as it is in rectangle case. Here is a picture:
(note x0,y0, x1,y1... and so on are of course different for both the quadrilateral and the rectangle, I just named them the same)
As the transformation would be linear then the math isn't that hard, but I am tired now and if someone can figure it out in the next few hours while I am away, then that person gets a cookie (a virtual one).
(note x0,y0, x1,y1... and so on are of course different for both the quadrilateral and the rectangle, I just named them the same)
As the transformation would be linear then the math isn't that hard, but I am tired now and if someone can figure it out in the next few hours while I am away, then that person gets a cookie (a virtual one).
38
Issues Help Desk / Help setting up Windows Git Install
« on: February 25, 2012, 05:50:49 pm »
Ok so I installed Git and Tortoise and everything, but only now I see what Ism meant about Rusky deleting stuff and vanishing. A LOT of windows stuff is missing (like the .exe from stupidity-buffer). ENIGMAsystem\additional is missing (which breaks things). Now when I run it I get:
edit: Also, my nick on Git is TheExDeus so add me so I can f*** up the repo. I want to commit some surface functions and we will see how that ends up.
Quote
Exception in thread "main" java.lang.ExceptionInInitializerErrorThats probably because I am using old LGM, but I can't download a new one from https://github.com/IsmAvatar/LateralGM as it doesn't have a compiled .jar as far as I can see. When I get that sorted I will look into other problems windows has (like not having anything windows related in \Compilers, but that should generate).
at org.enigma.backend.EnigmaSettings.<init>(EnigmaSettings.java:64)
at org.enigma.backend.EnigmaSettings.<init>(EnigmaSettings.java:55)
at org.enigma.EnigmaRunner.addResourceHook(EnigmaRunner.java:300)
at org.enigma.EnigmaRunner.<init>(EnigmaRunner.java:127)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.lateralgm.main.LGM.loadPlugins(LGM.java:302)
at org.lateralgm.main.LGM.main(LGM.java:489)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at org.enigma.TargetHandler.isResolvable(TargetHandler.java:179)
at org.enigma.TargetHandler.dependencyResolution(TargetHandler.java:126)
at org.enigma.TargetHandler.load(TargetHandler.java:61)
at org.enigma.TargetHandler.<clinit>(TargetHandler.java:51)
... 12 more
edit: Also, my nick on Git is TheExDeus so add me so I can f*** up the repo. I want to commit some surface functions and we will see how that ends up.
39
General ENIGMA / ENIGMA IS A MAZE
« on: February 21, 2012, 03:17:10 pm »
Maybe Josh can make a graph detailing how and what is called from the "Run" button to the first frame of the launched program. Right now I can't figure out what is called in what order and where it is called from. I am looking into Android now and in the new versions of NDK it can compile so called Native programs (that is C++ without any Java or even wrappers for Java code). So I can code everything in pure C++ and run it. I wanted to create the basic framework in ENIGMA so I could launch it, but I don't know where to start. The Platforms folder has functions that I know are called in the beginning (like win32 window create function) but I don't know where it is called from. I looked in the SHELLmain, but it didn't get any clearer. I can't actually find "main()". I also see that there is a lot of useless code (which I thought was removed last October when Josh did "the clean up"). One example of that is COLLIGMA which pops up here and there. I also think folders like Universal_System should be better structured (like Load and resource inits in one folder, general purpose functions in another and so on).
Basically, I really love ENIGMA and I want to use it everywhere, but there is a lot of obstacles in the way of that. Slow progress is one thing.. for example, the "Clean released" option with .ico support is still not there. MinGW didn't fix that bug you were having? And weren't there a workaround? Its just that the parser you are always working on actually does its job. There are bugs here and there, but mostly I can work around them. I think its much more important to make everything usable and structured and only then update/optimize/rewrite something.
Basically, I really love ENIGMA and I want to use it everywhere, but there is a lot of obstacles in the way of that. Slow progress is one thing.. for example, the "Clean released" option with .ico support is still not there. MinGW didn't fix that bug you were having? And weren't there a workaround? Its just that the parser you are always working on actually does its job. There are bugs here and there, but mostly I can work around them. I think its much more important to make everything usable and structured and only then update/optimize/rewrite something.
40
Issues Help Desk / Global arrays inside with(){}
« on: January 13, 2012, 04:14:43 pm »
Global arrays inside with(){} dun work.
Code:
So basically... is the new parser done yet?
Also, if you have this anywhere:
Code:
Code: [Select]
//create of obj_0
global var myarray;
myarray[0]="string";
//draw of obj_1
//this works
draw_text(10,10,string(myarray[0]));
//this doesn't
with (obj_0){
draw_text(10,10,string(myarray[0]));
}
It says:Quote
Preprocessor_Environment_Editable/IDE_EDIT_objectaccess.h:48:46: error: 'struct enigma::OBJ_obj_0' has no member named 'myarray'I doesn't work if I put other. in front of it (if I call with (obj_1){}), or if I do global var myarray[1][1]; or something like that.
Preprocessor_Environment_Editable/IDE_EDIT_objectaccess.h:49:46: error: 'struct enigma::OBJ_obj_1' has no member named 'myarray'
So basically... is the new parser done yet?
Also, if you have this anywhere:
Code: [Select]
global var time;
Then it insta-crashes on load.
41
Issues Help Desk / Error: multiple definition of
« on: December 26, 2011, 06:30:08 pm »
I ALWAYS get errors like this with ENIGMA when I am making something. And I am never able to fix these. Google search revelaed that is means what it says it means - I have multiple definitions of some structure or the like. This problem arrises when I include the first.h file (where structs are declared) into another second.h file and then include that second.h inside a project where I inclued the first.h then I will have two declarations of the same thing. The twist though, is that I DON'T. I think ENIGMA does include it somewhere, but I don't. The file structure:
include.h
main_code.cpp
I have #include "include.h" inside main_code.cpp. That is it. I don't include that "include.h" anywhere else. This is an extension though, so I have this in the Makefile:
So for the love of anything - WHY the hell it trows this error? I had this problem when I added surfaces as well. That is why it took me more than a year to add that god damn FBO support.
edit: It shows:
.eobjs/Windows/Windows/Run/SHELLmain.o:SHELLmain.cpp:(.text+0x6): first defined here
So ENIGMA includes the include.h inside the SHELLmain.cpp even when I don't ask it to? It would be fine if it did that and I could leave out #include "include.h" in the .cpp, but then it errors that I don't have struct's defined. So I either don't have them defined, or I have defined them twice. I don't really have a choice there.
edit2: I also tried "include guard" technique. So I had:
#ifndef MYFILE_H
#define MYFILE_H
//contents of include.h
#endif
And it still had the same error. This doesn't even make sense, because I can't have included it twice in this case.
include.h
main_code.cpp
I have #include "include.h" inside main_code.cpp. That is it. I don't include that "include.h" anywhere else. This is an extension though, so I have this in the Makefile:
Quote
SOURCES += $(wildcard Universal_System/Extensions/SomeExtension/main_code.cpp)This is it.
ifeq ($(PLATFORM), Win32)
LDLIBS += $(wildcard Universal_System/Extensions/SomeExtension/libs/*.a)
endif
So for the love of anything - WHY the hell it trows this error? I had this problem when I added surfaces as well. That is why it took me more than a year to add that god damn FBO support.
edit: It shows:
.eobjs/Windows/Windows/Run/SHELLmain.o:SHELLmain.cpp:(.text+0x6): first defined here
So ENIGMA includes the include.h inside the SHELLmain.cpp even when I don't ask it to? It would be fine if it did that and I could leave out #include "include.h" in the .cpp, but then it errors that I don't have struct's defined. So I either don't have them defined, or I have defined them twice. I don't really have a choice there.
edit2: I also tried "include guard" technique. So I had:
#ifndef MYFILE_H
#define MYFILE_H
//contents of include.h
#endif
And it still had the same error. This doesn't even make sense, because I can't have included it twice in this case.
42
Function Peer Review / sprite_create_from_surface
« on: December 16, 2011, 06:48:55 pm »
Hi. I went back to finish some of the surface functions I was working on, and I still can't figure this one out. I have this code:
So, ideas?
Also, I guess I could put this here as well:
I have made surface_save and surface_save_part functions. The problem is that the output bmp is vertically flipped. I used basically the same function that is used to save the screen and it works right there. This functions is like so:
Also, I would want to know how png's could be saved. ENIGMA already uses zlib for that I think, so maybe we could add two functions like:
save_texture_bmp and save_texture_png. Then saving surfaces, backgrounds and sprites would be identical and would only require a small wrapping function.
Code: [Select]
int sprite_create_from_surface(int id,int x,int y,int w,int h,bool removeback,bool smooth,int xorig,int yorig)
{
enigma::surface* surf=enigma::surface_array[id];
int sprid=enigma::sprite_idmax, full_width=nlpo2dc(w)+1, full_height=nlpo2dc(h)+1;
enigma::sprite_new_empty(sprid, 1, w, h, xorig, yorig, 0, h, 0, w, 1,0);
unsigned sz=full_width*full_height;
unsigned char *surfbuf=new unsigned char[sz*4];
int prevFbo;
glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &prevFbo);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, surf->fbo);
glReadPixels(x,y,w,h,GL_RGBA,GL_UNSIGNED_BYTE,surfbuf);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, prevFbo);
enigma::sprite_set_subimage(sprid, 0, xorig, yorig, w, h, surfbuf);
delete[] surfbuf;
return sprid;
}
Pretty simple, and it works. The problem is that it breaks after certain amount of usage. For me this breaks when I execute it 4 times. Then artifacts appear on the surface (when something is drawn on it). After fifth time the artifacts become more massive (like solid rectangles) and after that the surface just becomes totally solid color. The game doesn't break though (no freezing) so I don't think I overwrite anything important, but I do overwrite something.So, ideas?
Also, I guess I could put this here as well:
I have made surface_save and surface_save_part functions. The problem is that the output bmp is vertically flipped. I used basically the same function that is used to save the screen and it works right there. This functions is like so:
Code: [Select]
int surface_save(int id, string filename)
{
FILE *bmp=fopen(filename.c_str(),"wb");
if(!bmp) return -1;
enigma::surface* surf=enigma::surface_array[id];
unsigned int w=surf->width,h=surf->height,sz=w*h;
char *surfbuf=new char[sz*3];
int prevFbo;
glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &prevFbo);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, surf->fbo);
glReadPixels(0,0,w,h,GL_BGR,GL_UNSIGNED_BYTE,surfbuf);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, prevFbo);
fwrite("BM",2,1,bmp);
sz<<=2;
fwrite(&sz,4,1,bmp);
fwrite("\0\0\0\0\x36\0\0\0\x28\0\0",12,1,bmp);
fwrite(&w,4,1,bmp);
fwrite(&h,4,1,bmp);
fwrite("\1\0\x18\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",28,1,bmp);
if(w&3)
{
size_t pad=w&3;
w*=3;
sz-=sz>>2;
for(unsigned int i=0;i<sz;i+=w)
{
fwrite(surfbuf+i,w,1,bmp);
fwrite("\0\0",pad,1,bmp);
}
} else fwrite(surfbuf,w*3,h,bmp);
fclose(bmp);
delete[] surfbuf;
return 1;
}
Also, I would want to know how png's could be saved. ENIGMA already uses zlib for that I think, so maybe we could add two functions like:
save_texture_bmp and save_texture_png. Then saving surfaces, backgrounds and sprites would be identical and would only require a small wrapping function.
43
General ENIGMA / YYG Linux
« on: December 08, 2011, 06:23:21 pm »
http://yoyogames.com/news/65
Quote
So as a Friday teaser, here’s a sneak preview of what Scott has been working on: GameMaker running on a PC Linux (Fedora 15) under LXDE window manager.
44
General ENIGMA / FFI F'Up
« on: November 22, 2011, 10:26:54 am »
REV 948.
Quote
Building for mode (0)Also suggestion, as ffi is used only for external calls (dll's) then it could be an extension.
Cleaning up from previous executions
Location in memory of structure: 08A2D448
File version: -1
Incorrect version. File is too old for this compiler. Continuing anyway, because this number is always wrong.COPYING SOME F*CKING RESOURCES:
Copying sprite names
Copying sound names
Copying background names
Copying path names
Copying script names
Copying font names [1]
Copying timeline names [kidding, these are totally not implemented ]
Copying object names
Copying room names
SYNTAX CHECKING AND PRIMARY PARSING:
0 Scripts:
"Linking" scripts
`Linking' 0 scripts in 0 passes...
Completing script "Link"
Done.
0 Objects:
Creating room creation code scope and parsing
"Linking" scripts into the objects...
"Link" complete.
Tabulating maximum argument passes to each script
Finished
Writing modes and settings
Writing object switch
Writing resource names and maxima
Writing events
Checking for default code in ev[8, 0.
Checking for default code in ev[3, 0.
Linking globals
Running Secondary Parse Passes
Writing object data
Writing local accessors
Writing font data
Writing room data
Running make from `\MinGW\msys\1.0\bin\make.exe'
Full command line: \MinGW\msys\1.0\bin\make.exe Game GMODE=Run GRAPHICS=OpenGL AUDIO=OpenAL COLLISION=BBox WIDGETS=None PLATFORM=Win32 COMPILEPATH=Windows/Windows EXTENSIONS=" Universal_System/Extensions/Alarms Universal_System/Extensions/Timelines Universal_System/Extensions/Paths Universal_System/Extensions/MotionPlanning Universal_System/Extensions/DateTime Universal_System/Extensions/DataStructures"OUTPUTNAME="C:/Users/Daedalus/AppData/Local/Temp/egm5306193047205934733.tmp" eTCpath="/MinGW/bin:/bin:"
/usr/bin/make -C ENIGMAsystem/SHELL
make[1]: Entering directory `/c/Enigma_Trunk/ENIGMAsystem/SHELL'
g++ -Wall -s -O3 -IPlatforms/Win32/Info -IGraphics_Systems/OpenGL/Info -IAudio_Systems/OpenAL/Info -ICollision_Systems/BBox/Info -IWidget_Systems/None/Info -IUniversal_System/Info -MMD -MP -c -o .eobjs/Windows/Windows/Run/SHELLmain.o SHELLmain.cpp
echo "// GENERATED RESOURCE FILE FRONTEND" > .eobjs/Windows/Windows/Run/resources.rc
for res in ../additional/al/rc/oal32.rc; do echo "#include \"$res\"" >> .eobjs/Windows/Windows/Run/resources.rc; done
windres -o .eobjs/Windows/Windows/Run/resources.res -i .eobjs/Windows/Windows/Run/resources.rc -O coff
g++ -static-libstdc++ -static-libgcc -o C:/Users/Daedalus/AppData/Local/Temp/egm5306193047205934733.tmp .eobjs/Windows/Windows/Run/SHELLmain.o .eobjs/Windows/Windows/Run/libEGMstd.o .eobjs/Windows/Windows/Run/Platforms/Win32/WINDOWScallback.o .eobjs/Windows/Windows/Run/Platforms/Win32/WINDOWSfonts.o .eobjs/Windows/Windows/Run/Platforms/Win32/WINDOWSmain.o .eobjs/Windows/Windows/Run/Platforms/Win32/WINDOWSshow_error.o .eobjs/Windows/Windows/Run/Platforms/Win32/WINDOWSstd.o .eobjs/Windows/Windows/Run/Platforms/Win32/WINDOWSwindow.o .eobjs/Windows/Windows/Run/Platforms/Win32/externals.o .eobjs/Windows/Windows/Run/Platforms/Win32/file_manip.o .eobjs/Windows/Windows/Run/Graphics_Systems/OpenGL/GSbackground.o .eobjs/Windows/Windows/Run/Graphics_Systems/OpenGL/GSblend.o .eobjs/Windows/Windows/Run/Graphics_Systems/OpenGL/GScolors.o .eobjs/Windows/Windows/Run/Graphics_Systems/OpenGL/GScurves.o .eobjs/Windows/Windows/Run/Graphics_Systems/OpenGL/GSd3d.o .eobjs/Windows/Windows/Run/Graphics_Systems/OpenGL/GSenable.o .eobjs/Windows/Windows/Run/Graphics_Systems/OpenGL/GSfont.o .eobjs/Windows/Windows/Run/Graphics_Systems/OpenGL/GSmiscextra.o .eobjs/Windows/Windows/Run/Graphics_Systems/OpenGL/GSprmtvs.o .eobjs/Windows/Windows/Run/Graphics_Systems/OpenGL/GSscreen.o .eobjs/Windows/Windows/Run/Graphics_Systems/OpenGL/GSsprite.o .eobjs/Windows/Windows/Run/Graphics_Systems/OpenGL/GSstdraw.o .eobjs/Windows/Windows/Run/Graphics_Systems/OpenGL/GSsurface.o .eobjs/Windows/Windows/Run/Graphics_Systems/OpenGL/GStextures.o .eobjs/Windows/Windows/Run/Graphics_Systems/OpenGL/OPENGLStd.o .eobjs/Windows/Windows/Run/Graphics_Systems/OpenGL/glew.o .eobjs/Windows/Windows/Run/Audio_Systems/OpenAL/as_basic.o .eobjs/Windows/Windows/Run/Audio_Systems/OpenAL/wrap_oal.o .eobjs/Windows/Windows/Run/Audio_Systems/OpenAL/alure/alure.o .eobjs/Windows/Windows/Run/Audio_Systems/OpenAL/alure/buffer.o .eobjs/Windows/Windows/Run/Audio_Systems/OpenAL/alure/istream.o .eobjs/Windows/Windows/Run/Audio_Systems/OpenAL/alure/stream.o .eobjs/Windows/Windows/Run/Audio_Systems/OpenAL/alure/streamdec.o .eobjs/Windows/Windows/Run/Audio_Systems/OpenAL/alure/streamplay.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/core/atexit.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/core/duhlen.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/core/duhtag.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/core/dumbfile.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/core/loadduh.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/core/makeduh.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/core/rawsig.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/core/readduh.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/core/register.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/core/rendduh.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/core/rendsig.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/core/unload.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/helpers/clickrem.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/helpers/memfile.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/helpers/resample.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/helpers/sampbuf.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/helpers/silence.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/helpers/stdfile.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/itload.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/itload2.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/itmisc.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/itorder.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/itread.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/itread2.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/itrender.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/itunload.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/loadmod.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/loadmod2.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/loads3m.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/loads3m2.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/loadxm.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/loadxm2.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/readmod.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/readmod2.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/reads3m.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/reads3m2.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/readxm.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/readxm2.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/dumb/src/it/xmeffect.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/ogg/bitwise.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/ogg/framing.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/analysis.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/bitrate.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/block.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/codebook.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/envelope.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/floor0.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/floor1.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/info.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/lookup.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/lpc.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/lsp.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/mapping0.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/mdct.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/psy.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/registry.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/res0.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/sharedbook.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/smallft.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/synthesis.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/vorbisfile.o .eobjs/Windows/Windows/Run/Audio_Systems/Codecs/vorbis/lib/window.o .eobjs/Windows/Windows/Run/Collision_Systems/BBox/coll_funcs.o .eobjs/Windows/Windows/Run/Collision_Systems/BBox/coll_impl.o .eobjs/Windows/Windows/Run/Collision_Systems/BBox/coll_util.o .eobjs/Windows/Windows/Run/Collision_Systems/BBox/placeholderlinks.o .eobjs/Windows/Windows/Run/Widget_Systems/None/nowidget_impl.o .eobjs/Windows/Windows/Run/Universal_System/CallbackArrays.o .eobjs/Windows/Windows/Run/Universal_System/ENIGMA_GLOBALS.o .eobjs/Windows/Windows/Run/Universal_System/IMGloading.o .eobjs/Windows/Windows/Run/Universal_System/WITHconstruct.o .eobjs/Windows/Windows/Run/Universal_System/actions.o .eobjs/Windows/Windows/Run/Universal_System/backgroundinit.o .eobjs/Windows/Windows/Run/Universal_System/backgroundstruct.o .eobjs/Windows/Windows/Run/Universal_System/collisions_object.o .eobjs/Windows/Windows/Run/Universal_System/darray.o .eobjs/Windows/Windows/Run/Universal_System/depth_draw.o .eobjs/Windows/Windows/Run/Universal_System/dynamic_args.o .eobjs/Windows/Windows/Run/Universal_System/estring.o .eobjs/Windows/Windows/Run/Universal_System/event_system.o .eobjs/Windows/Windows/Run/Universal_System/events.o .eobjs/Windows/Windows/Run/Universal_System/fileio.o .eobjs/Windows/Windows/Run/Universal_System/fontinit.o .eobjs/Windows/Windows/Run/Universal_System/fontstruct.o .eobjs/Windows/Windows/Run/Universal_System/globalupdate.o .eobjs/Windows/Windows/Run/Universal_System/graphics_object.o .eobjs/Windows/Windows/Run/Universal_System/highscore_functions.o .eobjs/Windows/Windows/Run/Universal_System/instance.o .eobjs/Windows/Windows/Run/Universal_System/instance_system.o .eobjs/Windows/Windows/Run/Universal_System/loading.o .eobjs/Windows/Windows/Run/Universal_System/mathnc.o .eobjs/Windows/Windows/Run/Universal_System/motion_planning.o .eobjs/Windows/Windows/Run/Universal_System/motion_planning_struct.o .eobjs/Windows/Windows/Run/Universal_System/move_functions.o .eobjs/Windows/Windows/Run/Universal_System/mp_movement.o .eobjs/Windows/Windows/Run/Universal_System/multifunction_variant.o .eobjs/Windows/Windows/Run/Universal_System/object.o .eobjs/Windows/Windows/Run/Universal_System/path_functions.o .eobjs/Windows/Windows/Run/Universal_System/pathinit.o .eobjs/Windows/Windows/Run/Universal_System/pathstruct.o .eobjs/Windows/Windows/Run/Universal_System/planar_object.o .eobjs/Windows/Windows/Run/Universal_System/rectpack.o .eobjs/Windows/Windows/Run/Universal_System/reflexive_types.o .eobjs/Windows/Windows/Run/Universal_System/resource_data.o .eobjs/Windows/Windows/Run/Universal_System/roomsystem.o .eobjs/Windows/Windows/Run/Universal_System/simplecollisions.o .eobjs/Windows/Windows/Run/Universal_System/soundinit.o .eobjs/Windows/Windows/Run/Universal_System/spriteinit.o .eobjs/Windows/Windows/Run/Universal_System/spritestruct.o .eobjs/Windows/Windows/Run/Universal_System/terminal_io.o .eobjs/Windows/Windows/Run/Universal_System/transform_object.o .eobjs/Windows/Windows/Run/Universal_System/var4.o .eobjs/Windows/Windows/Run/Universal_System/var4_lua.o .eobjs/Windows/Windows/Run/Universal_System/zlib.o .eobjs/Windows/Windows/Run/Universal_System/Extensions/Alarms/alarmcode.o .eobjs/Windows/Windows/Run/Universal_System/Extensions/Timelines/timelines.o .eobjs/Windows/Windows/Run/Universal_System/Extensions/Paths/paths.o .eobjs/Windows/Windows/Run/Universal_System/Extensions/MotionPlanning/mp.o .eobjs/Windows/Windows/Run/Universal_System/Extensions/DateTime/date_time.o .eobjs/Windows/Windows/Run/Universal_System/Extensions/DataStructures/data_structures.o .eobjs/Windows/Windows/Run/resources.res Platforms/Win32/ffi/libFFI.a -lcomdlg32 -lgdi32 -lopengl32 -lglu32 ../additional/al/lib/Win32/OpenAL32.lib ../additional/zlib/libzlib.a
Platforms/Win32/ffi/libFFI.a(ffi.o): In function `ffi_call':
c:\Users\Josh\Desktop\libffi-3.0.10\i686-pc-mingw32/../src/x86/ffi.c:281: undefined reference to `__chkstk_ms'
Platforms/Win32/ffi/libFFI.a(ffi.o): In function `ffi_closure_SYSV_inner':
c:\Users\Josh\Desktop\libffi-3.0.10\i686-pc-mingw32/../src/x86/ffi.c:374: undefined reference to `__chkstk_ms'
Platforms/Win32/ffi/libFFI.a(ffi.o): In function `ffi_raw_call':
c:\Users\Josh\Desktop\libffi-3.0.10\i686-pc-mingw32/../src/x86/ffi.c:615: undefined reference to `__chkstk_ms'
collect2: ld returned 1 exit status
make[1]: *** [C:/Users/Daedalus/AppData/Local/Temp/egm5306193047205934733.tmp] Error 1
make[1]: Leaving directory `/c/Enigma_Trunk/ENIGMAsystem/SHELL'
make: *** [Game] Error 2
45
Issues Help Desk / Function pointers
« on: March 26, 2011, 05:34:22 pm »
So I am using script indexes which I later call to add easy modularity to my program. So to add an element I just write something like this:
Code: [Select]
scr_element_add(spr_r,draw_resistor,"R_{index}",get_resistor_bbox,"1 /Ohm",0,"resistor rezistors R","R",0);
scr_element_add(spr_vsrc,draw_vsrc,"U_{index}",get_capacitor_bbox,"1V",0,"vsrc sprieguma voltage avots","vsrc",0);
scr_element_add(spr_isrc,draw_isrc,"I_{index}",get_capacitor_bbox,"1A",0,"isrc strava current avots","isrc",0);
draw_vsrc, for example, is the script index. Previously I didn't know GM returned script indexes when you type its name without arguments and parenthesis and previously I just used some via ass way by looping trough all scripts and finding the correct one by name. Anyway, I have something like this in the draw event:Code: [Select]
script_execute(draw_script,x,y,element_rotation,0,color,color2);
So basically to add a new element I just create a new draw script and not a new object or something like that. So the question basically is if I can do this (or will be able to) in Enigma? In C++ I can get a function pointer and then using that to execute the script/function, but a function like script_execute is not needed. So in C++ I could write something like this:Code: [Select]
draw_script(x,y,element_rotation,0,color,color2);
Will this be the case in Enigma or will there actually be script_execute function? Right now typing a script name without parenthesis just shows an error (that the script is not declared in this scope).