aboutsummaryrefslogblamecommitdiff
path: root/src/core/fncwrapper.cpp
blob: 8f08baeee999b72c8dae33d94b986dcbb51d3f38 (plain) (tree)
1
2
3
4
5
6
7
8
9

                         



                                          
                                      
                                          
                                      
                                                 
                                             

                                           
#include "vmrunner.hpp"
#include "fncmodules.hpp"
extern unsigned getHash(const char *s);
void callFnc(const char* fnc)
{
	if(getHash(fnc)==getHash("randi"))
	vm->vmSetRetVald(randi().i());
	if(getHash(fnc)==getHash("randr"))
	vm->vmSetRetValf(randr().r());
	if(getHash(fnc)==getHash("createBullet"))
	vm->vmSetRetValf(createBullet().i());
	if(callStk.empty())callStk.clear();
}