PDA

View Full Version : Jazz 2 Source


Matrix
Dec 28, 2001, 11:05 PM
Hi,

Earlier today i contacted Bill of Logicware (the mac creators of jazz) and requested the source. If i do get it (i havnt got a reply yet) i will try to mke new jazz level editor (i you want it) fix some bugs in the mac version and create some other useful utilities (eg. for creating cines, .j2a files :D )

NOW PLEASE DO NOT CONTACT BILL as most of you should aggree that if we want this done we should not harass him :)

Note: I will not release the source to any member of this board or anyone else in that matter. I will only release programs to do with jazz 2

I hope to here form him soon,
Matrix

:D :D :D :D :D :D

$tilettø
Dec 29, 2001, 02:23 AM
um i dont think He has the source but i dunno

and i dont care

Kaz
Dec 29, 2001, 04:13 PM
Lol, if you ever actually do get the source contributite to the 1.25 forum =P

Txl Kill
Dec 29, 2001, 04:50 PM
I think if anyone gets the source (highly doubted) They should give it to the J2HG! Most of us are programmers anyways me and link know C++ we could fix it up!

Derby: Content edit.

Krezack
Dec 30, 2001, 08:52 PM
Kill it's simply not that easy.

Kaz
Jan 2, 2002, 11:28 PM
ACtually it is...

Txl Kill
Jan 3, 2002, 12:28 PM
lol yes

Krezack
Jan 6, 2002, 07:59 PM
What you get the source code in c++ then you just fix it up stright away? Sure i'd like to se you try. It'd take like a month or more of working the codeing out and stuff lol

Monolith
Jan 7, 2002, 06:33 PM
/me thinks some people haven't been coding c++ nearly long enough

If you just got the mac source code, you'd have to re-write a lot of code that's os specific. And if DirectX doesn't work exactly the same on a mac as it does on windows, then that would also be a huge amount of work.

Link
Jan 8, 2002, 04:06 PM
Txl Kill, I think it should be given to the 1.25 forum, not J2HG. There are many more experienced programmers in the 1.25 forum, and it would be moderated better, and there are already lots of ideas. Nobody in J2HG really knows C++ that well.

I know anything about macs...they are just some foreign horrible computer to me. Do they even have C++ for macs?

Monolith
Jan 9, 2002, 05:47 PM
I believe C++ is the same for any platform. It's just when you get into the APIs things really change.

(unrelated)

JZBlue
Jan 10, 2002, 12:03 PM
People really
need to get more into ASM, not bother with the windows API, and write their own
API prototypes into the program.

No music or HTML will be turned off. -Diz

Krezack
Jan 11, 2002, 02:05 AM
shuddup about ASM and actually try coding in asm.....youll soon see just how hard it is...noe delphi thats different delphi is.....bah just use delphi :P

Lama
Jan 14, 2002, 06:42 AM
Originally posted by Txl Kill
I think if anyone gets the source (highly doubted) They should give it to the J2HG! Most of us are programmers anyways me and link know C++ we could fix it up!



Link said <b>nobody</b> (I think this includes you) in J2HG knows C++ very well, also, even if you did, I highly doubt you can easily fix it. Why? This is because you cannot just search for a particular piece of code and then edit it in this case. Again, why? The guys that worked on it were professionals and thus it was made according to their standards. So, what if it was made according to their standards? This means they don't have to make it newbie-programmer-with-mediocre-knowledge-of-C++ friendly and I seriously doubt if they went out of their way to do that.

Krezack said that it would probably take you a month to work it out, I say it would take longer, much longer because it wasn't made by just one person and also, the ones who made it were professionals with extensive experience and knowledge on programming.

Example:

Excel knows C++ but he doesn't know it very well. I give Excel a C++ source file (source code) that's around 2000+ lines long (The JJ2 source code is a <b>lot</b> longer than this, mind you) without any comments and with cryptic variable and function names. What do you think will happen? I'm guessing that Ack won't understand one-fourth of what is written there because, number one, he doesn't know most of what I'm talking about, number two, even experienced programmers will have a hard time understanding something very cryptic that they did not make themselves.

Lama
Jan 14, 2002, 07:04 AM
Originally posted by Krezack
shuddup about ASM and actually try coding in asm.....youll soon see just how hard it is...noe delphi thats different delphi is.....bah just use delphi :P

Yes, you should actually try coding in assembly to find out how hard it is. With high-level languages like C, you don't have to bother with a lot of stuff and you get to concentrate more on the logic because a lot of the commands have been pre-written, e.g. you can just type printf("Hello, world!") and the string will appear on the screen once you execute the program. In assembly, you have to do mostly everything from scratch because it just gives you the bare essentials. Even example programs are not easy to understand, take this one (a program you can make using debug) for example

debug hello.com
a
Move AX, 900
Move DX, 10a
Int 21
Int 20
db "Hello, world!$"

rcx
18
w
q

is not as easy to make as it looks. Besides learning the syntax of the commands and what they do. You will need to perform a lot of calculations. The size of CX (command: rcx 18) was determined by subtracting the end address from the start address. Also, you don't get the data address 10a out of thin air, again, you note the sizes of the interrupts in between the commands and the address and you do some hexadecimal calculations to find out where you can insert that string.

I'd love to bore you to death some more but I have to wake-up early tomorrow.

Lama
Jan 15, 2002, 01:56 AM
A clearer example:

C++ code for "Hello, World!"

<font size=2><blockquote>
#include &lt;iostream.h&gt

#include <iostream>

int main()
{
std::cout << "Hello, world!\n";
}
</blockquote></font>

x86 Assembly code for "Hello, World!"

<font size=2><blockquote>
title Hello World Program (hello.asm)
; This program displays "Hello, World!"

dosseg
.model small
.stack 100h

.data
hello_message db 'Hello, World!',0dh,0ah,'$'

.code
main proc
mov ax,@data
mov ds,ax

mov ah,9
mov dx,offset hello_message
int 21h

mov ax,4C00h
int 21h
main endp
end main
</blockquote></font>

Note that I indicated x86 assembly because assembly, unlike C++, is not portable. C++ code can run on Macintosh computers as well as IBM PCs, therefore it is portable, x86 assembly code, in contrast, normally won't run on Mac PPCs because they use a different instruction set. If you wish, you can go to the Hello, World! (http://www.latech.edu/~acm/HelloWorld.shtml) page (where I got the source codes) and see for yourself the differences of assembly language, from system to system, where as, although there are dialects of C++, the example will run on any system.

Krezack
Jan 18, 2002, 05:47 AM
Uh....what lama said....

JZBlue
Jan 31, 2002, 11:22 AM
now suddenly comming back to this I feel slightly suprised
You are teaching me how to code in ASM?!

Why don't you try writing an OS in C? Have you compared a C porgrams size and speed to the same program written in ASM? Size doesn't matter that much anymore though it generally is a little smaller, and speed.. Lol! You can't even compare the speed, asm is hecka faster than anything already out there.

So it's not portable, that's about the only disadvantage along with annoying coding

btw, if anyone wants the source code of JJ2 in assembly, they can IM me on AIM @ SN: Kesshutsu


Here's a better example of the hellow world program in Win32 ASM this time



.386 ; 32-Bit when .386 appears before .MODEL
.MODEL FLAT , STDCALL

include windows.inc
include user32.inc
include kernel32.inc
include gdi32.inc
includelib user32.lib
includelib kernel32.lib
includelib gdi32.lib

.data
ClassName db "SimpleWinClass",0
AppName db "Hello!",0
TestString db "Hello World",0

.data?
hInstance HINSTANCE ?
CommandLine LPSTR ?
hwnd HWND ?

.code

WinMain proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdLine:LPSTR, CmdShow:SDWORD
LOCAL wc:WNDCLASSEX
LOCAL msg:MSG

mov wc.cbSize,SIZEOF WNDCLASSEX
mov wc.style, CS_HREDRAW or CS_VREDRAW
mov wc.lpfnWndProc, OFFSET WndProc
mov wc.cbClsExtra,NULL
mov wc.cbWndExtra,NULL
push hInstance
pop wc.hInstance
mov wc.hbrBackground,COLOR_WINDOW+1
mov wc.lpszMenuName,NULL
mov wc.lpszClassName,OFFSET ClassName
invoke LoadIcon,NULL,IDI_APPLICATION

mov wc.hIcon,eax
mov wc.hIconSm,0
invoke LoadCursor,NULL,IDC_ARROW

mov wc.hCursor,eax
invoke RegisterClassEx, addr wc

INVOKE CreateWindowEx,NULL,ADDR ClassName,ADDR AppName,\
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,CW_USEDEFAULT, ;postion
300,100, ;size
NULL,NULL,\
hInst,NULL
mov hwnd,eax


INVOKE ShowWindow, hwnd,SW_SHOWNORMAL
INVOKE UpdateWindow, hwnd

.WHILE TRUE
INVOKE GetMessage, ADDR msg,NULL,0,0
.BREAK .IF (!eax)
INVOKE TranslateMessage, ADDR msg
INVOKE DispatchMessage, ADDR msg
.ENDW
mov eax,msg.wParam
ret
WinMain endp
WndProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
LOCAL hdc:HDC
LOCAL ps:PAINTSTRUCT

mov eax,uMsg
.IF eax==WM_DESTROY
invoke PostQuitMessage,NULL
.ELSEIF eax==WM_PAINT
invoke BeginPaint,hWnd, ADDR ps
mov hdc,eax

invoke TextOut,hdc,0,0,ADDR TestString,(SIZEOF TestString) -1

invoke EndPaint,hWnd, ADDR ps

.ELSE
invoke DefWindowProc,hWnd,uMsg,wParam,lParam
ret
.ENDIF
xor eax,eax
ret
WndProc endp

start:

invoke GetModuleHandle, NULL
mov hInstance,eax
invoke GetCommandLine
invoke WinMain, hInstance,NULL,CommandLine, SW_SHOWDEFAULT
invoke ExitProcess,eax

end start

Krezack
Feb 1, 2002, 01:44 AM
Trust me, don't get lamer started, he knows his stuff.

JZBlue
Feb 6, 2002, 04:40 PM
k, Krez.. but I don't think I shoulda been treated like I didn't know anything about ASM ¬¬
Sorry Lama

btw, source code above was written for MASM, not turbo assembler incase anyone trys to assemble it, I don't think the 'invoke' command will work for it o.O but anyway who cares.. ..lalala oh yeah, thats the end of the message ~_^

Krezack
Feb 6, 2002, 08:07 PM
I think lamer said that because he thought you just say to use ASM and don't know much about it at all......like i do with Delphi....but Delphi is all i say it is! :p