Skip to content

Commit

Permalink
nice. �
Browse files Browse the repository at this point in the history
  • Loading branch information
DEntis-T committed Jun 21, 2024
1 parent 3429736 commit 3ef6b24
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/components/system.inc
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public dpp_processsystem(funcgroup[][],args[][],args_const[][])
//ver
if(!strcmp(funcgroup[1], "ver"))
{
printf("\tPawnScript %i.%i.%i-R%i\tBrace Inc.", DPP_VERSION_MAJOR,DPP_VERSION_MINOR,DPP_VERSION_PATCH,DPP_VERSION_RELEASE);
printf("\tPawn %d.%02d.%02d\tITB CompuPhase", __Pawn >>> 8, __Pawn & 0xFF, __PawnBuild/*__pawn_build*/); // from YSI
dpp_genvers__();
dpp_verinfo__();
dpp_internal<return>(1);
}
// If the function used it "print"
Expand Down
4 changes: 2 additions & 2 deletions src/core/index.inc
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ stock dpp_printmem__()

stock dpp_compile(const script[])
{
dpp_genvers__();
print(" ");
new content[16000];
printf("\tPawnScript %i.%i.%i-R%i\tBrace Inc.", DPP_VERSION_MAJOR,DPP_VERSION_MINOR,DPP_VERSION_PATCH,DPP_VERSION_RELEASE);
printf("\tPawn %d.%02d.%02d\tITB CompuPhase", __Pawn >>> 8, __Pawn & 0xFF, __PawnBuild/*__pawn_build*/); // from YSI
dpp_verinfo__();
//dpp_print("Interpreter version %i.%i.%i-R%i - by: DEntisT",DPP_VERSION_MAJOR,DPP_VERSION_MINOR,DPP_VERSION_PATCH,DPP_VERSION_RELEASE);
dpp_nullcomment();
dpp_printmem__();
Expand Down
84 changes: 84 additions & 0 deletions src/core/ver.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 the "License"; you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
Portions created by the Initial Developer are Copyright (c) 2022
the Initial Developer. All Rights Reserved.
*/

#if defined RELEASE_FILTERSCRIPT
#define DPP_VERSION_TYPE "FS"
#else
#define DPP_VERSION_TYPE "MS"
#endif
#define DPP_VERSION_MAJOR 1
#define DPP_VERSION_MINOR 2
#define DPP_VERSION_PATCH 0
//dpp_genver__()
#define DPP_VERSION_RELEASE "u"
//dpp_genver__()*2
#define DPP_VERSION_GS 1

new dpp_vers_string__[100];

dpp_genvers__()
{
//DPP_VERSION_TYPE,DPP_VERSION_MAJOR,DPP_VERSION_MINOR,DPP_VERSION_PATCH,DPP_VERSION_RELEASE,DPP_VERSION_GS

format(dpp_vers_string__, sizeof dpp_vers_string__, "%s %i%i%i%s-Gs%i",
DPP_VERSION_TYPE,
DPP_VERSION_MAJOR,
DPP_VERSION_MINOR,
DPP_VERSION_PATCH,
DPP_VERSION_RELEASE,
DPP_VERSION_GS);

return 1;
}

void:dpp_verinfo__()
{
printf("\tPawnScript %s\tBrace Inc.", dpp_vers_string__);
printf("\tPawn %d.%02d.%02d\t\tITB CompuPhase", __Pawn >>> 8, __Pawn & 0xFF, __PawnBuild/*__pawn_build*/); // from YSI
}

/*
DEntisT versioning system
=========================
Firstly, we must know if the code is a filterscript or mainscript,
that's what the FS or MS prefixes do.
Now, we need a product version which consists of 3 digits, and that's
x - Major vers number
y - Minor vers number
z - Patch number
Afterwards, we get a suffix:
t - testing phase
s - stable
u - unstable
And lastly, we have a release of the graphics system.
-GsX
where X is a number starting from 1.
Example:
PawnScript MS 245u-Gs3
PawnScript interpreter made for gamemode, major release 2 , minor release 4,
patch number 5. This is an unstable version. Graphics system is at release 3.
*/
2 changes: 2 additions & 0 deletions src/pawnscript.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ the Initial Developer. All Rights Reserved.
//-----------------------------------------------------------
// REQUIRED.
#include <open.mp>
#include "core/ver.inc"
#if !defined fcreatedir
native fcreatedir(const filename[]);
#endif
Expand Down Expand Up @@ -65,6 +66,7 @@ native fcreatedir(const filename[]);
#include "core/index.inc"
#include "core/sys_utils.inc"
#include "core/component_impl.inc"

#include "ps_asm.pwn"
#include "ps_sdk.pwn"
#include "ps_graphics.pwn"
Expand Down
6 changes: 2 additions & 4 deletions src/ps_graphics.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ public dpp_graphics__init() //Internal

public dpp_graphics__show()
{
printf("\tPawnScript: Graphics Mode\t\t\tVersion: [%i.%i.%i]",
dpp_graphics_major,
dpp_graphics_minor,
dpp_graphics_patch);
printf("\tPawnScript: Graphics Mode\t\t\tVersion: [Gs%i]",
DPP_VERSION_GS);
printf("\t[Rows: %i\t\tColumns: %i]",GRAPHICS_ROWS,GRAPHICS_COLUMNS);

for(new i; i < GRAPHICS_ROWS; i++)
Expand Down
4 changes: 0 additions & 4 deletions src/ps_setup.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ new dpp_ignoreline=0,File:dpp_indexhandle;
//-----------------------------------------------------------
#define dpp_invalidclass 100
//-----------------------------------------------------------
#define DPP_VERSION_MAJOR 1
#define DPP_VERSION_MINOR 1
#define DPP_VERSION_PATCH dpp_genver__()
#define DPP_VERSION_RELEASE dpp_genver__()*2
#define DPP_CELLMAX 8

#define DPP_VERSION_BETA 1
Expand Down

0 comments on commit 3ef6b24

Please sign in to comment.