-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.pl
More file actions
44 lines (30 loc) · 1.07 KB
/
game.pl
File metadata and controls
44 lines (30 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/perl -w
# This is an example of a perl module that is run from inside BUILD.
#
# Written by Ryan C. Gordon. (icculus@clutteredmind.org)
#
# Please do NOT harrass Ken Silverman about any code modifications
# (including this file) to BUILD.
#
#
#// "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
#// Ken Silverman's official web site: "http://www.advsys.net/ken"
#// See the included license file "BUILDLIC.TXT" for license info.
#// This file IS NOT A PART OF Ken Silverman's original release
use strict;
# Global/package data works.
my $build_counter = 0;
# The sub BUILD_frame() is called once before each video frame is rendered.
# This means it may run from < 10 to > 500 times per second, and should
# run AS FAST AS POSSIBLE.
sub BUILD_frame {
$build_counter++;
if ($build_counter == 1024) {
$build_counter = 0;
print("INSIDE PERL ROUTINE: build counter hit 1024.\n");
}
}
# Stuff outside a function is mainline code. This is run once when game
# loads.
print("INSIDE PERL ROUTINE: this is the mainline.\n");
# end of game.pl ...