Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
31 | halyavin | 1 | AClock 1.1 |
2 | Copyright (c) 2002,2003 Thomas Mathys |
||
3 | killer@vantage.ch |
||
4 | |||
5 | |||
6 | what the hell is this ? |
||
7 | ----------------------- |
||
8 | |||
9 | this is aclock, a silly analog clock application |
||
10 | for menuetos (http://www.menuetos.org). |
||
11 | |||
12 | |||
13 | why do i need it ? |
||
14 | ------------------ |
||
15 | |||
16 | well, this is certainly one of the last programs on |
||
17 | earth you'd ever need. anyway, it demonstrates how |
||
18 | how to do certain things: |
||
19 | |||
20 | - writing menuet apps that parse the command line. |
||
21 | includes a strtok-like function that you might |
||
22 | want to use in own projects. or maybe rather not. |
||
23 | - writing menuet apps that are aware of the current |
||
24 | window size and that have no problems with different |
||
25 | skin heights. |
||
26 | - how to write menuet apps with nasm instead of fasm |
||
27 | (there should be a gas version aswell, don't you think ?) |
||
28 | and how to write kick-ass code with nasm in general =) |
||
29 | |||
30 | |||
31 | compiling instructions |
||
32 | ---------------------- |
||
33 | |||
34 | yes, it's still written for nasm. |
||
35 | i really can't be bothered to work with fasm. |
||
36 | |||
37 | oh yes, you wanted to know how to compile aclock: |
||
38 | |||
39 | nasm -t -f bin -o aclock aclock.asm |
||
40 | |||
41 | if you get error messages like |
||
42 | |||
43 | nasm: unrecognised option `-t |
||
44 | type `nasm -h' for help |
||
45 | |||
46 | then you've got an old version of nasm. |
||
47 | get a newer version (0.98.36 or later) from |
||
48 | http://nasm.sourceforge.net |
||
49 | |||
50 | |||
51 | configuration |
||
52 | ------------- |
||
53 | |||
54 | you might want to change some of the constants defined |
||
55 | somewhere at the top of aclock.asm. the following might |
||
56 | be useful: |
||
57 | |||
58 | - DEFAULT_XPOS |
||
59 | - DEFAULT_YPOS |
||
60 | - DEFAULT_WIDTH |
||
61 | - DEFAULT_HEIGHT |
||
62 | - MIN_WIDTH |
||
63 | - MIN_HEIGHT |
||
64 | |||
65 | for more info about DEFAULT_XPOS/DEFAULT_YPOS see next |
||
66 | section. |
||
67 | |||
68 | |||
69 | usage |
||
70 | ----- |
||
71 | |||
72 | this version of AClock introduces command line parameters. |
||
73 | here's an example command line: |
||
74 | |||
75 | aclock w128 h128 x20 y-20 |
||
76 | |||
77 | this creates a window that is 128 pixels wide and 128 pixels |
||
78 | high (that's for the work area, without border/title bar). |
||
79 | the window is placed at x=20, y=screen resolution-20 |
||
80 | (because of the minus sign after the y). |
||
81 | |||
82 | all parameters are optional and may appear in any order. |
||
83 | you can't have any whitespaces in a parameter, e.g. |
||
84 | "w 128" is an invalid parameter (which will simply be ignored). |
||
85 | the command line parser is case sensitive. |