Optimization (ft. common data pointers)
This commit is contained in:
parent
b9c85d7580
commit
dba085c30f
10 changed files with 21 additions and 16 deletions
|
@ -12,9 +12,6 @@
|
|||
|
||||
#include "script/KevinSystem/kevin_system/Lib_Const.dnh"
|
||||
|
||||
let ITEMID_PTR = LoadAreaCommonDataValuePointer("ScriptID", "ItemID", 0);
|
||||
let SYSTEMID_PTR = LoadAreaCommonDataValuePointer("ScriptID", "SystemID", 0);
|
||||
|
||||
// Code by Kevinmonitor with some assistance.
|
||||
/*
|
||||
|
||||
|
@ -839,8 +836,8 @@ task _EnemyItemDrop(
|
|||
|
||||
{
|
||||
|
||||
if (isFlying) {SetCommonData("Flying Defeated", GetCommonData("Flying Defeated", 0)+1);}
|
||||
else {SetCommonData("Ground Defeated", GetCommonData("Ground Defeated", 0)+1);}
|
||||
if (isFlying) {SetCommonDataPtr(FLYINGENM_PTR, GetCommonDataPtr(FLYINGENM_PTR, 0)+1);}
|
||||
else {SetCommonDataPtr(GROUNDENM_PTR, GetCommonDataPtr(GROUNDENM_PTR, 0)+1);}
|
||||
|
||||
//_ExplosionEffect(enmX, enmY, PetalEffect);
|
||||
//_ScorePopup(float enmX, float enmY, int pointNum, int pivNum);
|
||||
|
|
|
@ -22,6 +22,12 @@
|
|||
|
||||
// Convenience constants
|
||||
|
||||
let ITEMID_PTR = LoadAreaCommonDataValuePointer("ScriptID", "ItemID", 0);
|
||||
let SYSTEMID_PTR = LoadAreaCommonDataValuePointer("ScriptID", "SystemID", 0);
|
||||
|
||||
let FLYINGENM_PTR = LoadCommonDataValuePointer("Flying Defeated", 0);
|
||||
let GROUNDENM_PTR = LoadCommonDataValuePointer("Ground Defeated", 0);
|
||||
|
||||
const STG_WIDTH = GetStgFrameWidth();
|
||||
const STG_HEIGHT = GetStgFrameHeight();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue