vanbrazerzkidai.blogg.se

Purebasic image memory allocation
Purebasic image memory allocation





purebasic image memory allocation
  1. PUREBASIC IMAGE MEMORY ALLOCATION 64 BIT
  2. PUREBASIC IMAGE MEMORY ALLOCATION FULL
  3. PUREBASIC IMAGE MEMORY ALLOCATION CODE

If we had 2 string and an integer we would stack them like so: MyFunction,0, SSI,MyFunction,0,0,0,0,0 This tells AppGameKit we want to send 1 string argument to the pkugin (S=String, I= Integer, F = Float) Ok so now lets send in some arguments, go back to the Commands.txt fileĬhange : MyFunction,0,0,MyFunction,0,0,0,0,0

purebasic image memory allocation

Now hit run, you should see a dialog box with a message "Hello from a PB plugin"Ĭongrats you have made your first Plugin. UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts

purebasic image memory allocation

SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices SetVirtualResolution( 1024, 768 ) // doesn't have to match the window SetWindowAllowResize( 1 ) // allow the user to resize the window

PUREBASIC IMAGE MEMORY ALLOCATION FULL

When AppGameKit loads the plugin it looks for a function 'ReceiveAGKPtr', this function is called by the runtime and sends the full set of function pointers to the plugin, we will setup this function but not use it yet, this function must exist for the plugin to work so we set this us with a C prototype If everything is good, we can add some code, if something went wrong, check each step and try again.

PUREBASIC IMAGE MEMORY ALLOCATION CODE

You can add both if you want to compile for both systems but set your preferred as default (I set classic) (checkbox at bottom of compile targets list) and set the other 'Studio' Enable in build all targets, now we can compile our plugin for both Classic and Studio at a single button click, handy stuffĬlick OK in the dialog, you are now greeted with an empty code page, first lets test our compile targets to make sure we got it right, go to the main menu, click Compiler>Build All Targets, a dialog will appear and tell you what's going on, when its done you should now have a new DLL in the plugin folder (you will need to launch PureBasic with admin rights to compile to the Program Files folder) Studio: C:\Program Files (x86)\The Game Creators\AppGameKit Studio\Plugins\myPlugin\Windows.dll Set the input file to the main.pb file that was created with the project and set the output executable to :Ĭlassic: C:\Program Files (x86)\The Game Creators\AGK2\Tier 1\Compiler\Plugins\myPlugin\Windows.dll Now we need to set the compile targets, in the 'Project Targets' list, right click 'Default Target' and click 'Edit Target', this opens the project compiler options. Use the project creation dialog to add a file, call it main.pb and click the 'Create Project' button, this will open the project overview tab.

PUREBASIC IMAGE MEMORY ALLOCATION 64 BIT

Now, Open PureBasic (x86 - 32 Bit, we will deal with 64 bit later) and create a project, again call it myPlugin and save it where ever you save your PB stuff, We will worry about what this content means in a bit, lets get something working first.







Purebasic image memory allocation