Skip to content

Commit 3ef6b24

Browse files
committed
nice. �
1 parent 3429736 commit 3ef6b24

6 files changed

Lines changed: 92 additions & 12 deletions

File tree

src/components/system.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public dpp_processsystem(funcgroup[][],args[][],args_const[][])
3131
//ver
3232
if(!strcmp(funcgroup[1], "ver"))
3333
{
34-
printf("\tPawnScript %i.%i.%i-R%i\tBrace Inc.", DPP_VERSION_MAJOR,DPP_VERSION_MINOR,DPP_VERSION_PATCH,DPP_VERSION_RELEASE);
35-
printf("\tPawn %d.%02d.%02d\tITB CompuPhase", __Pawn >>> 8, __Pawn & 0xFF, __PawnBuild/*__pawn_build*/); // from YSI
34+
dpp_genvers__();
35+
dpp_verinfo__();
3636
dpp_internal<return>(1);
3737
}
3838
// If the function used it "print"

src/core/index.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@ stock dpp_printmem__()
132132

133133
stock dpp_compile(const script[])
134134
{
135+
dpp_genvers__();
135136
print(" ");
136137
new content[16000];
137-
printf("\tPawnScript %i.%i.%i-R%i\tBrace Inc.", DPP_VERSION_MAJOR,DPP_VERSION_MINOR,DPP_VERSION_PATCH,DPP_VERSION_RELEASE);
138-
printf("\tPawn %d.%02d.%02d\tITB CompuPhase", __Pawn >>> 8, __Pawn & 0xFF, __PawnBuild/*__pawn_build*/); // from YSI
138+
dpp_verinfo__();
139139
//dpp_print("Interpreter version %i.%i.%i-R%i - by: DEntisT",DPP_VERSION_MAJOR,DPP_VERSION_MINOR,DPP_VERSION_PATCH,DPP_VERSION_RELEASE);
140140
dpp_nullcomment();
141141
dpp_printmem__();

src/core/ver.inc

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
/*
2+
3+
Version: MPL 1.1
4+
5+
The contents of this file are subject to the Mozilla Public License Version
6+
1.1 the "License"; you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
http://www.mozilla.org/MPL/
9+
10+
Software distributed under the License is distributed on an "AS IS" basis,
11+
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12+
for the specific language governing rights and limitations under the
13+
License.
14+
15+
Portions created by the Initial Developer are Copyright (c) 2022
16+
the Initial Developer. All Rights Reserved.
17+
18+
*/
19+
20+
#if defined RELEASE_FILTERSCRIPT
21+
#define DPP_VERSION_TYPE "FS"
22+
#else
23+
#define DPP_VERSION_TYPE "MS"
24+
#endif
25+
#define DPP_VERSION_MAJOR 1
26+
#define DPP_VERSION_MINOR 2
27+
#define DPP_VERSION_PATCH 0
28+
//dpp_genver__()
29+
#define DPP_VERSION_RELEASE "u"
30+
//dpp_genver__()*2
31+
#define DPP_VERSION_GS 1
32+
33+
new dpp_vers_string__[100];
34+
35+
dpp_genvers__()
36+
{
37+
//DPP_VERSION_TYPE,DPP_VERSION_MAJOR,DPP_VERSION_MINOR,DPP_VERSION_PATCH,DPP_VERSION_RELEASE,DPP_VERSION_GS
38+
39+
format(dpp_vers_string__, sizeof dpp_vers_string__, "%s %i%i%i%s-Gs%i",
40+
DPP_VERSION_TYPE,
41+
DPP_VERSION_MAJOR,
42+
DPP_VERSION_MINOR,
43+
DPP_VERSION_PATCH,
44+
DPP_VERSION_RELEASE,
45+
DPP_VERSION_GS);
46+
47+
return 1;
48+
}
49+
50+
void:dpp_verinfo__()
51+
{
52+
printf("\tPawnScript %s\tBrace Inc.", dpp_vers_string__);
53+
printf("\tPawn %d.%02d.%02d\t\tITB CompuPhase", __Pawn >>> 8, __Pawn & 0xFF, __PawnBuild/*__pawn_build*/); // from YSI
54+
}
55+
56+
/*
57+
DEntisT versioning system
58+
=========================
59+
60+
Firstly, we must know if the code is a filterscript or mainscript,
61+
that's what the FS or MS prefixes do.
62+
63+
Now, we need a product version which consists of 3 digits, and that's
64+
x - Major vers number
65+
y - Minor vers number
66+
z - Patch number
67+
68+
Afterwards, we get a suffix:
69+
t - testing phase
70+
s - stable
71+
u - unstable
72+
73+
And lastly, we have a release of the graphics system.
74+
-GsX
75+
where X is a number starting from 1.
76+
77+
Example:
78+
79+
PawnScript MS 245u-Gs3
80+
81+
PawnScript interpreter made for gamemode, major release 2 , minor release 4,
82+
patch number 5. This is an unstable version. Graphics system is at release 3.
83+
84+
*/

src/pawnscript.pwn

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ the Initial Developer. All Rights Reserved.
3333
//-----------------------------------------------------------
3434
// REQUIRED.
3535
#include <open.mp>
36+
#include "core/ver.inc"
3637
#if !defined fcreatedir
3738
native fcreatedir(const filename[]);
3839
#endif
@@ -65,6 +66,7 @@ native fcreatedir(const filename[]);
6566
#include "core/index.inc"
6667
#include "core/sys_utils.inc"
6768
#include "core/component_impl.inc"
69+
6870
#include "ps_asm.pwn"
6971
#include "ps_sdk.pwn"
7072
#include "ps_graphics.pwn"

src/ps_graphics.pwn

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,8 @@ public dpp_graphics__init() //Internal
5353

5454
public dpp_graphics__show()
5555
{
56-
printf("\tPawnScript: Graphics Mode\t\t\tVersion: [%i.%i.%i]",
57-
dpp_graphics_major,
58-
dpp_graphics_minor,
59-
dpp_graphics_patch);
56+
printf("\tPawnScript: Graphics Mode\t\t\tVersion: [Gs%i]",
57+
DPP_VERSION_GS);
6058
printf("\t[Rows: %i\t\tColumns: %i]",GRAPHICS_ROWS,GRAPHICS_COLUMNS);
6159

6260
for(new i; i < GRAPHICS_ROWS; i++)

src/ps_setup.pwn

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ new dpp_ignoreline=0,File:dpp_indexhandle;
3030
//-----------------------------------------------------------
3131
#define dpp_invalidclass 100
3232
//-----------------------------------------------------------
33-
#define DPP_VERSION_MAJOR 1
34-
#define DPP_VERSION_MINOR 1
35-
#define DPP_VERSION_PATCH dpp_genver__()
36-
#define DPP_VERSION_RELEASE dpp_genver__()*2
3733
#define DPP_CELLMAX 8
3834

3935
#define DPP_VERSION_BETA 1

0 commit comments

Comments
 (0)