Re: PT writeField Function (adding field easy way with source code)
@ChUs
Thats what I call trolling... you released some part of code which is useless alone and you never gonna release full code.
I guess realmpt is something like rpt, dll you are talking about is probably for devs of that PT only.
You saying "realmpt dll do same like this" and getting thx for it... I don't care about this 10Q system and thanks like that are probably reason.
OK so what? realmpt ppl have it to DL somewhere?
We are open community and we share ideas on this board.
Its probably sharp stick in the eye for you because open community have it too...
I don't know why you take part of this discussion if your only reason to post (Posts: 3 till now) is "we have it and we do it better than you bi**h!!11".
@bobsobol
I like to debug C code on assembly level and thats something that need to be done when code share info with .exe.
06-02-11
SheenBR
Re: PT writeField Function (adding field easy way with source code)
he should be some sandurr's bitch. Ignore him vormav. :)
06-02-11
ChUs
Re: PT writeField Function (adding field easy way with source code)
//Operations
void SetFileName( char * pszStageFileName, char * pszMiniMapFileName );
void SetLevelRequirement( int iLevel );
void SetType( EMapType iType );
void SetSky( ESkyID iDay, ESkyID iDawn, ESkyID iNight );
void SetBackgroundMusicID( EBackgroundMusicID iID );
void AddTeleport1( int iX, int iY, int iZ, int iWidth, int iHeight, BaseMap * pcBaseMap, int iDestinationX, int iDestinationY, int iDestinationZ, int iLevelRequirement, int iTeleportType = TELEPORTTYPE_DIRECT );
void AddTeleport2( int iX, int iY, int iZ, int iWidth, int iHeight, BaseMap * pcBaseMap, int iDestinationX1, int iDestinationY1, int iDestinationZ1, int iDestinationX2, int iDestinationY2, int iDestinationZ2, int iLevelRequirement, int iTeleportType = TELEPORTTYPE_DIRECT );
void AddTeleport( int iX, int iY, int iZ, int iWidth, int iHeight );
void AddDestination( BaseMap * pcBaseMap, int iX, int iY, int iZ );
void SetCenter( int iX, int iY );
void AddSpawn( int iX, int iY );
void AddStaticModel( char * pszModelFilePath, BOOL bHidden = FALSE ); //bHidden Not Sure
void AddSound( int iX, int iY, int iZ, int iRadius, int iSoundID );
void AddBorder( BaseMap * pcBorderMap, int iX, int iY, int iZ = 0 );
}; //Size Game = 0x147C, Server = 0x0EA8
void BaseMap::AddTeleport1( int iX, int iY, int iZ, int iWidth, int iHeight, BaseMap * pcBaseMap, int iDestinationX, int iDestinationY, int iDestinationZ, int iLevelRequirement, int iTeleportType )
{
AddTeleport( iX, iY, iZ, iWidth, iHeight );
AddDestination( pcBaseMap, iDestinationX, iDestinationY, iDestinationZ );
void BaseMap::AddTeleport2( int iX, int iY, int iZ, int iWidth, int iHeight, BaseMap * pcBaseMap, int iDestinationX1, int iDestinationY1, int iDestinationZ1, int iDestinationX2, int iDestinationY2, int iDestinationZ2, int iLevelRequirement, int iTeleportType )
{
AddTeleport( iX, iY, iZ, iWidth, iHeight );
AddDestination( pcBaseMap, iDestinationX1, iDestinationY1, iDestinationZ1 );
AddDestination( pcBaseMap, iDestinationX2, iDestinationY2, iDestinationZ2 );
NAKED void BaseMap::AddSound( int iX, int iY, int iZ, int iRadius, int iSoundID )
{
JUMP( pfnAddSound );
}
NAKED void BaseMap::AddBorder( BaseMap * pcBorderMap, int iX, int iY, int iZ )
{
JUMP( pfnAddBorder );
}
:ott1:
06-02-11
SheenBR
Re: PT writeField Function (adding field easy way with source code)
well, even for me that understands shit of C++, this piece of code seems pointless.
and, who are you? oO
07-02-11
bobsobol
Re: PT writeField Function (adding field easy way with source code)
Quote:
Originally Posted by Vormav
@ChUs
Thats what I call trolling... you released some part of code which is useless alone and you never gonna release full code.
I guess realmpt is something like rpt, dll you are talking about is probably for devs of that PT only.
RealmPT is what most people know as rPT these days. It is largely the same team as the *old* rPT. (Renaissance) They have their own (somewhat more private) dev community in their own forums.
Basically coders give partial code on the forum, and Sandurr and co. take what they like and put it in rPT. Their premise is more along the lines that people post incomplete solutions and rPT will pay them for the rest. It's a developers market place rather than a communist sharing ground. The existence of "developer" forums like that confuse people when they come to RZ.
We don't want you to show us your incomplete work and sell us the rest. We give complete solutions for free, and if you don't want to give yours, we really don't want to know about them. :ott1:
Quote:
Originally Posted by Vormav
@bobsobol
I like to debug C code on assembly level and thats something that need to be done when code share info with .exe.
It shouldn't be necessary, but I do the same with my FB code. (GDB and Olly make awesome combo don't they.) XD
Also, to Sheen and ChUs:-
When Vormav says C, he means C and C++, but not C#.
Spoiler:
The two languages are compatible. You can add ++ extensions in source alone to a C compiler (it doesn't work as well as a native C++ compiler, but can be done) you can write pure C in a C++ compiler without using any C++ extensions. (that works fine) What's difficult, is writing ANSI, ISO and Microsoft compatible C / C++. Because they use the same terms with different syntax. :(: (and Borland do too, but it's not as uncommon to turn the ANSI or ISO switch on on a BCB project)
07-02-11
ChUs
Re: PT writeField Function (adding field easy way with source code)
Sandurr writes 99,99999% of the rPT game code himself. There is no dev team in rPT, there's only sandurr. they don't buy code stuff from ragezone people, lol..
And now he lets me put some useful code stuff here and you all get so rude it's weird
07-02-11
SheenBR
Re: PT writeField Function (adding field easy way with source code)
you call func prototypes useful? Do we live in the same world? I guess not.
And as bob said, if you arent going to release full code or something, just stop posting here and go flatter sandurr. :)
07-02-11
bobsobol
Re: PT writeField Function (adding field easy way with source code)
Quote:
Originally Posted by ChUs
they don't buy code stuff from ragezone people, lol..
They don't buy RZ devs stuff, because we don't sell it. We give it away free.
I can assure you rPT does use stuff that is developed in forums like RZ and MIB. But, being rPT / uPT they do it their own way. And that's fine, we don't say "You must not adapt this, it's MINE!!!!" and that's a lot of why we are different.
I have defiantly seen people posting incomplete code and artwork on the rPT forums... I have assumed that they are hoping Sandurr will buy their work. Maybe I'm wrong and they just like to sit in there and brag. IDK. What they definitely don't do is actually share unconditionally, the way Vormav has. :wink:
Quote:
Originally Posted by ChUs
And now he lets me put some useful code stuff here and you all get so rude it's weird
Ahh... I see. This is his way of saying BTDT, catch up guys. That's okay then. But he has his own account. IDK why he didn't just say that. :lol:
07-02-11
Vormav
Re: PT writeField Function (adding field easy way with source code)
Quote:
Originally Posted by ChUs
Sandurr writes 99,99999% of the rPT game code himself. There is no dev team in rPT, there's only sandurr. they don't buy code stuff from ragezone people, lol..
And now he lets me put some useful code stuff here and you all get so rude it's weird
I can believe he is writing for himself only, when I write code for someone (like this code here) I add as many possible comments so others will be able to understand and develop new fields using it. This sandurr "part of code" is just pale... and because I don't see whole I can't tell if its better than thing I wrote (my goal is to make it 100% PT compatible).
You trying to say that when I created this code you decided to put "part" of code "that do similar thing" to be useful... Now you're either being sarcastic or extremely stupid.
My wild guess is that you where trying to sell that code and now you are playing stupid, as bobsobol said:
Quote:
We give complete solutions for free, and if you don't want to give yours, we really don't want to know about them.
I don't think anyone will bother with code you posted if its not "whole". Who will rewrite 43 fields when we already have "our" version?
I am going to rewrite my 1st post, I added:
teleportLVL, fieldLVL and enums for Sounds, Music and FieldTypes ofc >=P
I changed teleportToField function to teleportTO (its shorter now ;)).
Because I wrote it very quick I am not happy with it.
I will make tutorial part bigger (covering all) and move it to tutorials sub forum.
Whats worry me is that LVLs of files and object like teleport "space" are client sided, also untested (need to document that too) skillsBlock is client sided too :/
I think when I finish server version I will edit it a bit and inject it to official ePT server too see if it work same.
PS. @SheenBR I don't think its time to rewrite it to any of you fav languages yet, I might get crazy and butcher code ;)
07-02-11
bobsobol
Re: PT writeField Function (adding field easy way with source code)
lol. I think Sheen is interested to know if he really has to go down the road of learning that crappy old C / C++ thing that nobody uses any more.
*sniff* *sniff* Is that coffee :blink:
Spoiler:
Pascal is older that C++. C# tries to follow C++ syntax, as do most modern versions of Pascal, Basic and Fortran. Why? Because every programmer needs to understand C syntax to understand API specs for just about any current OS.
There are very few that aren't written primarily in C(++). Yes, most Mac OS APIs are documented in Objective C, most Win32 APIs are documented in C++ and Linux ones are typically traditional C... the commonality of all of these is C. You don't get C++ or Objective C without C underneath. Sadly, the same does not remain true for C#.
Interestingly, many modern Basic, Fortran and Pascal compilers either start life, or move on to compiling to C as a preprocessor, and then compiling that to machine code to link with the OS.
News flash. What do you think the .Net framework which JIT compiles MSIL (the dotNet Intermediate Language) is written in? Oh look! It's C++. -.-
Now... I love machine code. I love the simplicity of the instructions and the strict Operator [Operand[[,Operand],Operand]]]] syntax, and the fact that if you can't do it in Assembler, then it is physically impossible for the machine to do it. There are no limits, nothing is "out of scope", nothing is beyond your reach. (with the possible exception of the Kernel and "privileged" instructions... so write your own OS:ott1:) But if you need something higher, you need to learn C. You can learn C++, but if you learn it as C++ you learn C as you go. If you learn C, as I did, the ++ extensions can be a pain in the backside, but you do need to learn C.
We where asked if learning Java would help develop PT... you can use Java. Anything I have released that I wrote in AutoIt could just as easily have been written in Java, or Perl, or Python, or C#, or VB.net... but if you want to hit the EXEs... you need to know your C. It helps to know Assembler, but that doesn't get you very far unless you know how a C compiler produces it. If you only know C... the assembler will come.
@Vormav: I must admit, I switched to using Eclipse or Notepad ++ with MinGW GCC... so I've not had a chance to look through the code yet. (need to put Bloodshed back on the dev VM)
Question about Map sounds. I can see "Music", and wonder if we can add new .BGM files to go with new maps. But also, I always turn the music off, in all games... each field has a different background sound as well as music. (you can't really hear it with the music going)
Is that supported?
Also. The plans to guide it fully in the Tutorials section, and give a rough outline here. (basic APIs etc) sounds like a good one.
Tip: Reserve some posts at the top of your guide to break chapters down. Easiest way is to put so many emoticons (smilies) into the last post that the next one is forced to be new, and not get merged. You can strip the emos out after the posts are reserved. Write it up in WordPad or something first, so you have an idea of how many sections you'd like.
(no rude comments about "stripping emos" please)
07-02-11
SheenBR
Re: writeField Function (adding and editing PT fields)
bobsobol,vormav I want some tips to learn C or C++.
Which compilator to use?
Which guides to follow?
PS: I'm a full noob in C++, except for a few printf() and cou << stuff xD
07-02-11
Vormav
Re: PT writeField Function (adding field easy way with source code)
Quote:
Originally Posted by bobsobol
lol. I think Sheen is interested to know if he really has to go down the road of learning that crappy old C / C++ thing that nobody uses any more.
Some people may say why to learn ASM? ;)
Quote:
Originally Posted by bobsobol
@Vormav: I must admit, I switched to using Eclipse or Notepad ++ with MinGW GCC... so I've not had a chance to look through the code yet. (need to put Bloodshed back on the dev VM)
Question about Map sounds. I can see "Music", and wonder if we can add new .BGM files to go with new maps. But also, I always turn the music off, in all games... each field has a different background sound as well as music. (you can't really hear it with the music going)
Is that supported?
In my version of kPT there is space for offset for 2 sounds and 1 bmg.
You would need to move whole table to other place to add more.
and offset should lead to:
wav\bgm\your_new_music.bgm
and same thing with sounds.
I can move it to source code but that will lead to adding another offset and make harder and harder for peoples that know a lot about 3D but nearly nothing about C.
BTW do you have wav\bgm\wind loop.bgm? I don't have it in my PT and its my bgm number 3 :/
Quote:
Originally Posted by bobsobol
Also. The plans to guide it fully in the Tutorials section, and give a rough outline here. (basic APIs etc) sounds like a good one.
Thats because it will be hard on 3D and low on C >=P
Quote:
Originally Posted by bobsobol
Tip: Reserve some posts at the top of your guide to break chapters down. Easiest way is to put so many emoticons (smilies) into the last post that the next one is forced to be new, and not get merged. You can strip the emos out after the posts are reserved. Write it up in WordPad or something first, so you have an idea of how many sections you'd like.
(no rude comments about "stripping emos" please)
LOL
In code I usually do
Code:
//----- (new field) ------------------------------------------------------------
and similar separators.
But writing in wordpad or emacs is good idea. The reason it was so chaotic was because I had no time to release it before and I did not wanted to deley it any longer. :sleep:
Quote:
Originally Posted by SheenBR
bobsobol,vormav I want some tips to learn C or C++.
Which compilator to use?
Which guides to follow?
PS: I'm a full noob in C++, except for a few printf() and cou << stuff xD
Write field function I wrote is even simpler than using cout >=P
There secret is in KISS.
I think any tutorial will do like C++ Language Tutorial
Personally I know more about 3D than programing LOL.
08-02-11
SheenBR
Re: writeField Function (adding and editing PT fields)
WEEEEE, I think I've made my own InitializeFont in C++ xDD
Just make clear something to me.
Again, 2 enumerations in the same enum block can't have the same name... even if they relate to the same thing.
--- EDIT2 ---
I have successfully built under MSVC 6 - 10, and even using NMake (Microsoft C++ v6).
Spoiler:
NMake and Microsoft C++ (the engine behind Visual C++) comes on the Windows SDK install CDs. (usually) Allowing you to build C++ without the IDE, in a more traditional manner. The configure.cmd file just creates a "make.cmd" with appropriate build target, so just like any GNU ./configure make.
You can get Projects, Solutions and NMake file with configure.cmd >here< and simply add them to the fieldWrite folder. Use only the folder which relates to your version of the compiler.
Ignore the many warnings that Vormav hasn't included function prototypes for each of his functions (yet). I tried making some in a header, but the warnings then became errors... there are some type mis-matches that need to be ironed out.