Remove static ctor
This commit is contained in:
@@ -4,6 +4,6 @@ d:
|
|||||||
- dmd
|
- dmd
|
||||||
- gdc
|
- gdc
|
||||||
- ldc
|
- ldc
|
||||||
script: dub test --compiler=${DC} -- --DRT-oncycle=print -h
|
script: dub test --compiler=${DC} -- -h
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ import std.conv;
|
|||||||
import std.range;
|
import std.range;
|
||||||
class Lexical
|
class Lexical
|
||||||
{
|
{
|
||||||
static TokenType[] table;
|
TokenType[] table;
|
||||||
static TokenType[wstring] reserved;
|
TokenType[wstring] reserved;
|
||||||
wstring code;
|
wstring code;
|
||||||
int index;
|
int index;
|
||||||
int line;
|
int line;
|
||||||
static this()
|
void initReservedWordsTable()
|
||||||
{
|
{
|
||||||
table = new TokenType[256];
|
table = new TokenType[256];
|
||||||
for(int i = 0;i<256;i++)
|
for(int i = 0;i<256;i++)
|
||||||
@@ -86,6 +86,7 @@ class Lexical
|
|||||||
}
|
}
|
||||||
this(wstring input)
|
this(wstring input)
|
||||||
{
|
{
|
||||||
|
initReservedWordsTable();
|
||||||
this.code = input;
|
this.code = input;
|
||||||
line = 1;
|
line = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -347,6 +347,7 @@ class Sprite
|
|||||||
}
|
}
|
||||||
this(PetitComputer petitcom)
|
this(PetitComputer petitcom)
|
||||||
{
|
{
|
||||||
|
initSpriteAnimationTable();
|
||||||
sprites = new SpriteData[512];
|
sprites = new SpriteData[512];
|
||||||
zsortedSprites = new SpriteData*[512];
|
zsortedSprites = new SpriteData*[512];
|
||||||
for(int i = 0; i < sprites.length; i++)
|
for(int i = 0; i < sprites.length; i++)
|
||||||
@@ -875,8 +876,8 @@ class Sprite
|
|||||||
spanim(id, tgete | (relative ? SpriteAnimTarget.relative : cast(SpriteAnimTarget)0), data);
|
spanim(id, tgete | (relative ? SpriteAnimTarget.relative : cast(SpriteAnimTarget)0), data);
|
||||||
|
|
||||||
}
|
}
|
||||||
static SpriteAnimTarget[wstring] spriteAnimTarget;
|
SpriteAnimTarget[wstring] spriteAnimTarget;
|
||||||
static this()
|
void initSpriteAnimationTable()
|
||||||
{
|
{
|
||||||
spriteAnimTarget = [
|
spriteAnimTarget = [
|
||||||
"XY": SpriteAnimTarget.XY,
|
"XY": SpriteAnimTarget.XY,
|
||||||
|
|||||||
Reference in New Issue
Block a user